Package com.blazebit.persistence.spi
Class JoinTable
java.lang.Object
com.blazebit.persistence.spi.JoinTable
A structure for accessing join table information.
- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the id attribute names of the owning entity that map to the join table.Returns the foreign key mappings of the join tables column names to the owner table column names.Returns the column mappings of the key/index column if there are any, otherwisenull
.Returns the column types of the key/index columns if there are any, otherwisenull
.The name of the join table.Returns the id attribute names of the target entity that map to the join table.Returns the foreign key mappings of the join tables column names to the target table column names.
-
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 nameidAttributeNames
- The attribute names of the owning entityidColumnMappings
- The id column mappingskeyColumnMappings
- The key column mappingskeyColumnTypes
- The key column typestargetAttributeNames
- The attribute names of the target entitytargetIdColumnMappings
- The target id column mappings
-
-
Method Details
-
getTableName
The name of the join table.- Returns:
- The join table name
-
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
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
Returns the column mappings of the key/index column if there are any, otherwisenull
. 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
Returns the column types of the key/index columns if there are any, otherwisenull
.- Returns:
- The key column types
- Since:
- 1.3.0
-
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
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
-