Class AbstractCheckList
- All Implemented Interfaces:
Displayable,StringFiller,HasChildren,HasId
- Direct Known Subclasses:
AbstractCheckListItem,CheckList
-
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic voidgetCheckList(Transaction transaction) booleangetName()static <T extends AbstractCheckList>
voidpopulate(T checkList, CheckListTemplate template, TransactionManager tm) static <T extends AbstractCheckList>
voidpopulate(T checkList, CheckListTemplate template, TransactionManager tm, Consumer<T> setValues) static <T extends AbstractCheckList,IT extends AbstractCheckListItem>
voidpopulate(T checkList, CheckListTemplate template, TransactionManager tm, Consumer<T> setValues, BiConsumer<IT, T> setItemValues) voidsetCompleteBefore(ComputedDate completeBefore) voidsetCompleteBefore(Object value) voidsetCompleted(boolean completed) voidsetCompletedOn(Date completedOn) voidtoString()String representation of the instance.voidvalidate()The system invokes this method internally whenever the object gets saved to the DB (that means, while doing transactions).voidvalidateChildAttach(StoredObject child, int linkType) Do validation when a child is attached.voidvalidateChildDetach(StoredObject child, int linkType) Do validation when a child is detached.voidvalidateChildUpdate(StoredObject child, int linkType) Do validation when a child is updated.voidThe system will invoke this whenever the object is saved to the DB.Methods inherited from class com.storedobject.core.StoredObject
addLink, addLink, addLink, addLink, addLink, addLink, addLink, addLink, checkCurrency, checkCurrency, checkForDuplicate, checkForDuplicate, checkTimeZone, checkTransaction, clearObjectLinks, contemporary, copy, copy, count, count, count, count, count, count, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, create, created, delete, delete, delete, deleted, directUpdate, equals, exists, exists, exists, exists, exists, existsFileData, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsMaster, existsMaster, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, family, family, family, family, fill, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getActor, getAttachment, getAttachmentId, getChildren, getContemporaryOf, getDeleted, getDeleted, getExistsCondition, getExistsCondition, getFileData, getFileData, getHistorical, getId, getKeyIndex, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getNotExistsCondition, getNotExistsCondition, getParent, getParent, getParent, getParentId, getParentId, getParentId, getRelated, getRelated, getTransaction, getTransactionId, getTransactionIP, getUnique, getUniqueCondition, hashCode, inserted, isModified, isVirtual, list, list, list, list, list, list, list, list, list, list, list, list, list, listDeletedIds, listFileData, listFileData, listHistory, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listTree, listTree, listTree, listTree, listViaQuery, listViaQuery, load, load, load, load, loadAttributesFrom, loaded, loading, makeNew, makeVirtual, migrate, moduleName, nextVersion, objectLink, objectLink, objectLink, objectLinks, objectLinks, old, person, previousVersion, previousVersion, query, query, query, query, query, query, query, query, query, query, query, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, reload, reload, reloaded, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeReverseLinks, removeReverseLinks, save, save, save, save, save, save, save, save, save, save, save, save, save, save, save, saved, saving, setMaster, setRawValue, setTransaction, stringify, tableName, timestamp, toCode, toDisplay, transacting, undelete, undelete, undeleted, updated, user, userId, validateDelete, validateInsert, validateParentAttach, validateParentDetach, validateParentUpdate, validateUndelete, validateUpdate, valueEquals
-
Constructor Details
-
AbstractCheckList
public AbstractCheckList()
-
-
Method Details
-
columns
-
toString
Description copied from class:StoredObjectString representation of the instance. Mostly used for logging purposes.- Overrides:
toStringin classStoredObject- Returns:
- String representation of the instance.
-
setName
-
getName
-
setCompleteBefore
-
setCompleteBefore
-
getCompleteBefore
-
setCompletedOn
-
getCompletedOn
-
setCompleted
public void setCompleted(boolean completed) -
getCompleted
-
validateData
Description copied from class:StoredObjectThe system will invoke this whenever the object is saved to the DB. It will be invoked in all cases while creating new objects and updating/deleting/undeleting existing objects. If any exception is raised by this method, the process of saving to the DB will be abandoned.
Note: This method is mainly used to validate the data of all attributes of the object, and it may be used by others for validating the object. For example, front-end data-entry systems can use this method for validating the object.
- Overrides:
validateDatain classStoredObject- Parameters:
tm- Current transaction manager.- Throws:
Exception- If data is invalid.
-
validate
Description copied from class:StoredObjectThe system invokes this method internally whenever the object gets saved to the DB (that means, while doing transactions). It will be invoked in all cases (while creating new objects and updating/deleting/undeleting existing objects). If this method raises any exceptions, the process of saving to the DB will be abandoned.
This method is not usually used for validating data (For that purpose,
StoredObject.validateData(TransactionManager)is recommended). It is mainly used for validating the state of the object. Methods such asStoredObject.created(),StoredObject.updated(),StoredObject.deleted(),StoredObject.undeleted()etc., are used to check the specific states, but overridden methods may check for other "application-specific"/"business-specific" states.This method is invoked only after one of the other operation-specific validate-methods is invoked depending on the save operation -
StoredObject.validateInsert(),StoredObject.validateUpdate(),StoredObject.validateDelete(),StoredObject.validateUndelete().Note: When overridden "super" should be called, otherwise, a "design error" will occur.
- Overrides:
validatein classStoredObject- Throws:
Exception- By raising an exception from this method, the current transaction can be abandoned.
-
checkCompleteness
public boolean checkCompleteness() -
listItems
-
validateChildAttach
Description copied from class:StoredObjectDo validation when a child is attached.Note: This method will be invoked only if this class implements
HasChildren.- Overrides:
validateChildAttachin classStoredObject- Parameters:
child- Child to validate.linkType- Link type.- Throws:
Exception- By raising an exception from this method, the current transaction can be abandoned.
-
validateChildDetach
Description copied from class:StoredObjectDo validation when a child is detached.Note: This method will be invoked only if this class implements
HasChildren.- Overrides:
validateChildDetachin classStoredObject- Parameters:
child- Child to validate.linkType- Link type.- Throws:
Exception- By raising an exception from this method, the current transaction can be abandoned.
-
validateChildUpdate
Description copied from class:StoredObjectDo validation when a child is updated. Default implementation of this invokesStoredObject.validateChildAttach(StoredObject, int).Note: This method will be invoked only if this class implements
HasChildren.- Overrides:
validateChildUpdatein classStoredObject- Parameters:
child- Child to validate.linkType- Link type.
-
populate
public static <T extends AbstractCheckList> void populate(T checkList, CheckListTemplate template, TransactionManager tm) throws Exception - Throws:
Exception
-
populate
public static <T extends AbstractCheckList> void populate(T checkList, CheckListTemplate template, TransactionManager tm, Consumer<T> setValues) throws Exception - Throws:
Exception
-
populate
public static <T extends AbstractCheckList,IT extends AbstractCheckListItem> void populate(T checkList, CheckListTemplate template, TransactionManager tm, Consumer<T> setValues, BiConsumer<IT, T> setItemValues) throws Exception- Throws:
Exception
-
getCheckList
-
getCheckList
-