Interface RawType
RawType objects are thread-safe. Multiple threads may safely
call the methods of a shared RawType object.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the original model class metadata used to create this class, or null if this is not a model class.Returns the class name for this type in the format specified byClass.getName().Returns the array component type, or null if this is not an array type.intReturns the number of array dimensions, or zero if this is not an array type.Returns the original model entity metadata used to create this class, or null if this is not an entity class.Returns an unmodifiable list of the names of the enum instances, or null if this is not an enum type.Returns a map of field name to raw field for each non-static non-transient field declared in this class, or null if this is not a complex type (in other words, this is a simple type or an array type).intgetId()Returns the internal unique ID for this type.Returns the type of the superclass, or null if the superclass is Object or this is not a complex type (in other words, this is a simple type or an array type).intReturns the class version for this type.booleanisArray()Returns whether this is an array type.booleanReturns whether this type has been deleted using a classDeletermutation.booleanisEnum()Returns whether this is an enum type.booleanReturns whether this type is a Java primitive: char, byte, short, int, long, float or double.booleanisSimple()Returns whether this is a}/com/sleepycat/persist/model/Entity.html#simpleTypes">simple type}: primitive, primitive wrapper, BigInteger, BigDecimal, String or Date.invalid @link
{@link <a href="{@docRoottoString()Returns an XML representation of the raw type.
-
Method Details
-
getClassName
String getClassName()Returns the class name for this type in the format specified byClass.getName().If this class currently exists (has not been removed or renamed) then the class name may be passed to
Class.forName(java.lang.String)to get the currentClassobject. However, if this raw type is not the current version of the class, this type information may differ from that of the currentClass. -
getVersion
int getVersion()Returns the class version for this type. For simple types, zero is always returned.- See Also:
-
getId
int getId()Returns the internal unique ID for this type. -
isSimple
boolean isSimple()Returns whether this is a}/com/sleepycat/persist/model/Entity.html#simpleTypes">simple type}: primitive, primitive wrapper, BigInteger, BigDecimal, String or Date.invalid @link
{@link <a href="{@docRootIf true is returned,
isPrimitive()can be called for more information, and a raw value of this type is represented as a simple type object (not as aRawObject).If false is returned, this is a complex type, an array type (see
isArray()), or an enum type, and a raw value of this type is represented as aRawObject. -
isPrimitive
boolean isPrimitive()Returns whether this type is a Java primitive: char, byte, short, int, long, float or double.If true is returned, this is also a simple type. In other words, primitive types are a subset of simple types.
If true is returned, a raw value of this type is represented as a non-null instance of the primitive type's wrapper class. For example, an
intraw value is represented as anInteger. -
isEnum
boolean isEnum()Returns whether this is an enum type.If true is returned, a value of this type is a
RawObjectand the enum constant String is available viaRawObject.getEnum().If false is returned, then this is a complex type, an array type (see
isArray()), or a simple type (seeisSimple()). -
getEnumConstants
Returns an unmodifiable list of the names of the enum instances, or null if this is not an enum type. -
isArray
boolean isArray()Returns whether this is an array type. Raw value arrays are represented asRawObjectinstances.If true is returned, the array component type is returned by
getComponentType()and the number of array dimensions is returned bygetDimensions().If false is returned, then this is a complex type, an enum type (see
isEnum()), or a simple type (seeisSimple()). -
getDimensions
int getDimensions()Returns the number of array dimensions, or zero if this is not an array type. -
getComponentType
RawType getComponentType()Returns the array component type, or null if this is not an array type. -
getFields
Returns a map of field name to raw field for each non-static non-transient field declared in this class, or null if this is not a complex type (in other words, this is a simple type or an array type). -
getSuperType
RawType getSuperType()Returns the type of the superclass, or null if the superclass is Object or this is not a complex type (in other words, this is a simple type or an array type). -
getClassMetadata
ClassMetadata getClassMetadata()Returns the original model class metadata used to create this class, or null if this is not a model class. -
getEntityMetadata
EntityMetadata getEntityMetadata()Returns the original model entity metadata used to create this class, or null if this is not an entity class. -
isDeleted
boolean isDeleted()Returns whether this type has been deleted using a classDeletermutation. A deleted type may be returned byEntityModel.getRawTypeVersionorEntityModel.getAllRawTypeVersions. -
toString
String toString()Returns an XML representation of the raw type.
-