Class MasterDataInstanceEntityImpl
- java.lang.Object
-
- org.flowable.common.engine.impl.persistence.entity.AbstractEntity
-
- com.flowable.dataobject.engine.impl.persistence.entity.AbstractDataObjectEngineEntity
-
- com.flowable.dataobject.engine.impl.persistence.entity.MasterDataInstanceEntityImpl
-
- All Implemented Interfaces:
MasterDataInstance
,MasterDataInstanceEntity
,HasRevision
,Entity
public class MasterDataInstanceEntityImpl extends AbstractDataObjectEngineEntity implements MasterDataInstanceEntity
-
-
Field Summary
Fields Modifier and Type Field Description protected Date
creationTime
protected String
creatorId
protected String
definitionId
protected String
definitionKey
protected String
description
protected String
externalId
protected boolean
favorite
protected String
key
protected String
name
protected List<Translation>
queryTranslations
protected List<DataObjectVariableEntity>
queryVariables
protected int
sortOrder
protected String
state
protected String
tenantId
protected Map<String,Map<String,String>>
translations
protected boolean
translationsInitialized
protected String
updaterId
protected Date
updateTime
protected Map<String,Object>
variables
protected boolean
variablesInitialized
-
Fields inherited from class org.flowable.common.engine.impl.persistence.entity.AbstractEntity
id, isDeleted, isInserted, isUpdated, originalPersistentState, revision
-
-
Constructor Summary
Constructors Constructor Description MasterDataInstanceEntityImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Date
getCreationTime()
Returns the creation timestamp of this data instance.String
getCreatorId()
Returns the id of the user creating this data instance.String
getDefinitionId()
Returns the id of the master data definition this instance belongs to.String
getDefinitionKey()
Returns the key of the master data definition this instance belongs to.String
getDescription()
Returns the optional description of this master data instance, if any, null otherwise.String
getExternalId()
Returns the external id of this master data instance.String
getKey()
Returns the key for this master data instance which must be unique, but is human-readable normally and must be the same across environments for the same master data instance.String
getLocalizedName(Locale locale)
Returns the name for this instance according the given locale, if available, defaults to the name provided byMasterDataInstance.getName()
if there is no translation available for the requested locale.String
getName()
Returns the name of this master data instance which is usually used as the label.Object
getPersistentState()
List<Translation>
getQueryTranslations()
Getter used by MyBatis when querying master data instances with translations included.List<DataObjectVariableEntity>
getQueryVariables()
Getter used by MyBatis when querying master data instances with variables included.int
getSortOrder()
Returns the sort order for this master data instance.String
getState()
Returns the state of this master data instance which might be active or archived.String
getTenantId()
Returns the tenant id for this master data instance.Map<String,Map<String,String>>
getTranslations()
The translations for the master data, a Map having locale as the key and key value pairs for each locale.String
getUpdaterId()
Returns the optional id of the user having last modified this data instance, if any,null
otherwise.Date
getUpdateTime()
Returns the timestamp of the last update of this data instance, in most cases where events are immutable, this timestamp is the same as the creation timestamp, but must never benull
.Map<String,Object>
getVariables()
Returns the optional map of variables attached to this master data instance.boolean
isFavorite()
Returns true, if this master data instance is a favorite, which means it should be shown on the top of the list in a selection for instance.void
setCreationTime(Date creationTime)
void
setCreatorId(String creatorId)
void
setDefinitionId(String definitionId)
void
setDefinitionKey(String definitionKey)
void
setDescription(String description)
void
setExternalId(String externalId)
void
setFavorite(boolean favorite)
void
setKey(String key)
void
setName(String name)
void
setQueryTranslations(List<Translation> queryVariables)
Setter used by MyBatis when querying master data instances with translations.void
setQueryVariables(List<DataObjectVariableEntity> queryVariables)
Setter used by MyBatis when querying master data instances with variables.void
setSortOrder(int sortOrder)
void
setState(String state)
void
setTenantId(String tenantId)
void
setUpdaterId(String updaterId)
void
setUpdateTime(Date updateTime)
-
Methods inherited from class com.flowable.dataobject.engine.impl.persistence.entity.AbstractDataObjectEngineEntity
getIdPrefix
-
Methods inherited from class org.flowable.common.engine.impl.persistence.entity.AbstractEntity
getId, getOriginalPersistentState, getRevision, getRevisionNext, isDeleted, isInserted, isUpdated, setDeleted, setId, setInserted, setOriginalPersistentState, setRevision, setUpdated
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.flowable.common.engine.impl.persistence.entity.Entity
getId, getIdPrefix, getOriginalPersistentState, isDeleted, isInserted, isUpdated, setDeleted, setId, setInserted, setOriginalPersistentState, setUpdated
-
Methods inherited from interface org.flowable.common.engine.impl.db.HasRevision
getRevision, getRevisionNext, setRevision
-
Methods inherited from interface com.flowable.dataobject.api.runtime.MasterDataInstance
getId
-
-
-
-
Field Detail
-
definitionId
protected String definitionId
-
definitionKey
protected String definitionKey
-
tenantId
protected String tenantId
-
externalId
protected String externalId
-
key
protected String key
-
name
protected String name
-
state
protected String state
-
sortOrder
protected int sortOrder
-
favorite
protected boolean favorite
-
description
protected String description
-
creationTime
protected Date creationTime
-
creatorId
protected String creatorId
-
updateTime
protected Date updateTime
-
updaterId
protected String updaterId
-
queryVariables
protected List<DataObjectVariableEntity> queryVariables
-
queryTranslations
protected List<Translation> queryTranslations
-
variablesInitialized
protected boolean variablesInitialized
-
translationsInitialized
protected boolean translationsInitialized
-
-
Method Detail
-
getPersistentState
public Object getPersistentState()
- Specified by:
getPersistentState
in interfaceEntity
-
getDefinitionId
public String getDefinitionId()
Description copied from interface:MasterDataInstance
Returns the id of the master data definition this instance belongs to.- Specified by:
getDefinitionId
in interfaceMasterDataInstance
- Returns:
- the id of the master data definition
-
setDefinitionId
public void setDefinitionId(String definitionId)
- Specified by:
setDefinitionId
in interfaceMasterDataInstanceEntity
-
getDefinitionKey
public String getDefinitionKey()
Description copied from interface:MasterDataInstance
Returns the key of the master data definition this instance belongs to.- Specified by:
getDefinitionKey
in interfaceMasterDataInstance
- Returns:
- the key of the master data definition
-
setDefinitionKey
public void setDefinitionKey(String definitionKey)
- Specified by:
setDefinitionKey
in interfaceMasterDataInstanceEntity
-
getTenantId
public String getTenantId()
Description copied from interface:MasterDataInstance
Returns the tenant id for this master data instance.- Specified by:
getTenantId
in interfaceMasterDataInstance
- Returns:
- the tenant id of this master data instance
-
setTenantId
public void setTenantId(String tenantId)
- Specified by:
setTenantId
in interfaceMasterDataInstanceEntity
-
getExternalId
public String getExternalId()
Description copied from interface:MasterDataInstance
Returns the external id of this master data instance. This is specially useful, if this master data instance is mastered within an external system and needs to be mapped to that external id. The external id must be unique only within the same master data type, not fully unique like the normal, technical id. If this master data instance is, however, managed internally, the external id might simply return the same value as the id.- Specified by:
getExternalId
in interfaceMasterDataInstance
- Returns:
- the external id or the same value as
MasterDataInstance.getId()
if this data object is managed internally and not by an external data source
-
setExternalId
public void setExternalId(String externalId)
- Specified by:
setExternalId
in interfaceMasterDataInstanceEntity
-
getKey
public String getKey()
Description copied from interface:MasterDataInstance
Returns the key for this master data instance which must be unique, but is human-readable normally and must be the same across environments for the same master data instance. For a country master data instance, this might for instance be the 3 digit ISO code.- Specified by:
getKey
in interfaceMasterDataInstance
- Returns:
- the key for this master data instance
-
setKey
public void setKey(String key)
- Specified by:
setKey
in interfaceMasterDataInstanceEntity
-
getName
public String getName()
Description copied from interface:MasterDataInstance
Returns the name of this master data instance which is usually used as the label.- Specified by:
getName
in interfaceMasterDataInstance
- Returns:
- the name of this master data instance
-
setName
public void setName(String name)
- Specified by:
setName
in interfaceMasterDataInstanceEntity
-
getState
public String getState()
Description copied from interface:MasterDataInstance
Returns the state of this master data instance which might be active or archived. An archived instance must not be selected or presented for lookup anymore, but must still be available as it might still be referenced by some data in the system.- Specified by:
getState
in interfaceMasterDataInstance
- Returns:
- the state of this master data instance
- See Also:
for a list of available states
-
setState
public void setState(String state)
- Specified by:
setState
in interfaceMasterDataInstanceEntity
-
getSortOrder
public int getSortOrder()
Description copied from interface:MasterDataInstance
Returns the sort order for this master data instance. Entries having the same sort order will be sorted according their names, but sometimes sorting according the name is not what you want (for instance priority levels should be sorted according there severity, not their name).- Specified by:
getSortOrder
in interfaceMasterDataInstance
- Returns:
- the sort order for this master data instance, defaults to 0, if not set
-
setSortOrder
public void setSortOrder(int sortOrder)
- Specified by:
setSortOrder
in interfaceMasterDataInstanceEntity
-
isFavorite
public boolean isFavorite()
Description copied from interface:MasterDataInstance
Returns true, if this master data instance is a favorite, which means it should be shown on the top of the list in a selection for instance.- Specified by:
isFavorite
in interfaceMasterDataInstance
- Returns:
- true if this is a favorite master data instance
-
setFavorite
public void setFavorite(boolean favorite)
- Specified by:
setFavorite
in interfaceMasterDataInstanceEntity
-
getDescription
public String getDescription()
Description copied from interface:MasterDataInstance
Returns the optional description of this master data instance, if any, null otherwise.- Specified by:
getDescription
in interfaceMasterDataInstance
- Returns:
- the optional description or null, if not present
-
setDescription
public void setDescription(String description)
- Specified by:
setDescription
in interfaceMasterDataInstanceEntity
-
getCreationTime
public Date getCreationTime()
Description copied from interface:MasterDataInstance
Returns the creation timestamp of this data instance.- Specified by:
getCreationTime
in interfaceMasterDataInstance
- Returns:
- the creation timestamp
-
setCreationTime
public void setCreationTime(Date creationTime)
- Specified by:
setCreationTime
in interfaceMasterDataInstanceEntity
-
getCreatorId
public String getCreatorId()
Description copied from interface:MasterDataInstance
Returns the id of the user creating this data instance.- Specified by:
getCreatorId
in interfaceMasterDataInstance
- Returns:
- the id of the creation user
-
setCreatorId
public void setCreatorId(String creatorId)
- Specified by:
setCreatorId
in interfaceMasterDataInstanceEntity
-
getUpdateTime
public Date getUpdateTime()
Description copied from interface:MasterDataInstance
Returns the timestamp of the last update of this data instance, in most cases where events are immutable, this timestamp is the same as the creation timestamp, but must never benull
.- Specified by:
getUpdateTime
in interfaceMasterDataInstance
- Returns:
- the timestamp of the last update / modification of this data object
-
setUpdateTime
public void setUpdateTime(Date updateTime)
- Specified by:
setUpdateTime
in interfaceMasterDataInstanceEntity
-
getUpdaterId
public String getUpdaterId()
Description copied from interface:MasterDataInstance
Returns the optional id of the user having last modified this data instance, if any,null
otherwise.- Specified by:
getUpdaterId
in interfaceMasterDataInstance
- Returns:
- the optional id of the user having last updated this data instance
-
setUpdaterId
public void setUpdaterId(String updaterId)
- Specified by:
setUpdaterId
in interfaceMasterDataInstanceEntity
-
getLocalizedName
public String getLocalizedName(Locale locale)
Description copied from interface:MasterDataInstance
Returns the name for this instance according the given locale, if available, defaults to the name provided byMasterDataInstance.getName()
if there is no translation available for the requested locale.- Specified by:
getLocalizedName
in interfaceMasterDataInstance
- Parameters:
locale
- the locale to return the name for- Returns:
- the name in the requested locale, if available, otherwise the default one is returned
-
getVariables
public Map<String,Object> getVariables()
Description copied from interface:MasterDataInstance
Returns the optional map of variables attached to this master data instance. Returns an empty map, if there are no variables available, but never null.- Specified by:
getVariables
in interfaceMasterDataInstance
- Returns:
- the optional map of variables for this master data instance
-
getTranslations
public Map<String,Map<String,String>> getTranslations()
Description copied from interface:MasterDataInstance
The translations for the master data, a Map having locale as the key and key value pairs for each locale.- Specified by:
getTranslations
in interfaceMasterDataInstance
- Returns:
- the translations
-
getQueryVariables
public List<DataObjectVariableEntity> getQueryVariables()
Getter used by MyBatis when querying master data instances with variables included.
-
setQueryVariables
public void setQueryVariables(List<DataObjectVariableEntity> queryVariables)
Setter used by MyBatis when querying master data instances with variables.- Specified by:
setQueryVariables
in interfaceMasterDataInstanceEntity
-
getQueryTranslations
public List<Translation> getQueryTranslations()
Getter used by MyBatis when querying master data instances with translations included.
-
setQueryTranslations
public void setQueryTranslations(List<Translation> queryVariables)
Setter used by MyBatis when querying master data instances with translations.
-
-