1, PO, persistence object, persistent Layer objects, object properties and database table of the field one by one corresponding;
2, BO, Business object, Business Layer objects, object properties and the current business logic required by the name of the data one by one corresponding;
3, VO, View object, Performance Layer objects, object properties and the name of the data displayed on the page one by one corresponding;
4, POJO, Plain ordinary Java object, normal Java objects, only attributes and their set/get methods. Note:
(1) The PO is created when new data is added to the database, deleted when the data is deleted from the database, can only survive in a database connection, the disconnect is destroyed, and the Po object needs to implement serialization excuses.
(2) BO, Vo, and Pojo are created by the New keyword and are recycled by GC, which always exists as long as it is not recycled.
Po bo Vo has very similar properties, and when used at an irregular level, it is often converted to each other.
Beanutils.copyproperties () can be used to simplify the conversion between three objects in Po bo vo. Note:
If a property with a different name exists between user and Useractionform, the beanutils does not process the properties and needs to be handled manually. For example:
There is a CreateDate creation time field inside the user class, and Useractionform does not have this field in it. Beanutils.copyproperties () does not perform any processing on this field. You must manually handle it yourself.