org.nakedobjects.applib
Class AbstractDomainObject

java.lang.Object
  extended by org.nakedobjects.applib.AbstractContainedObject
      extended by org.nakedobjects.applib.AbstractDomainObject

public abstract class AbstractDomainObject
extends AbstractContainedObject

Convenience super class for all domain objects that wish to interact with the container.

Subclassing is NOT mandatory; the methods in this superclass can be pushed down into domain objects and another superclass used if required.

See Also:
DomainObjectContainer

Constructor Summary
AbstractDomainObject()
           
 
Method Summary
protected  void disposeInstance()
          Deprecated. - instead use AbstractContainedObject.remove(Object).
protected  boolean isPersistent()
          Deprecated. - instead use AbstractContainedObject.isPersistent(Object).
protected  void makePersistent()
          Deprecated. - instead use AbstractContainedObject.persist(Object).
protected  void makePersistentIfNotAlready()
          Deprecated. - instead use AbstractContainedObject.persistentIfNotAlready(Object).
protected  void objectChanged()
          Notifies the container that this object has changed, so that it can be persisted.
protected  void resolve()
          Resolve this object, populating references to other objects.
protected  void resolve(java.lang.Object referencedObject)
          Resolve this object if the referenced object is still unknown.
 
Methods inherited from class org.nakedobjects.applib.AbstractContainedObject
allInstances, allMatches, allMatches, allMatches, allMatches, firstMatch, firstMatch, firstMatch, firstMatch, getContainer, getUser, informUser, isPersistent, isValid, newTransientInstance, persist, persistentIfNotAlready, raiseError, remove, setContainer, uniqueMatch, uniqueMatch, uniqueMatch, uniqueMatch, validate, warnUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDomainObject

public AbstractDomainObject()
Method Detail

resolve

protected void resolve()
Resolve this object, populating references to other objects.


resolve

protected void resolve(java.lang.Object referencedObject)
Resolve this object if the referenced object is still unknown.


objectChanged

protected void objectChanged()
Notifies the container that this object has changed, so that it can be persisted.


isPersistent

@Deprecated
protected boolean isPersistent()
Deprecated. - instead use AbstractContainedObject.isPersistent(Object).

Whether this object is persistent.


makePersistent

@Deprecated
protected void makePersistent()
Deprecated. - instead use AbstractContainedObject.persist(Object).

Save this object to the persistent object store.

If the object is persistent already, then will throw an exception.

See Also:
AbstractContainedObject.persistentIfNotAlready(Object)

makePersistentIfNotAlready

@Deprecated
protected void makePersistentIfNotAlready()
Deprecated. - instead use AbstractContainedObject.persistentIfNotAlready(Object).

Saves the object, but only if not already persistent.

See Also:
AbstractContainedObject.isPersistent(Object), AbstractContainedObject.persist(Object)

disposeInstance

@Deprecated
protected void disposeInstance()
Deprecated. - instead use AbstractContainedObject.remove(Object).

Delete this object from the persistent object store.



Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.