@Entity public class Property extends PropertyOwner implements IMapExpressionOwner, IProperty
PropertyOwner
. A property can own another set of properties.
The basic property implementation is a name/value pair. The PropertyOwner
class
has methods like getPropertyValue
and
setPropertyValue
that find a property by name and set or get its value.
Properties have a type depending on the type of the persisted value. The defined types and persisted value types are:
Property Type | Persisted Value Type |
---|---|
STRING | String |
EXPRESSION | MapExpression |
XREF | MapReference |
PropertyDefinition
Type | Property and Description |
---|---|
boolean |
isPersistent
Gets the value of the property persistentProperty.
|
boolean |
isTransient
Gets the value of the property transientProperty.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EMPTY_STRING_VALUE |
Modifier and Type | Method and Description |
---|---|
void |
addChildProperty(Property childProperty)
Adds a child property to this property.
|
java.util.List |
getAllMapReferences() |
Property |
getChildProperty(java.lang.String key)
Gets the child property object with the specified key name.
|
java.lang.Object |
getChildPropertyValue(java.lang.String key)
Gets the child property value for the child property with the specified name.
|
java.lang.Object |
getDefaultValue()
Gets the default value of this property.
|
java.lang.String |
getDefaultValueString()
Gets the default value as a String.
|
java.lang.String |
getDisplayableObjectName()
Return a user-displayable name for this object.
|
java.lang.String |
getDisplayableTypeName()
Get a user-displayable type name for the object.
|
java.lang.String |
getDisplayName()
Gets a displayable, translated name for the property.
|
MapExpression |
getExpressionValue()
Gets the expression value of the property, for properties of type EXPRESSION.
|
IMapRootContainer |
getMapRootContainer()
Get the owning root container for this object.
|
java.lang.Integer |
getMaxLength()
Gets the maximum length of this property, giving transient maximum length the priority.
|
java.lang.String |
getName()
Gets the name of the property.
|
IPropertyOwner |
getOwner()
Gets owner of this property.
|
PropertyDefinition |
getPropertyDefinition()
Gets the property definition used to create this property, if any.
|
PropertyOwner |
getPropertyOwner()
Gets the owner of this property.
|
java.util.List |
getStringDomainValues()
Returns a list of domain values of this property, giving transient domain values priority.
|
java.lang.String |
getStringValue()
Gets the string value of the property.
|
java.lang.String |
getTranslatedDomainValue(java.lang.String value)
Gets the NLS translated domain value of the domain value key.
|
PropertyDefinition.PropertyType |
getType()
Gets the type of this property.
|
java.lang.Object |
getValue()
Gets the value of the property.
|
java.lang.String |
getValueDisplayType()
Gets the value type for display.
|
java.util.List |
getXRefDomainValues()
Returns a list of the domain model object values that can be assigned as
values for the XREF property.
|
boolean |
isDefaultValue()
Checks if this property's value is equals to the default value.
|
boolean |
isPersistentProperty()
Gets the value of the property persistentProperty.
|
boolean |
isReadOnly()
Checks if this property is read-only.
|
boolean |
isTransientProperty()
Gets the value of the property transientProperty.
|
void |
setChildPropertyValue(java.lang.String key,
java.lang.Object value)
Sets a child property value, for the property with the specified key name.
|
void |
setDomainValues(java.util.List domainValues)
Sets the transient domain values for this property.
|
void |
setTransientMaxLength(java.lang.Integer maxLength)
Sets the transient maximum length of this property.
|
void |
setValue(java.lang.Object value)
Sets the object value of the property.
|
java.lang.String |
toString() |
boolean |
validate(java.util.List result,
boolean debug)
Validates the value of this expression.
|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
dump, dump, getGUID, getStrongTypeClassName, validate, validate
getRootContainer
getGlobalId, getInternalId, getParent
public boolean isPersistentProperty
public boolean isTransientProperty
public static final java.lang.String EMPTY_STRING_VALUE
public boolean isPersistentProperty()
public boolean isTransientProperty()
public IPropertyOwner getOwner()
public PropertyOwner getPropertyOwner()
public PropertyDefinition getPropertyDefinition()
public java.lang.String getName()
public java.lang.String getDisplayableObjectName()
IRoot
getDisplayableObjectName
in interface IRoot
public java.lang.String getDisplayName()
public PropertyDefinition.PropertyType getType()
public boolean isReadOnly()
public java.lang.String getStringValue() throws PropertyException
PropertyException
public void setValue(java.lang.Object value) throws PropertyException
value
- the new object value for this property.PropertyException
public void addChildProperty(Property childProperty) throws PropertyException
childProperty
- the child property to add to this property.PropertyException
public Property getChildProperty(java.lang.String key) throws PropertyException
key
- the name of the child property to be retrieved.PropertyException
public void setChildPropertyValue(java.lang.String key, java.lang.Object value) throws PropertyException
key
- the name of the child property to set.value
- the new value for the child property.PropertyException
public java.lang.Object getChildPropertyValue(java.lang.String key) throws PropertyException
key
- the key name of the child property value to get.PropertyException
public java.lang.Object getValue() throws PropertyException
PropertyException
public MapExpression getExpressionValue() throws PropertyException
PropertyException
MapComponentException
public java.util.List getStringDomainValues()
setDomainValues(List)
, the
String values of the transient domain objects are returned, otherwise, the domain
values from PropertyDefinition
are retrieved and returned.PropertyException
public java.util.List getXRefDomainValues() throws PropertyException
PropertyException
public java.lang.String getTranslatedDomainValue(java.lang.String value)
value
- the domain value key.public java.lang.Object getDefaultValue()
PropertyDefinition
is retrieved and returned.public java.lang.String getDefaultValueString()
public void setDomainValues(java.util.List domainValues)
domainValues
- the transient domain values.public java.lang.String getValueDisplayType()
public boolean isDefaultValue()
PropertyException
public boolean validate(java.util.List result, boolean debug)
public java.lang.String getDisplayableTypeName()
IRoot
getDisplayableTypeName
in interface IRoot
public IMapRootContainer getMapRootContainer()
IMapExpressionOwner
getMapRootContainer
in interface IMapExpressionOwner
public java.lang.String toString()
public java.lang.Integer getMaxLength()
setTransientMaxLength
, the transient maximum length is
returned, otherwise, the maximum length from PropertyDefinition
is returned.PropertyDefinition.getMaxLength()
,
setTransientMaxLength(Integer)
public void setTransientMaxLength(java.lang.Integer maxLength)
PropertyDefinition
.maxLength
- the transient maximum length of this property.PropertyDefinition.getMaxLength()
public java.util.List getAllMapReferences()