LEFT - The type of one of the entities being associatedRIGHT - The type of the other of the entities being associatedpublic class AssociationDaoBuilder<LEFT,RIGHT> extends Object
AssociationDao.| Constructor and Description |
|---|
AssociationDaoBuilder(DaoDescriptor<LEFT,LEFT> leftDaoDescriptor,
DaoDescriptor<RIGHT,RIGHT> rightDaoDescriptor)
Construct a new builder instance.
|
| Modifier and Type | Method and Description |
|---|---|
AssociationDao<LEFT,RIGHT> |
buildDao(Connection connection)
Creates a new
AssociationDao using the passed Connection. |
AssociationDaoBuilder<LEFT,RIGHT> |
withLeftColumnName(String leftColumnName)
The name of the column in the association table that references the
primary key of the left entity.
|
AssociationDaoBuilder<LEFT,RIGHT> |
withPrimaryKeyName(String primaryKeyName)
Setter for the primary key column name of the association table in the database.
|
AssociationDaoBuilder<LEFT,RIGHT> |
withRightColumnName(String rightColumnName)
The name of the column in the association table that references the
primary key of the right entity.
|
AssociationDaoBuilder<LEFT,RIGHT> |
withSequenceName(String sequenceName)
Setter for the name of the database sequence used to populate
the primary key of the association table
|
AssociationDaoBuilder<LEFT,RIGHT> |
withTableName(String tableName)
Setter for the name of the association table in the database.
|
public AssociationDaoBuilder(DaoDescriptor<LEFT,LEFT> leftDaoDescriptor, DaoDescriptor<RIGHT,RIGHT> rightDaoDescriptor)
leftDaoDescriptor - the DaoBuilder or other descriptor
of one of the entities being associatedrightDaoDescriptor - the DaoBuilder or other descriptor
of one of other of the entities being associatedpublic AssociationDao<LEFT,RIGHT> buildDao(Connection connection)
AssociationDao using the passed Connection.connection - a connection to the underlying data storepublic AssociationDaoBuilder<LEFT,RIGHT> withTableName(String tableName)
tableName - the database table namepublic AssociationDaoBuilder<LEFT,RIGHT> withPrimaryKeyName(String primaryKeyName)
primaryKeyName - the database column representing the primary key in the association tablepublic AssociationDaoBuilder<LEFT,RIGHT> withSequenceName(String sequenceName)
sequenceName - the database sequence namepublic AssociationDaoBuilder<LEFT,RIGHT> withLeftColumnName(String leftColumnName)
leftColumnName - The column namepublic AssociationDaoBuilder<LEFT,RIGHT> withRightColumnName(String rightColumnName)
rightColumnName - The column nameCopyright © 2019. All rights reserved.