Class JoinTable

java.lang.Object
com.blazebit.persistence.spi.JoinTable

public class JoinTable extends Object
A structure for accessing join table information.
Since:
1.2.0
Author:
Christian Beikov
  • Constructor Details

    • JoinTable

      public JoinTable(String tableName, Set<String> idAttributeNames, Map<String,String> idColumnMappings, Map<String,String> keyColumnMappings, Map<String,String> keyColumnTypes, Set<String> targetAttributeNames, Map<String,String> targetIdColumnMappings)
      Constructs a JoinTable.
      Parameters:
      tableName - The join table name
      idAttributeNames - The attribute names of the owning entity
      idColumnMappings - The id column mappings
      keyColumnMappings - The key column mappings
      keyColumnTypes - The key column types
      targetAttributeNames - The attribute names of the target entity
      targetIdColumnMappings - The target id column mappings
  • Method Details

    • getTableName

      public String getTableName()
      The name of the join table.
      Returns:
      The join table name
    • getIdAttributeNames

      public Set<String> getIdAttributeNames()
      Returns the id attribute names of the owning entity that map to the join table.
      Returns:
      The owner entity id attribute names
      Since:
      1.3.0
    • getIdColumnMappings

      public Map<String,String> getIdColumnMappings()
      Returns the foreign key mappings of the join tables column names to the owner table column names. The keys are column names of the join table. Values are the column names of the owner table.
      Returns:
      The id column mappings
    • getKeyColumnMappings

      public Map<String,String> getKeyColumnMappings()
      Returns the column mappings of the key/index column if there are any, otherwise null. In case of a simple key/index type, this returns the column name mapping to itself. Otherwise returns foreign key mappings of the join tables key column names to the key target table column names. The keys are column names of the join table. Values are the column names of the key target table.
      Returns:
      The key column mappings
    • getKeyColumnTypes

      public Map<String,String> getKeyColumnTypes()
      Returns the column types of the key/index columns if there are any, otherwise null.
      Returns:
      The key column types
      Since:
      1.3.0
    • getTargetAttributeNames

      public Set<String> getTargetAttributeNames()
      Returns the id attribute names of the target entity that map to the join table.
      Returns:
      The target entity id attribute names
      Since:
      1.3.0
    • getTargetColumnMappings

      public Map<String,String> getTargetColumnMappings()
      Returns the foreign key mappings of the join tables column names to the target table column names. The keys are column names of the join table. Values are the column names of the target table.
      Returns:
      The target id column mappings