public class CoreType extends Object implements PlasmaType
property or
a data object.| Constructor and Description |
|---|
CoreType(String uri,
String typeName)
Creates and returns a new type for the given URI / type combination.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
List<Property> |
findProperties(KeyType keyType)
Returns the declared property from
Type and its base types tagged with the
given key type. |
Property |
findProperty(ConcurrencyType concurrencyType,
ConcurrentDataFlavor dataFlavor)
Returns the declared property from
Type and its base types tagged with the
given concurrency type and data flavor. |
Property |
findProperty(KeyType keyType)
Returns the declared property from
Type and its base types tagged with the
given key type. |
Property |
findProperty(String propertyName)
Returns the declared property from this type and its base types with the
given property name, or null if not exists
|
Object |
get(Property property)
Returns the value of the specified instance property of this Type.
|
Alias |
getAlias()
Returns the alias for
Type |
List<String> |
getAliasNames()
Return a list of alias names for this Type.
|
List<Type> |
getBaseTypes()
Returns the List of immediate base Types for this Type, or an
empty list if there are no base Types.
|
Classifier |
getClassifier()
Return the repository classifier underlying this
Type |
List<Property> |
getDeclaredProperties()
Returns the Properties declared in this Type as opposed to
those declared in base Types.
|
List<Property> |
getDeclaredPropertiesSorted()
Returns an alphabetically sorted list of the Properties declared
in this Type as opposed to
those declared in base Types.
|
Derivation |
getDerivation()
Returns the derivation information for
Type if exists, or null
if not exists |
PlasmaType |
getDerivationSupplier()
Returns the derivation supplier type for
Type or null if not exists. |
List<Comment> |
getDescription()
Returns the comments from the repository classifier for this
Type. |
String |
getDescriptionText()
Returns the concatenated comments from the repository classifier for this
Type. |
String |
getId()
Returns the unique id for the element within its meta data repository.
|
Class<?> |
getInstanceClass()
Returns the Java class that this type represents or the generic
data object implementation class if no provisioned implementation
class is found.
|
List<Property> |
getInstanceProperties() |
String |
getLocalName()
Returns the local name alias of this
Type as a string. |
byte[] |
getLocalNameBytes()
Returns the local name of this Type as a byte array which may be cached
or lazily cached on demand.
|
String |
getName()
Returns the name of the type.
|
byte[] |
getNameBytes()
Returns the name of this Type as a byte array which may be cached
or lazily cached on demand.
|
String |
getPackageName()
Returns the logical name of the
model package (if any) associated with this Type
as a string, or null if no package exists.
|
String |
getPackagePhysicalName()
Returns the physical name alias of the
model package (if any) associated with this Type
as a string, or null if no physical
name alias exists.
|
byte[] |
getPackagePhysicalNameBytes()
Returns the physical name alias of package containing this Type as a byte array
which may be cached or lazily cached on demand, or null if no physical alias name exists.
|
String |
getPhysicalName()
Return the physical name for this
type or null if no physical alias name exists.
|
byte[] |
getPhysicalNameBytes()
Returns the physical name alias of this Type as a byte array which may be cached
or lazily cached on demand, or null if no physical alias name exists.
|
List<Property> |
getProperties()
Returns the List of the
Properties of this type and
all base types. |
Property |
getProperty(String propertyName)
Returns from
all the Properties of this type, the
property with the specified name. |
QName |
getQualifiedName()
Return the namespace URI qualified name for this
type.
|
byte[] |
getQualifiedNameBytes()
Returns the namespace qualified logical name of this Type as a byte array which may be cached
or lazily cached on demand.
|
int |
getQualifiedNameHashCode()
Returns a qualified logical-name hash code
for this type based on the
|
QName |
getQualifiedPhysicalName()
Return the (physical) namespace qualified physical name for this
type or null if no physical namespace and physical name exists.
|
byte[] |
getQualifiedPhysicalNameBytes()
Returns the namespace qualified physical name of this Type as a byte array which may be cached
or lazily cached on demand, or null if no physical alias name exists.
|
List<Type> |
getSubTypes()
Returns a list of types which specialize or inherit from
this type.
|
String |
getURI()
Returns the namespace URI of the type.
|
byte[] |
getURIBytes()
Returns the URI of this Type as a byte array which may be cached
or lazily cached on demand.
|
String |
getURIPhysicalName()
Returns the physical name alias of the URI associated with this
Type as a string, or null if no physical alias name exists. |
byte[] |
getURIPhysicalNameBytes()
Returns the physical name alias of the URI associated this
Type as a byte array which may be cached
or lazily cached on demand, or null if no physical alias name exists. |
int |
hashCode() |
boolean |
isAbstract()
Indicates if this Type is abstract.
|
boolean |
isBaseType(PlasmaType other)
Returns true if the given type is part of the (base type)
ancestry for this type.
|
boolean |
isDataType()
Indicates if this Type specifies DataTypes (true) or DataObjects (false).
|
boolean |
isInstance(Object object)
Returns whether the specified object is an instance of this type.
|
boolean |
isOpen()
Indicates if this Type allows any form of open content.
|
boolean |
isRelation(PlasmaType other,
AssociationPath relationPath)
Returns true if the given type is linked or related to
Type
across any number of traversals or hops as qualified by the given
relation path type. |
boolean |
isSequenced()
Indicates if this Type specifies Sequenced DataObjects.
|
boolean |
isSubType(PlasmaType other)
Returns true if the given type is a specialization or
inherits from this type.
|
List<Object> |
search(Property property)
Collects and returns all values from
Type and its base types
mapped to the given instance property. |
Class<?> |
toDataTypeInstanceClass(DataType dataType)
Returns a Java primitive wrapper class for the given SDO data-type (as
per the SDO Specification 2.10 Section 8.1).
|
String |
toString() |
public CoreType(String uri, String typeName) throws InvalidClassifierNameException
uri - the URI for the typetypeName - the name for the typeInvalidClassifierNameException - when the given URI / type combination cannot be
found in the underlying metadata repositorypublic String getName()
public byte[] getNameBytes()
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.
getNameBytes in interface PlasmaTypepublic QName getQualifiedName()
getQualifiedName in interface PlasmaTypepublic byte[] getQualifiedNameBytes()
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.
getQualifiedNameBytes in interface PlasmaTypepublic QName getQualifiedPhysicalName()
getQualifiedPhysicalName in interface PlasmaTypepublic int getQualifiedNameHashCode()
getQualifiedNameHashCode in interface PlasmaTypepublic byte[] getQualifiedPhysicalNameBytes()
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.
getQualifiedPhysicalNameBytes in interface PlasmaTypepublic String getURI()
public byte[] getURIBytes()
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.
getURIBytes in interface PlasmaTypepublic String getPhysicalName()
getPhysicalName in interface PlasmaTypepublic byte[] getPhysicalNameBytes()
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.
getPhysicalNameBytes in interface PlasmaTypepublic String getLocalName()
PlasmaTypeType as a string.getLocalName in interface PlasmaTypeType as a string.public byte[] getLocalNameBytes()
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.
getLocalNameBytes in interface PlasmaTypepublic String getPackageName()
getPackageName in interface PlasmaTypepublic String getPackagePhysicalName()
getPackagePhysicalName in interface PlasmaTypepublic byte[] getPackagePhysicalNameBytes()
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.
getPackagePhysicalNameBytes in interface PlasmaTypepublic String getURIPhysicalName()
PlasmaTypeType as a string, or null if no physical alias name exists.getURIPhysicalName in interface PlasmaTypeType as a string, or null if no physical alias name exists..public byte[] getURIPhysicalNameBytes()
PlasmaTypeType 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.
getURIPhysicalNameBytes in interface PlasmaTypeType as a byte array, or null if no physical alias name exists.public List<Comment> getDescription()
PlasmaTypeType.getDescription in interface PlasmaTypeType.public String getDescriptionText()
PlasmaTypeType.getDescriptionText in interface PlasmaTypeType.public Alias getAlias()
PlasmaTypeTypegetAlias in interface PlasmaTypepublic Classifier getClassifier()
PlasmaTypeTypegetClassifier in interface PlasmaTypeTypepublic boolean isAbstract()
isAbstract in interface Typepublic boolean isDataType()
isInstance(object) && !isDataType() implies DataObject.class.isInstance(object) returns true.
isDataType in interface Typepublic List<String> getAliasNames()
getAliasNames in interface Typepublic List<Type> getBaseTypes()
getBaseTypes in interface Typepublic boolean isBaseType(PlasmaType other)
isBaseType in interface PlasmaTypeother - the base type candidatepublic List<Type> getSubTypes()
getSubTypes in interface PlasmaTypepublic boolean isSubType(PlasmaType other)
isSubType in interface PlasmaTypeother - the sub type candidatepublic List<Property> getDeclaredProperties()
getDeclaredProperties in interface Typepublic List<Property> getDeclaredPropertiesSorted()
getDeclaredPropertiesSorted in interface PlasmaTypepublic List<Property> getInstanceProperties()
getInstanceProperties in interface Typepublic List<Property> getProperties()
Properties of this type and
all base types.
The expression
type.getProperties().indexOf(property)yields the property's index relative to this type. As such, these expressions are equivalent:
dataObject.get(i)
dataObject.get((Property)dataObject.getType().getProperties().get(i));
getProperties in interface TypeProperty.getContainingType()public Object get(Property property)
get in interface Typeproperty - one of the properties returned by
getInstanceProperties().DataObject.get(Property)public List<Object> search(Property property)
PlasmaTypeType and its base types
mapped to the given instance property.search in interface PlasmaTypeproperty - one of the properties returned by
Type.getInstanceProperties().Type and its base types
mapped to the given instance propertypublic Property getProperty(String propertyName)
all the Properties of this type, the
property with the specified name.
As such, these expressions are equivalent:
dataObject.get("name")
dataObject.get(dataObject.getType().getProperty("name"))
getProperty in interface TypegetProperties()public Property findProperty(String propertyName)
findProperty in interface PlasmaTypename - the property namepublic Property findProperty(ConcurrencyType concurrencyType, ConcurrentDataFlavor dataFlavor)
PlasmaTypeType and its base types tagged with the
given concurrency type and data flavor.findProperty in interface PlasmaTypeconcurrencyType - the concurrency typedataFlavor - the concurrency data flavorType and its base types tagged with the
given concurrency type and data flavor, or null if not existspublic Property findProperty(KeyType keyType)
PlasmaTypeType and its base types tagged with the
given key type. If more than one property is found, a warning is logged
and the first property is returned.findProperty in interface PlasmaTypekeyType - the key typeType and its base types tagged with the
given key type, or null if not exists. If more than one property is found, a warning is logged
and the first property is returned.public List<Property> findProperties(KeyType keyType)
PlasmaTypeType and its base types tagged with the
given key type.findProperties in interface PlasmaTypekeyType - the key typeType and its base types tagged with the
given key type, or null if not exists.public Class<?> getInstanceClass()
getInstanceClass in interface Typepublic boolean isInstance(Object object)
isInstance in interface Typeobject - the object in question.true if the object is an instance.Class.isInstance(java.lang.Object)public boolean isOpen()
public boolean isSequenced()
Sequence elements = dataObject.getSequence();
isSequenced in interface Typepublic Class<?> toDataTypeInstanceClass(DataType dataType)
toDataTypeInstanceClass in interface PlasmaTypedataType - public boolean isRelation(PlasmaType other, AssociationPath relationPath)
PlasmaTypeType
across any number of traversals or hops as qualified by the given
relation path type.isRelation in interface PlasmaTypeother - the other typerelationPath - the relation path typeType
across any number of traversals or hops as qualified by the given
relation path type.public Derivation getDerivation()
PlasmaTypeType if exists, or null
if not existsgetDerivation in interface PlasmaTypepublic PlasmaType getDerivationSupplier()
PlasmaTypeType or null if not exists.getDerivationSupplier in interface PlasmaTypeType or null if not exists.public String getId()
PlasmaTypegetId in interface PlasmaTypeCopyright © 2017. All rights reserved.