Class BaseDataObject
java.lang.Object
org.apache.cayenne.PersistentObject
org.apache.cayenne.BaseDataObject
- All Implemented Interfaces:
Serializable, Persistent, Validating
@Deprecated(since="5.0",
forRemoval=true)
public abstract class BaseDataObject
extends PersistentObject
implements Persistent, Validating
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated base implementation of
Persistent objects.- Since:
- 4.1
- See Also:
-
Field Summary
Fields inherited from class PersistentObject
objectContext, objectId, persistenceState, snapshotVersionModifier and TypeFieldDescriptionprotected ObjectContextprotected ObjectIdprotected intprotected longFields inherited from interface Persistent
DEFAULT_VERSION -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Methods inherited from class PersistentObject
addToManyTarget, appendProperties, beforePropertyRead, beforePropertyWrite, getMapKey, getObjectContext, getObjectId, getPersistenceState, getSnapshotVersion, readNestedProperty, readNestedProperty, readProperty, readPropertyDirectly, readSerialized, readState, removeToManyTarget, setObjectContext, setObjectId, setPersistenceState, setReverseRelationship, setSnapshotVersion, setToManyTarget, setToOneTarget, toString, toStringBuffer, unsetReverseRelationship, validateForDelete, validateForInsert, validateForSave, validateForUpdate, willConnect, writeProperty, writePropertyDirectly, writeSerialized, writeStateModifier and TypeMethodDescriptionvoidaddToManyTarget(String relName, Persistent value, boolean setReverse) Adds an object to a to-many relationship.protected voidappendProperties(StringBuffer buffer) protected voidbeforePropertyRead(String propName) protected voidbeforePropertyWrite(String propName, Object oldValue, Object newValue) protected ObjectReturns a map key for a given to-many map relationship and a target object.intlongReturns a version of a DataRow snapshot that was used to create this object.readNestedProperty(String path) Returns a value of the property identified by a property path.Returns a value of the property identified by a property path.readProperty(String propertyName) Returns a value of the property identified by propName.readPropertyDirectly(String propName) Returns mapped property value as currently stored in the Persistent object.protected voidprotected voidvoidremoveToManyTarget(String relName, Persistent value, boolean setReverse) Removes an object from a to-many relationship.voidsetObjectContext(ObjectContext objectContext) voidsetObjectId(ObjectId objectId) voidsetPersistenceState(int persistenceState) protected voidsetReverseRelationship(String relName, Persistent val) Initializes reverse relationship from objectvalto this object.voidsetSnapshotVersion(long snapshotVersion) List<? extends Persistent> setToManyTarget(String relName, Collection<? extends Persistent> values, boolean setReverse) Sets the relationships to the specifiedPersistentobjects.voidsetToOneTarget(String relationshipName, Persistent value, boolean setReverse) Sets to-one relationship to a new value.toString()toStringBuffer(StringBuffer buffer, boolean fullDesc) A variation of "toString" method, that may be more efficient in some cases.protected voidunsetReverseRelationship(String relName, Persistent val) Removes current object from reverse relationship of objectvalto this object.voidvalidateForDelete(ValidationResult validationResult) This implementation does nothing.voidvalidateForInsert(ValidationResult validationResult) protected voidvalidateForSave(ValidationResult validationResult) Performs property validation of the object, appending any validation failures to the provided validationResult object.voidvalidateForUpdate(ValidationResult validationResult) protected voidwillConnect(String relationshipName, Persistent object) Called before establishing a relationship with another object.voidwriteProperty(String propName, Object val) Sets the property to the new value.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 voidprotected void
-
Constructor Details
-
BaseDataObject
public BaseDataObject()Deprecated, for removal: This API element is subject to removal in a future version.
-
PersistentObjectdirectly