Interface MasterDataInstance
- All Known Subinterfaces:
MasterDataInstanceEntity
- All Known Implementing Classes:
MasterDataInstanceEntityImpl
public interface MasterDataInstance
A single master data instance usually fetched through the
DataObjectRuntimeService
and based on a DataObjectDefinition
.- Author:
- Micha Kiener
-
Method Summary
Modifier and Type Method Description java.util.Date
getCreationTime()
Returns the creation timestamp of this data instance.java.lang.String
getCreatorId()
Returns the id of the user creating this data instance.java.lang.String
getDefinitionId()
Returns the id of the master data definition this instance belongs to.java.lang.String
getDefinitionKey()
Returns the key of the master data definition this instance belongs to.java.lang.String
getDescription()
Returns the optional description of this master data instance, if any, null otherwise.java.lang.String
getExternalId()
Returns the external id of this master data instance.java.lang.String
getId()
Returns the unique, technical id for this master data instance.java.lang.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.java.lang.String
getLocalizedName(java.util.Locale locale)
Returns the name for this instance according the given locale, if available, defaults to the name provided bygetName()
if there is no translation available for the requested locale.java.lang.String
getName()
Returns the name of this master data instance which is usually used as the label.int
getSortOrder()
Returns the sort order for this master data instance.java.lang.String
getState()
Returns the state of this master data instance which might be active or archived.java.lang.String
getTenantId()
Returns the tenant id for this master data instance.java.lang.String
getUpdaterId()
Returns the optional id of the user having last modified this data instance, if any,null
otherwise.java.util.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
.java.util.Map<java.lang.String,java.lang.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.
-
Method Details
-
getId
java.lang.String getId()Returns the unique, technical id for this master data instance. This id will be different from environment to environment.- Returns:
- the id of this master data instance
-
getTenantId
java.lang.String getTenantId()Returns the tenant id for this master data instance.- Returns:
- the tenant id of this master data instance
-
getExternalId
java.lang.String getExternalId()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.- Returns:
- the external id or the same value as
getId()
if this data object is managed internally and not by an external data source
-
getKey
java.lang.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. For a country master data instance, this might for instance be the 3 digit ISO code.- Returns:
- the key for this master data instance
-
getName
java.lang.String getName()Returns the name of this master data instance which is usually used as the label.- Returns:
- the name of this master data instance
-
getDefinitionId
java.lang.String getDefinitionId()Returns the id of the master data definition this instance belongs to.- Returns:
- the id of the master data definition
-
getDefinitionKey
java.lang.String getDefinitionKey()Returns the key of the master data definition this instance belongs to.- Returns:
- the key of the master data definition
-
getState
java.lang.String getState()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.- Returns:
- the state of this master data instance
- See Also:
for a list of available states
-
getSortOrder
int getSortOrder()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).- Returns:
- the sort order for this master data instance, defaults to 0, if not set
-
isFavorite
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.- Returns:
- true if this is a favorite master data instance
-
getLocalizedName
java.lang.String getLocalizedName(java.util.Locale locale)Returns the name for this instance according the given locale, if available, defaults to the name provided bygetName()
if there is no translation available for the requested locale.- Parameters:
locale
- the locale to return the name for- Returns:
- the name in the requested locale, if available, otherwise the default one is returned
-
getDescription
java.lang.String getDescription()Returns the optional description of this master data instance, if any, null otherwise.- Returns:
- the optional description or null, if not present
-
getCreationTime
java.util.Date getCreationTime()Returns the creation timestamp of this data instance.- Returns:
- the creation timestamp
-
getCreatorId
java.lang.String getCreatorId()Returns the id of the user creating this data instance.- Returns:
- the id of the creation user
-
getUpdateTime
java.util.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
.- Returns:
- the timestamp of the last update / modification of this data object
-
getUpdaterId
java.lang.String getUpdaterId()Returns the optional id of the user having last modified this data instance, if any,null
otherwise.- Returns:
- the optional id of the user having last updated this data instance
-
getVariables
java.util.Map<java.lang.String,java.lang.Object> getVariables()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.- Returns:
- the optional map of variables for this master data instance
-