Class BinaryField.Default
- java.lang.Object
-
- one.microstream.persistence.binary.internal.BinaryField.Default
-
- All Implemented Interfaces:
BinaryField
,BinaryField.Initializable
,PersistenceTypeDefinitionMember
,PersistenceTypeDefinitionMemberField
,PersistenceTypeDefinitionMemberFieldGeneric
,PersistenceTypeDescriptionMember
,PersistenceTypeDescriptionMemberField
,PersistenceTypeDescriptionMemberFieldGeneric
- Enclosing interface:
- BinaryField
public static final class BinaryField.Default extends Object implements BinaryField.Initializable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface one.microstream.persistence.binary.internal.BinaryField
BinaryField.Default, BinaryField.Defaults, BinaryField.Initializable
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceTypeDescriptionMember
PersistenceTypeDescriptionMember.IdentityHashEqualator
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceTypeDescriptionMemberField
PersistenceTypeDescriptionMemberField.Abstract
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceTypeDescriptionMemberFieldGeneric
PersistenceTypeDescriptionMemberFieldGeneric.Abstract
-
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
Modifier and Type Method Description void
assembleTypeDescription(PersistenceTypeDescriptionMemberAppender assembler)
BinaryField
copyForName(String qualifier, String name)
PersistenceTypeDefinitionMember
createDefinitionMember(PersistenceTypeDefinitionMemberCreator creator)
boolean
hasReferences()
Determines if this field contains references.String
identifier()
The name of the member identifying it in its parent group of members.
E.g.String
initializeName(String name)
long
initializeOffset(long offset)
boolean
isEnumConstant()
Determines if this member is a enum constant name definition instead of an isntance field definition.boolean
isPrimitive()
Determines if this member is primitive value.boolean
isPrimitiveDefinition()
Determines if this member is a primitive type definition instead of a field definition.boolean
isReference()
Determines if this member directly is a reference.boolean
isValidPersistentLength(long persistentLength)
String
name()
The simple or "primary" name of the member, if applicable.long
offset()
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.Class<?>
type()
The runtime type used by this description member, if possible.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.internal.BinaryField
copyForName
-
Methods inherited from interface one.microstream.persistence.binary.internal.BinaryField.Initializable
initializeNameOptional
-
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
-
-
-
-
Method Detail
-
initializeOffset
public final long initializeOffset(long offset)
- Specified by:
initializeOffset
in interfaceBinaryField.Initializable
-
initializeName
public final String initializeName(String name)
- Specified by:
initializeName
in interfaceBinaryField.Initializable
-
offset
public final long offset()
- Specified by:
offset
in interfaceBinaryField
-
copyForName
public BinaryField copyForName(String qualifier, String name)
- Specified by:
copyForName
in interfaceBinaryField
- Specified by:
copyForName
in interfacePersistenceTypeDefinitionMemberFieldGeneric
-
type
public final Class<?> type()
Description copied from interface:PersistenceTypeDefinitionMember
The runtime type used by this description member, if possible. Otherwisenull
.- Specified by:
type
in interfaceBinaryField
- Specified by:
type
in interfacePersistenceTypeDefinitionMember
-
typeName
public String typeName()
- Specified by:
typeName
in interfacePersistenceTypeDescriptionMember
- Specified by:
typeName
in interfacePersistenceTypeDescriptionMemberField
-
qualifier
public final String 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
public final String 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
- Specified by:
name
in interfacePersistenceTypeDescriptionMember
- Specified by:
name
in interfacePersistenceTypeDescriptionMemberField
- Returns:
- the member's simple name.
-
identifier
public final String 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
public void assembleTypeDescription(PersistenceTypeDescriptionMemberAppender assembler)
- Specified by:
assembleTypeDescription
in interfacePersistenceTypeDescriptionMember
-
isReference
public boolean isReference()
Description copied from interface:PersistenceTypeDescriptionMember
Determines if this member directly is a reference.- Specified by:
isReference
in interfacePersistenceTypeDescriptionMember
-
isPrimitive
public boolean isPrimitive()
Description copied from interface:PersistenceTypeDescriptionMember
Determines if this member is primitive value.- Specified by:
isPrimitive
in interfacePersistenceTypeDescriptionMember
-
isPrimitiveDefinition
public boolean isPrimitiveDefinition()
Description copied from interface:PersistenceTypeDescriptionMember
Determines if this member is a primitive type definition instead of a field definition.- Specified by:
isPrimitiveDefinition
in interfacePersistenceTypeDescriptionMember
-
isEnumConstant
public boolean isEnumConstant()
Description copied from interface:PersistenceTypeDescriptionMember
Determines if this member is a enum constant name definition instead of an isntance field definition.- Specified by:
isEnumConstant
in interfacePersistenceTypeDescriptionMember
-
hasReferences
public boolean hasReferences()
Description copied from interface:PersistenceTypeDescriptionMember
Determines if this field contains references. Either because it is a reference itself, seePersistenceTypeDescriptionMember.isReference()
, or because it is a complex type that contains one or more nested members that have references.- Specified by:
hasReferences
in interfacePersistenceTypeDescriptionMember
-
persistentMinimumLength
public 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 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 boolean isValidPersistentLength(long persistentLength)
- Specified by:
isValidPersistentLength
in interfacePersistenceTypeDescriptionMember
-
validatePersistentLength
public void validatePersistentLength(long persistentLength)
- Specified by:
validatePersistentLength
in interfacePersistenceTypeDescriptionMember
-
createDefinitionMember
public PersistenceTypeDefinitionMember createDefinitionMember(PersistenceTypeDefinitionMemberCreator creator)
- Specified by:
createDefinitionMember
in interfacePersistenceTypeDescriptionMember
-
-