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
-
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
- the description to compare to- Returns:
- if this and the other description are equal
- 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
- the description to compare to- Returns:
- if this and the other description's structure are equal
- 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
- the first memberm2
- the second member- Returns:
- if the two members have the same structure
-
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()- Returns:
- if this member directly is a reference.
-
isPrimitive
boolean isPrimitive()- Returns:
- if this member is primitive value.
-
isPrimitiveDefinition
boolean isPrimitiveDefinition()- Returns:
- if this member is a primitive type definition instead of a field definition.
-
isEnumConstant
boolean isEnumConstant()- Returns:
- if this member is a enum constant name definition instead of an isntance field definition.
-
hasReferences
boolean hasReferences()- Returns:
- if this field contains references. Either because it is a reference itself,
see
isReference()
, 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)
-