@Entity public class Property extends oracle.odi.domain.root.PropertyOwner implements IMapExpressionOwner, IProperty, oracle.odi.domain.mapping.IMapReferenceOwner
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
,
Serialized FormType | Property and Description |
---|---|
boolean |
isPersistent
Decides if this property is persistable.
|
boolean |
isTransient
Checks if this property is transient.
|
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 |
getDisplayableTypeName()
Get a user-displayable type name for the object.
|
java.lang.String |
getDisplayName()
Gets a displayable, translated name for the property.
|
java.lang.String |
getDisplayNameKey()
Gets the NLS display name key 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.
|
oracle.odi.domain.root.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()
Decides if this property is persistable.
|
boolean |
isReadOnly()
Checks if this property is read-only.
|
boolean |
isTransientProperty()
Checks if this property is transient.
|
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.
|
addProperty, adjustPropertyPersistency, createProperty, createProperty, delete, getAllProperties, getAllProperties, getAllPropertyMapReferenceOwners, getBooleanPropertyValue, getChildNamespaceId, getDisplayableProperties, getExpressionPropertyValue, getIntPropertyValue, getProperties, getProperties, getProperty, getPropertyMetadataOwner, getPropertyValue, getPropertyValueReference, getStringPropertyValue, initiateDynamicProperties, internalGetAllProperties, internalIsPropertyDefined, internalSetPropertyValue, invokeMethod, isPropertyDefined, notifyPropertyChange, onSave, removeAllProperties, removeProperty, removeProperty, setBooleanPropertyValue, setIntPropertyValue, setPropertyValue, validateProperties
getBusinessName, getDescription, getGlobalNamespaceId, getNamespaceId, setBusinessName, setDescription, setName
addCachedIssue, addCachedIssues, clearIssueCache, displayIssues, displayIssues, displayIssues, dump, dump, dump, dump, dumpToString, equals, getAdapter, getCachedErrors, getCachedIssues, getCachedSyncState, getCachedValidationErrorMessage, getDisplayableObjectName, getFCOContainer, getFullName, getGUID, getInternalId, getPropertyDefinitionOwner, getRootContainer, getSecurityContainer, getStrongTypeClassName, getSyncState, handleMapChangeEvent, hasAdapter, hashCode, isNew, setCachedSyncState, validate
getGlobalId, getNumericId, hasCustomizedPersistenceMethodFor, invokeCustomizedPersistenceMethodFor
dump, dump, getDisplayableObjectName, getGUID, getStrongTypeClassName, validate
getRootContainer
getGlobalId, getInternalId, getSecurityContainer
getBusinessName, getDescription, setBusinessName, setDescription, setName
Note 1:The persistency policy for a property is as as follows:
Rule 1: Transient property is not persistable.
Rule 2: Property without definition is always persistable.
Rule 3: Property with dynamic default value is always persistable.
Rule 4: Property with static default is persistable only if the property value is not equal to the property's default value.
The goal of the above rules is to avoid persisting any Property instance whose value equals to its static default value.
Note 2: We have to persist property having dynamic default value even if the property value is equal to the default. This is because the current default value may become non-default at any moment.
Note: A transient property is not persisted. However, there are non-transient properties that are also not persisted in repository. The method isPersistentProperty() implements the persistency rules.
isPersistentProperty()
public Property(PropertyDefinition propDef, oracle.odi.domain.root.PropertyOwner propertyOwner) throws MappingException
propDef
- The property definition object that creates this property.PropertyException
MappingException
public Property(PropertyDefinition.PropertyType type, oracle.odi.domain.root.PropertyOwner propertyOwner, java.lang.String name, java.lang.String displayNameKey) throws MappingException
propertyOwner
- The owner of the property.name
- The name of the property.displayNameKey
- The NLS display name key for the property.PropertyException
MappingException
public Property(oracle.odi.domain.root.PropertyOwner propertyOwner, java.lang.String name, java.lang.String displayNameKey, MapExpression value) throws MappingException
propertyOwner
- The owner of the property.name
- The name of the property.displayNameKey
- The NLS display name key for the property.value
- The expression value of the property.PropertyException
MappingException
public boolean isPersistentProperty()
Note 1:The persistency policy for a property is as as follows:
Rule 1: Transient property is not persistable.
Rule 2: Property without definition is always persistable.
Rule 3: Property with dynamic default value is always persistable.
Rule 4: Property with static default is persistable only if the property value is not equal to the property's default value.
The goal of the above rules is to avoid persisting any Property instance whose value equals to its static default value.
Note 2: We have to persist property having dynamic default value even if the property value is equal to the default. This is because the current default value may become non-default at any moment.
public boolean isTransientProperty()
Note: A transient property is not persisted. However, there are non-transient properties that are also not persisted in repository. The method isPersistentProperty() implements the persistency rules.
isPersistentProperty()
public IPropertyOwner getOwner()
public oracle.odi.domain.root.PropertyOwner getPropertyOwner()
public PropertyDefinition getPropertyDefinition()
public java.lang.String getName()
getName
in interface IProperty
getName
in interface IMapExpressionOwner
getName
in interface INamedObject
getName
in interface IRoot
getName
in class oracle.odi.domain.root.NamedObject
public java.lang.String getDisplayNameKey()
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
oracle.odi.domain.mapping.exception.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)
validate
in interface IRoot
validate
in class oracle.odi.domain.root.PropertyOwner
result
- a list of issues found during validationdebug
- If true, then informational issues are added that provide information
about the structure of the metadata and the state of this object.public java.lang.String getDisplayableTypeName()
IRoot
getDisplayableTypeName
in interface IPropertyOwner
getDisplayableTypeName
in interface IRoot
getDisplayableTypeName
in class oracle.odi.domain.root.PropertyOwner
public IMapRootContainer getMapRootContainer()
IMapExpressionOwner
getMapRootContainer
in interface IMapExpressionOwner
public java.lang.String toString()
toString
in class oracle.odi.domain.root.Root
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()
getAllMapReferences
in interface oracle.odi.domain.mapping.IMapReferenceOwner