org.plasma.sdo.core
Class CoreProperty

java.lang.Object
  extended by org.plasma.sdo.core.CoreProperty
All Implemented Interfaces:
Property, PlasmaProperty

public class CoreProperty
extends Object
implements PlasmaProperty

A representation of a Property in the type of a data object.


Field Summary
 
Fields inherited from interface org.plasma.sdo.PlasmaProperty
INSTANCE_PROPERTY_BOOLEAN_ISOPERATIONAL, INSTANCE_PROPERTY_BOOLEAN_ISUNIQUE, INSTANCE_PROPERTY_BYTES_LOCAL_NAME_BYTES, INSTANCE_PROPERTY_BYTES_NAME_BYTES, INSTANCE_PROPERTY_BYTES_PHYSICAL_NAME_BYTES, INSTANCE_PROPERTY_BYTES_QUALIFIED_NAME_BYTES, INSTANCE_PROPERTY_BYTES_QUALIFIED_PHYSICAL_NAME_BYTES, INSTANCE_PROPERTY_BYTES_URI_BYTES, INSTANCE_PROPERTY_INT_MAXLENGTH, INSTANCE_PROPERTY_LONG_SNAPSHOT_TIMESTAMP, INSTANCE_PROPERTY_OBJECT_CONCURRENCY_USER, INSTANCE_PROPERTY_OBJECT_CONCURRENCY_VERSION, INSTANCE_PROPERTY_OBJECT_DESCRIPTION, INSTANCE_PROPERTY_OBJECT_IS_LOCKED_PROPERTY, INSTANCE_PROPERTY_OBJECT_LOCKING_TIMESTAMP, INSTANCE_PROPERTY_OBJECT_LOCKING_USER, INSTANCE_PROPERTY_OBJECT_ORIGINATION_TIMESTAMP, INSTANCE_PROPERTY_OBJECT_ORIGINATION_USER, INSTANCE_PROPERTY_OBJECT_PRIKEY_PROPERTIES, INSTANCE_PROPERTY_OBJECT_QUALIFIED_NAME, INSTANCE_PROPERTY_OBJECT_SNAPSHOT_DATE_PROPERTY, INSTANCE_PROPERTY_OBJECT_VISIBILITY, INSTANCE_PROPERTY_STRING_LOCAL_NAME, INSTANCE_PROPERTY_STRING_NAMESPACE_PHYSICAL_NAME, INSTANCE_PROPERTY_STRING_NAMESPACE_URI, INSTANCE_PROPERTY_STRING_PHYSICAL_NAME, INSTANCE_PROPERTY_STRING_UUID
 
Constructor Summary
CoreProperty(CoreType type, Property property, CoreType containingType)
           
 
Method Summary
static PlasmaProperty createInstanceProperty(String name, DataType dataType)
           
 boolean equals(Object other)
           
 Object get(Property property)
          Returns the value of the specified instance property of this Property.
 Alias getAlias()
          Returns the alias for this property if exists, or null if not exists
 List<String> getAliasNames()
          Returns a list of alias names for this Property.
 Concurrent getConcurrent()
          Returns the concurrent information for this property if exists, or null if not exists
 Type getContainingType()
          Returns the containing type of this Property.
 DataFlavor getDataFlavor()
          For data type properties, returns the data flavor associated with the property data type.
 Object getDefault()
          Returns the default value this Property will have in a data object where the Property hasn't been set.
 List<Comment> getDescription()
           
 String getDescriptionText()
           
 EnumerationConstraint getEnumerationConstraint()
          Returns the enumeration constraint information for this property if exists, or null if not exists
 List getInstanceProperties()
          Returns a read-only List of instance Properties available on this Property.
 Key getKey()
          Returns the key information for this property if exists, or null if not exists
 String getLocalName()
          Returns the local name alias for this Property if exists, or otherwise the property name
 byte[] getLocalNameBytes()
          Returns the local name of this Property as a byte array which may be cached or lazily cached on demand.
 long getMaxLength()
          Returns the maximum length allowed this property, or -1 if no maximum length is defined.
 String getName()
          Returns the name of the Property.
 byte[] getNameBytes()
          Returns the logical name of this Property as a byte array which may be cached or lazily cached on demand.
 Property getOpposite()
          Returns the opposite Property if the Property is bi-directional or null otherwise.
 String getPhysicalName()
          Returns the physical name alias for this property if exists, or null if not exists
 byte[] getPhysicalNameBytes()
          Returns the physical name alias of this Property as a byte array which may be cached or lazily cached on demand, or null if no physical alias name exists.
 Enumeration getRestriction()
           
 Sort getSort()
          Returns the sorting information for this property if exists, or null if not exists
 Temporal getTemporal()
          Returns the temporal information for this property if exists, or null if not exists
 Type getType()
          Returns the type of the Property.
 UniqueConstraint getUniqueConstraint()
          Returns the unique constraint information for this property if exists, or null if not exists
 ValueConstraint getValueConstraint()
          Returns the value constraint information for this property if exists, or null if not exists
 ValueSetConstraint getValueSetConstraint()
          Returns the value-set constraint information for this property if exists, or null if not exists
 XmlProperty getXmlProperty()
          Returns the XML property information for this property if exists, or null if not exists
 int hashCode()
           
 boolean isConcurrent()
          Returns true if this property is tagged as concurrent.
 boolean isConcurrent(ConcurrencyType type, ConcurrentDataFlavor dataFlavor)
          Returns true if this property is tagged as concurrent for the given concurrency type and data flavor.
 boolean isContainment()
          Returns whether the Property is containment, i.e., whether it represents by-value composition.
 boolean isKey()
          Returns true if the key information for this property if exists.
 boolean isKey(KeyType keyType)
          Returns true if the key information for this property if exists and the key type is set to the given type.
 boolean isMany()
          Returns whether the Property is many-valued.
 boolean isNullable()
          Returns whether or not instances of this property can be set to null.
 boolean isOpenContent()
          Returns whether or not this is an open content Property.
 boolean isReadOnly()
          Returns true if values for this Property cannot be modified using the SDO APIs.
 boolean isXMLAttribute()
          Returns true if this property is rendered within an XML document as an XML attribute.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoreProperty

