Interface EmbeddableType<EMBEDDABLE>
- Type Parameters:
EMBEDDABLE- the embeddable type
Embeddable.
An embeddable type is a component class that can be embedded in an entity class and contains multiple properties that are mapped to database columns. This interface provides methods to create instances of embeddable objects and access their property types.
Implementations of this interface are typically generated at compile time by the Doma annotation processor.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault <ENTITY> List<EntityPropertyType<ENTITY,?>> getEmbeddablePropertyTypes(String embeddedPropertyName, Class<ENTITY> entityClass, NamingType namingType) Deprecated.default <ENTITY> List<EntityPropertyType<ENTITY,?>> getEmbeddablePropertyTypes(String embeddedPropertyName, Class<ENTITY> entityClass, NamingType namingType, EmbeddedType embeddedType) Deprecated.<ENTITY> List<EntityPropertyType<ENTITY,?>> getEmbeddablePropertyTypes(PropertyPath embeddedPropertyPath, Class<ENTITY> entityClass, NamingType namingType, EmbeddedType embeddedType) Returns a list of entity property types for the embeddable properties using a property path.default <ENTITY> EMBEDDABLEnewEmbeddable(String embeddedPropertyName, Map<String, Property<ENTITY, ?>> __args) Deprecated.<ENTITY> EMBEDDABLEnewEmbeddable(String embeddedPropertyName, Map<String, Property<ENTITY, ?>> __args, boolean optional)
-
Method Details
-
getEmbeddablePropertyTypes
@Deprecated default <ENTITY> List<EntityPropertyType<ENTITY,?>> getEmbeddablePropertyTypes(String embeddedPropertyName, Class<ENTITY> entityClass, NamingType namingType) Deprecated.Returns a list of entity property types for the embeddable properties.This method is used to obtain metadata about the properties within an embeddable object when it is embedded in an entity. The property types are used for mapping between the embeddable object's properties and database columns.
- Type Parameters:
ENTITY- the entity type that contains the embeddable- Parameters:
embeddedPropertyName- the name of the property in the entity that holds the embeddableentityClass- the entity classnamingType- the naming convention used for column names- Returns:
- a list of entity property types for the embeddable properties
-
getEmbeddablePropertyTypes
@Deprecated default <ENTITY> List<EntityPropertyType<ENTITY,?>> getEmbeddablePropertyTypes(String embeddedPropertyName, Class<ENTITY> entityClass, NamingType namingType, EmbeddedType embeddedType) Deprecated.Returns a list of entity property types for the embeddable properties with a column name prefix.This method is used to obtain metadata about the properties within an embeddable object when it is embedded in an entity. The property types are used for mapping between the embeddable object's properties and database columns. The column name prefix is applied to all column names of the embeddable properties, which is useful when the same embeddable type is used multiple times within an entity.
- Type Parameters:
ENTITY- the entity type that contains the embeddable- Parameters:
embeddedPropertyName- the name of the property in the entity that holds the embeddableentityClass- the entity classnamingType- the naming convention used for column namesembeddedType- the embedded type metadata containing column prefix and column overrides- Returns:
- a list of entity property types for the embeddable properties
-
getEmbeddablePropertyTypes
<ENTITY> List<EntityPropertyType<ENTITY,?>> getEmbeddablePropertyTypes(PropertyPath embeddedPropertyPath, Class<ENTITY> entityClass, NamingType namingType, EmbeddedType embeddedType) Returns a list of entity property types for the embeddable properties using a property path.This method is used to obtain metadata about the properties within an embeddable object when it is embedded in an entity. The property types are used for mapping between the embeddable object's properties and database columns. This method supports nested property paths for complex embeddable structures.
- Type Parameters:
ENTITY- the entity type that contains the embeddable- Parameters:
embeddedPropertyPath- the property path to the embeddable within the entityentityClass- the entity classnamingType- the naming convention used for column namesembeddedType- the embedded type metadata containing column prefix and column overrides- Returns:
- a list of entity property types for the embeddable properties
-
newEmbeddable
@Deprecated default <ENTITY> EMBEDDABLE newEmbeddable(String embeddedPropertyName, Map<String, Property<ENTITY, ?>> __args) Deprecated.Creates a new instance of the embeddable object.This method is used to create a new embeddable object instance with the provided property values. It is typically called when constructing an entity from database query results.
- Type Parameters:
ENTITY- the entity type that contains the embeddable- Parameters:
embeddedPropertyName- the name of the property in the entity that holds the embeddable__args- a map of property names to property values for initializing the embeddable- Returns:
- a new instance of the embeddable object
-
newEmbeddable
<ENTITY> EMBEDDABLE newEmbeddable(String embeddedPropertyName, Map<String, Property<ENTITY, ?>> __args, boolean optional)
-