CN110457013A - Program assembly configuration device and method - Google Patents

Program assembly configuration device and method Download PDF

Info

Publication number
CN110457013A
CN110457013A CN201910631088.XA CN201910631088A CN110457013A CN 110457013 A CN110457013 A CN 110457013A CN 201910631088 A CN201910631088 A CN 201910631088A CN 110457013 A CN110457013 A CN 110457013A
Authority
CN
China
Prior art keywords
model class
class
original data
processor
data model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910631088.XA
Other languages
Chinese (zh)
Other versions
CN110457013B (en
Inventor
杨贾冰
陈双
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced Nova Technology Singapore Holdings Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910631088.XA priority Critical patent/CN110457013B/en
Publication of CN110457013A publication Critical patent/CN110457013A/en
Application granted granted Critical
Publication of CN110457013B publication Critical patent/CN110457013B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented

Abstract

A kind of apparatus and method of configurator component of the embodiment of the present invention, the device includes: annotation processor, database framework type for being used based on application program will be converted to the new annotation model class with the database framework type matching using the unified original data model class for explaining mark;Database manipulation interface, for receiving the call request to described program component from the application program;And the corresponding new annotation model class of the database framework type used with the application program is sent to the database framework of the application program use in response to the call request by reflection processor.

Description

Program assembly configuration device and method
Technical field
The present invention relates to software technologies, in particular to are suitable for the consolidator component programming of disparate databases frame.
Background technique
Software modularity design makes it possible software function scalability.Generally for a certain specific function of realization Can, developer can design special functional unit, required function is packaged into Software Development Kit (SDK) component, It is supplied to application APP, these functional units are for example embedded into application program in the form of plug-in unit as needed, and APP is only Need the interface for calling SDK to provide that packaged function can be realized, to reach the function of abundant application program.
In APP Components Development, SDK component is frequently necessary to carry out database purchase operation, such as message case module needs Will be in the content that message is locally stored, and the database framework that database purchase just must call APP itself to access is realized.Cause This needs to be the corresponding SDK component of APP exploitation for meeting disparate databases frame.Such as storing service management, wherein disappearing Ceasing details includes title title and content content.If APP carries out database purchase using sqlite database framework, Definition Model class is needed in message case module:
Later, sqlite database framework interface is called to realize the storage of specific Message data.
For realizing the function of same storage service management, if APP carries out data inventory using ormLite frame Storage, then need other Definition Model class:
Later, ormLite database framework interface is called to realize the storage of Message data in the model class.
It can be seen that the APP for supporting disparate databases framework type, even the SDK component of exploitation identical function, It is also required to work out different programs respectively, for example, there is no mark solutions under sqlite database framework, and in ormLite frame It is lower to usually require definition note, i.e., the grammer guided in above procedure with@in programming.
Summary of the invention
In order to avoid the database framework supported by APP it is different due to develop with identical function but different programs SDK component, for the angle of component design, it is desirable to provide unified programming code can be configured to APP under disparate databases frame Use, rather than according to different APP using the case where database framework come configuration data class and call database purchase code Logic.
For this purpose, the present invention proposes a kind of customized note using unification, it will be certainly in the compilation phase by annotation processor The scheme for being converted to the note suitable for each disparate databases frame is explained in definition, is turned again by reflective operation in the program runtime Annotation model class is changed, to realize the purpose that may operate under different application APP using same set of code.
According to one aspect of the present invention, a kind of device for configurator component is provided, wherein described program component Comprising using the unified original data model class for explaining mark, which includes: annotation processor, for being adopted based on application program The original data model class is converted to the new note with the database framework type matching by database framework type Model class;Database manipulation interface, for receiving the call request to described program component from the application program;And Processor is reflected, is used in response to the call request, the database framework type used with the application program is corresponding New annotation model class sends the database framework that the application program uses to.In a preferred embodiment, 2, the program groups The configuration device of part further comprises: determination type module, for determining that the application program for loading described program component is adopted Database framework type;Wherein, if original data model class in described program component and the database framework class Type mismatches, then the annotation processor is converted to the original data model class and the database framework type matching New annotation model class.
According to one aspect of the present invention, a kind of method of configurator component is provided, wherein described program component includes Utilize the unified original data model class for explaining mark, comprising:, will be described based on the database framework type that application program uses Original data model class is converted to the new annotation model class with the database framework type matching;It receives and applies journey from described The call request to described program component of sequence;In response to the call request, the database that will be used with the application program The corresponding new annotation model class of framework type sends the database framework that the application program uses to.
According to one aspect of the present invention, a kind of intelligent terminal is provided, comprising: memory, for storing application program;Place Manage device, for executing the application program, wherein application programming be include plug-in unit, which includes: that database manipulation connects Mouthful, for receiving the call request to the plug-in unit from the application program;And reflection processor, in response to institute Call request is stated, the corresponding new annotation model class of database framework type that will be used in the plug-in unit, with the application program The database framework that the application program uses is sent to, wherein the new annotation model class is based on using by the plug-in unit The unified original data model class for explaining mark generate, to realize the function of the plug-in unit.
According to one aspect of the present invention, a kind of machine readable media is provided, program code is stored thereon with, wherein the journey Sequence code makes the machine execute method of the invention when being executed by machine.
Detailed description of the invention
Fig. 1 shows the schematic block diagram of the program assembly according to one embodiment;
Data model class converts schematic block diagram when Fig. 2A shows the compiling according to one embodiment;
Fig. 2 B, which is shown, calls schematic block diagram according to the program runtime data model class of one embodiment;
Fig. 3, which is shown, calls schematic block diagram according to the program runtime data model class of another embodiment;
Fig. 4 is shown to be illustrated according to the APP, component, annotation processor of one embodiment and the mutual operation of reflection processor Figure;
Fig. 5 shows the flow chart executed according to the program assembly of one embodiment;
Fig. 6 shows terminal schematic diagram according to an embodiment of the invention.
Specific embodiment
It to apparatus and method provided in an embodiment of the present invention and is described in detail with reference to the accompanying drawing.Although being shown in attached drawing The preferred embodiment of the disclosure is shown, however, it is to be appreciated that may be realized in various forms the disclosure without that should be explained here The embodiment stated is limited.On the contrary, these embodiments are provided so that this disclosure will be more thorough and complete, and can The scope of the present disclosure is fully disclosed to those skilled in the art.Structure of the invention is illustrated so that Java is programmed as an example below Think of and embodiment.
Java language is used widely at present, particularly starts to support that source code is added in 5.0 version of Java language Special grammar metadata.Class, method, variable, parameter and packet in Java language etc. can be marked, and be supported customized Java mark.Different with Javadoc, Java mark can obtain marked content by reflection.In the compilation process of Java source code In, note can be annotated processor and handle and generate the message comprising information or additional Java sound code file or resource, together The Java sound code file of Shi Xinzeng may also can be compiled and handle and modify the code itself being annotated.In addition, Java language Java reflection mechanism is provided, for observing and modifying the behavior of program at runtime.In Java, reflection allows in compiling duration Between do not know the title of pipeline joint, check class, interface, word at runtime in the case where field (fields, i.e. member variable), method Section and method.It also allows to carry out to instantiate the calling of new object and distinct methods according to judging result.One of the invention or Multiple embodiments explain with reflection mechanism the unified programming realized suitable for multiple database frame using the note of Java.
Fig. 1 shows program assembly 100 according to an embodiment of the invention, and program assembly 100 can be one solely here Vertical SDK component or plug-in unit can be embedded in application APP, to call the function of SDK component preprogrammed, such as logarithm According to library access operation.One or more embodiment according to the invention, configuration device 102 is integrated in program assembly 100, when uncommon When program assembly 100 is integrated into application APP by prestige, configuration device 102 can be according to the characteristic of application APP, to journey The program and operating mechanism of sequence component 100 carry out suitability configuration.Here application APP can be it is known can be in intelligence Any application run in energy terminal, and intelligent terminal may be the calculating dress including such as computer, mobile phone, plate etc. It sets.
As shown in Figure 1, program assembly 100 includes program 101 and configuration device 102.It is stored in program 101 and utilizes system One explains the original data model class Original_Class of mark, for realizing scheduled function.Here unified explain can To be customized note, such as customized Java mark.It shows as follows and utilizes the customized initial data mould for explaining mark An example of type class Original_Class:
In this embodiment, IAPDatabaseTable is explained using unified, IAPDatabaseField is labelled with database mould Type class Message class, defines the operating parameters such as method, attribute in model class.
Configuration device 102 includes determination type module 104, annotation processor 106, database manipulation interface 108 and anti- Penetrate processor 110.When SDK component 100 to be integrated into application APP and be compiled, determination type module 104 is determined Load database framework type DB_Frame used by the application APP of the SDK component 100.Here database framework Type can be general any type on APP known in the art, such as SQlite, ormLite, greenDAO etc.. As an example, determination type module 104 can further judge the original data model class Original_ in SDK component Whether Class matches with identified database framework type DB_Frame, and matching here refers to whether database framework props up Hold original data model class and its unified note.Such as when database framework DB_Frame supports the unified note or when number When not needing to explain at runtime according to library frame DB_Frame, then it is assumed that original data model class and database framework type DB_ Frame matching.
If original data model class Original_Class and database framework type DB_Frame in program 101 are not Matching, annotation processor 106 are based on original data model class Original_Class and generate and database framework type DB_ The matched new annotation model class New_class of Frame, and by new annotation model class New_class storage into program 101, this In original data model class and new annotation model class realize the same predetermined function of SDK component.An example according to the invention, When generating new annotation model class New_class, annotation processor 106 scans original data model class Original_Class's It is unified to explain, which is explained and is converted to the specific note for meeting database framework type DB_Frame, it is new for marking Annotation model class New_class.Meanwhile using an identifier field by new annotation model class, example associated with initial data class Such as, identifier is added in the class name of initial data class.
As an example, Fig. 2A is shown when application APP is using ormLite database framework, by annotation processor The 106 class conversions realized.As shown, in this example, SDK component 100 is a message case module, for storing message, Wherein the message case module has original data model class Message, there is defined the title of message (title) and disappears It ceases content (content), in addition, the message utilizes customized unified note@IAPDatabaseTable ,@ IAPDatabaseField is labeled database involved in class and method attribute.Due to the customized unified note@ IAPDatabaseTable ,@IAPDatabaseField are not the database framework ormLite that current application program APP is used The note supported, therefore during compiling, annotation processor 106 scans in message case module with unified annotation model class Message class explains@IAPDatabaseTable for unified, and@IAPDatabaseField is converted into ormLite respectively and is propped up Note@DatabaseTable, the@DatabaseField held, while creating new annotation model class GenMessage class, the new note Solution model class class name is made of archetype class class name Message prefixing " Gen ".
When application APP operation and it is desirable that call SDK component to realize predetermined function when, database manipulation interface 108 The call request Call_SDK to SDK component from application APP is received, and passes through component database operation interface 108 The database manipulation for the database framework that incoming application APP uses specifically is requested, such as is stored.
It is to be herein pointed out SDK component 100 is to utilize archetype class when executing specific database manipulation What Original_Class was realized, but actual database storage is real by application APP database framework such as (ormLite) It is existing.For this purpose, reflection processor 110 in response to call request Call_SDK, the database framework class that will be used with application APP The class object of the corresponding new annotation model class New_class of type sends the database framework of application APP to.Such as Fig. 2 B institute Show, by taking the application APP using ormLite database framework as an example, reflection processor 110 utilizes database manipulation interface 108 receive the call request Call_SDK of the application APP, and the annotation model class that can determine that current APP is supported is OrmLite data model class.Therefore, reflection processor 110 traverses original data model class, to obtain the class object of model class, The parameter value for each parameter that the class object includes parameter in class and SDK component is generated when executing specific database manipulation. It still by taking message box sub-component above as an example, is handled by reflection, reflection processor 110 is available to original data model class Message header (title) and content (content) in class object (Message.class) and the class object it is specific Acquired parameter occurrence is encapsulated into the individual features in new annotation model class GenMessage by value, reflection processor 110 In parameter title and content.Then, processor 110 is reflected by the class object GenMessage.class of new annotation model class The ormLite database framework in application APP is sent to, to realize database in the storage operation to message.
It is to be herein pointed out be only explained by taking Message message class as an example above, still, original data model Class Original_Class is not limited to a kind of entity class, can also comprising other types of class and greater number of entity class, In operation, reflection processor 110 can traverse each object in all entity class and class, and be transformed into new annotation model class In New_class.
In addition it should be pointed out that determination type module 104 is nor essential in configuration device 102 in this example Component, such as configuration device 102 directly can receive database framework used by the application APP that user specifies from external Type DB_Frame, and the original data model class Original_Class in determining program component 100 and specified in turn Whether database framework type DB_Frame matches.
Fig. 3 shows original data model class Original_Class and database framework type DB_ in SDK component The matched example of Frame, wherein using message case module as the example of SDK component.As shown, APP here is adopted It with SQLite database framework, does not need to explain at runtime, therefore in the compilation phase, annotation processor 106 does not need pair Unified explain does any conversion.In APP operation, original data model class can be directly used by database manipulation interface Each object in Message.
Fig. 4 is shown to be handled with the execution stage in application APP, SDK component, annotation processor and reflection in compiling Operation chart between device, what needs to be explained here is that, purpose for ease of description, SDK component, annotation processor and It is separately positioned for reflecting processor.
As shown in 1.1 in figure, is worked out in advance in the program 101 of SDK component and explained target initial data mould with unified Type class Original_Class.Such as message case module shown in Fig. 2A, wherein with customized unified note IAPDatabaseTable ,@IAPDatabaseField are labelled with the Message class of original data model class.Such as 1.2 institute in figure Show, it, can be by database framework type DB_ that APP is supported when it is desirable that SDK component is integrated into APP in the compilation phase Frame sends annotation processor to.As shown in 1.3 in figure, annotation processor is generated according to database framework type DB_Frame Support the corresponding new annotation model class of database framework DB_Frame.As shown in Figure 2 A, in database framework type DB_ When Frame is ormLite, annotation processor is scanned with the unified model class Message class explained in SDK component, will wherein It is unified explain@IAPDatabaseTable ,@IAPDatabaseField is converted into supporting the new note@of ormLite DatabaseTable ,@DatabaseField, and data model class GenMessage class is created, the new annotation model class class name It is made of model class class name Message prefixing identifier " Gen ".Then 1.4, annotation processor is by the data model of creation Class GenMessage class returns to SDK component, such as is stored in program 101.
When APP operation is for example wished to call SDK component to realize that predetermined function such as message stores, such as 2.1 institute in figure Show, APP issues call request call_SDK to SDK component by database manipulation interface, and SDK component operates original data model Class such as Message class operates to execute message storage, and the title and content of operating result such as message are stored in Message class Title and content attribute in.Meanwhile as shown in 2.2, number of the reflection processor based on the current APP for issuing call request According to library framework type DB_Frame, new annotation model class New_ corresponding with type DB_Frame is searched from program 101 class.For example, as shown in Figure 2 B, when APP support be ormLite database framework when, reflection processor can determine it is corresponding New annotation model class is ormLite.Then, as shown in 2.3, reflection processor obtains the Class object of archetype class for example Message.class, to generate the Class object such as GenMessage.class of new annotation model class.As an example, The process for generating the Class object of new annotation model class by reflection processor is as follows:
(1), it is obtained from the mapping relations of the class object of archetype class and the class object of new annotation model class caching new Class (class) object of annotation model class.If caching is not present, mould is obtained from the class object of archetype class by reflection The class name of type class, addition identifier such as " Gen " form the class name of new annotation model class afterwards, then, by reflection based on original The class object of model class generates the class object of new annotation model class, and by the class object of archetype class and new annotation model class Class object mapping relations deposit mapped cache in.
(2), the member variable name and field (Field) object of archetype class and new annotation model class are obtained from caching Mapping relations, any caching is not present, then the member in archetype class or new annotation model class is obtained by reflection The mapping relations of variable name and field object write-in caching;
(3), new annotation model class members variable name is traversed, to each member variable name, from the member of archetype class Field object is obtained in the mapping relations of variable name and field object caching, and is obtained on archetype class object together by reflection The value of name member variable, and the member variable value of archetype class object is passed through into reflection setting to new annotation model class object On member variable of the same name.
Back to shown in Fig. 4, as shown in 2.4, after being handled by reflection, reflection processor returns to the class of new annotation model class Object GenMessage.class.To be explained under the ormLite database framework of APP based on new as shown in 2.5 and 2.6 The class object GenMessage.class of model class realizes the practical operation to database, and APP can deposit operation such as message The result of storage returns.
Fig. 5 shows the flow chart of configuration SDK component according to an embodiment of the invention, for purposes of illustration only, with shown below In example, by taking message case module as an example, and APP is respectively adopted bis- kinds of database frameworks of ormLite and SQLite and carries out data Library operation.It is packaged in message case module and utilizes the customized unified original data model for explaining mark of Java language Class, for example,
As shown in figure 5, in step 502, when expectation integrates the message box sub-portfolio in APP, in the APP compilation phase, Determine that expectation loads database framework type DB_Frame used by the application APP of message case module, as previously mentioned, It wherein determines that framework type DB_Frame can both be realized by the way that user is specified, can also voluntarily judge to realize.Before subsequent process To step 504, judge whether database framework type DB_Frame matches with original data model class Original_Class. If database framework DB_Frame and original data model class Original_Class that current APP is used are mismatched, such as Current APP then arrives step 506 using ormLite frame before process.
In step 506, explained using the unification of annotation processor scanning original data model class Original_Class, with The unification is explained to the specific note for being converted to the database framework type DB_Frame for meeting current APP, it is described for marking New annotation model class New_class.Meanwhile it is using an identifier field that new annotation model class is associated with initial data class. Example as shown in Figure 2 A, when current APP uses ormLite database framework, annotation processor 106 scans message box subgroup Part explains@IAPDatabaseTable for unified, and@IAPDatabaseField is converted into the note that ormLite is supported respectively @DatabaseTable ,@DatabaseField are solved, while creating new annotation model class GenMessage class, the new annotation model Class class name is made of model class class name Message prefixing " Gen ".In turn, the process of compilation of entire APP is completed.If in step When rapid 504 database frameworks for determining that current APP is used are matched with original data model class Original_Class, such as currently When APP is using SQLite frame, then woth no need to explain conversion process, the process of compilation of entire APP is done directly.
In step 508, in the application APP operation phase, asked by database manipulation interface from the calling of APP It asks, such as message storage operation.In step 510, it is based on call request, the determining database framework with current application program APP The data model class to match.As previously described in example, it if current APP uses SQLite frame, can be directly based upon original Data model class Original_Class carries out data storage operations, as shown in Figure 3;And if current APP uses ormLite frame Frame then advances to step 512.As previously mentioned, conversion has new annotation model class in advance in SDK component in the compilation phase OrmLite data model class, as shown in Figure 2 B, therefore in step 512, using reflection mechanism, in response to call request, will with answer The ormLite in application APP is sent to the new annotation model class of the corresponding ormLite of ormLite frame that program uses Database framework.It for the message case module in this example, is handled by reflection, reflection processor is available to arrive initial data Message header (title) and content (content) in the class object (Message.class) of model class and the class object Occurrence, reflection processor acquired parameter occurrence is encapsulated into the corresponding spy in new annotation model class GenMessage It levies in parameter title and content.Then, in step 514, processor is reflected by the class object of new annotation model class GenMessage.class sends the ormLite database framework in application APP to, to realize database to message Storage operation.
Using the solution of the present invention, can be automatically generated by annotation processor for disparate databases frame (such as SQlite, ormLite) new annotation model class, then actual database operation in using Java reflection mechanism obtain generate It is new to explain class object, thus on the basis of same set of unified note, using original data model class, it is switched to different numbers According to progress actual database operation under the frame of library.
According to the present invention, which can be installed on any terminal, such as computer, mobile phone etc..Fig. 6 example Property shows a kind of intelligent terminal comprising is stored with the memory and processor of application APP, wherein the processor can be held The stored application program of row is with accessing data base.One or more embodiment according to the invention, application APP quilt Be programmed for including plug-in unit to realize scheduled function, wherein the plug-in unit include: database manipulation interface and reflection processor, Then middle database manipulation interface, is asked for receiving the call request to plug-in unit from application program in response to the calling Ask, reflection processor by the plug-in unit, with the corresponding new annotation model class of database framework type of application APP use The database framework that the application program uses is sent to, wherein the new annotation model class is based on using by the plug-in unit The unified original data model class for explaining mark generate, to realize the function of the plug-in unit.In one example, at reflection It manages device and obtains characteristic parameter and its parameter value in original data model class, and acquired parameter value is encapsulated as the new note The parameter value of individual features parameter in model class, wherein the parameter value in the original data model class is described program component It operates the original data model class and generates.It is to be herein pointed out in addition to processor shown in fig. 6, memory and Realize that the intelligent terminal of program assembly execution generally according to its actual functional capability, may be used also except nonvolatile memory, in embodiment To include other hardware, this is repeated no more.
Although it is to be herein pointed out the present invention is described in conjunction with above preferred embodiment, it is apparent that the present invention is unlimited In this.In addition, each module in Fig. 1 may include processor, electronic equipment, hardware device, electronic component, logic circuit, deposit Reservoir, software code, firmware code etc. or their any combination.Technical staff will also be appreciated that in conjunction with public herein Various illustrative logic blocks, module and the method and step for opening content description can be implemented as electronic hardware, computer software Or both combination.It taking software implementation as an example, is to be deposited by processor by non-volatile as the equipment on a logical meaning Corresponding computer program instructions read what operation in memory was formed in reservoir.Another embodiment of the present invention provides it is machine readable Machine readable instructions are stored on medium, which execute computer and be disclosed herein when being computer-executed Any method above-mentioned.Specifically, system or device equipped with machine readable media can be provided, it is machine readable at this It stores the software program code for realizing the function of any embodiment in above-described embodiment on medium, and makes the computer of the system Read and execute the machine readable instructions being stored in the machine readable media.In this case, it is read from machine readable media The function of any one of above-described embodiment embodiment, therefore machine readable code and storage can be achieved in program code taken itself The machine readable media of machine readable code constitutes a part of the invention.
It should be noted that above-mentioned each process is all necessary with step or module not all in the structure chart of device , certain steps or module can be ignored according to the actual needs.Each step execution sequence be not it is fixed, can be according to need It is adjusted.System structure described in the various embodiments described above can be physical structure, be also possible to logical construction, that is, have A little modules may be realized by same physical entity, be realized alternatively, some modules may divide by multiple physical entities, alternatively, can be with It is realized jointly by certain components in multiple autonomous devices.
Detailed displaying and explanation carried out to the present invention above by attached drawing and preferred embodiment, however the present invention is not limited to These embodiments having revealed that, base could be aware that with above-mentioned multiple embodiment those skilled in the art, can combine above-mentioned difference Code audit means in embodiment obtain the more embodiments of the present invention, these embodiments also protection scope of the present invention it It is interior.

Claims (14)

1. a kind of device for configurator component, wherein described program component includes to utilize the unified original number for explaining mark According to model class, which includes:
Annotation processor, the database framework type for being used based on application program are converted the original data model class For the new annotation model class with the database framework type matching;
Database manipulation interface, for receiving the call request to described program component from the application program;And
Processor is reflected, is used in response to the call request, the database framework type pair that will be used with the application program The new annotation model class answered sends the database framework that the application program uses to.
2. device as claimed in claim 1, further comprises:
Determination type module, the database framework type used for determining the application program for loading described program component;
Wherein, described if original data model class and the database framework type in described program component mismatch The original data model class is converted to the new annotation model class with the database framework type matching by annotation processor.
3. such as the device of claims 1 or 2, wherein the annotation processor scans the unified note of the original data model class The unification is explained and is converted to the specific note for meeting the database framework type, for marking the new note mould by solution Type class.
4. device as claimed in claim 3, wherein the reflection processor obtains characteristic parameter and its ginseng in original data model class Numerical value, and acquired parameter value is encapsulated as to the parameter value of the individual features parameter in the new annotation model class, wherein institute Stating the parameter value in original data model class is that described program component operates the original data model class and generates.
5. device as claimed in claim 4, wherein the annotation processor is Java type processor with reflection processor, also, The original data model class is distinguished with the new annotation model class with identifier.
6. a kind of method of configurator component, wherein described program component includes to utilize the unified initial data mould for explaining mark Type class, comprising:
Based on the database framework type that application program uses, the original data model class is converted to and the database frame The new annotation model class of frame type matching;
Receive the call request to described program component from the application program;
In response to the call request, by the corresponding new annotation model class of the database framework type used with the application program Send the database framework that the application program uses to.
7. method as claimed in claim 6, further comprises:
Determine the database framework type that the application program for loading described program component uses;
Wherein, if original data model class and the database framework type in described program component mismatch, by institute It states original data model class and is converted to new annotation model class with the database framework type matching.
8. such as the method for claim 6 or 7, wherein the original data model class is converted to and the database framework type Matched new annotation model class further comprises:
The unified of the original data model class is scanned using annotation processor to explain, and unification note is converted to and meets institute The specific note for stating database framework type, for marking the new annotation model class.
9. method as claimed in claim 8, wherein by the corresponding new note of the database framework type used with the application program Model class sends the database framework that the application program uses to:
Characteristic parameter and its parameter value in original data model class are obtained using reflection processor, and acquired parameter value is sealed Dress is the parameter value of the individual features parameter in the new annotation model class, wherein the parameter value in the original data model class It is that described program component operates the original data model class and generates.
10. method as claimed in claim 9, wherein the annotation processor is Java type processor with reflection processor, and And the original data model class is distinguished with the new annotation model class with identifier.
11. a kind of intelligent terminal, comprising:
Memory, for storing application program;
Processor, for executing the application program, wherein application programming be include plug-in unit, which includes:
Database manipulation interface, for receiving the call request to the plug-in unit from the application program;And
Processor is reflected, the database that in response to the call request, will be used in the plug-in unit, with the application program is used for The corresponding new annotation model class of framework type sends the database framework that the application program uses to, wherein the new note mould Type class is to be generated based on utilization by the unified original data model class for explaining mark in the plug-in unit, to realize the plug-in unit Function.
12. such as the intelligent terminal of claim 11, wherein the reflection processor obtains characteristic parameter in original data model class And its parameter value, and acquired parameter value is encapsulated as to the parameter value of the individual features parameter in the new annotation model class, Wherein the parameter value in the original data model class is that described program component operates the original data model class and generates.
13. such as the intelligent terminal of claim 11 or 12, wherein the reflection processor is Java type processor, also, institute It states original data model class and is distinguished with the new annotation model class with identifier.
14. a kind of machine readable media is stored thereon with program code, wherein the program code makes the machine when being executed by machine The method of device perform claim requirement 6-10.
CN201910631088.XA 2019-07-12 2019-07-12 Program component configuration device and method Active CN110457013B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910631088.XA CN110457013B (en) 2019-07-12 2019-07-12 Program component configuration device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910631088.XA CN110457013B (en) 2019-07-12 2019-07-12 Program component configuration device and method

Publications (2)

Publication Number Publication Date
CN110457013A true CN110457013A (en) 2019-11-15
CN110457013B CN110457013B (en) 2023-11-17

Family

ID=68481167

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910631088.XA Active CN110457013B (en) 2019-07-12 2019-07-12 Program component configuration device and method

Country Status (1)

Country Link
CN (1) CN110457013B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112068902A (en) * 2020-09-10 2020-12-11 北京五八信息技术有限公司 Plug-in calling method and device, electronic equipment and storage medium
CN113448995A (en) * 2020-03-25 2021-09-28 北京沃东天骏信息技术有限公司 Database operation method, device and system, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060031820A1 (en) * 2004-08-09 2006-02-09 Aizhong Li Method for program transformation and apparatus for COBOL to Java program transformation
CN103020064A (en) * 2011-09-20 2013-04-03 佳都新太科技股份有限公司 Method and configuration for generating query condition in annotation way
US20140181630A1 (en) * 2012-12-21 2014-06-26 Vidinoti Sa Method and apparatus for adding annotations to an image
US20150074081A1 (en) * 2013-09-06 2015-03-12 Sap Ag Entity-relationship model extensions using annotations
CN105868270A (en) * 2016-03-17 2016-08-17 央广视讯传媒股份有限公司 Android object storing framework based on reflection mechanism
CN106302442A (en) * 2016-08-12 2017-01-04 广州慧睿思通信息科技有限公司 A kind of network communication packet analytic method based on Java language
CN106295390A (en) * 2015-06-08 2017-01-04 阿里巴巴集团控股有限公司 A kind of method and device of information processing
CN108628635A (en) * 2018-05-07 2018-10-09 广州视源电子科技股份有限公司 Method, apparatus, equipment and the storage medium of the name that gets parms and local variable name

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060031820A1 (en) * 2004-08-09 2006-02-09 Aizhong Li Method for program transformation and apparatus for COBOL to Java program transformation
CN103020064A (en) * 2011-09-20 2013-04-03 佳都新太科技股份有限公司 Method and configuration for generating query condition in annotation way
US20140181630A1 (en) * 2012-12-21 2014-06-26 Vidinoti Sa Method and apparatus for adding annotations to an image
US20150074081A1 (en) * 2013-09-06 2015-03-12 Sap Ag Entity-relationship model extensions using annotations
CN106295390A (en) * 2015-06-08 2017-01-04 阿里巴巴集团控股有限公司 A kind of method and device of information processing
CN105868270A (en) * 2016-03-17 2016-08-17 央广视讯传媒股份有限公司 Android object storing framework based on reflection mechanism
CN106302442A (en) * 2016-08-12 2017-01-04 广州慧睿思通信息科技有限公司 A kind of network communication packet analytic method based on Java language
CN108628635A (en) * 2018-05-07 2018-10-09 广州视源电子科技股份有限公司 Method, apparatus, equipment and the storage medium of the name that gets parms and local variable name

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
RENAUD PAWLAK: "Spoon: Annotation-Driven Program Transformation-the AOP case", 《PROCEEDINGS OF THE 1ST WORKSHOP ON ASPECT ORIENTED MIDDLEWARE DEVELOPMENT》 *
RENAUD PAWLAK: "Spoon: Annotation-Driven Program Transformation-the AOP case", 《PROCEEDINGS OF THE 1ST WORKSHOP ON ASPECT ORIENTED MIDDLEWARE DEVELOPMENT》, 28 November 2005 (2005-11-28), pages 1 - 6 *
丁春玲 等: "Java反射机制在数据持久层轻量级ORM框架中的应用研究", 《西安文理学院学报( 自然科学版)》 *
王雪梅;李彩虹;慕富强;李廉;: "基于Annotation数据结构自动生成的研究与实现", 微电子学与计算机, no. 01 *
罗多多: "基于网络支付与移动客户端的集体食堂菜品购销系统设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
罗多多: "基于网络支付与移动客户端的集体食堂菜品购销系统设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 1, 15 January 2016 (2016-01-15), pages 3 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448995A (en) * 2020-03-25 2021-09-28 北京沃东天骏信息技术有限公司 Database operation method, device and system, electronic equipment and storage medium
CN112068902A (en) * 2020-09-10 2020-12-11 北京五八信息技术有限公司 Plug-in calling method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110457013B (en) 2023-11-17

Similar Documents

Publication Publication Date Title
US8706771B2 (en) Systems and methods for analyzing and transforming an application from a source installation to a target installation
CN100545851C (en) The remote system administration of utility command row environment
JP5189986B2 (en) Extensible mechanism for object composition
CN110365751B (en) Service processing method, device and equipment of gateway system
CN107832207A (en) Interface performance test method, apparatus, storage medium and computer equipment
US20110184870A1 (en) Form processing in a user interface workflow composition tool
CA2763544A1 (en) M2m service platform and working method thereof
CN109032631A (en) Application program service packs acquisition methods, device, computer equipment and storage medium
Einarsson et al. SmarthomeML: Towards a domain-specific modeling language for creating smart home applications
US9535687B2 (en) Audited builds based upon separate class dependency records
Bocciarelli et al. A language for enabling model-driven analysis of business processes
CN110457013A (en) Program assembly configuration device and method
CN114942796A (en) Plug-in compiling and calling method, device, equipment and storage medium
CN111695827A (en) Business process management method and device, electronic equipment and storage medium
CN107526679A (en) Automated test frame, the automated testing method based on thereon, storage medium and computer equipment
CN112506492A (en) Visual point burying method supporting dynamic scene configuration
CN112114789B (en) Service development method and equipment
CN116974581B (en) Code generation method, device, electronic equipment and storage medium
CN114202419A (en) Message generation method, device, equipment, storage medium and program product
CN109558121A (en) Development approach, device, equipment and the storage medium of interface drive program
CN110399130A (en) A kind of APP skin change method based on android system
CN115857907A (en) Business flow dynamic assembly system and method
CN109240667A (en) A kind of development approach of application software, device, storage medium and terminal
CN105930431A (en) Method, device and system for accessing database
CN113961232A (en) Terminal, method and platform server for providing integrated development environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201010

Address after: English genus

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: English genus

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201010

Address after: English genus

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240227

Address after: Guohao Times City # 20-01, 128 Meizhi Road, Singapore

Patentee after: Advanced Nova Technology (Singapore) Holdings Ltd.

Country or region after: Singapore

Address before: English genus

Patentee before: Innovative advanced technology Co.,Ltd.

Country or region before: United Kingdom