T - the entity this column belongs toJ - the entity being joinedpublic class JoinColumn<T,J> extends Object implements TypedColumn<T>
Most users of hrorm will have no need to directly use this.
| Constructor and Description | 
|---|
JoinColumn(String name,
          String joinedTablePrefix,
          Prefixer prefixer,
          Function<T,J> getter,
          BiConsumer<T,J> setter,
          DaoDescriptor<J> daoDescriptor,
          boolean nullable)  | 
| Modifier and Type | Method and Description | 
|---|---|
List<TypedColumn<J>> | 
getDataColumns()  | 
String | 
getJoinedTablePrefix()  | 
String | 
getName()  | 
String | 
getPrefix()  | 
String | 
getTable()  | 
List<JoinColumn<J,?>> | 
getTransitiveJoins()  | 
boolean | 
isPrimaryKey()  | 
void | 
notNull()
Calling this method will enforce a not-null constraint on this column. 
 | 
PopulateResult | 
populate(T item,
        ResultSet resultSet)
Populates the object with the data read from the database. 
 | 
void | 
setValue(T item,
        int index,
        PreparedStatement preparedStatement)
Sets a value onto the prepared statement based on the state of the object passed. 
 | 
JoinColumn<T,J> | 
withPrefix(String newPrefix,
          Prefixer prefixer)
Make a new instance of the column, identical to this instance, except with a
 new prefix. 
 | 
public List<JoinColumn<J,?>> getTransitiveJoins()
public String getTable()
public String getName()
getName in interface TypedColumn<T>public String getJoinedTablePrefix()
public String getPrefix()
getPrefix in interface TypedColumn<T>public PopulateResult populate(T item, ResultSet resultSet) throws SQLException
TypedColumnpopulate in interface TypedColumn<T>item - The object being populatedresultSet - The result said being readSQLException - allowed for ResultSet operationspublic void setValue(T item, int index, PreparedStatement preparedStatement) throws SQLException
TypedColumnsetValue in interface TypedColumn<T>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<T,J> withPrefix(String newPrefix, Prefixer prefixer)
TypedColumnwithPrefix in interface TypedColumn<T>newPrefix - The new prefixprefixer - The source for new prefixespublic List<TypedColumn<J>> getDataColumns()
public boolean isPrimaryKey()
isPrimaryKey in interface TypedColumn<T>public void notNull()
TypedColumnnotNull in interface TypedColumn<T>Copyright © 2018. All rights reserved.