Record Class EntitySchema.KeyComponentInfo
java.lang.Object
java.lang.Record
dev.hogwai.dynamodb.simplified.entity.EntitySchema.KeyComponentInfo
- Record Components:
component- the key component nameposition- the ordering position within the composite keyattributeName- the entity attribute nameextractor- the strategy for extracting the value from an entity instance
- Enclosing class:
EntitySchema<T>
public static record EntitySchema.KeyComponentInfo(String component, int position, String attributeName, UnaryOperator<Object> extractor)
extends Record
Describes a single key component part with its attribute name, position,
and a strategy for extracting the value from an entity instance.
-
Constructor Summary
ConstructorsConstructorDescriptionKeyComponentInfo(String component, int position, String attributeName, UnaryOperator<Object> extractor) Creates an instance of aKeyComponentInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributeNamerecord component.Returns the value of thecomponentrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theextractorrecord component.final inthashCode()Returns a hash code value for this object.intposition()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
KeyComponentInfo
public KeyComponentInfo(String component, int position, String attributeName, UnaryOperator<Object> extractor) Creates an instance of aKeyComponentInforecord class.- Parameters:
component- the value for thecomponentrecord componentposition- the value for thepositionrecord componentattributeName- the value for theattributeNamerecord componentextractor- the value for theextractorrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
component
-
position
-
attributeName
Returns the value of theattributeNamerecord component.- Returns:
- the value of the
attributeNamerecord component
-
extractor
-