ENTITY - the entity this column belongs toJOINED - the entity being joinedENTITYBUILDER - the class that can construct new entity instancesJOINEDBUILDER - the class that can construct instances of the joined entitypublic class JoinColumn<ENTITY,JOINED,ENTITYBUILDER,JOINEDBUILDER> extends Object implements Column<ENTITY,ENTITYBUILDER>
Most users of hrorm will have no need to directly use this.
| Constructor and Description | 
|---|
| JoinColumn(String name,
          String joinedTablePrefix,
          Prefixer prefixer,
          Function<ENTITY,JOINED> getter,
          BiConsumer<ENTITYBUILDER,JOINED> setter,
          DaoDescriptor<JOINED,JOINEDBUILDER> daoDescriptor,
          boolean nullable) | 
| Modifier and Type | Method and Description | 
|---|---|
| List<Column<JOINED,JOINEDBUILDER>> | getDataColumns() | 
| String | getJoinedTablePrefix() | 
| String | getJoinedTablePrimaryKeyName() | 
| String | getName()The name of the database column this instance represents. | 
| String | getPrefix()The prefix that should be used for this column when generating
 SQL. | 
| String | getTable() | 
| List<JoinColumn<JOINED,?,JOINEDBUILDER,?>> | getTransitiveJoins() | 
| boolean | isNullable()Indicator of whether or not this column is nullable or not. | 
| void | notNull()Calling this method will enforce a not-null constraint on this column. | 
| PopulateResult | populate(ENTITYBUILDER builder,
        ResultSet resultSet)Populates the object with the data read from the database. | 
| void | setValue(ENTITY item,
        int index,
        PreparedStatement preparedStatement)Sets a value onto the prepared statement based on the state of the object passed. | 
| Set<Integer> | supportedTypes()The members of  java.sql.Typesthat this column should support. | 
| JoinColumn<ENTITY,JOINED,ENTITYBUILDER,JOINEDBUILDER> | withPrefix(String newPrefix,
          Prefixer prefixer)Make a new instance of the column, identical to this instance, except with a
 new prefix. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisParentColumn, isPrimaryKeypublic JoinColumn(String name, String joinedTablePrefix, Prefixer prefixer, Function<ENTITY,JOINED> getter, BiConsumer<ENTITYBUILDER,JOINED> setter, DaoDescriptor<JOINED,JOINEDBUILDER> daoDescriptor, boolean nullable)
public List<JoinColumn<JOINED,?,JOINEDBUILDER,?>> getTransitiveJoins()
public String getTable()
public String getName()
ColumngetName in interface Column<ENTITY,ENTITYBUILDER>public String getJoinedTablePrefix()
public String getPrefix()
ColumngetPrefix in interface Column<ENTITY,ENTITYBUILDER>public PopulateResult populate(ENTITYBUILDER builder, ResultSet resultSet) throws SQLException
Columnpopulate in interface Column<ENTITY,ENTITYBUILDER>builder - The object being populatedresultSet - The result said being readSQLException - allowed for ResultSet operationspublic void setValue(ENTITY item, int index, PreparedStatement preparedStatement) throws SQLException
ColumnsetValue in interface Column<ENTITY,ENTITYBUILDER>item - The object to read the data from.index - Where in the prepared statement to set the read valuepreparedStatement - The statement being populatedSQLException - allowed for PreparedStatement operationspublic JoinColumn<ENTITY,JOINED,ENTITYBUILDER,JOINEDBUILDER> withPrefix(String newPrefix, Prefixer prefixer)
ColumnwithPrefix in interface Column<ENTITY,ENTITYBUILDER>newPrefix - The new prefixprefixer - The source for new prefixespublic List<Column<JOINED,JOINEDBUILDER>> getDataColumns()
public void notNull()
ColumnnotNull in interface Column<ENTITY,ENTITYBUILDER>public String getJoinedTablePrimaryKeyName()
public Set<Integer> supportedTypes()
Columnjava.sql.Types that this column should support.supportedTypes in interface Column<ENTITY,ENTITYBUILDER>public boolean isNullable()
ColumnisNullable in interface Column<ENTITY,ENTITYBUILDER>Copyright © 2019. All rights reserved.