T - the PDO classD - the domain object classpublic abstract class AbstractDomainObject<T extends PersistentDomainObject<T>,D extends AbstractDomainObject<T,D>> extends Object implements DomainObject<T>, org.tentackle.reflect.EffectiveClassProvider<T>, Cloneable, Serializable
| Constructor and Description |
|---|
AbstractDomainObject()
Creates an application domain object.
|
AbstractDomainObject(T pdo)
Creates an application domain object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assertRootEntity()
Checks if the PDO is a root entity.
|
D |
clone() |
DomainObject<T> |
cloneDomainObject() |
T |
findByUniqueDomainKey(Object domainKey) |
DomainContext |
getDomainContext() |
Class<T> |
getEffectiveClass() |
List<Class<? super T>> |
getEffectiveSuperClasses() |
T |
getPdo() |
PersistenceDelegate<T> |
getPersistenceDelegate() |
String |
getPlural() |
org.tentackle.session.Session |
getSession() |
String |
getSingular() |
Object |
getUniqueDomainKey() |
Class<?> |
getUniqueDomainKeyType() |
boolean |
isUniqueDomainKeyProvided() |
T |
me() |
T |
pdo() |
void |
setPdo(T pdo) |
void |
setUniqueDomainKey(Object domainKey) |
String |
toGenericString() |
String |
toString()
Gets the string representation of this domain object.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waiton, oppublic AbstractDomainObject(T pdo)
pdo - the persistent domain object this is a delegate forpublic AbstractDomainObject()
public PersistenceDelegate<T> getPersistenceDelegate()
getPersistenceDelegate in interface DomainDelegate<T extends PersistentDomainObject<T>>public T getPdo()
getPdo in interface PdoHolder<T extends PersistentDomainObject<T>>public T pdo()
pdo in interface DomainObject<T extends PersistentDomainObject<T>>public T me()
me in interface ProxyDelegate<T extends PersistentDomainObject<T>>public void setPdo(T pdo)
setPdo in interface PdoHolder<T extends PersistentDomainObject<T>>public Class<T> getEffectiveClass()
getEffectiveClass in interface org.tentackle.reflect.EffectiveClassProvider<T extends PersistentDomainObject<T>>public List<Class<? super T>> getEffectiveSuperClasses()
getEffectiveSuperClasses in interface org.tentackle.reflect.EffectiveClassProvider<T extends PersistentDomainObject<T>>public DomainContext getDomainContext()
getDomainContext in interface DomainContextProviderpublic org.tentackle.session.Session getSession()
getSession in interface org.tentackle.session.SessionProviderpublic String toGenericString()
toGenericString in interface DomainObject<T extends PersistentDomainObject<T>>public String toString()
The default implementation returns the domain key, if this is a root entity. If a component, its single-name will be returned. If evaluating the domain key failed, the generic string is returned along with the exception in parentheses. This is due to the fact that toString should never throw an exception as it is used for logging and debugging.
public DomainObject<T> cloneDomainObject()
cloneDomainObject in interface DomainObject<T extends PersistentDomainObject<T>>public boolean isUniqueDomainKeyProvided()
isUniqueDomainKeyProvided in interface DomainObject<T extends PersistentDomainObject<T>>public Class<?> getUniqueDomainKeyType()
getUniqueDomainKeyType in interface DomainObject<T extends PersistentDomainObject<T>>public Object getUniqueDomainKey()
getUniqueDomainKey in interface DomainObject<T extends PersistentDomainObject<T>>public void setUniqueDomainKey(Object domainKey)
setUniqueDomainKey in interface DomainObject<T extends PersistentDomainObject<T>>public T findByUniqueDomainKey(Object domainKey)
findByUniqueDomainKey in interface DomainObject<T extends PersistentDomainObject<T>>public String getSingular()
getSingular in interface DomainObject<T extends PersistentDomainObject<T>>public String getPlural()
getPlural in interface DomainObject<T extends PersistentDomainObject<T>>public void assertRootEntity()
Tentackle - distributed, domain- and model-driven