Record Class CompositeAutoMappingPolicy
java.lang.Object
java.lang.Record
de.calamanari.adl.sql.config.CompositeAutoMappingPolicy
- Record Components:
members- the child policies in the order they should be probed
- All Implemented Interfaces:
AutoMappingPolicy, Serializable
public record CompositeAutoMappingPolicy(List<AutoMappingPolicy> members)
extends Record
implements AutoMappingPolicy
A
CompositeAutoMappingPolicy allows combining a list of policies into a common policy that can apply different rules or patterns to determine the
column assignment for a given argName.
The policies will be probed in order of appearance in the configured list.
Instances are immutable.
- Author:
- Karl Eilebrecht
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCompositeAutoMappingPolicy(List<AutoMappingPolicy> members) Creates an instance of aCompositeAutoMappingPolicyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisApplicable(String argName) Returns whether this mapping policy can map the given argument to a columnReturns the column assignment for the given argNamemembers()Returns the value of themembersrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CompositeAutoMappingPolicy
Creates an instance of aCompositeAutoMappingPolicyrecord class.- Parameters:
members- the value for themembersrecord component
-
-
Method Details
-
isApplicable
Description copied from interface:AutoMappingPolicyReturns whether this mapping policy can map the given argument to a column- Specified by:
isApplicablein interfaceAutoMappingPolicy- Parameters:
argName-- Returns:
- true if the policy is applicable
-
map
Description copied from interface:AutoMappingPolicyReturns the column assignment for the given argName- Specified by:
mapin interfaceAutoMappingPolicy- Parameters:
argName-ctx-- Returns:
- column assignment
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
members
-