Package org.apache.torque.om
Schnittstelle ObjectModel
- Alle bekannten Unterschnittstellen:
Persistent
public interface ObjectModel
This interface defines methods related to object referencing and tracking
- Version:
- $Id: Persistent.java 1152582 2011-07-31 13:59:17Z tfischer $
- Autor:
- Thomas Vandahl
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungObjectKey<?>
getter for the object primaryKey.boolean
Returns whether the object has been modified, since it was last retrieved from storage.boolean
isNew()
Returns whether the object has ever been saved.void
setModified
(boolean m) Sets the modified state for the object.void
setNew
(boolean b) Setter for the isNew attribute.void
setPrimaryKey
(String primaryKey) Sets the PrimaryKey for the object.void
setPrimaryKey
(ObjectKey<?> primaryKey) Sets the PrimaryKey for the object.
-
Methodendetails
-
getPrimaryKey
ObjectKey<?> getPrimaryKey()getter for the object primaryKey.- Gibt zurück:
- the object primaryKey as an Object
-
setPrimaryKey
Sets the PrimaryKey for the object.- Parameter:
primaryKey
- The new PrimaryKey for the object.- Löst aus:
TorqueException
- This method might throw an exception
-
setPrimaryKey
Sets the PrimaryKey for the object.- Parameter:
primaryKey
- the String should be of the form produced by ObjectKey.toString().- Löst aus:
TorqueException
- This method might throw an exception
-
isModified
boolean isModified()Returns whether the object has been modified, since it was last retrieved from storage.- Gibt zurück:
- True if the object has been modified.
-
isNew
boolean isNew()Returns whether the object has ever been saved. This will be false, if the object was retrieved from storage or was created and then saved.- Gibt zurück:
- true, if the object has never been persisted.
-
setNew
void setNew(boolean b) Setter for the isNew attribute. This method will be called by Torque-generated children and Peers.- Parameter:
b
- the state of the object.
-
setModified
void setModified(boolean m) Sets the modified state for the object.- Parameter:
m
- The new modified state for the object.
-