Package org.apache.cayenne
Class GenericPersistentObject
java.lang.Object
org.apache.cayenne.PersistentObject
org.apache.cayenne.GenericPersistentObject
- All Implemented Interfaces:
- Serializable,- Persistent,- Validating
Implementation of 
Persistent that uses Map to store object fields.
 This implementation was pre 4.1 default.
 Since 4.1 it is recommended to use PersistentObject as superclass (and it is actually default now),
 as it has better performance and lower memory consumption (much lower for small objects).
 
 You may need to use this class only if you have some generic attributes created at runtime (also
 consider HybridPersistentObject in this case) or if any compatibility issues arise.
- Since:
- 5.0, renamed from CayenneDataObject
- See Also:
- 
Field SummaryFieldsFields inherited from class org.apache.cayenne.PersistentObjectobjectContext, objectId, persistenceState, snapshotVersionFields inherited from interface org.apache.cayenne.PersistentDEFAULT_VERSION
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidappendProperties(StringBuffer buffer) readPropertyDirectly(String propName) Returns mapped property value as currently stored in the Persistent object.protected voidvoidsetPersistenceState(int persistenceState) voidwritePropertyDirectly(String propName, Object val) Modifies a value of a named property without altering the object state in any way, and without triggering any database operations.protected voidMethods inherited from class org.apache.cayenne.PersistentObjectaddToManyTarget, beforePropertyRead, beforePropertyWrite, getMapKey, getObjectContext, getObjectId, getPersistenceState, getSnapshotVersion, readNestedProperty, readNestedProperty, readProperty, readSerialized, removeToManyTarget, setObjectContext, setObjectId, setReverseRelationship, setSnapshotVersion, setToManyTarget, setToOneTarget, toString, toStringBuffer, unsetReverseRelationship, validateForDelete, validateForInsert, validateForSave, validateForUpdate, willConnect, writeProperty, writeSerialized
- 
Field Details- 
values
 
- 
- 
Constructor Details- 
GenericPersistentObjectpublic GenericPersistentObject()
 
- 
- 
Method Details- 
setPersistenceStatepublic void setPersistenceState(int persistenceState) - Specified by:
- setPersistenceStatein interface- Persistent
- Overrides:
- setPersistenceStatein class- PersistentObject
 
- 
readPropertyDirectlyDescription copied from interface:PersistentReturns mapped property value as currently stored in the Persistent object. Returned value maybe a fault or a real value. This method will not attempt to resolve faults, or to read unmapped properties.- Specified by:
- readPropertyDirectlyin interface- Persistent
- Overrides:
- readPropertyDirectlyin class- PersistentObject
 
- 
writePropertyDirectlyDescription copied from interface:PersistentModifies a value of a named property without altering the object state in any way, and without triggering any database operations. This method is intended mostly for internal use by Cayenne framework, and shouldn't be called from the application code.- Specified by:
- writePropertyDirectlyin interface- Persistent
- Overrides:
- writePropertyDirectlyin class- PersistentObject
 
- 
appendProperties- Overrides:
- appendPropertiesin class- PersistentObject
 
- 
readState- Overrides:
- readStatein class- PersistentObject
- Throws:
- IOException
- ClassNotFoundException
 
- 
writeState- Overrides:
- writeStatein class- PersistentObject
- Throws:
- IOException
 
 
-