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 implements SchemaDescriptor<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>>
AssociationDao
.Constructor and Description |
---|
AssociationDaoBuilder(DaoDescriptor<LEFT,?> leftDaoDescriptor,
DaoDescriptor<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 . |
Function<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>> |
buildFunction()
The mechanism for building a new entity instance.
|
List<ChildrenDescriptor<Association<LEFT,RIGHT>,?,Association<LEFT,RIGHT>,?>> |
childrenDescriptors()
The definitions of any entities that are owned by type
ENTITY |
ColumnCollection<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>> |
getColumnCollection() |
ParentColumn<Association<LEFT,RIGHT>,?,Association<LEFT,RIGHT>,?> |
parentColumn()
The parent column, if there is one, of the
ENTITY . |
PrimaryKey<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>> |
primaryKey()
The primary key for objects of type
ENTITY |
boolean |
ready()
Flag indicating whether or not all the necessary fields have been set.
|
Supplier<Association<LEFT,RIGHT>> |
supplier()
The mechanism to use to instantiate a new instance of type
ENTITY ,
generally a no-argument constructor of the class. |
String |
tableName()
The name of the table that is used to persist type
ENTITY |
List<List<String>> |
uniquenessConstraints()
A list of column name lists, each of which should be unique.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hasParent
allColumns, dataColumns, joinColumns, nonJoinColumns, select
public AssociationDaoBuilder(DaoDescriptor<LEFT,?> leftDaoDescriptor, DaoDescriptor<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 namepublic boolean ready()
public PrimaryKey<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>> primaryKey()
DaoDescriptor
ENTITY
primaryKey
in interface DaoDescriptor<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>>
public String tableName()
KeylessDaoDescriptor
ENTITY
tableName
in interface KeylessDaoDescriptor<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>>
public Supplier<Association<LEFT,RIGHT>> supplier()
KeylessDaoDescriptor
ENTITY
,
generally a no-argument constructor of the class.supplier
in interface KeylessDaoDescriptor<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>>
public List<ChildrenDescriptor<Association<LEFT,RIGHT>,?,Association<LEFT,RIGHT>,?>> childrenDescriptors()
DaoDescriptor
ENTITY
childrenDescriptors
in interface DaoDescriptor<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>>
public ColumnCollection<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>> getColumnCollection()
getColumnCollection
in interface KeylessDaoDescriptor<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>>
public ParentColumn<Association<LEFT,RIGHT>,?,Association<LEFT,RIGHT>,?> parentColumn()
DaoDescriptor
ENTITY
.parentColumn
in interface DaoDescriptor<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>>
public Function<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>> buildFunction()
KeylessDaoDescriptor
buildFunction
in interface KeylessDaoDescriptor<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>>
public List<List<String>> uniquenessConstraints()
SchemaDescriptor
uniquenessConstraints
in interface SchemaDescriptor<Association<LEFT,RIGHT>,Association<LEFT,RIGHT>>
Copyright © 2019. All rights reserved.