Class EmbeddedPropertyType<ENTITY,EMBEDDABLE>

java.lang.Object
org.seasar.doma.jdbc.entity.EmbeddedPropertyType<ENTITY,EMBEDDABLE>
Type Parameters:
ENTITY - the entity type containing this embeddable property
EMBEDDABLE - the embeddable type

public class EmbeddedPropertyType<ENTITY,EMBEDDABLE> extends Object
Represents a property in an entity class that is mapped to an embeddable object.

An embeddable property is a property whose type is annotated with Embeddable and contains multiple properties that are mapped to database columns. This class manages the relationship between the entity property and its constituent embeddable properties.

Implementations of this class are typically generated at compile time by the Doma annotation processor.

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getEmbeddablePropertyTypes

      public List<EntityPropertyType<ENTITY,?>> getEmbeddablePropertyTypes()
      Returns the list of entity property types that are part of this embeddable property.

      These property types represent the individual properties within the embeddable object that are mapped to database columns.

      Returns:
      the list of entity property types in this embeddable property
    • getEmbeddablePropertyTypeMap

      public Map<String,EntityPropertyType<ENTITY,?>> getEmbeddablePropertyTypeMap()
      Returns a map of entity property types that are part of this embeddable property.

      The map keys are the property names, and the values are the corresponding entity property types. This provides a convenient way to look up properties by name within the embeddable object.

      Returns:
      a map of property names to entity property types in this embeddable property
    • save

      public void save(ENTITY entity, EMBEDDABLE value)
      Sets the embeddable value in the entity.

      This method is used to update the embeddable property in the entity with a new value, typically during entity construction or when loading data from the database.

      Parameters:
      entity - the entity in which to set the embeddable value
      value - the embeddable value to set