public class AnyWorkObjectDefinition extends Entity implements HierarchicalEntity
Represents a concrete work object definition. <p> Note: This class is useful when working with work object definitions in a generic way.
Modifier and Type | Class and Description |
---|---|
static class |
AnyWorkObjectDefinition.Builder
Builder for an AnyWorkObjectDefinition instance.
|
Entity.EntityBuilder<E extends Entity,SELF extends Entity.EntityBuilder<E,SELF>>
HierarchicalEntity.HierarchicalEntityBuilder<SELF extends HierarchicalEntity.HierarchicalEntityBuilder<SELF>>
Modifier and Type | Field and Description |
---|---|
static String |
ANY_WORK_OBJECT_DEFINITION_TYPE
Deprecated.
|
static TimestampOperand<Instant> |
CREATION_TIME
Allows to build predicates testing for certain work object definition creation time values.
|
static StringOperand<String> |
EXTERNAL_ID
Allows to build predicates testing for certain external work object definition id values.
|
static VersionOperand |
EXTERNAL_VERSION
Allows to build predicates testing for certain work object definition external version values.
|
static HierarchyOperandImpl |
HIERARCHY
Allows to build predicates testing for certain work object definition path values.
|
static StringOperand<String> |
ID
Allows to build predicates testing for certain work object definition id values.
|
static StringOperand<String> |
KEY
Allows to build predicates testing for certain work object definition key values.
|
static LatestVersionOperand |
LATEST_EXTERNAL_VERSION
Allows to build predicates that test for the latest external version of all work object definitions with a certain key.
|
static LatestVersionOperand |
LATEST_VERSION
Allows to build predicates that test for the latest version of all work object definitions with a certain key.
|
static StringOperand<String> |
NAME
Allows to build predicates testing for certain work object definition name values.
|
static PropertyOperand |
PROPERTY
Allows to build predicates testing for certain work object definition property values.
|
static StringOperand<String> |
PROVIDER_ID
Allows to build predicates testing for certain work object definition provider id values.
|
static StringOperand<String> |
TENANT_ID
Allows to build predicates testing for certain work object definition tenant id values.
|
static StringOperand<String> |
TYPE
Allows to build predicates testing for certain work object definition type values.
|
static TimestampOperand<Instant> |
UPDATE_TIME
Allows to build predicates testing for certain work object definition update time values.
|
static TimestampOperand<Instant> |
VALID_FROM
Allows to build predicates testing for certain work object definition valid from date values.
|
static TimestampOperand<Instant> |
VALID_TO
Allows to build predicates testing for certain work object definition valid to date values.
|
static VersionOperand |
VERSION
Allows to build predicates testing for certain work object definition version values.
|
Modifier and Type | Method and Description |
---|---|
static AnyWorkObjectDefinition.Builder |
builder()
Creates a builder for a new concrete work object definition instance.
|
static AnyWorkObjectDefinition.Builder |
builder(AnyWorkObjectDefinition template)
Creates a builder for a new concrete work object definition instance and applies the given template.
|
int |
getExternalVersion()
Returns the external version of the entity.
|
String |
getKey()
Returns the key of the entity.
|
List<Property> |
getLocalProperties()
Returns the local properties of the entity.
|
List<Property> |
getLocalProperties(com.google.common.base.Predicate<Property> predicate)
Returns the local properties of the entity, filtered by the given predicate.
|
Map<String,String> |
getLocalPropertiesMap()
Returns the local properties of the entity, mapped by the property name.
|
Map<String,String> |
getLocalPropertiesMap(com.google.common.base.Predicate<Property> predicate)
Returns the local properties of the entity as name/value pairs, filtered by the given predicate.
|
Property |
getLocalProperty(String name)
Returns the local property with the given name.
|
<V> V |
getLocalPropertyValue(PropertyName<V> propertyAccessor)
Returns the value of the local property with the name defined by the property accessor, deserialized and cast to the type expected by the property accessor.
|
String |
getLocalPropertyValue(String name)
Returns the value of the local property with the given name.
|
String |
getParentId()
Returns the id of the parent entity.
|
List<String> |
getPath()
Returns the path of the hierarchy to which the entity belongs.
|
List<Property> |
getProperties()
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalProperties() method instead and recheck where you store the properties |
List<Property> |
getProperties(com.google.common.base.Predicate<Property> predicate)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalProperties(Predicate) method instead and recheck where you store the properties |
Map<String,String> |
getPropertiesMap()
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalPropertiesMap() method instead and recheck where you store the properties |
Map<String,String> |
getPropertiesMap(com.google.common.base.Predicate<Property> predicate)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalPropertiesMap(Predicate) method instead and recheck where you store the properties |
Property |
getProperty(String name)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalProperty(String) method instead and recheck where you store the properties |
<V> V |
getPropertyValue(PropertyName<V> propertyAccessor)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalPropertyValue(PropertyName) method instead and recheck where you store the properties |
String |
getPropertyValue(String name)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalPropertyValue(String) method instead and recheck where you store the properties |
String |
getResourceString()
Returns the resource string of the entity.
|
String |
getRootId()
Returns the id of the root entity.
|
Instant |
getValidFrom()
Returns the date from which the entity is valid.
|
Instant |
getValidTo()
Returns the date until which the entity is valid.
|
int |
getVersion()
Returns the version of the entity.
|
boolean |
hasLocalProperty(PropertyName<?> propertyAccessor)
Returns <i>true</i> if the entity has a local property with the name of the given property accessor.
|
boolean |
hasLocalProperty(String name)
Returns <i>true</i> if the entity has a local property with the given name.
|
boolean |
hasParent()
Returns <i>true</i> if the entity has a parent.
|
boolean |
hasProperty(PropertyName<?> propertyAccessor)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
hasLocalProperty(PropertyName) method instead and recheck where you store the properties |
boolean |
hasProperty(String name)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
hasLocalProperty(String) method instead and recheck where you store the properties |
String |
toString() |
getCreationTime, getExternalId, getGlobalId, getId, getModificationCreatorId, getModificationUpdaterId, getModificationVersion, getName, getProviderId, getTenantId, getType, getUpdateTime
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getId
@Deprecated public static final String ANY_WORK_OBJECT_DEFINITION_TYPE
public static final StringOperand<String> ID
Allows to build predicates testing for certain work object definition id values.
public static final StringOperand<String> EXTERNAL_ID
Allows to build predicates testing for certain external work object definition id values.
public static final StringOperand<String> PROVIDER_ID
Allows to build predicates testing for certain work object definition provider id values.
public static final StringOperand<String> TENANT_ID
Allows to build predicates testing for certain work object definition tenant id values.
public static final StringOperand<String> NAME
Allows to build predicates testing for certain work object definition name values.
public static final TimestampOperand<Instant> CREATION_TIME
Allows to build predicates testing for certain work object definition creation time values.
public static final TimestampOperand<Instant> UPDATE_TIME
Allows to build predicates testing for certain work object definition update time values.
public static final StringOperand<String> TYPE
Allows to build predicates testing for certain work object definition type values.
public static final StringOperand<String> KEY
Allows to build predicates testing for certain work object definition key values.
public static final PropertyOperand PROPERTY
Allows to build predicates testing for certain work object definition property values.
public static final TimestampOperand<Instant> VALID_FROM
Allows to build predicates testing for certain work object definition valid from date values.
public static final TimestampOperand<Instant> VALID_TO
Allows to build predicates testing for certain work object definition valid to date values.
public static final VersionOperand VERSION
Allows to build predicates testing for certain work object definition version values.
public static final LatestVersionOperand LATEST_VERSION
Allows to build predicates that test for the latest version of all work object definitions with a certain key.
public static final VersionOperand EXTERNAL_VERSION
Allows to build predicates testing for certain work object definition external version values.
public static final LatestVersionOperand LATEST_EXTERNAL_VERSION
Allows to build predicates that test for the latest external version of all work object definitions with a certain key.
public static final HierarchyOperandImpl HIERARCHY
Allows to build predicates testing for certain work object definition path values.
public static AnyWorkObjectDefinition.Builder builder()
Creates a builder for a new concrete work object definition instance.
public static AnyWorkObjectDefinition.Builder builder(AnyWorkObjectDefinition template)
Creates a builder for a new concrete work object definition instance and applies the given template.
template
- the work object definition templatepublic List<String> getPath()
HierarchicalEntity
Returns the path of the hierarchy to which the entity belongs. The path starts with the root and ends with the entity itself, when iterating through the list from beginning to end.
getPath
in interface HierarchicalEntity
public String getRootId()
HierarchicalEntity
Returns the id of the root entity.
getRootId
in interface HierarchicalEntity
public boolean hasParent()
HierarchicalEntity
Returns <i>true</i> if the entity has a parent.
hasParent
in interface HierarchicalEntity
public String getParentId()
HierarchicalEntity
Returns the id of the parent entity.
getParentId
in interface HierarchicalEntity
public String getKey()
Returns the key of the entity.
@Deprecated public List<Property> getProperties()
getLocalProperties()
method instead and recheck where you store the propertiesReturns the properties of the entity.
@Deprecated public final List<Property> getProperties(com.google.common.base.Predicate<Property> predicate)
getLocalProperties(Predicate)
method instead and recheck where you store the propertiesReturns the properties of the entity, filtered by the given predicate.
predicate
- the predicate to filter by@Deprecated public Map<String,String> getPropertiesMap()
getLocalPropertiesMap()
method instead and recheck where you store the propertiesReturns the properties of the entity as name/value pairs. In case of name clashes, properties closer to this entity have precedence.
@Deprecated public final Map<String,String> getPropertiesMap(com.google.common.base.Predicate<Property> predicate)
getLocalPropertiesMap(Predicate)
method instead and recheck where you store the propertiesReturns the properties of the entity as name/value pairs, filtered by the given predicate.
predicate
- the predicate to filter by@Deprecated public Property getProperty(String name)
getLocalProperty(String)
method instead and recheck where you store the propertiesReturns the property with the given name. In case of name clashes, properties closer to this entity have precedence.
name
- the name of the property to return@Deprecated public String getPropertyValue(String name)
getLocalPropertyValue(String)
method instead and recheck where you store the propertiesReturns the value of the property with the given name. In case of name clashes, properties closer to this entity have precedence.
name
- the name of the property whose value to return@Deprecated public <V> V getPropertyValue(PropertyName<V> propertyAccessor)
getLocalPropertyValue(PropertyName)
method instead and recheck where you store the propertiesReturns the value of the property with the name defined by the property accessor, deserialized and cast to the type expected by the property accessor.
V
- the expected transient and persisted type of the property valuepropertyAccessor
- the accessor from which to derive the name, deserialize the value, and cast to the expected type@Deprecated public boolean hasProperty(String name)
hasLocalProperty(String)
method instead and recheck where you store the propertiesReturns <i>true</i> if the entity has a property with the given name.
name
- the name of the property@Deprecated public boolean hasProperty(PropertyName<?> propertyAccessor)
hasLocalProperty(PropertyName)
method instead and recheck where you store the propertiesReturns <i>true</i> if the entity has a property with the name of the given property accessor.
propertyAccessor
- the accessor from which to derive the name, deserialize the value, and cast to the expected typepublic final List<Property> getLocalProperties()
Returns the local properties of the entity.
public final List<Property> getLocalProperties(com.google.common.base.Predicate<Property> predicate)
Returns the local properties of the entity, filtered by the given predicate.
predicate
- the predicate to filter bypublic final Map<String,String> getLocalPropertiesMap()
Returns the local properties of the entity, mapped by the property name.
public final Map<String,String> getLocalPropertiesMap(com.google.common.base.Predicate<Property> predicate)
Returns the local properties of the entity as name/value pairs, filtered by the given predicate.
predicate
- the predicate to filter bypublic final Property getLocalProperty(String name)
Returns the local property with the given name.
name
- the name of the local property to returnpublic final String getLocalPropertyValue(String name)
Returns the value of the local property with the given name.
name
- the name of the local property whose value to returnpublic final <V> V getLocalPropertyValue(PropertyName<V> propertyAccessor)
Returns the value of the local property with the name defined by the property accessor, deserialized and cast to the type expected by the property accessor.
V
- the expected transient and persisted type of the property valuepropertyAccessor
- the accessor from which to derive the name, deserialize the value, and cast to the expected typepublic boolean hasLocalProperty(String name)
Returns <i>true</i> if the entity has a local property with the given name.
name
- the name of the propertypublic boolean hasLocalProperty(PropertyName<?> propertyAccessor)
Returns <i>true</i> if the entity has a local property with the name of the given property accessor.
propertyAccessor
- the accessor from which to derive the name, deserialize the value, and cast to the expected typepublic Instant getValidFrom()
Returns the date from which the entity is valid.
public Instant getValidTo()
Returns the date until which the entity is valid.
public int getVersion()
Returns the version of the entity.
public int getExternalVersion()
Returns the external version of the entity.
public String getResourceString()
Returns the resource string of the entity.
Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.