Package mc.core.model.cc
Class Principal
java.lang.Object
mc.core.model.base.EntityBase
mc.core.model.base.ComplexEntity
mc.core.model.cc.Principal
- All Implemented Interfaces:
Serializable,IBaseEntity,ICoreEntity,IEntity,ISortableEntity
base class for User or UserGroup. Can have one or more assigned territory to signal that the Principal belongs to or
is responsible for these territories. Set Principal inactive when not used but should not be deleted. Since
Principals are referenced in many other entities (e.g. Permission, State, Version) upon deletion by the frontend
their LifeCycleFlag is set to DELETED, but they are not removed from database.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class mc.core.model.base.ComplexEntity
ComplexEntity.ComplexEntityComparator, ComplexEntity.ParamNested 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget a list of permission objects, this principal is assigned to.getType()override in derived classes, return null if ComplexEntity-subclass is not type managed.booleanisActive()booleanvoidsetActive(boolean active) voidsetPermissionsForPrincipal(List<Permission> permissions) voidsetTerritory(Territory territory) Methods inherited from class mc.core.model.base.ComplexEntity
addState, getAttributes, getCollections, getCollections, getCollectionToCEs, getDateCreated, getDateModified, getEntityData, getEntityDatas, getEntityFilters, getEntityOwner, getExternalKey, getFileId, getFilename, getHasObjectRights, getId, getLifeCycleFlag, getMasterId, getMasterLocale, getMemos, getParameter, getParameters, getParameterValue, getPermissions, getRelatedEntities, getState, getStateGroupTypes, getStates, getStatesToRemove, getVersions, getWatches, isArchived, isDeleted, isRightInheritanceDisabled, isSecondaryCollection, 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, setCollection, setDescription, setDescription, setFlag, setInternalDescription, setIsSystem, setName, setName, setNamespace, setPrio, toString
-
Constructor Details
-
Principal
public Principal() -
Principal
Copy constructor. Does not copy permissions.- Parameters:
source- Template object.
-
-
Method Details
-
isActive
public boolean isActive() -
setActive
public void setActive(boolean active) -
isVisible
public boolean isVisible()- Overrides:
isVisiblein classComplexEntity
-
getInternalDescription
- Specified by:
getInternalDescriptionin interfaceIEntity- Overrides:
getInternalDescriptionin classComplexEntity- Returns:
- Unique identifier in combination with entity class if internalDescription property is defined as unique.
Might be
null.
-
getPermissionsForPrincipal
get a list of permission objects, this principal is assigned to. normally this method is not used directly, but it gives hibernate a hint to delete permission objects on delete of principal. Important note: do not name method "getPermissions". there is ComplexEntity.getPermissions mapped by field "object". hibernate complains about "shared collection" then.- Returns:
- List of Permission
-
setPermissionsForPrincipal
-
getTerritory
-
setTerritory
-
getType
Description copied from class:ComplexEntityoverride in derived classes, return null if ComplexEntity-subclass is not type managed.- Specified by:
getTypein classComplexEntity
-