- Type Parameters:
ENTITY- the entity type that contains this propertyBASIC- the basic type that represents the property's value
- All Superinterfaces:
JdbcMappable<BASIC>,JdbcMappingHint
- All Known Implementing Classes:
DefaultPropertyType.DefaultProperty
This interface defines methods for getting and setting property values on entity instances, as well as converting between entity property values and database column values.
Implementations of this interface are typically generated at compile time by the Doma
annotation processor based on Entity annotated classes.
-
Method Summary
Modifier and TypeMethodDescriptionReturns this property as anInParameterfor use in SQL execution.get()Returns the current value of this property.Returns the non-optional value of this property.Loads the value from the entity into this property.Saves the current value of this property to the given entity instance.Methods inherited from interface org.seasar.doma.jdbc.JdbcMappable
getWrapperMethods inherited from interface org.seasar.doma.jdbc.JdbcMappingHint
getDomainClass, getJdbcType
-
Method Details
-
get
Object get()Returns the current value of this property.The returned value may be wrapped in an Optional if the property is nullable.
- Returns:
- the current value of this property, possibly wrapped in an Optional
-
getAsNonOptional
Object getAsNonOptional()Returns the non-optional value of this property.If the property value is wrapped in an Optional, this method unwraps it. This method may throw an exception if the property value is null.
- Returns:
- the non-optional value of this property
- Throws:
NoSuchElementException- if the property value is null and wrapped in an Optional
-
load
Loads the value from the entity into this property.This method extracts the property value from the given entity instance and stores it in this property object for later use.
- Parameters:
entity- the entity instance to load the value from- Returns:
- this property instance for method chaining
-
save
Saves the current value of this property to the given entity instance.This method updates the property value in the given entity instance with the current value stored in this property object.
- Parameters:
entity- the entity instance to save the value to- Returns:
- this property instance for method chaining
-
asInParameter
InParameter<BASIC> asInParameter()Returns this property as anInParameterfor use in SQL execution.This method allows the property to be used as a parameter in SQL statements.
- Returns:
- an input parameter representing this property's value
- See Also:
-