public CoreProperty(CoreType type,
                    Property property,
                    CoreType containingType)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

createInstanceProperty

public static PlasmaProperty createInstanceProperty(String name,
                                                    DataType dataType)

getName

public String getName()
Returns the name of the Property.

Specified by:
getName in interface Property
Returns:
the Property name.

getDataFlavor

public DataFlavor getDataFlavor()
Description copied from interface: PlasmaProperty
For data type properties, returns the data flavor associated with the property data type.

Specified by:
getDataFlavor in interface PlasmaProperty
Returns:
the data flavor associated with the property data type

getDescription

public List<Comment> getDescription()
Specified by:
getDescription in interface PlasmaProperty

getDescriptionText

public String getDescriptionText()
Specified by:
getDescriptionText in interface PlasmaProperty

getPhysicalName

public String getPhysicalName()
Description copied from interface: PlasmaProperty
Returns the physical name alias for this property if exists, or null if not exists

Specified by:
getPhysicalName in interface PlasmaProperty
Returns:
the physical name alias, or null if not exists
See Also:
Alias

getNameBytes

public byte[] getNameBytes()
Returns the logical name of this Property as a byte array which may be cached or lazily cached on demand.

Helps support Data Access Services for sparse, distributed "cloud" data stores typically storing lexicographically ordered row and column keys as uninterpreted arrays of bytes. Fast dynamic construction of such keys is important as such services may necessarily construct unique composite keys based in part on qualified or unqualified logical or physical type names.

Specified by:
getNameBytes in interface PlasmaProperty
Returns:
the logical name alias as a byte array.

getPhysicalNameBytes

public byte[] getPhysicalNameBytes()
Returns the physical name alias of this Property as a byte array which may be cached or lazily cached on demand, or null if no physical alias name exists.

Helps support Data Access Services for sparse, distributed "cloud" data stores typically storing lexicographically ordered row and column keys as uninterpreted arrays of bytes. Fast dynamic construction of such keys is important as such services may necessarily construct unique composite keys based in part on qualified or unqualified logical or physical type names.

Specified by:
getPhysicalNameBytes in interface PlasmaProperty
Returns:
the physical name alias of this Property as a byte array, or null if no physical alias name exists.

getLocalName

public String getLocalName()
Description copied from interface: PlasmaProperty
Returns the local name alias for this Property if exists, or otherwise the property name

Specified by:
getLocalName in interface PlasmaProperty
Returns:
the local name alias for this Property if exists, or otherwise the property name
See Also:
Alias

getLocalNameBytes

public byte[] getLocalNameBytes()
Returns the local name of this Property as a byte array which may be cached or lazily cached on demand.

