Module org.seasar.doma.core
Record Class PropertyPathSegment.Default
java.lang.Object
java.lang.Record
org.seasar.doma.internal.jdbc.entity.PropertyPathSegment.Default
- Record Components:
name- the name of the property segment
- All Implemented Interfaces:
PropertyPathSegment
- Enclosing interface:
- PropertyPathSegment
public static record PropertyPathSegment.Default(String name)
extends Record
implements PropertyPathSegment
A default property path segment implementation for regular field access.
This implementation provides standard field access without any special handling. It ensures the field is accessible via reflection and creates a wrapper that directly gets and sets field values.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.seasar.doma.internal.jdbc.entity.PropertyPathSegment
PropertyPathSegment.Default, PropertyPathSegment.Optional -
Constructor Summary
Constructors -
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.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.Creates a field wrapper for regular field access.
-
Constructor Details
-
Default
Creates an instance of aDefaultrecord class.- Parameters:
name- the value for thenamerecord component
-
-
Method Details
-
wrapField
Creates a field wrapper for regular field access.This method ensures the field is accessible (making it accessible if necessary) and returns a wrapper that provides direct access to the field value.
- Specified by:
wrapFieldin interfacePropertyPathSegment- Parameters:
field- the field to wrap- Returns:
- a field wrapper for direct field access
- Throws:
WrapException- if an error occurs while creating the wrapper
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
name
Returns the value of thenamerecord component.- Specified by:
namein interfacePropertyPathSegment- Returns:
- the value of the
namerecord component
-