Package mc.core.domain.generic.dobj
Class ClassificationDO
java.lang.Object
mc.core.system.base.BaseBean
mc.core.domain.base.dobj.AbstractBaseDO<T>
mc.core.domain.base.dobj.AbstractEntityBaseDO<T>
mc.core.domain.base.dobj.AbstractComplexEntityDO<T>
mc.core.domain.base.dobj.AbstractHrcEntityDO<Classification>
mc.core.domain.generic.dobj.ClassificationDO
- All Implemented Interfaces:
IBaseDO<Classification>
-
Nested Class Summary
Nested classes/interfaces inherited from class mc.core.domain.base.dobj.AbstractBaseDO
AbstractBaseDO.Initializer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidattributeChangeOrder(Classification classification, Attribute attribute, boolean byCollection, boolean decreaseOrder) attributeGetAllowedDVSets(Classification classification, Attribute attribute) Returns list of standard values of given attribute that are allowed for given classification.voidattributeRemove(Classification classification, Attribute attribute, boolean force) Removes assignment of attribute to the classification, if exists.voidattributesAdd(Classification classification, List<Attribute> attributes, boolean byCollection) Adds list of given attributes at the end of list of assigned attributes of this collection and sets prio accordingly, prios starting with 1.voidattributeSetAllowedDVSets(Classification classification, Attribute attribute, List<DataValueSet> dvSets) voidattributesSetMandatory(Classification classification, List<Attribute> mandatoryAttributes) Sets all assigned attributes of this classifications that are within given list of mandatory.copy(Classification source, Classification target) deep copy of classification.copyToHrc(Classification source, ClassificationHrc target) deep copy of classification.voiddelete(Classification classification, boolean force) NOTE: when overriding this method and you delete any other objects you need to call validateNotUsed before in case flag force is false!edit(Classification classification) insert(Classification classification) voidmove(Classification classification, Classification target) move classification to another parent.voidmoveToHrc(Classification classification, ClassificationHrc target) move classification to another classificationHrc.Methods inherited from class mc.core.domain.base.dobj.AbstractHrcEntityDO
getAllOffspringMethods inherited from class mc.core.domain.base.dobj.AbstractComplexEntityDO
addDefaultSearchCriteria, assertPermission, assertPermission, attributes, copy, copyDataSync, copyToCollection, doRecursiveActionAsync, entityProfileApply, entityProfileApply, filter, getCollectionHierarchies, getCollectionsAll, getFromExternalKey, getFromKeySearchFilter, getUserRole, lifecycle, newComplexEntityEvent, onChange, parameter, permissions, prepareSearchFilter, relations, secondaryCollectionAdd, secondaryCollectionCopy, secondaryCollectionMove, secondaryCollectionRemove, setRightInheritanceDisabled, states, translate, versions, watchesMethods inherited from class mc.core.domain.base.dobj.AbstractEntityBaseDO
getFromInternalDescription, save, sendEvent, sendEventMethods inherited from class mc.core.domain.base.dobj.AbstractBaseDO
delete, getAll, getAllActive, getEntityDisplay, getFromId, getFromKey, getOne, map, map, save, validator
-
Constructor Details
-
ClassificationDO
public ClassificationDO()
-
-
Method Details
-
insert
public Classification insert(Classification classification) throws UserException, ApplicationException - Overrides:
insertin classAbstractComplexEntityDO<Classification>- Throws:
UserExceptionApplicationException
-
delete
public void delete(Classification classification, boolean force) throws UserException, ApplicationException Description copied from class:AbstractBaseDONOTE: when overriding this method and you delete any other objects you need to call validateNotUsed before in case flag force is false!- Overrides:
deletein classAbstractComplexEntityDO<Classification>- Parameters:
classification- mandatoryforce- if true delete without usage check, which can result in db constraints error unless references are taken care of- Throws:
UserExceptionApplicationException
-
edit
public Classification edit(Classification classification) throws UserException, ApplicationException - Overrides:
editin classAbstractComplexEntityDO<Classification>- Throws:
UserExceptionApplicationException
-
move
move classification to another parent. target can be part of another classifcationHrc. classificationHrc for the object and all it's children is set.- Parameters:
classification- object to move, mandatorytarget- new parent for the object, optional. if null the object is moved to the root of the hierarchy
-
moveToHrc
move classification to another classificationHrc. classificationHrc for the object and all it's children is set.- Parameters:
classification- object to move, mandatorytarget- hierarchy to move to, optional. if null the object is moved to the root of it's hierarchy
-
copy
public Classification copy(Classification source, Classification target) throws ApplicationException deep copy of classification. copies classification attributes and object attributes. target can be part of another classifcationHrc. classificationHrc for the copy and all it's children is set.- Overrides:
copyin classAbstractHrcEntityDO<Classification>- Parameters:
source- object to copy, mandatorytarget- parent for the copy, optional. if null the parent of source is used- Returns:
- copy
- Throws:
ApplicationException
-
copyToHrc
public Classification copyToHrc(Classification source, ClassificationHrc target) throws ApplicationException deep copy of classification. copies classification attributes and object attributes. target can be another classifcationHrc. classificationHrc for the copy and all it's children is set.- Parameters:
source- object to copy, mandatorytarget- hierarchy for the copy, optional. if null the hierarchy of source is used- Throws:
ApplicationException
-
attributesAdd
public void attributesAdd(Classification classification, List<Attribute> attributes, boolean byCollection) throws UserException Adds list of given attributes at the end of list of assigned attributes of this collection and sets prio accordingly, prios starting with 1.- Parameters:
classification- mandatoryattributes- mandatory, if list is empty nothing happensbyCollection- if attribute order should be determined grouped by collections, otherwise grouped by attributeType.- Throws:
UserException
-
attributesSetMandatory
public void attributesSetMandatory(Classification classification, List<Attribute> mandatoryAttributes) throws UserException Sets all assigned attributes of this classifications that are within given list of mandatory.- Parameters:
classification- mandatorymandatoryAttributes- mandatory, empty list allowed.- Throws:
UserException
-
attributeChangeOrder
public void attributeChangeOrder(Classification classification, Attribute attribute, boolean byCollection, boolean decreaseOrder) throws UserException - Throws:
UserException
-
attributeSetAllowedDVSets
public void attributeSetAllowedDVSets(Classification classification, Attribute attribute, List<DataValueSet> dvSets) throws UserException - Throws:
UserException
-
attributeGetAllowedDVSets
public List<DataValueSet> attributeGetAllowedDVSets(Classification classification, Attribute attribute) Returns list of standard values of given attribute that are allowed for given classification. If attribute is not assigned to classification returns empty list.- Parameters:
classification- mandatoryattribute- mandatory- Returns:
- List
-
attributeRemove
public void attributeRemove(Classification classification, Attribute attribute, boolean force) throws ApplicationException Removes assignment of attribute to the classification, if exists.- Parameters:
classification- mandatoryattribute- mandatoryforce- ignored for to date, always removes- Throws:
ApplicationException
-