public interface Surrogate
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Database |
getDatabase()
Return the database of the database object.
|
DBObjectType |
getDBObjectType()
Return a keyword identifying the type of database object of this surrogate.
|
DBObjectId |
getId()
Return the id of this database object.
|
DBObject |
getObject()
Returns the database object corresponding to the surrogate.
|
int |
hashCode()
Return the hashCode of this surrogate unless it is in construction.
|
boolean |
inConstruction()
Test whether the data object is in the database or is a new object being
constructed.
|
String |
toString()
Applications can rely on this method when needing to display the surrogate in a
user interface or in a report.
|
void |
upgrade(Surrogate surrogate)
Leave the in construction state and take the identity of the
parameter.
|
String toString()
boolean inConstruction()
void upgrade(Surrogate surrogate)
surrogate - a surrogate which will transmit its identity to this surrogateDBObject getObject()
DBObjectId getId()
DBObjectId or nullDatabase getDatabase()
DBObjectType getDBObjectType()
boolean equals(Object o)
Clients can rely on this method to return true when the underlying database
objects are the same. The method returns false when inConstruction() is true
for one of the objects involved.
int hashCode()
inConstruction() is true throw an IllegalStateException.Copyright © 2017. All rights reserved.