CN105893039A - Universal method for realizing simple database by compiling entity class characteristics - Google Patents

Universal method for realizing simple database by compiling entity class characteristics Download PDF

Info

Publication number
CN105893039A
CN105893039A CN201610194668.3A CN201610194668A CN105893039A CN 105893039 A CN105893039 A CN 105893039A CN 201610194668 A CN201610194668 A CN 201610194668A CN 105893039 A CN105893039 A CN 105893039A
Authority
CN
China
Prior art keywords
entity class
class
characteristic
realized
universal method
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.)
Pending
Application number
CN201610194668.3A
Other languages
Chinese (zh)
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.)
Inspur General Software Co Ltd
Original Assignee
Inspur General Software Co 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 Inspur General Software Co Ltd filed Critical Inspur General Software Co Ltd
Priority to CN201610194668.3A priority Critical patent/CN105893039A/en
Publication of CN105893039A publication Critical patent/CN105893039A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a universal method for realizing a simple database by utilizing the property of writing entity classes, belonging to the field of creating C # object instances of computer software, comprising the following steps: the user-defined characteristic class is used for storing some operation information corresponding to the entity class; uniformly packaging to correspond to different entity classes by utilizing an advanced generic technology; collecting the attribute and characteristic information of the entity class through technologies such as reflection; the integration of interface-oriented programming and object creation is realized. The invention sub-packages some table information into the property classes by self-defining the property classes, and further encapsulates simple insertion and change logics.

Description

A kind of utilization is write entity class characteristic thus is realized the universal method in simple data storehouse
Technical field
The present invention relates to computer software C# object instance and create field, specifically a kind of utilization writes entity class spy Property thus realize the universal method in simple data storehouse.
Background technology
Day by day deepening now with informationalized, on market, system is the most a feast for the eyes, and various systems also bring The interaction problems of data, owing to a big enterprise requires difference for informationalized, different department, different business also need Different systems is had to support, then how could realize the data interaction between different system the most faster?
Way general in .NET is to be WebService to provide interface to outside, including be supplied to external program interface and How about external environment condition pushes the data etc. that come, then these simply relate to the job simplification of database manipulation, soon Speed realizes, and liberation labour force has just become the problem that we need to consider.
The interface externally provided in military industry version now, is used a set of fixing pattern, in the interface the superiors Writing outer layer exhibiting method, logical layer writes the logic (or data of conversion data layer) of extracted data, and data are converted by data Layer And be saved in data base (or fetching data), so arrive when a client often proposes to synchronize the table data of an other system In native system (or synchronizing native system data to time in other system), we add a method, to realize connecing at each layer of having to Mouthful.
Summary of the invention
The technical assignment of the present invention is for above weak point, it is provided that a kind of utilization is write entity class characteristic thus realized Some table information, by custom properties class, are dispensed into characteristic apoplexy due to endogenous wind, and then encapsulation are simple by the universal method in simple data storehouse Insertion, the logic of change.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of utilization is write entity class characteristic thus is realized the universal method in simple data storehouse, and described method includes:
Custom properties class, for the certain operations information corresponding to storage entity class;
Utilizing advanced Generic programming, unified encapsulation is with corresponding different entity class;
The attribute of entity class, characteristic information is collected by technology such as reflections;
Realize interface-oriented programming and the fusion creating object.
Further, the encapsulation of simple operation layer is realized by reflection, general type, custom properties technology.
Further, the encapsulation sought unity of talking, the simple operations of data base can be realized for different entity class.
A kind of utilization of the present invention is write entity class characteristic thus is realized universal method and the prior art in simple data storehouse Compare, have the advantages that
Create characteristic class;
Generic programming is utilized to achieve general to entity class of this method;
Offer system extension convenient manner;
Some information in entity class are all passed through the technology such as reflection and are realized, unified management;
Utilize self-defined characteristic class TableAttribute for class and characteristic class TableAttribute for attribute, By the information of characteristic in entity class, it is achieved to the encapsulation simply preserving in logic business layer, revising, so that at logarithm According in the shirtsleeve operation of storehouse, only need to write corresponding entity class, the unification general type class FoolDB<T>calling encapsulation is the most permissible Realize the operations such as foolproof preservation, amendment.Improve the efficiency of coding, especially connect WebService is in outside During mouth, save substantial amounts of human and material resources.This technology realizes simple, without special secret algorithm;Call realize easy to use;Fall The complexity of low programming, and then improve the efficiency of programming.
Accompanying drawing explanation
The present invention is further described below in conjunction with the accompanying drawings.
Accompanying drawing 1 creates figure for object instance;
Accompanying drawing 2 is interface-oriented programming figure.
Detailed description of the invention
The invention will be further described with specific embodiment below in conjunction with the accompanying drawings.
A kind of utilization is write entity class characteristic thus is realized the universal method in simple data storehouse, and described method includes:
Custom properties class, for the certain operations information corresponding to storage entity class;
Utilizing advanced Generic programming, unified encapsulation is with corresponding different entity class;
The attribute of entity class, characteristic information is collected by technology such as reflections;
Realize interface-oriented programming and the fusion creating object.
The encapsulation of simple operation layer is realized by reflection, general type, custom properties technology.
The encapsulation sought unity of talking, can realize the simple operations of data base for different entity class.
The method that then general type instantiation FoolDB calls apoplexy due to endogenous wind, example is as follows:
List<PMIS_KTXXB> lstktxxb = new List<PMIS_KTXXB>();
PMIS_KTXXB ktxxb = new PMIS_KTXXB();
ktxxb.KTXXB_GUID = System.Guid.NewGuid().ToString();
ktxxb.KTXXB_JHSL = "12";
ktxxb.KTXXB_KTBH = "345";
lstktxxb.Add(ktxxb);
FoolDB<PMIS_KTXXB> fool = new FoolDB<PMIS_KTXXB>();
fool.Insert(lstktxxb, "0");
By detailed description of the invention above, described those skilled in the art can readily realize the present invention.But should manage Solving, the present invention is not limited to above-mentioned detailed description of the invention.On the basis of disclosed embodiment, the skill of described technical field Art personnel can the different technical characteristic of combination in any, thus realize different technical schemes.
In addition to the technical characteristic described in description, it is the known technology of those skilled in the art.

