public abstract class SimpleFormat extends Format
Modifier and Type | Class and Description |
---|---|
static class |
SimpleFormat.FBigDec |
static class |
SimpleFormat.FBigInt |
static class |
SimpleFormat.FBool |
static class |
SimpleFormat.FByte |
static class |
SimpleFormat.FChar |
static class |
SimpleFormat.FDate |
static class |
SimpleFormat.FDouble |
static class |
SimpleFormat.FFloat |
static class |
SimpleFormat.FInt |
static class |
SimpleFormat.FLong |
static class |
SimpleFormat.FShort |
static class |
SimpleFormat.FString |
ID_BIGDEC, ID_BIGINT, ID_BOOL, ID_BOOL_W, ID_BYTE, ID_BYTE_W, ID_CHAR, ID_CHAR_W, ID_DATE, ID_DOUBLE, ID_DOUBLE_W, ID_FLOAT, ID_FLOAT_W, ID_INT, ID_INT_W, ID_LONG, ID_LONG_W, ID_NULL, ID_NUMBER, ID_OBJECT, ID_PREDEFINED, ID_SHORT, ID_SHORT_W, ID_SIMPLE_MAX, ID_SIMPLE_MIN, ID_STRING
Constructor and Description |
---|
SimpleFormat(Catalog catalog,
java.lang.Class type,
boolean primitive) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
collectRelatedFormats(Catalog catalog,
java.util.Map<java.lang.String,Format> newFormats)
Calls catalog.createFormat for formats that this format depends on, or
that should also be persistent.
|
(package private) void |
copySecMultiKeyPrimitiveArray(int len,
RecordInput input,
java.util.Set results) |
(package private) boolean |
evolve(Format newFormat,
Evolver evolver)
Called for an existing format that may not equal the current format for
the same class.
|
(package private) int |
getPrimitiveLength() |
(package private) Format |
getWrapperFormat()
For primitive types only, returns their associated wrapper type.
|
(package private) void |
initialize(Catalog catalog,
EntityModel model,
int initVersion)
Initializes an uninitialized format, initializing its related formats
(superclass formats and array component formats) first.
|
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.
|
(package private) java.lang.Object |
newPrimitiveArray(int len,
EntityInput input) |
java.lang.Object |
readObject(java.lang.Object o,
EntityInput input,
boolean rawAccess)
Called after newInstance() to read the rest of the data bytes and fill
in the object contents.
|
(package private) void |
readPrimitiveField(java.lang.Object o,
EntityInput input,
java.lang.reflect.Field field) |
(package private) void |
setWrapperFormat(SimpleFormat wrapperFormat) |
(package private) void |
skipPrimitiveArray(int len,
RecordInput input) |
(package private) void |
writePrimitiveArray(java.lang.Object o,
EntityOutput output) |
(package private) void |
writePrimitiveField(java.lang.Object o,
EntityOutput output,
java.lang.reflect.Field field) |
allowEvolveFromProxy, areNestedRefsProhibited, convertRawObject, copySecKey, copySecMultiKey, evolveMetadata, getAccessor, getCatalog, getClassMetadata, getClassName, getComponentType, getDimensions, getEntityFormat, getEntityMetadata, getEnumConstants, getEvolveNeeded, getExistingType, getFields, getId, getLatestVersion, getNewStringFormat, getOldKeyName, getPreviousVersion, getProxiedFormat, getReader, getSequenceKeyFormat, getSuperFormat, getSuperType, getType, getVersion, initCatalog, initializeIfNeeded, initializeReader, isArray, isAssignableTo, isCurrentVersion, isDeleted, isEntity, isEnum, isInitialized, isModelClass, isNew, isPredefined, isPriKeyNullOrZero, isSameClass, migrateFromBeta, newArray, newInstance, nullifySecKey, readPriKey, setDeleted, setEvolveNeeded, setId, setLatestVersion, setProxiedFormat, setReader, setSuperFormat, setUnused, skipContents, skipToSecKey, toString, writeObject, writePriKey
SimpleFormat(Catalog catalog, java.lang.Class type, boolean primitive)
void setWrapperFormat(SimpleFormat wrapperFormat)
Format getWrapperFormat()
Format
getWrapperFormat
in class Format
public boolean isSimple()
RawType
If 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()
RawType
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 int
raw value is represented as an
Integer
.
isPrimitive
in interface RawType
isPrimitive
in class Format
void collectRelatedFormats(Catalog catalog, java.util.Map<java.lang.String,Format> newFormats)
Format
collectRelatedFormats
in class Format
void initialize(Catalog catalog, EntityModel model, int initVersion)
Format
initialize
in class Format
public java.lang.Object readObject(java.lang.Object o, EntityInput input, boolean rawAccess)
Format
readObject
in interface Reader
readObject
in class Format
boolean evolve(Format newFormat, Evolver evolver)
Format
If this method returns true, then it must have determined one of two things: - that the old and new formats are equal, and it must have called Evolver.useOldFormat; or - that the old format can be evolved to the new format, and it must have called Evolver.useEvolvedFormat.
If this method returns false, then it must have determined that the old format could not be evolved to the new format, and it must have called Evolver.addInvalidMutation, addMissingMutation or addEvolveError.
java.lang.Object newPrimitiveArray(int len, EntityInput input) throws RefreshException
RefreshException
void writePrimitiveArray(java.lang.Object o, EntityOutput output)
int getPrimitiveLength()
void readPrimitiveField(java.lang.Object o, EntityInput input, java.lang.reflect.Field field) throws java.lang.IllegalAccessException, RefreshException
java.lang.IllegalAccessException
- from subclasses.RefreshException
void writePrimitiveField(java.lang.Object o, EntityOutput output, java.lang.reflect.Field field) throws java.lang.IllegalAccessException
java.lang.IllegalAccessException
- from subclasses.void skipPrimitiveArray(int len, RecordInput input)
void copySecMultiKeyPrimitiveArray(int len, RecordInput input, java.util.Set results)
Copyright (c) 2004-2012 Oracle. All rights reserved.