Helps support Data Access Services for sparse, distributed "cloud" data stores typically storing lexicographically ordered row and column keys as uninterpreted arrays of bytes. Fast dynamic construction of such keys is important as such services may necessarily construct unique composite keys based in part on qualified or unqualified logical or physical type names.

Specified by:
getLocalNameBytes in interface PlasmaProperty
Returns:
the local name of this Property as a byte array

getAlias

public Alias getAlias()
Description copied from interface: PlasmaProperty
Returns the alias for this property if exists, or null if not exists

Specified by:
getAlias in interface PlasmaProperty
Returns:
the alias, or null if not exists
See Also:
Alias

getKey

public Key getKey()
Description copied from interface: PlasmaProperty
Returns the key information for this property if exists, or null if not exists

Specified by:
getKey in interface PlasmaProperty
Returns:
the key information, or null if not exists
See Also:
Key

isKey

public boolean isKey()
Description copied from interface: PlasmaProperty
Returns true if the key information for this property if exists.

Specified by:
isKey in interface PlasmaProperty
Returns:
true if the key information for this property if exists
See Also:
Key

isKey

public boolean isKey(KeyType keyType)
Description copied from interface: PlasmaProperty
Returns true if the key information for this property if exists and the key type is set to the given type.

Specified by:
isKey in interface PlasmaProperty
Parameters:
keyType - the key type
Returns:
true if the key information for this property if exists and the key type is set to the given type
See Also:
KeyType

getConcurrent

public Concurrent getConcurrent()
Description copied from interface: PlasmaProperty
Returns the concurrent information for this property if exists, or null if not exists

Specified by:
getConcurrent in interface PlasmaProperty
Returns:
the concurrent information, or null if not exists
See Also:
Concurrent

isConcurrent

public boolean isConcurrent()
Description copied from interface: PlasmaProperty
Returns true if this property is tagged as concurrent.

Specified by:
isConcurrent in interface PlasmaProperty
Returns:
true if this property is tagged as concurrent.

isConcurrent

public boolean isConcurrent(ConcurrencyType type,
                            ConcurrentDataFlavor dataFlavor)
Description copied from interface: PlasmaProperty
Returns true if this property is tagged as concurrent for the given concurrency type and data flavor.

Specified by:
isConcurrent in interface PlasmaProperty
Parameters:
type - the concurrency type
dataFlavor - concurrency data flavor
Returns:
true if this property is tagged as concurrent for the given concurrency type and data flavor.

getTemporal

public Temporal getTemporal()
Description copied from interface: PlasmaProperty
Returns the temporal information for this property if exists, or null if not exists

Specified by:
getTemporal in interface PlasmaProperty
Returns:
the temporal information, or null if not exists
See Also:
Temporal

getEnumerationConstraint

public EnumerationConstraint getEnumerationConstraint()
Description copied from interface: PlasmaProperty
Returns the enumeration constraint information for this property if exists, or null if not exists

Specified by:
getEnumerationConstraint in interface PlasmaProperty
Returns:
the enumeration constraint information, or null if not exists
See Also:
Temporal

getValueSetConstraint

public ValueSetConstraint getValueSetConstraint()
Description copied from interface: PlasmaProperty
Returns the value-set constraint information for this property if exists, or null if not exists

Specified by:
getValueSetConstraint in interface PlasmaProperty
Returns:
the value-set constraint information, or null if not exists
See Also:
ValueSetConstraint

getValueConstraint

public ValueConstraint getValueConstraint()
Description copied from interface: PlasmaProperty
Returns the value constraint information for this property if exists, or null if not exists

Specified by:
getValueConstraint in interface PlasmaProperty
Returns:
the value constraint, or null if not exists
See Also:
ValueConstraint

getSort

public Sort getSort()
Description copied from interface: PlasmaProperty
Returns the sorting information for this property if exists, or null if not exists

Specified by:
getSort in interface PlasmaProperty
Returns:
the sorting information, or null if not exists
See Also:
Sequence

getUniqueConstraint

public UniqueConstraint getUniqueConstraint()
Description copied from interface: PlasmaProperty
Returns the unique constraint information for this property if exists, or null if not exists

Specified by:
getUniqueConstraint in interface PlasmaProperty
Returns:
the unique constraint information, or null if not exists
See Also:
ValueConstraint

getXmlProperty

public XmlProperty getXmlProperty()
Description copied from interface: PlasmaProperty
Returns the XML property information for this property if exists, or null if not exists

Specified by:
getXmlProperty in interface PlasmaProperty
Returns:
the XML property information, or null if not exists
See Also:
XmlProperty

