|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tentackle.db.DbObject
org.tentackle.appworx.AppDbObject
org.tentackle.appworx.PartialAppDbObject
public abstract class PartialAppDbObject
Partial implementation of an AppDbObject that is an abstract
super class in a table-per-class mapping.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.tentackle.db.DbObject |
|---|
DbObject.CopyAllToDbLogger, DbObject.IdComparator<T extends DbObject>, DbObject.NameComparator<T extends DbObject>, DbObject.NameIdComparator<T extends DbObject> |
| Field Summary |
|---|
| Fields inherited from class org.tentackle.appworx.AppDbObject |
|---|
FIELD_EDITEDBY, FIELD_EDITEDEXPIRY, FIELD_EDITEDSINCE, FIELD_NORMTEXT, TX_DELETE_ALL_IN_CONTEXT, TX_SAVE_COPY_IN_CONTEXT, TX_TRANSFER_EDITEDBY, VERIFIED_DUPLICATE |
| Fields inherited from class org.tentackle.db.DbObject |
|---|
BEGIN, COMMIT, DELETE, DELETEALL, FIELD_ID, FIELD_SERIAL, FIELD_TABLESERIAL, idComparator, INSERT, lazyMethodInterval, nameComparator, nameIdComparator, TX_DELETE_LIST, TX_DELETE_MISSING_IN_LIST, TX_DELETE_OBJECT, TX_DUMMY_UPDATE, TX_INSERT_OBJECT, TX_INSERT_PLAIN, TX_SAVE, TX_SAVE_LIST, TX_UPDATE_OBJECT, TX_UPDATE_PLAIN, TX_UPDATE_SERIAL, TX_UPDATE_SERIAL_AND_TABLESERIAL, TX_UPDATE_TABLESERIAL, UPDATE |
| Constructor Summary | |
|---|---|
PartialAppDbObject(AppDbObject master)
Creates a partial object for a given master object. |
|
| Method Summary | |
|---|---|
String |
getClassBaseName()
Gets the basename of the class of this object. The basename is the class name without the package name. |
String |
getClassName()
Gets the class name of this object. This is equivalent to getClass().getName() except for PartialDbObjects! |
ContextDb |
getContextDb()
Gets the database application context this object belongs to. |
Db |
getDb()
Get the logical db connection for this object. |
long |
getId()
Gets the object ID. |
String |
getNormText()
Gets the normtext. |
boolean |
isEntity()
Returns whether instances of this class exist as database entities. |
boolean |
isNew()
Checks whether this object is already persistant in the db or only residing in memory. |
boolean |
isPartial()
Returns true if object is only a partial implementation. |
void |
setContextDb(ContextDb contextDb)
Sets this object's database application context. |
void |
setContextId()
Determines the object-ID(s) of the root object(s) of the context and sets the attributes of the database object accordingly. |
void |
setDb(Db db)
Sets the logical db connection for this object. |
void |
setId(long id)
Sets the unique ID of this object. |
void |
setNormText(String normText)
Sets the normtext. |
void |
setSerial(long serial)
Sets the serial number (modification count). |
String |
toGenericString()
Gets the string value: " DbObject.getSingleName()[id/serial]".Example: "Product[344/2]" |
String |
toString()
Gets the default string value. The default implementation invokes DbObject.toGenericString(). |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PartialAppDbObject(AppDbObject master)
master - the master object| Method Detail |
|---|
public boolean isPartial()
Overridden to return true. Notice that for hierarchies of depth > 2 the DbGetFields wurblet must be invoked with the "--nameonly" option.
isPartial in class DbObjectpublic boolean isEntity()
Overridden to return false. Partial object are not entities by definition.
isEntity in class DbObjectpublic Db getDb()
DbObject
getDb in class DbObjectpublic void setDb(Db db)
AppDbObjectOverridden to set the Db in ContextDb as well.
setDb in class AppDbObjectdb - the db connectionpublic String getClassBaseName()
DbObject
getClassBaseName in class DbObjectpublic long getId()
DbObject
getId in class DbObjectpublic void setId(long id)
DbObjectDbObject.isModified().
setId in class DbObjectid - the object idpublic void setSerial(long serial)
DbObjectDbObject.isModified().
setSerial in class DbObjectserial - the serial numberpublic boolean isNew()
DbObject
isNew in class DbObjectpublic String getNormText()
AppDbObject
getNormText in class AppDbObjectpublic void setNormText(String normText)
AppDbObject
setNormText in class AppDbObjectnormText - the normtextpublic String toString()
DbObjectDbObject.toGenericString().
toString in class DbObjectpublic String toGenericString()
DbObjectDbObject.getSingleName()[id/serial]".
toGenericString in class DbObjectpublic ContextDb getContextDb()
AppDbObjectThe default implementation just returns the context. Subclasses may override this with a covariant method.
getContextDb in interface ContextDependablegetContextDb in class AppDbObjectpublic void setContextDb(ContextDb contextDb)
AppDbObject
Setting the context will also DbObject.setDb(org.tentackle.db.Db) and AppDbObject.setContextId()
setContextDb in interface ContextDependablesetContextDb in class AppDbObjectpublic void setContextId()
AppDbObjectThe default implementation does nothing (object living in a context not depending on another object).
setContextId in interface ContextDependablesetContextId in class AppDbObjectpublic String getClassName()
DbObject
getClassName in class DbObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||