Interface PersistenceTypeDescriptionMember
- All Known Subinterfaces:
BinaryField<T>
,BinaryField.Initializable<T>
,PersistenceTypeDefinitionMember
,PersistenceTypeDefinitionMemberEnumConstant
,PersistenceTypeDefinitionMemberField
,PersistenceTypeDefinitionMemberFieldGeneric
,PersistenceTypeDefinitionMemberFieldGenericComplex
,PersistenceTypeDefinitionMemberFieldGenericSimple
,PersistenceTypeDefinitionMemberFieldGenericVariableLength
,PersistenceTypeDefinitionMemberFieldReflective
,PersistenceTypeDefinitionMemberPrimitiveDefinition
,PersistenceTypeDescriptionMemberEnumConstant
,PersistenceTypeDescriptionMemberField
,PersistenceTypeDescriptionMemberFieldGeneric
,PersistenceTypeDescriptionMemberFieldGenericComplex
,PersistenceTypeDescriptionMemberFieldGenericSimple
,PersistenceTypeDescriptionMemberFieldGenericVariableLength
,PersistenceTypeDescriptionMemberFieldReflective
,PersistenceTypeDescriptionMemberPrimitiveDefinition
- All Known Implementing Classes:
BinaryField.Abstract
,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
,PersistenceTypeDefinitionMemberEnumConstant.Default
,PersistenceTypeDefinitionMemberFieldGenericComplex.Default
,PersistenceTypeDefinitionMemberFieldGenericSimple.Default
,PersistenceTypeDefinitionMemberFieldGenericVariableLength.Default
,PersistenceTypeDefinitionMemberFieldReflective.Default
,PersistenceTypeDefinitionMemberPrimitiveDefinition.Default
,PersistenceTypeDescriptionMemberEnumConstant.Default
,PersistenceTypeDescriptionMemberField.Abstract
,PersistenceTypeDescriptionMemberFieldGeneric.Abstract
,PersistenceTypeDescriptionMemberFieldGenericComplex.Default
,PersistenceTypeDescriptionMemberFieldGenericSimple.Default
,PersistenceTypeDescriptionMemberFieldGenericVariableLength.Default
,PersistenceTypeDescriptionMemberFieldReflective.Default
,PersistenceTypeDescriptionMemberPrimitiveDefinition.Default
public interface PersistenceTypeDescriptionMember
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PersistenceTypeDescriptionMember.IdentityHashEqualator
-
Method Summary
Modifier and Type Method Description void
assembleTypeDescription(PersistenceTypeDescriptionMemberAppender assembler)
static long
calculatePersistentMaximumLength(long startValue, Iterable<? extends PersistenceTypeDescriptionMember> members)
static long
calculatePersistentMinimumLength(long startValue, Iterable<? extends PersistenceTypeDescriptionMember> members)
PersistenceTypeDefinitionMember
createDefinitionMember(PersistenceTypeDefinitionMemberCreator creator)
static boolean
determineHasReferences(Iterable<? extends PersistenceTypeDescriptionMember> members)
static boolean
determineIsPrimitive(XGettingSequence<? extends PersistenceTypeDescriptionMember> members)
static boolean
equalDescription(PersistenceTypeDescriptionMember m1, PersistenceTypeDescriptionMember m2)
static boolean
equalDescriptions(XGettingSequence<? extends PersistenceTypeDescriptionMember> members1, XGettingSequence<? extends PersistenceTypeDescriptionMember> members2)
static boolean
equalMembers(XGettingSequence<? extends PersistenceTypeDescriptionMember> members1, XGettingSequence<? extends PersistenceTypeDescriptionMember> members2, Equalator<PersistenceTypeDescriptionMember> equalator)
default boolean
equalsDescription(PersistenceTypeDescriptionMember other)
equalsStructure(PersistenceTypeDescriptionMember)
plusqualifier()
equality, to check if a member is really content-wise equal.default boolean
equalsStructure(PersistenceTypeDescriptionMember other)
Structure means equal order of members by type name and simple name.
Not qualifier, since that is only required for intra-type field identificationstatic boolean
equalStructure(PersistenceTypeDescriptionMember m1, PersistenceTypeDescriptionMember m2)
Tests whether the passedPersistenceTypeDescriptionMember
have the same "intended" structure, meaning same order of fields with same simple name (PersistenceTypeDescriptionMembername()
) and type name.static boolean
equalStructures(XGettingSequence<? extends PersistenceTypeDescriptionMember> members1, XGettingSequence<? extends PersistenceTypeDescriptionMember> members2)
static boolean
equalTypeAndName(PersistenceTypeDescriptionMember m1, PersistenceTypeDescriptionMember m2)
static boolean
equalTypeAndNameAndQualifier(PersistenceTypeDescriptionMember m1, PersistenceTypeDescriptionMember m2)
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.static int
identityHash(PersistenceTypeDescriptionMember member)
static PersistenceTypeDescriptionMember.IdentityHashEqualator
identityHashEqualator()
boolean
isEnumConstant()
Determines if this member is a enum constant name definition instead of an isntance field definition.default boolean
isFixedLength()
default boolean
isIdentical(PersistenceTypeDescriptionMember other)
static boolean
isIdentical(PersistenceTypeDescriptionMember m1, PersistenceTypeDescriptionMember m2)
boolean
isInstanceMember()
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)
default boolean
isVariableLength()
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.String
typeName()
void
validatePersistentLength(long persistentLength)
-
Method Details
-
typeName
String typeName() -
qualifier
String qualifier()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.- Returns:
- the member's qualifier string to ensure a unique
identifier()
in a group of members.
-
identifier
String identifier()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
.- Returns:
- the member's uniquely identifying name.
-
name
String name()The simple or "primary" name of the member, if applicable. E.g. "lastName".May be
null
if not applicable.- Returns:
- the member's simple name.
-
isInstanceMember
boolean isInstanceMember() -
equalsDescription
equalsStructure(PersistenceTypeDescriptionMember)
plusqualifier()
equality, to check if a member is really content-wise equal.- Parameters:
other
-- See Also:
equalsStructure(PersistenceTypeDescriptionMember)
-
equalsStructure
Structure means equal order of members by type name and simple name.
Not qualifier, since that is only required for intra-type field identification- Parameters:
other
-- See Also:
equalDescription(PersistenceTypeDescriptionMember,PersistenceTypeDescriptionMember)
-
equalTypeAndName
static boolean equalTypeAndName(PersistenceTypeDescriptionMember m1, PersistenceTypeDescriptionMember m2) -
equalTypeAndNameAndQualifier
static boolean equalTypeAndNameAndQualifier(PersistenceTypeDescriptionMember m1, PersistenceTypeDescriptionMember m2) -
equalStructure
static boolean equalStructure(PersistenceTypeDescriptionMember m1, PersistenceTypeDescriptionMember m2)Tests whether the passedPersistenceTypeDescriptionMember
have the same "intended" structure, meaning same order of fields with same simple name (PersistenceTypeDescriptionMembername()
) and type name.
For example:
APersistenceTypeDescriptionMemberFieldReflective
and aPersistenceTypeDescriptionMemberFieldGeneric
with different member qualifiers are still considered equal.
This is necessary for legacy type mapping to being able to write a custom legacy type handler that is compatible with a generic type handler derived from reflective information.- Parameters:
m1
-m2
-
-
equalDescription
static boolean equalDescription(PersistenceTypeDescriptionMember m1, PersistenceTypeDescriptionMember m2) -
calculatePersistentMinimumLength
static long calculatePersistentMinimumLength(long startValue, Iterable<? extends PersistenceTypeDescriptionMember> members) -
calculatePersistentMaximumLength
static long calculatePersistentMaximumLength(long startValue, Iterable<? extends PersistenceTypeDescriptionMember> members) -
assembleTypeDescription
-
isReference
boolean isReference()Determines if this member directly is a reference. -
isPrimitive
boolean isPrimitive()Determines if this member is primitive value. -
isPrimitiveDefinition
boolean isPrimitiveDefinition()Determines if this member is a primitive type definition instead of a field definition. -
isEnumConstant
boolean isEnumConstant()Determines if this member is a enum constant name definition instead of an isntance field definition. -
hasReferences
boolean hasReferences()Determines if this field contains references. Either because it is a reference itself, seeisReference()
, or because it is a complex type that contains one or more nested members that have references. -
isVariableLength
default boolean isVariableLength() -
isFixedLength
default boolean isFixedLength() -
persistentMinimumLength
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. The precise meaning of the length value depends on the actual persistence form.- Returns:
- the persistent form length of null if variable length.
- See Also:
persistentMaximumLength()
-
persistentMaximumLength
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. The precise meaning of the length value depends on the actual persistence form.- Returns:
- the persistent form length of null if variable length.
- See Also:
persistentMinimumLength()
-
isValidPersistentLength
boolean isValidPersistentLength(long persistentLength) -
validatePersistentLength
void validatePersistentLength(long persistentLength) -
isIdentical
-
isIdentical
static boolean isIdentical(PersistenceTypeDescriptionMember m1, PersistenceTypeDescriptionMember m2) -
identityHash
-
identityHashEqualator
-
determineHasReferences
static boolean determineHasReferences(Iterable<? extends PersistenceTypeDescriptionMember> members) -
determineIsPrimitive
static boolean determineIsPrimitive(XGettingSequence<? extends PersistenceTypeDescriptionMember> members) -
equalDescriptions
static boolean equalDescriptions(XGettingSequence<? extends PersistenceTypeDescriptionMember> members1, XGettingSequence<? extends PersistenceTypeDescriptionMember> members2) -
equalStructures
static boolean equalStructures(XGettingSequence<? extends PersistenceTypeDescriptionMember> members1, XGettingSequence<? extends PersistenceTypeDescriptionMember> members2) -
equalMembers
static boolean equalMembers(XGettingSequence<? extends PersistenceTypeDescriptionMember> members1, XGettingSequence<? extends PersistenceTypeDescriptionMember> members2, Equalator<PersistenceTypeDescriptionMember> equalator) -
createDefinitionMember
PersistenceTypeDefinitionMember createDefinitionMember(PersistenceTypeDefinitionMemberCreator creator)
-