Claims (3)

1. a utilization is write entity class characteristic thus is realized the universal method in simple data storehouse, it is characterised in that described method bag Include:
Custom properties class, for the certain operations information corresponding to storage entity class;
Utilizing advanced Generic programming, unified encapsulation is with corresponding different entity class;
The attribute of entity class, characteristic information is collected by technology such as reflections;
Realize interface-oriented programming and the fusion creating object.
A kind of utilization the most according to claim 1 is write entity class characteristic thus is realized the universal method in simple data storehouse, It is characterized in that being realized the encapsulation of simple operation layer by reflection, general type, custom properties technology.
A kind of utilization the most according to claim 1 and 2 is write entity class characteristic thus is realized the general side in simple data storehouse Method, it is characterised in that the encapsulation sought unity of talking, can realize the simple operations of data base for different entity class.
CN201610194668.3A 2016-03-30 2016-03-30 Universal method for realizing simple database by compiling entity class characteristics Pending CN105893039A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610194668.3A CN105893039A (en) 2016-03-30 2016-03-30 Universal method for realizing simple database by compiling entity class characteristics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610194668.3A CN105893039A (en) 2016-03-30 2016-03-30 Universal method for realizing simple database by compiling entity class characteristics

Publications (1)

Publication Number Publication Date
CN105893039A true CN105893039A (en) 2016-08-24

Family

ID=57014383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610194668.3A Pending CN105893039A (en) 2016-03-30 2016-03-30 Universal method for realizing simple database by compiling entity class characteristics

Country Status (1)

Country Link
CN (1) CN105893039A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109299332A (en) * 2018-11-02 2019-02-01 芜湖智久机器人有限公司 A kind of method, apparatus and storage medium by class and Database Mapping
CN110347372A (en) * 2018-04-08 2019-10-18 福建省天奕网络科技有限公司 A kind of method and terminal of ergodic data
CN114006729A (en) * 2021-09-29 2022-02-01 广东电网有限责任公司电力调度控制中心 Low-voltage power line carrier communication trusted access management method and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110347372A (en) * 2018-04-08 2019-10-18 福建省天奕网络科技有限公司 A kind of method and terminal of ergodic data
CN110347372B (en) * 2018-04-08 2022-07-05 福建省天奕网络科技有限公司 Data traversal method and terminal
CN109299332A (en) * 2018-11-02 2019-02-01 芜湖智久机器人有限公司 A kind of method, apparatus and storage medium by class and Database Mapping
CN114006729A (en) * 2021-09-29 2022-02-01 广东电网有限责任公司电力调度控制中心 Low-voltage power line carrier communication trusted access management method and system
CN114006729B (en) * 2021-09-29 2023-12-01 广东电网有限责任公司电力调度控制中心 Trusted access management method and system for power line carrier communication

Similar Documents

Publication Publication Date Title
CN108536761B (en) Report data query method and server
US10416979B2 (en) Package installation on a host file system using a container
CN106776012B (en) Virtual resource management method and system
US20140115161A1 (en) Method and system for migration of multi-tier virtual application across different clouds hypervisor platforms
US9996597B2 (en) Unified mapreduce framework for large-scale data processing
US9176769B2 (en) Partitioned array objects in a distributed runtime
CN103049317B (en) Based on the high concurrent data no write de-lay system and method for queue under cloud environment
WO2018036342A1 (en) Csar-based template design visualization method and device
WO2019047441A1 (en) Communication optimization method and system
CN110908707B (en) Resource packaging method, device, server and storage medium
US20160182320A1 (en) Techniques to generate a graph model for cloud infrastructure elements
CN102983996A (en) Dynamic allocation method and system for high-availability cluster resource management
CN105893039A (en) Universal method for realizing simple database by compiling entity class characteristics
CN109460439A (en) A kind of data processing method, device, medium and electronic equipment
CN110069312A (en) A kind of method and device of UI component Configuration and generation UI Component Gallery
CN109508319B (en) 3D cross-platform resource management system and method
CN110532058B (en) Management method, device and equipment of container cluster service and readable storage medium
CN111966739A (en) Method and equipment for processing graph data
US11416312B1 (en) Near-real-time data processing with partition files
CN105183854A (en) Scheduling method applicable to data unloading of database
CN103810258A (en) Data aggregation scheduling method based on data warehouse
WO2020063181A1 (en) Data processing method, device and apparatus
CN110673827A (en) Resource calling method and device based on android system and electronic equipment
CN110955415A (en) Method for adapting projection multi-platform service
CN102184105A (en) Data processing method based on modularity and data center system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160824