public class

Ejb3Column

extends Object
java.lang.Object
   ↳ org.hibernate.cfg.Ejb3Column
Known Direct Subclasses

Class Overview

Wrap state of an EJB3 @Column annotation and build the Hibernate column mapping element

Summary

Constants
int DEFAULT_COLUMN_LENGTH
Fields
protected Map<StringJoin> joins
protected PropertyHolder propertyHolder
public String sqlType
Public Constructors
Ejb3Column()
Public Methods
void addIndex(Index index, boolean inSecondPass)
void bind()
static Ejb3Column[] buildColumnFromAnnotation(Column[] anns, Formula formulaAnn, Nullability nullability, PropertyHolder propertyHolder, PropertyData inferredData, Map<StringJoin> secondaryTables, Mappings mappings)
static Ejb3Column[] buildColumnFromAnnotation(Column[] anns, Formula formulaAnn, Nullability nullability, PropertyHolder propertyHolder, PropertyData inferredData, String suffixForDefaultColumnName, Map<StringJoin> secondaryTables, Mappings mappings)
static void checkPropertyConsistency(Ejb3Column[] columns, String propertyName)
void forceNotNull()
String getFormulaString()
Join getJoin()
int getLength()
String getLogicalColumnName()
Column getMappingColumn()
String getName()
int getPrecision()
PropertyHolder getPropertyHolder()
String getPropertyName()
int getScale()
String getSecondaryTableName()
String getSqlType()
Table getTable()
Find appropriate table of the column.
boolean isFormula()
boolean isImplicit()
boolean isInsertable()
boolean isNameDeferred()
boolean isNullable()
boolean isSecondary()
boolean isUnique()
boolean isUpdatable()
void linkWithValue(SimpleValue value)
void redefineColumnName(String columnName, String propertyName, boolean applyNamingStrategy)
void setFormula(String formula)
void setImplicit(boolean implicit)
void setInsertable(boolean insertable)
void setJoins(Map<StringJoin> joins)
void setLength(int length)
void setLogicalColumnName(String logicalColumnName)
void setMappings(Mappings mappings)
void setNullable(boolean nullable)
void setPrecision(int precision)
void setPropertyHolder(PropertyHolder propertyHolder)
void setPropertyName(String propertyName)
void setScale(int scale)
void setSecondaryTableName(String secondaryTableName)
void setSqlType(String sqlType)
void setTable(Table table)
void setUnique(boolean unique)
void setUpdatable(boolean updatable)
String toString()
Protected Methods
void addColumnBinding(SimpleValue value)
Mappings getMappings()
void initMappingColumn(String columnName, String propertyName, int length, int precision, int scale, boolean nullable, String sqlType, boolean unique, boolean applyNamingStrategy)
void setMappingColumn(Column mappingColumn)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int DEFAULT_COLUMN_LENGTH

Constant Value: 255 (0x000000ff)

Fields

protected Map<StringJoin> joins

protected PropertyHolder propertyHolder

public String sqlType

Public Constructors

public Ejb3Column ()

Public Methods

public void addIndex (Index index, boolean inSecondPass)

public void bind ()

public static Ejb3Column[] buildColumnFromAnnotation (Column[] anns, Formula formulaAnn, Nullability nullability, PropertyHolder propertyHolder, PropertyData inferredData, Map<StringJoin> secondaryTables, Mappings mappings)

public static Ejb3Column[] buildColumnFromAnnotation (Column[] anns, Formula formulaAnn, Nullability nullability, PropertyHolder propertyHolder, PropertyData inferredData, String suffixForDefaultColumnName, Map<StringJoin> secondaryTables, Mappings mappings)

public static void checkPropertyConsistency (Ejb3Column[] columns, String propertyName)

public void forceNotNull ()

public String getFormulaString ()

public Join getJoin ()

public int getLength ()

public String getLogicalColumnName ()

public Column getMappingColumn ()

public String getName ()

public int getPrecision ()

public PropertyHolder getPropertyHolder ()

public String getPropertyName ()

public int getScale ()

public String getSecondaryTableName ()

public String getSqlType ()

public Table getTable ()

Find appropriate table of the column. It can come from a secondary table or from the main table of the persistent class

Returns
  • appropriate table
Throws
AnnotationException missing secondary table

public boolean isFormula ()

public boolean isImplicit ()

public boolean isInsertable ()

public boolean isNameDeferred ()

public boolean isNullable ()

public boolean isSecondary ()

public boolean isUnique ()

public boolean isUpdatable ()

public void linkWithValue (SimpleValue value)

public void redefineColumnName (String columnName, String propertyName, boolean applyNamingStrategy)

public void setFormula (String formula)

public void setImplicit (boolean implicit)

public void setInsertable (boolean insertable)

public void setJoins (Map<StringJoin> joins)

public void setLength (int length)

public void setLogicalColumnName (String logicalColumnName)

public void setMappings (Mappings mappings)

public void setNullable (boolean nullable)

public void setPrecision (int precision)

public void setPropertyHolder (PropertyHolder propertyHolder)

public void setPropertyName (String propertyName)

public void setScale (int scale)

public void setSecondaryTableName (String secondaryTableName)

public void setSqlType (String sqlType)

public void setTable (Table table)

public void setUnique (boolean unique)

public void setUpdatable (boolean updatable)

public String toString ()

Protected Methods

protected void addColumnBinding (SimpleValue value)

protected Mappings getMappings ()

protected void initMappingColumn (String columnName, String propertyName, int length, int precision, int scale, boolean nullable, String sqlType, boolean unique, boolean applyNamingStrategy)

protected void setMappingColumn (Column mappingColumn)