public abstract class Format extends Object implements RawType, Serializable
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowEvolveFromProxy()
Currently, only FBigDec will return true.
|
com.sleepycat.persist.impl.Accessor |
getAccessor(boolean rawAccess) |
ClassMetadata |
getClassMetadata()
Returns the original model class metadata used to create this class, or
null if this is not a model class.
|
String |
getClassName()
Returns the class name for this type in the format specified by
Class.getName(). |
Format |
getComponentType()
Returns the array component type, or null if this is not an array type.
|
int |
getDimensions()
Returns the number of array dimensions, or zero if this is not an array
type.
|
EntityMetadata |
getEntityMetadata()
Returns the original model entity metadata used to create this class, or
null if this is not an entity class.
|
List<String> |
getEnumConstants()
Returns an unmodifiable list of the names of the enum instances, or null
if this is not an enum type.
|
Map<String,RawField> |
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).
|
int |
getId()
Returns the format ID.
|
String |
getOldKeyName(String keyName)
For an entity class or subclass, returns the old key name for the given
key name that has been renamed, or returns the given key name if it has
not been renamed.
|
Format |
getPreviousVersion()
Returns the previous version of this format in the linked list of
versions, or null if this is the only version.
|
Format |
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).
|
int |
getVersion()
Returns the class version for this type.
|
void |
initializeReader(com.sleepycat.persist.impl.Catalog catalog,
EntityModel model,
int initVersion,
Format oldFormat)
Called to initialize a separate Reader implementation.
|
boolean |
isArray()
Returns whether this is an array type.
|
boolean |
isDeleted()
Returns whether the class for this format was deleted.
|
boolean |
isEnum()
Returns whether this is an enum type.
|
boolean |
isPrimitive()
Returns whether this type is a Java primitive: char, byte, short, int,
long, float or double.
|
boolean |
isSimple()
Returns whether this is a
simple type:
primitive, primitive wrapper, BigInteger, BigDecimal, String or Date.
|
abstract Object |
newInstance(EntityInput input,
boolean rawAccess)
Creates a new instance of the target class using its default
constructor.
|
abstract Object |
readObject(Object o,
EntityInput input,
boolean rawAccess)
Called after newInstance() to read the rest of the data bytes and fill
in the object contents.
|
void |
readPriKey(Object o,
EntityInput input,
boolean rawAccess)
Reads the primary key from the given input bytes and sets the primary
key field in the given object.
|
String |
toString()
Returns an XML representation of the raw type.
|
public final int getId()
public final Format getPreviousVersion()
public final boolean isDeleted()
public void initializeReader(com.sleepycat.persist.impl.Catalog catalog,
EntityModel model,
int initVersion,
Format oldFormat)
public String getClassName()
RawTypeClass.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 current
Class object. However, if this raw type is not the current
version of the class, this type information may differ from that of the
current Class.
getClassName in interface RawTypepublic int getVersion()
RawTypegetVersion in interface RawTypeEntity.version(),
Persistent.version()public Format getSuperType()
RawTypegetSuperType in interface RawTypepublic boolean isSimple()
RawTypeIf true is returned, RawType.isPrimitive() can be called for more
information, and a raw value of this type is represented as a simple
type object (not as a RawObject).
If false is returned, this is a complex type, an array type (see
RawType.isArray()), or an enum type, and a raw value of this type is
represented as a RawObject.
public boolean isPrimitive()
RawTypeIf 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 int raw value is represented as an
Integer.
isPrimitive in interface RawTypepublic boolean isEnum()
RawTypeIf true is returned, a value of this type is a RawObject and
the enum constant String is available via RawObject.getEnum().
If false is returned, then this is a complex type, an array type (see
RawType.isArray()), or a simple type (see RawType.isSimple()).
public List<String> getEnumConstants()
RawTypegetEnumConstants in interface RawTypepublic boolean isArray()
RawTypeRawObject instances.
If true is returned, the array component type is returned by RawType.getComponentType() and the number of array dimensions is returned by
RawType.getDimensions().
If false is returned, then this is a complex type, an enum type (see
RawType.isEnum()), or a simple type (see RawType.isSimple()).
public int getDimensions()
RawTypegetDimensions in interface RawTypepublic Format getComponentType()
RawTypegetComponentType in interface RawTypepublic Map<String,RawField> getFields()
RawTypepublic ClassMetadata getClassMetadata()
RawTypegetClassMetadata in interface RawTypepublic EntityMetadata getEntityMetadata()
RawTypegetEntityMetadata in interface RawTypepublic abstract Object newInstance(EntityInput input, boolean rawAccess) throws RefreshException
RefreshExceptionpublic abstract Object readObject(Object o, EntityInput input, boolean rawAccess) throws RefreshException
RefreshExceptionpublic void readPriKey(Object o, EntityInput input, boolean rawAccess) throws RefreshException
RefreshExceptionpublic String getOldKeyName(String keyName)
public boolean allowEvolveFromProxy()
public com.sleepycat.persist.impl.Accessor getAccessor(boolean rawAccess)
Copyright © 2024. All rights reserved.