|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.persistence.metadata.Element
com.arsdigita.persistence.metadata.ModelElement
com.arsdigita.persistence.metadata.DataType
com.arsdigita.persistence.metadata.CompoundType
com.arsdigita.persistence.metadata.ObjectType
The ObjectType class is a specialized form of CompoundType that supports inheritence. It also adds the notion of identity by allowing properties to be marked as special "key" properties.
Field Summary | |
static String |
versionId
|
Method Summary | |
ObjectType |
getBasetype()
Returns the base type of this ObjectType (which may simply be the current ObjectType). |
Iterator |
getDeclaredProperties()
Returns an Iterator containing all the properties that are defined by this ObjectType directly. |
Property |
getDeclaredProperty(String name)
Returns the Property directly defined by this ObjectType with the given name or null if no such property exists. |
Iterator |
getKeyProperties()
Returns an Iterator containing all the properties that are part of this ObjectType's key. |
Iterator |
getProperties()
Returns an Iterator containing all the properties that are part of this ObjectType. |
Property |
getProperty(String name)
Returns the Property contained by this ObjectType with the given name or null if no such property exists. |
ObjectType |
getSupertype()
Returns the supertype of this ObjectType or null if this is a base type. |
boolean |
hasDeclaredProperty(String name)
Returns true if this ObjectType directly defines a Property with the given name. |
boolean |
hasProperty(String name)
Returns true if this ObjectType contains a Property with the given name. |
boolean |
isKeyProperty(Property p)
Returns true if the given Property is one of the key Properties on this ObjectType. |
boolean |
isKeyProperty(String name)
Returns true if the given Property name belongs to this Object type, and is one of the key Properties. |
boolean |
isSubtypeOf(ObjectType type)
Returns true if this ObjectType is a subtype of type. |
boolean |
isSubtypeOf(String qualifiedName)
|
static void |
verifySubtype(ObjectType baseType,
ObjectType extendedType)
Checks if the ObjectType specified by
extendedType is a subtype of the ObjectType
specified by baseType . |
static void |
verifySubtype(ObjectType baseType,
String extendedType)
|
static void |
verifySubtype(String baseType,
ObjectType extendedType)
|
static void |
verifySubtype(String baseType,
String extendedType)
|
Methods inherited from class com.arsdigita.persistence.metadata.CompoundType |
isCompound |
Methods inherited from class com.arsdigita.persistence.metadata.DataType |
getName, getQualifiedName, isSimple |
Methods inherited from class com.arsdigita.persistence.metadata.ModelElement |
getModel |
Methods inherited from class com.arsdigita.persistence.metadata.Element |
equals, getColumnNumber, getFilename, getLineNumber, hashCode |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
Method Detail |
public ObjectType getSupertype()
public ObjectType getBasetype()
public boolean isKeyProperty(Property p)
p
- The property to check.
public boolean isKeyProperty(String name)
name
- The name of a property to check.
public Iterator getKeyProperties()
Property
public Iterator getProperties()
getProperties
in class CompoundType
Property
public Iterator getDeclaredProperties()
Property
public boolean hasProperty(String name)
hasProperty
in class CompoundType
name
- The name of the property to query for.
public boolean hasDeclaredProperty(String name)
name
- The name of the property to query for.
public Property getProperty(String name)
getProperty
in class CompoundType
name
- The name of the property to retrieve.
public Property getDeclaredProperty(String name)
name
- The name of the property to retrieve.
public boolean isSubtypeOf(String qualifiedName)
isSubtypeOf(ObjectType)
public boolean isSubtypeOf(ObjectType type)
type
- The candidate supertype.
public static void verifySubtype(ObjectType baseType, ObjectType extendedType)
ObjectType
specified by
extendedType
is a subtype of the ObjectType
specified by baseType
.
baseType
- The base object type.extendedType
- The extended object type.
PersistenceException
- Thrown if extendedType
is not a subtype of the ObjectType
specified by
baseType
.public static void verifySubtype(String baseType, String extendedType)
public static void verifySubtype(String baseType, ObjectType extendedType)
public static void verifySubtype(ObjectType baseType, String extendedType)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |