Package org.eclnt.ccee.datacontext.dofw
Class DataContextDOFW<HOMEOBJECTCLASS,CONTENTTYPECLASS>
java.lang.Object
org.eclnt.ccee.datacontext.DataContext<HOMEOBJECTCLASS,CONTENTTYPECLASS>
org.eclnt.ccee.datacontext.dofw.DataContextDOFW<HOMEOBJECTCLASS,CONTENTTYPECLASS>
public abstract class DataContextDOFW<HOMEOBJECTCLASS,CONTENTTYPECLASS>
extends DataContext<HOMEOBJECTCLASS,CONTENTTYPECLASS>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclnt.ccee.datacontext.DataContext
DataContext.DefaultListener<CONTENTTYPECLASS>, DataContext.IExecuteOnObject, DataContext.IListener<CONTENTTYPECLASS>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Method to be implemented by extensions: the method must check in the database if the object is available.void
This method is called for completely removing the whole object - with all its sub-object.protected void
Removes objects that are part of the data context - in addition to the home object.protected void
protected void
This is the method for actually removing one object that is part of the data context.protected void
This is the method for actually saving one object that is part of the data context.protected void
protected CONTENTTYPECLASS
protected void
protected void
protected void
save()
protected void
Actual persisting of objects - which is called during theDataContext.save()
method.protected void
Part of processing inDataContext.saveLoadedObjects()
.void
This method is called as part of the save processing.void
void
This method is called as part ofupdateKeys()
.Methods inherited from class org.eclnt.ccee.datacontext.DataContext
addListener, addListObject, addListObject, checkIfContainedObjectIsNew, checkIfContentWasChanged, checkIfLoaded, clear, clearList, delete, executeFunctionOnAllRegisteredObjects, getAllContainedContentTypes, getAllHomeObjectsCascadingUp, getChildDataContext, getClassForChildDataContext, getClonedReadObject, getContent, getCreateChildDataContext, getCreateChildDataContext, getHomeObject, getKeySequenceForUpdate, getLoadedContentTypes, getObject, getObject, getObjects, getObjects, getParentDataContext, getRootDataContext, isNew, readAllContent, readContent, registerHomeObject, registerHomeObjectInContent, removeListener, removeListObject, setObject, setObject, updateHomeObjectRegistrationByReadBean, writeChangeLog
-
Constructor Details
-
DataContextDOFW
-
-
Method Details
-
save
- Overrides:
save
in classDataContext<HOMEOBJECTCLASS,
CONTENTTYPECLASS>
-
dbDeleteAll
public void dbDeleteAll()Description copied from class:DataContext
This method is called for completely removing the whole object - with all its sub-object. It MUST be implemented! The data context only manages these beans that are loaded in its content, so a deletion "bean by bean by bean" is not possible (without previously loading all objects...).- Specified by:
dbDeleteAll
in classDataContext<HOMEOBJECTCLASS,
CONTENTTYPECLASS>
-
checkIfObjectExistsInDB
public boolean checkIfObjectExistsInDB()Description copied from class:DataContext
Method to be implemented by extensions: the method must check in the database if the object is available. Dependent on the result the data context will treat the home object as new object or as already existing object.- Specified by:
checkIfObjectExistsInDB
in classDataContext<HOMEOBJECTCLASS,
CONTENTTYPECLASS>
-
updateKeys
public void updateKeys()This method is called as part of the save processing. The implementation can make sure that contained objects share the key of the home object. - In many situations objects are added to the context without a properly filled key. This method can be used to drill down the key of the home object in all the sub-objects which depend on the home object. -
updateKeysOfContainedObjects
public void updateKeysOfContainedObjects()This method is called as part ofupdateKeys()
. DataContext implementations need to override if they provide sub objects. You do not have to override if only the home object is managed in the data context. -
getHomeReferenceForDrillDown
-
updateKeysOfContainedDataContexts
public void updateKeysOfContainedDataContexts() -
saveLoadedObjects
protected void saveLoadedObjects()Description copied from class:DataContext
Actual persisting of objects - which is called during theDataContext.save()
method. Extend this method in order to implement some own saving logic for all objects within the DataContext.- Overrides:
saveLoadedObjects
in classDataContext<HOMEOBJECTCLASS,
CONTENTTYPECLASS>
-
saveLoadedObjects
Description copied from class:DataContext
Part of processing inDataContext.saveLoadedObjects()
. Each object type is processed, this method executes the saving per object type.- Overrides:
saveLoadedObjects
in classDataContext<HOMEOBJECTCLASS,
CONTENTTYPECLASS>
-
executeInTransaction
- Specified by:
executeInTransaction
in classDataContext<HOMEOBJECTCLASS,
CONTENTTYPECLASS>
-
getHomeObjectContentType
- Specified by:
getHomeObjectContentType
in classDataContext<HOMEOBJECTCLASS,
CONTENTTYPECLASS>
-
postProcessSetObject
protected void postProcessSetObject()- Overrides:
postProcessSetObject
in classDataContext<HOMEOBJECTCLASS,
CONTENTTYPECLASS>
-
postProcessAddListObject
protected void postProcessAddListObject()- Overrides:
postProcessAddListObject
in classDataContext<HOMEOBJECTCLASS,
CONTENTTYPECLASS>
-
dbDeleteHomeObject
protected void dbDeleteHomeObject()- Specified by:
dbDeleteHomeObject
in classDataContext<HOMEOBJECTCLASS,
CONTENTTYPECLASS>
-
dbDeleteAssociatedObjects
protected void dbDeleteAssociatedObjects()Removes objects that are part of the data context - in addition to the home object. This method is an empty implementation on this level and must be implemented for all data contexts that include more than just the home object. -
dbRemoveObject
Description copied from class:DataContext
This is the method for actually removing one object that is part of the data context. Override this method following your persistence management.- Specified by:
dbRemoveObject
in classDataContext<HOMEOBJECTCLASS,
CONTENTTYPECLASS>
-
dbSaveObject
Description copied from class:DataContext
This is the method for actually saving one object that is part of the data context. Override this method following your persistence management.- Specified by:
dbSaveObject
in classDataContext<HOMEOBJECTCLASS,
CONTENTTYPECLASS>
-
performPhase2SaveInRootDataContext
protected void performPhase2SaveInRootDataContext()
-