getRestriction

public Enumeration getRestriction()
Specified by:
getRestriction in interface PlasmaProperty

getMaxLength

public long getMaxLength()
Returns the maximum length allowed this property, or -1 if no maximum length is defined.

Specified by:
getMaxLength in interface PlasmaProperty
Returns:
the maximum length or -1 if no maximum length is defined

isXMLAttribute

public boolean isXMLAttribute()
Description copied from interface: PlasmaProperty
Returns true if this property is rendered within an XML document as an XML attribute. This determination is based on 1.) whether the XmlProperty information exists for this property and the nodeType is 'attribute' and then 2.) on a simple algorithm based on the data type and data flavor.

Specified by:
isXMLAttribute in interface PlasmaProperty
Returns:
true if this property is rendered within an XML document as an XML attribute.
See Also:
XmlProperty, XmlNodeType

get

public Object get(Property property)
Returns the value of the specified instance property of this Property.

Specified by:
get in interface Property
Parameters:
property - one of the properties returned by getInstanceProperties().
Returns:
the value of the specified property.
See Also:
3.6.7 Property Instance Properties Property instances can themselves include open content, that is, extended metadata in the form of instance properties. The list of such extensions is available by calling Property.getInstanceProperties(). The values of these properties are available by calling Property.get(Property). For more details, see Section 3.5.6.

getInstanceProperties

public List getInstanceProperties()
Description copied from interface: Property
Returns a read-only List of instance Properties available on this Property.

This list includes, at a minimum, any open content properties (extensions) added to the object before defining the Property's Type. Implementations may, but are not required to in the 2.1 version of SDO, provide additional instance properties.

Specified by:
getInstanceProperties in interface Property
Returns:
the List of instance Properties on this Property.

getAliasNames

public List<String> getAliasNames()
Returns a list of alias names for this Property.

Specified by:
getAliasNames in interface Property
Returns:
a list of alias names for this Property.

getDefault

public Object getDefault()
Returns the default value this Property will have in a data object where the Property hasn't been set.

Specified by:
getDefault in interface Property
Returns:
the default value.

getOpposite

public Property getOpposite()
Description copied from interface: Property
Returns the opposite Property if the Property is bi-directional or null otherwise.

Specified by:
getOpposite in interface Property
Returns:
the opposite Property if the Property is bi-directional or null

getType

public Type getType()
Returns the type of the Property.

Specified by:
getType in interface Property
Returns:
the Property type.

isContainment

public boolean isContainment()
Returns whether the Property is containment, i.e., whether it represents by-value composition. 3.1.6 Containment ...The tree structure is created using containment references which start at the root DataObject. The root DataObject refers to other DataObjects, which can refer to further DataObjects. Each DataObject in the data graph, except for the root DataObject, must have a containment reference from another node in the tree. Each DataObject in the graph keeps track of the location of its containment reference. ... A container DataObject is one that contains other DataObjects. A DataObject can have a maximum of one container DataObject. If a DataObject has no container, it is considered to be a root DataObject. In the case of a reference, a Property may be either a containment or non-containment reference. In EMOF, the term containment reference is called composite. In XML, elements with complex types are mapped to containment properties. S.C. indicates how to emit XML entities in terms of containment. E.g. in UML, Package.packagedElement is a containment reference property. Activity.edge is a reference property.

Specified by:
isContainment in interface Property
Returns:
true if the Property is containment.

getContainingType

public Type getContainingType()
Returns the containing type of this Property.

Specified by:
getContainingType in interface Property
Returns:
the Property's containing type.
See Also:
Type.getProperties()

isMany

public boolean isMany()
Returns whether the Property is many-valued.

Specified by:
isMany in interface Property
Returns:
true if the Property is many-valued.

isNullable

public boolean isNullable()
Returns whether or not instances of this property can be set to null. The effect of calling set(null) on a non-nullable property is not specified by SDO.

Specified by:
isNullable in interface Property
Returns:
true if this property is nullable.

isOpenContent

public boolean isOpenContent()
Returns whether or not this is an open content Property.

Specified by:
isOpenContent in interface Property
Returns:
true if this property is an open content Property.

isReadOnly

public boolean isReadOnly()
Returns true if values for this Property cannot be modified using the SDO APIs. When true, DataObject.set(Property property, Object value) throws an exception. Values may change due to other factors, such as services operating on DataObjects.

Specified by:
isReadOnly in interface Property
Returns:
true if values for this Property cannot be modified.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All rights reserved.