Class BinaryHandlerEntityLoading.Default<T>
java.lang.Object
one.microstream.persistence.binary.one.microstream.entity.BinaryHandlerEntityLoading.Default<T>
- All Implemented Interfaces:
BinaryHandlerEntityLoading<T>
,BinaryTypeHandler<T>
,PersistenceDataTypeHolder<Binary>
,PersistenceTypeDefinition
,PersistenceTypeDescription
,PersistenceTypeHandler<Binary,T>
,PersistenceTypeIdentity
,PersistenceTypeIdOwner
,PersistenceTypeLink
- Enclosing interface:
- BinaryHandlerEntityLoading<T>
public static class BinaryHandlerEntityLoading.Default<T> extends Object implements BinaryHandlerEntityLoading<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.persistence.binary.one.microstream.entity.BinaryHandlerEntityLoading
BinaryHandlerEntityLoading.Default<T>
Nested classes/interfaces inherited from interface one.microstream.persistence.binary.types.BinaryTypeHandler
BinaryTypeHandler.Abstract<T>
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceTypeDescription
PersistenceTypeDescription.Identity
-
Method Summary
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.one.microstream.entity.BinaryHandlerEntityLoading
store
-
Method Details
-
initialize
- Specified by:
initialize
in interfacePersistenceTypeHandler<Binary,T>
-
dataType
- Specified by:
dataType
in interfaceBinaryTypeHandler<T>
- Specified by:
dataType
in interfacePersistenceDataTypeHolder<T>
- Specified by:
dataType
in interfacePersistenceTypeHandler<Binary,T>
-
typeId
public long typeId()Description copied from interface:PersistenceTypeDefinition
The biuniquely associated id value identifying a type description.- Specified by:
typeId
in interfacePersistenceTypeDefinition
- Specified by:
typeId
in interfacePersistenceTypeIdentity
- Specified by:
typeId
in interfacePersistenceTypeIdOwner
- Specified by:
typeId
in interfacePersistenceTypeLink
-
typeName
Description copied from interface:PersistenceTypeDefinition
The name of the type as defined in the type dictionary. This name may never change for a given typeId, even if the runtimePersistenceTypeDefinition.runtimeTypeName()
did to reflect a design-level type renaming.- Specified by:
typeName
in interfacePersistenceTypeDefinition
- Specified by:
typeName
in interfacePersistenceTypeDescription
- Specified by:
typeName
in interfacePersistenceTypeIdentity
-
instanceReferenceMembers
- Specified by:
instanceReferenceMembers
in interfacePersistenceTypeDescription
-
runtimeTypeName
Description copied from interface:PersistenceTypeDefinition
The name of the corresponding runtime type. If not implemented otherwise (e.g. to cache the name), this method simply callsClass.getName()
of a non-nullPersistenceTypeDefinition.type()
reference.- Specified by:
runtimeTypeName
in interfacePersistenceTypeDefinition
- Returns:
- the name of the corresponding runtime type
-
type
- Specified by:
type
in interfacePersistenceTypeDefinition
- Specified by:
type
in interfacePersistenceTypeHandler<Binary,T>
- Specified by:
type
in interfacePersistenceTypeLink
-
isValidEntityType
- Specified by:
isValidEntityType
in interfacePersistenceTypeHandler<Binary,T>
-
instancePrimitiveMembers
- Specified by:
instancePrimitiveMembers
in interfacePersistenceTypeDescription
-
validateEntityType
- Specified by:
validateEntityType
in interfacePersistenceTypeHandler<Binary,T>
-
allMembers
- Specified by:
allMembers
in interfacePersistenceTypeDefinition
- Specified by:
allMembers
in interfacePersistenceTypeDescription
- Specified by:
allMembers
in interfacePersistenceTypeHandler<Binary,T>
-
instanceMembers
Description copied from interface:PersistenceTypeDefinition
Enum (unique elements with order), usingPersistenceTypeDescriptionMember.identityHashEqualator()
. Contains all persistent members (similar, but not identical to fields) in persistent order, which can differ from the declaration order.- Specified by:
instanceMembers
in interfacePersistenceTypeDefinition
- Specified by:
instanceMembers
in interfacePersistenceTypeDescription
- Specified by:
instanceMembers
in interfacePersistenceTypeHandler<Binary,T>
-
iterateInstanceReferences
- Specified by:
iterateInstanceReferences
in interfacePersistenceTypeHandler<Binary,T>
-
iterateLoadableReferences
- Specified by:
iterateLoadableReferences
in interfacePersistenceTypeHandler<Binary,T>
-
create
- Specified by:
create
in interfacePersistenceTypeHandler<Binary,T>
-
hasPersistedReferences
public boolean hasPersistedReferences()- Specified by:
hasPersistedReferences
in interfacePersistenceTypeDefinition
-
membersPersistedLengthMinimum
public long membersPersistedLengthMinimum()- Specified by:
membersPersistedLengthMinimum
in interfacePersistenceTypeDefinition
-
toTypeIdentifier
- Specified by:
toTypeIdentifier
in interfacePersistenceTypeDescription
-
initializeState
- Specified by:
initializeState
in interfacePersistenceTypeHandler<Binary,T>
-
membersPersistedLengthMaximum
public long membersPersistedLengthMaximum()- Specified by:
membersPersistedLengthMaximum
in interfacePersistenceTypeDefinition
-
hasPersistedVariableLength
public boolean hasPersistedVariableLength()Description copied from interface:PersistenceTypeDefinition
Provides information if two instances of the handled type can have different length in persisted form.Examples for variable length types:
- arrays
java.lang.String
java.util.ArrayList
java.math.BigDecimal
Examples for fixed length types:
- primitive value wrapper types
java.lang.Object
java.util.Date
- typical entity types (without unshared inlined variable length component instances)
- Specified by:
hasPersistedVariableLength
in interfacePersistenceTypeDefinition
- Returns:
- if two instances of the handled type can have different length in persisted form
-
updateState
- Specified by:
updateState
in interfacePersistenceTypeHandler<Binary,T>
-
complete
Description copied from interface:PersistenceTypeHandler
Completes an initially built instance after all loaded instances have been built. E.g. can be used to cause a hash collection to hash all its initially collected entries after their instances have been built.- Specified by:
complete
in interfacePersistenceTypeHandler<Binary,T>
- Parameters:
data
- the data targetinstance
- the source instancehandler
- the appropriate handler
-
isPrimitiveType
public boolean isPrimitiveType()- Specified by:
isPrimitiveType
in interfacePersistenceTypeDefinition
-
hasVaryingPersistedLengthInstances
public boolean hasVaryingPersistedLengthInstances()Description copied from interface:PersistenceTypeDefinition
Provides information if one particular instance can have variing binary length from one store to another.Examples for variable length instances:
- variable size collection instances
- variable size pesudo collection instances like
java.util.StringBuilder
- instances of custom defined types similar to collections
Examples for fixed length instances:
- arrays
- all immutable type instances (like
java.lang.String
) - all fixed length types (see
PersistenceTypeDefinition.hasVaryingPersistedLengthInstances()
- Specified by:
hasVaryingPersistedLengthInstances
in interfacePersistenceTypeDefinition
- Returns:
- if one particular instance can have variing binary length from one store to another
-
iterateMemberTypes
Description copied from interface:PersistenceTypeHandler
Iterates the types of persistent members (e.g. non-transientField
s). The same type may occur more than once. The order in which the types are provided is undefined, i.e. depending on the implementation.- Specified by:
iterateMemberTypes
in interfacePersistenceTypeHandler<Binary,T>
- Type Parameters:
C
- the logic type- Parameters:
logic
- the iteration logic- Returns:
- the given logic
-
toRuntimeTypeIdentifier
- Specified by:
toRuntimeTypeIdentifier
in interfacePersistenceTypeDefinition
-
membersInDeclaredOrder
- Specified by:
membersInDeclaredOrder
in interfacePersistenceTypeHandler<Binary,T>
-
storingMembers
- Specified by:
storingMembers
in interfacePersistenceTypeHandler<Binary,T>
-
settingMembers
- Specified by:
settingMembers
in interfacePersistenceTypeHandler<Binary,T>
-
guaranteeSpecificInstanceViablity
Description copied from interface:PersistenceTypeHandler
Guarantees that thePersistenceTypeHandler
implementation is actually viably usable to handle instances. That is the natural purpose of type handlers, but there are exceptions, like type handlers created for abstract types or unpersistable types just to have a metadata representation that links a type and a type id.See occurances of
PersistenceExceptionTypeNotPersistable
.- Specified by:
guaranteeSpecificInstanceViablity
in interfacePersistenceTypeHandler<Binary,T>
- Throws:
PersistenceExceptionTypeNotPersistable
- if the handler's type is not persistable- See Also:
PersistenceExceptionTypeNotPersistable
-
isSpecificInstanceViable
public boolean isSpecificInstanceViable()- Specified by:
isSpecificInstanceViable
in interfacePersistenceTypeHandler<Binary,T>
-
guaranteeSubTypeInstanceViablity
- Specified by:
guaranteeSubTypeInstanceViablity
in interfacePersistenceTypeHandler<Binary,T>
- Throws:
PersistenceExceptionTypeNotPersistable
-
isSubTypeInstanceViable
public boolean isSubTypeInstanceViable()- Specified by:
isSubTypeInstanceViable
in interfacePersistenceTypeHandler<Binary,T>
-
collectEnumConstants
- Specified by:
collectEnumConstants
in interfacePersistenceTypeHandler<Binary,T>
-
getPersistedEnumOrdinal
- Specified by:
getPersistedEnumOrdinal
in interfacePersistenceTypeHandler<Binary,T>
-
createStoringEntityHandler
- Specified by:
createStoringEntityHandler
in interfaceBinaryHandlerEntityLoading<T>
-