Package mc.core.model.generic
Class Collection
java.lang.Object
mc.core.model.base.EntityBase
mc.core.model.base.ComplexEntity
mc.core.model.base.HrcEntity
mc.core.model.generic.Collection
- All Implemented Interfaces:
Serializable,IBaseEntity,ICoreEntity,IEntity,IHrcManaged<Collection>,IRightManaged,ISortableEntity
Collection are used as hierarchical structured containers for any kind of entity that implement ICollectionManaged.
There are 2 ways to structure entities in collections: ComplexEntities that have a type will be grouped in a
collection tree per type, other entities have a collection tree for the whole class.
Collections are ComplexEntities and are always IRightManaged (implementing interface IRightManaged). Collections are not type managed, getType() returns null.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class mc.core.model.base.HrcEntity
HrcEntity.HrcEntityComparator, HrcEntity.ParamNested classes/interfaces inherited from class mc.core.model.base.ComplexEntity
ComplexEntity.ComplexEntityComparatorNested classes/interfaces inherited from class mc.core.model.base.EntityBase
EntityBase.EntityComparator -
Field Summary
Fields inherited from class mc.core.model.base.EntityBase
INTDESC_COLUMN_LENGTH -
Constructor Summary
ConstructorsConstructorDescriptiondefault constructorCollection(Collection source) copy constructorCollection(Collection parentCollection, String uri) Collection(Collection parentCollection, String uri, String internalDescription) -
Method Summary
Modifier and TypeMethodDescriptiongive the maximum list of RightTypes that apply for this class.Returns the complete path of uris for this collection.booleantype of ComplexEntity must be attached if existsgetHrc()has no special hierarchy objectgetItems()For ComplexEntities that have a collection tree per type: store the type in collectionused by copy and delete collectiongetType()override in derived classes, return null if ComplexEntity-subclass is not type managed.getUri()The URI of collection, must be unique within the parent collection.typesafe retrieval of HrcEntity children.typesafe retrieval of HrcEntity parent.typesafe retrieval of HrcEntity parents.hrcPath()typesafe retrieval of HrcEntity parents plus entity itself.typesafe retrieval of HrcEntity visible children (filtered on life cycle flag visible)
never return proxiesvoidsetCollection(Collection collection) override to disable.voidsetDisplayPath(String displayPath) voidsetItemClass(String itemClass) voidsetItems(List<ComplexEntity> items) voidsetItemType(ComplexTypeEntity itemType) voidvoidsetParentCollection(Collection parent) Propagate itemClass and itemType to child collectionvoidset partial URI (last part of collection path) for this collection internally stored in external key.uriPath()Methods inherited from class mc.core.model.base.HrcEntity
addChild, getChildren, getParent, getVisibleChildren, hrcParentsDisplay, hrcPathDisplay, hrcPathDisplay, setChildrenMethods inherited from class mc.core.model.base.ComplexEntity
addState, getAttributes, getCollections, getCollections, getCollectionToCEs, getDateCreated, getDateModified, getEntityData, getEntityDatas, getEntityFilters, getEntityOwner, getExternalKey, getFileId, getFilename, getId, getInternalDescription, getLifeCycleFlag, getMasterId, getMasterLocale, getMemos, getParameter, getParameters, getParameterValue, getPermissions, getRelatedEntities, getState, getStateGroupTypes, getStates, getStatesToRemove, getVersions, getWatches, isArchived, isDeleted, isRightInheritanceDisabled, isSecondaryCollection, isVisible, setAttributes, setCollectionToCEs, setDateCreated, setDateModified, setEntityDatas, setEntityFilters, setEntityOwner, setExternalKey, setFileId, setFilename, setId, setLifeCycleFlag, setMasterId, setMasterLocale, setMemos, setParameters, setPermissions, setRelatedEntities, setRightInheritanceDisabled, setStates, setType, setVersions, setWatchesMethods inherited from class mc.core.model.base.EntityBase
equals, getCollection, getDescription, getDescription, getFlag, getIsSystem, getName, getName, getNamespace, getPrio, hashCode, setDescription, setDescription, setFlag, setInternalDescription, setIsSystem, setName, setName, setNamespace, setPrio, toStringMethods inherited from interface mc.core.model.base.IBaseEntity
getId, setIdMethods inherited from interface mc.core.model.base.IEntity
getDescription, getInternalDescription, getName, getPrio, setInternalDescriptionMethods inherited from interface mc.core.model.base.IHrcManaged
hrcParentsDisplay, hrcPathDisplay, hrcPathDisplayMethods inherited from interface mc.core.model.base.IRightManaged
getPermissions
-
Constructor Details
-
Collection
public Collection()default constructor -
Collection
copy constructor -
Collection
-
Collection
-
-
Method Details
-
getItemClass
-
setItemClass
-
getItemType
For ComplexEntities that have a collection tree per type: store the type in collection- Returns:
- ComplexTypeEntity
-
setItemType
-
getItems
- Returns:
- list of ComplexEntity objects "in" this collection. mapped by property EntityBase.collection.
-
setItems
-
getLinkedItems
used by copy and delete collection -
getType
Description copied from class:ComplexEntityoverride in derived classes, return null if ComplexEntity-subclass is not type managed.- Specified by:
getTypein classComplexEntity
-
getUri
The URI of collection, must be unique within the parent collection. Internally it is mapped to externalKey- Returns:
- String
-
setUri
set partial URI (last part of collection path) for this collection internally stored in external key. Must be unique within the parent collection -
setParentCollection
Propagate itemClass and itemType to child collection -
setParent
-
setCollection
override to disable. never set collection on a collection - will result in corrupted data. usesetParentCollection(Collection)- Overrides:
setCollectionin classEntityBase
-
getDisplayPath
Returns the complete path of uris for this collection. NOTE: Transient, not stored in database, must be set externally- Returns:
- String
-
setDisplayPath
-
getAllowedRightTypes
Description copied from interface:IRightManagedgive the maximum list of RightTypes that apply for this class.- Specified by:
getAllowedRightTypesin interfaceIRightManaged- Returns:
- array of enum RightType
- See Also:
-
getHasObjectRights
public boolean getHasObjectRights()Description copied from class:ComplexEntitytype of ComplexEntity must be attached if exists- Specified by:
getHasObjectRightsin interfaceIRightManaged- Overrides:
getHasObjectRightsin classComplexEntity- Returns:
- true if object rights are configured for this ComplexEntity
-
getHrc
has no special hierarchy object -
hrcChildren
Description copied from interface:IHrcManagedtypesafe retrieval of HrcEntity children. never return proxies- Specified by:
hrcChildrenin interfaceIHrcManaged<Collection>- Returns:
- typesafe list of children entities or empty list. never null
-
hrcVisibleChildren
Description copied from interface:IHrcManagedtypesafe retrieval of HrcEntity visible children (filtered on life cycle flag visible)
never return proxies- Specified by:
hrcVisibleChildrenin interfaceIHrcManaged<Collection>- Returns:
- typesafe list of children entities or empty list. never null
-
hrcParent
Description copied from interface:IHrcManagedtypesafe retrieval of HrcEntity parent. never return proxy. use this preferable over getParent() if you want access type special properties or use entity class, instead of safeCast to target type yourself. still use getParent() if you only need the id, cause no need to initialize (load) proxy then- Specified by:
hrcParentin interfaceIHrcManaged<Collection>- Returns:
- parent entity or null
-
hrcParents
Description copied from interface:IHrcManagedtypesafe retrieval of HrcEntity parents. never return proxies. use this if you want access type special properties or use entity class, instead of safeCast to target type yourself- Specified by:
hrcParentsin interfaceIHrcManaged<Collection>- Overrides:
hrcParentsin classHrcEntity- Returns:
- Parents starting from root up to (but not including) this
HrcEntity.
-
hrcPath
Description copied from interface:IHrcManagedtypesafe retrieval of HrcEntity parents plus entity itself. never return proxies. use this if you want access type special properties or use entity class, instead of safeCast to target type yourself- Specified by:
hrcPathin interfaceIHrcManaged<Collection>- Overrides:
hrcPathin classHrcEntity- Returns:
- List of ancestors starting with root ancestor and including ourself at the end
- See Also:
-
uriPath
-