Class BinaryField.Abstract<T>
java.lang.Object
one.microstream.persistence.binary.types.BinaryField.Abstract<T>
- All Implemented Interfaces:
BinaryField<T>
,BinaryField.Initializable<T>
,PersistenceTypeDefinitionMember
,PersistenceTypeDefinitionMemberField
,PersistenceTypeDefinitionMemberFieldGeneric
,PersistenceTypeDescriptionMember
,PersistenceTypeDescriptionMemberField
,PersistenceTypeDescriptionMemberFieldGeneric
- Direct Known Subclasses:
BinaryField.Default_boolean
,BinaryField.Default_byte
,BinaryField.Default_char
,BinaryField.Default_double
,BinaryField.Default_float
,BinaryField.Default_int
,BinaryField.Default_long
,BinaryField.Default_short
,BinaryField.DefaultReference
- Enclosing interface:
- BinaryField<T>
public abstract static class BinaryField.Abstract<T> extends Object implements BinaryField.Initializable<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.persistence.binary.types.BinaryField
BinaryField.Abstract<T>, BinaryField.Default_boolean<T>, BinaryField.Default_byte<T>, BinaryField.Default_char<T>, BinaryField.Default_double<T>, BinaryField.Default_float<T>, BinaryField.Default_int<T>, BinaryField.Default_long<T>, BinaryField.Default_short<T>, BinaryField.DefaultReference<T,R>, BinaryField.Defaults, BinaryField.Initializable<T>
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceTypeDescriptionMember
PersistenceTypeDescriptionMember.IdentityHashEqualator
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected PersistenceTypeDefinitionMemberFieldGeneric
actual()
void
assembleTypeDescription(PersistenceTypeDescriptionMemberAppender assembler)
long
binaryOffset()
PersistenceTypeDefinitionMember
createDefinitionMember(PersistenceTypeDefinitionMemberCreator creator)
boolean
hasReferences()
String
identifier()
The name of the member identifying it in its parent group of members.
E.g.String
initializeIdentifier(String qualifier, String name)
long
initializeOffset(long offset)
boolean
isEnumConstant()
boolean
isPrimitive()
boolean
isPrimitiveDefinition()
boolean
isReference()
boolean
isValidPersistentLength(long persistentLength)
String
name()
The simple or "primary" name of the member, if applicable.long
persistentMaximumLength()
Returns the highest possible length value that a member of the persistent form for values of the type represented by this instance can have.long
persistentMinimumLength()
Returns the lowest possible length value that a member of the persistent form for values of the type represented by this instance can have.String
qualifier()
A type-internal qualifier to distinct different members with equal "primary" name.protected void
throwValidationException(String instanceValue, String persistedValue)
Class<?>
type()
String
typeName()
void
validatePersistentLength(long persistentLength)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface one.microstream.persistence.binary.types.BinaryField
calculateBinaryLength, canSet, copyForName, copyForName, iterateLoadableReferences, iterateReferences, read_boolean, read_byte, read_char, read_double, read_float, read_int, read_long, read_short, readReference, setToInstance, storeFromInstance, validateState
Methods inherited from interface one.microstream.persistence.binary.types.BinaryField.Initializable
initializeIdentifierOptional
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeDefinitionMember
runtimeQualifier
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeDefinitionMemberField
field
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeDescriptionMember
equalsDescription, equalsStructure, isFixedLength, isIdentical, isVariableLength
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeDescriptionMemberField
isInstanceMember
-
Constructor Details
-
Method Details
-
initializeOffset
public final long initializeOffset(long offset)- Specified by:
initializeOffset
in interfaceBinaryField.Initializable<T>
-
binaryOffset
public final long binaryOffset() -
actual
-
initializeIdentifier
- Specified by:
initializeIdentifier
in interfaceBinaryField.Initializable<T>
-
type
- Specified by:
type
in interfaceBinaryField<T>
- Specified by:
type
in interfacePersistenceTypeDefinitionMember
- Returns:
- the runtime type used by this description member, if possible. Otherwise
null
.
-
typeName
- Specified by:
typeName
in interfacePersistenceTypeDescriptionMember
- Specified by:
typeName
in interfacePersistenceTypeDescriptionMemberField
-
qualifier
Description copied from interface:PersistenceTypeDescriptionMember
A type-internal qualifier to distinct different members with equal "primary" name. E.g. reflection-based type handling where fields names are only unique in combination with their declaring class.May be
null
if not applicable.- Specified by:
qualifier
in interfacePersistenceTypeDescriptionMember
- Specified by:
qualifier
in interfacePersistenceTypeDescriptionMemberField
- Returns:
- the member's qualifier string to ensure a unique
PersistenceTypeDescriptionMember.identifier()
in a group of members.
-
name
Description copied from interface:PersistenceTypeDescriptionMember
The simple or "primary" name of the member, if applicable. E.g. "lastName".May be
null
if not applicable.- Specified by:
name
in interfaceBinaryField<T>
- Specified by:
name
in interfacePersistenceTypeDescriptionMember
- Specified by:
name
in interfacePersistenceTypeDescriptionMemberField
- Returns:
- the member's simple name.
-
identifier
Description copied from interface:PersistenceTypeDescriptionMember
The name of the member identifying it in its parent group of members.
E.g. "com.my.app.entities.Person#lastname".May never be
null
.- Specified by:
identifier
in interfacePersistenceTypeDescriptionMember
- Returns:
- the member's uniquely identifying name.
-
assembleTypeDescription
- Specified by:
assembleTypeDescription
in interfacePersistenceTypeDescriptionMember
-
isReference
public final boolean isReference()- Specified by:
isReference
in interfacePersistenceTypeDescriptionMember
- Returns:
- if this member directly is a reference.
-
isPrimitive
public final boolean isPrimitive()- Specified by:
isPrimitive
in interfacePersistenceTypeDescriptionMember
- Returns:
- if this member is primitive value.
-
isPrimitiveDefinition
public final boolean isPrimitiveDefinition()- Specified by:
isPrimitiveDefinition
in interfacePersistenceTypeDescriptionMember
- Returns:
- if this member is a primitive type definition instead of a field definition.
-
isEnumConstant
public final boolean isEnumConstant()- Specified by:
isEnumConstant
in interfacePersistenceTypeDescriptionMember
- Returns:
- if this member is a enum constant name definition instead of an isntance field definition.
-
hasReferences
public final boolean hasReferences()- Specified by:
hasReferences
in interfacePersistenceTypeDescriptionMember
- Returns:
- if this field contains references. Either because it is a reference itself,
see
PersistenceTypeDescriptionMember.isReference()
, or because it is a complex type that contains one or more nested members that have references.
-
persistentMinimumLength
public final long persistentMinimumLength()Description copied from interface:PersistenceTypeDescriptionMember
Returns the lowest possible length value that a member of the persistent form for values of the type represented by this instance can have. The precise meaning of the length value depends on the actual persistence form.- Specified by:
persistentMinimumLength
in interfacePersistenceTypeDescriptionMember
- Returns:
- the persistent form length of null if variable length.
- See Also:
PersistenceTypeDescriptionMember.persistentMaximumLength()
-
persistentMaximumLength
public final long persistentMaximumLength()Description copied from interface:PersistenceTypeDescriptionMember
Returns the highest possible length value that a member of the persistent form for values of the type represented by this instance can have. The precise meaning of the length value depends on the actual persistence form.- Specified by:
persistentMaximumLength
in interfacePersistenceTypeDescriptionMember
- Returns:
- the persistent form length of null if variable length.
- See Also:
PersistenceTypeDescriptionMember.persistentMinimumLength()
-
isValidPersistentLength
public final boolean isValidPersistentLength(long persistentLength)- Specified by:
isValidPersistentLength
in interfacePersistenceTypeDescriptionMember
-
validatePersistentLength
public final void validatePersistentLength(long persistentLength)- Specified by:
validatePersistentLength
in interfacePersistenceTypeDescriptionMember
-
createDefinitionMember
public final PersistenceTypeDefinitionMember createDefinitionMember(PersistenceTypeDefinitionMemberCreator creator)- Specified by:
createDefinitionMember
in interfacePersistenceTypeDescriptionMember
-
throwValidationException
-