Data persistence layer (06)

zhaozj2021-02-16  68

Class Diagram:

Persistentcriteria class level

Overview: PersistentObject encapsulates a single object persistent behavior. The Persistentcriterai class level supports saving, acquisition, deleting multiple objects. method:

AddSelectxxx (): addSelectxxxx () of the PersistentCriteria class is a group of methods, which represent: GreatertHan, Litterthan, Equalto, etc.

Two parameters:

A parameter is the other of the class's attribute is the value. Returns: This method returns the subclass example of the corresponding SelectionCriteria. For example: addselectgreaterthan () Creates a GreatertHancriteria instance and addSelectEqualto () creates an EqualToCriteria instance. Addorcriteria () Method: It uses "or" logic to use "or" logic to connect two conditions together with an instance of PeristentCriteria. Attributes:

FORCLASS: It indicates the type of object being processed, for example, may be an Employee or Invoice object. IssubclassesInCluded: The condition is also applied to the Forclass subclass. Summary: These two attributes support the polymorphism in the inheritance. For example, the combination of these two attributes and the addSelectxxx () method allows us to operate on the instance of the Person object that meets specific conditions and their subclasses. Such as: The name of the Person object and its subclass of Person objects between June 14, 1996 from June 14, 1996: SubsenceCriteria class:

Overview: Encapsulates the behavior of comparing the specified value with a attribute. Each comparison type (equal to, greater than, less than, less than or equal, greater than or equal) has a subclass. Note: Its instance is associated with other instances by using the "and" logic. ("Or" logic is implemented by orcirteria () method) RetrieVecriteria class

Overview: This class is used to receive a long time. It supports getting zero or more objects, proxy objects, records, or a cursor. Why don't you say this. Deletecriteria class:

Overview: Supports multiple objects at a time. At the same time, support logo deletion ()) and direct deletion (PermanentlyDelete ()). Note: An instance of the DeleteCriteria class creates an instance of UpdateCriteria, updates the deletionDatetime or isdeleted field of the corresponding table. Updatecriteria class:

Overview: One or more properties for updating a set of objects simultaneously. method:

Perform () method: This method first gets the object to be updated by RetrieveCriteria, then loops to give their properties to a new value, and finally send a SAVE () message to each object to write back the persistent mechanism.

转载请注明原文地址:https://www.9cbs.com/read-16032.html

New Post(0)