|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hydrateframework.AbstractHydrateObject
public abstract class AbstractHydrateObject
This class implements the HydrateObject interface and provides a
base class for generated object implementations. This implements code to keep
track of the ownership of the object and the object's state.
| Field Summary |
|---|
| Fields inherited from interface org.hydrateframework.HydrateObject |
|---|
ATTR_MANDATORY, ATTR_MULTIPLE, ATTR_MULTIPLEOPTIONAL, ATTR_NONE, ATTR_OPTIONAL, saveALL, savePOST, savePRE, STATECHANGED, STATEPOSTSAVE, STATEPRESAVE, STATEUNCHANGED, STATEUPDATING |
| Constructor Summary | |
|---|---|
AbstractHydrateObject(ObjectContext ctx)
Each object is created belonging to an ObjectContext |
|
| Method Summary | |
|---|---|
abstract java.io.PrintStream |
dump(java.io.PrintStream out,
boolean title,
int depth,
int indent)
|
boolean |
equals(java.lang.Object o)
|
ObjectContext |
getContext()
|
abstract java.lang.Class |
getImplementedIfc()
Each business object concrete class implements a particular business object interface. |
boolean |
isChanged()
|
boolean |
isPersisted()
Determine if the object is persisted in the database. |
boolean |
isPreSaving()
|
boolean |
isRemoved()
Determine if a request has been made to remove the object from the database |
boolean |
isUpdating()
|
static java.lang.String |
makeIndent(int i)
Helper method to be used by implementations of dump to
indent the output to an appropriate level. |
void |
save(SaveContext ctx)
This method is called by users of this business object to persist it in a persistent store. |
void |
setClean()
Set the object to a 'clean' state. |
void |
setContext(ObjectContext ctx)
Set the object context associated with the object |
void |
setDirty()
Set the object to a 'dirty' state. |
void |
setNotPersisted()
Call this method to indicate that the object has not been persisted in a database. |
void |
setPersisted()
Call this method to indicate that the object has been persisted in a database. |
void |
setPostSaving()
Set the object to a state indicating that it is finishing the update process on an object |
void |
setPreSaving()
Set the object to a state indicating that it has been partially updated |
void |
setRemoved(boolean remove)
Mark this object as having been deleted from the database. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.hydrateframework.HydrateObject |
|---|
attributeType, forget, getDiscriminator, getFamily, getKey, isFieldPopulated, mergeDown, save, setAttrFromString, writeAttributesXML |
| Constructor Detail |
|---|
public AbstractHydrateObject(ObjectContext ctx)
ObjectContext
ctx - the context within which the object is being created. It
is legal for this parameter to be null, but much of the infrastructure
will not work if it is.| Method Detail |
|---|
public static java.lang.String makeIndent(int i)
dump to
indent the output to an appropriate level.
public boolean isChanged()
isChanged in interface HydrateObjectpublic boolean isUpdating()
isUpdating in interface HydrateObjectpublic boolean isPreSaving()
isPreSaving in interface HydrateObjectpublic void setPreSaving()
HydrateObject
setPreSaving in interface HydrateObjectpublic void setPostSaving()
HydrateObject
setPostSaving in interface HydrateObjectpublic void setClean()
HydrateObjectisChanged will subsequently
return false unless the object is not in the database. isUpdating
will subsequently return false.
setClean in interface HydrateObjectpublic void setDirty()
HydrateObjectisChanged will subsequently
return true.
setDirty in interface HydrateObject
public final void save(SaveContext ctx)
throws SaveException
HydrateObject
save in interface HydrateObjectSaveExceptionpublic void setPersisted()
HydrateObject
setPersisted in interface HydrateObjectpublic void setNotPersisted()
HydrateObject
setNotPersisted in interface HydrateObjectpublic void setRemoved(boolean remove)
HydrateObject
setRemoved in interface HydrateObjectpublic boolean isRemoved()
HydrateObject
isRemoved in interface HydrateObjectpublic boolean isPersisted()
HydrateObject
isPersisted in interface HydrateObjectpublic ObjectContext getContext()
getContext in interface HydrateObjectpublic void setContext(ObjectContext ctx)
HydrateObject
setContext in interface HydrateObjectctx - the new contextpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic abstract java.lang.Class getImplementedIfc()
HydrateObjectthis.getKey().getKeyClass()
since the key class is always the base business class and this
method returns the actual interface that is being implemented.
getImplementedIfc in interface HydrateObject
public abstract java.io.PrintStream dump(java.io.PrintStream out,
boolean title,
int depth,
int indent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||