ENTITY - The type of the entity.BUILDER - The class that is used to build new entity instances.public interface Column<ENTITY,BUILDER>
Most users of hrorm will have no need to directly use this.
| Modifier and Type | Method and Description | 
|---|---|
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 | 
getSqlTypeName()
Returns the name of the column type in SQL, e.g. 
 | 
boolean | 
isNullable()
Indicator of whether or not this column is nullable or not. 
 | 
default boolean | 
isParentColumn()
Flag indicating whether this column represents a reference to a parent entity. 
 | 
default boolean | 
isPrimaryKey()
Flag indicating whether or not this column is the primary key of the table 
 | 
void | 
notNull()
Calling this method will enforce a not-null constraint on this column. 
 | 
PopulateResult | 
populate(BUILDER constructor,
        ResultSet resultSet)
Populates the object with the data read from the database. 
 | 
void | 
setSqlTypeName(String sqlTypeName)  | 
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.Types that this column should support. | 
Column<ENTITY,BUILDER> | 
withPrefix(String newPrefix,
          Prefixer prefixer)
Make a new instance of the column, identical to this instance, except with a
 new prefix. 
 | 
String getName()
String getPrefix()
void setValue(ENTITY item, int index, PreparedStatement preparedStatement) throws SQLException
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 operationsdefault boolean isPrimaryKey()
void notNull()
boolean isNullable()
default boolean isParentColumn()
PopulateResult populate(BUILDER constructor, ResultSet resultSet) throws SQLException
constructor - The object being populatedresultSet - The result said being readSQLException - allowed for ResultSet operationsColumn<ENTITY,BUILDER> withPrefix(String newPrefix, Prefixer prefixer)
newPrefix - The new prefixprefixer - The source for new prefixesSet<Integer> supportedTypes()
java.sql.Types that this column should support.String getSqlTypeName()
String,
 "decimal" for BigDecimal.void setSqlTypeName(String sqlTypeName)
Copyright © 2019. All rights reserved.