## org.hibernate.cfg
Class Ejb3Column

    java.lang.Object
      org.hibernate.cfg.Ejb3Column

Direct Known Subclasses:
  Ejb3DiscriminatorColumn, Ejb3JoinColumn, IndexColumn

    public class Ejb3Column

extends Object

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

Field Summary
`static int` `DEFAULT_COLUMN_LENGTH`
`protected Map<String,Join>` `joins`
`protected PropertyHolder` `propertyHolder`
`String` `sqlType`

Constructor Summary
`Ejb3Column()`

Method Summary
`protected void` `addColumnBinding(SimpleValue value)`
`void` `addIndex(Index index, boolean inSecondPass)`
`void` `bind()`
`static Ejb3Column[]` `buildColumnFromAnnotation(Column[] anns, Formula formulaAnn, Nullability nullability, PropertyHolder propertyHolder, PropertyData inferredData, Map<String,Join> secondaryTables, Mappings mappings)`
`static Ejb3Column[]` `buildColumnFromAnnotation(Column[] anns, Formula formulaAnn, Nullability nullability, PropertyHolder propertyHolder, PropertyData inferredData, String suffixForDefaultColumnName, Map<String,Join> secondaryTables, Mappings mappings)`
`static void` `checkPropertyConsistency(Ejb3Column[] columns, String propertyName)`
`void` `forceNotNull()`
`String` `getFormulaString()`
`Join` `getJoin()`
`int` `getLength()`
`String` `getLogicalColumnName()`
`Column` `getMappingColumn()`
`protected Mappings` `getMappings()`
`String` `getName()`
`int` `getPrecision()`
`PropertyHolder` `getPropertyHolder()`
`String` `getPropertyName()`
`int` `getScale()`
`String` `getSecondaryTableName()`
`String` `getSqlType()`
`Table` `getTable()` Find appropriate table of the column.
`protected void` `initMappingColumn(String columnName, String propertyName, int length, int precision, int scale, boolean nullable, String sqlType, boolean unique, boolean applyNamingStrategy)`
`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<String,Join> joins)`
`void` `setLength(int length)`
`void` `setLogicalColumnName(String logicalColumnName)`
`protected void` `setMappingColumn(Column mappingColumn)`
`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()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### joins

    protected Map<String,Join> joins

### propertyHolder

    protected PropertyHolder propertyHolder

### DEFAULT_COLUMN_LENGTH

    public static final int DEFAULT_COLUMN_LENGTH

See Also:
  Constant Field Values

### sqlType

    public String sqlType

Constructor Detail

### Ejb3Column

    public Ejb3Column()

Method Detail

### setTable

    public void setTable(Table table)

### getLogicalColumnName

    public String getLogicalColumnName()

### getSqlType

    public String getSqlType()

### getLength

    public int getLength()

### getPrecision

    public int getPrecision()

### getScale

    public int getScale()

### isUnique

    public boolean isUnique()

### isFormula

    public boolean isFormula()

### getFormulaString

    public String getFormulaString()

### getSecondaryTableName

    public String getSecondaryTableName()

### setFormula

    public void setFormula(String formula)

### isImplicit

    public boolean isImplicit()

### setInsertable

    public void setInsertable(boolean insertable)

### setUpdatable

    public void setUpdatable(boolean updatable)

### getMappings

    protected Mappings getMappings()

### setMappings

    public void setMappings(Mappings mappings)

### setImplicit

    public void setImplicit(boolean implicit)

### setSqlType

    public void setSqlType(String sqlType)

### setLength

    public void setLength(int length)

### setPrecision

    public void setPrecision(int precision)

### setScale

    public void setScale(int scale)

### setLogicalColumnName

    public void setLogicalColumnName(String logicalColumnName)

### setPropertyName

    public void setPropertyName(String propertyName)

### getPropertyName

    public String getPropertyName()

### setUnique

    public void setUnique(boolean unique)

### isNullable

    public boolean isNullable()

### bind

    public void bind()

### initMappingColumn

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

### isNameDeferred

    public boolean isNameDeferred()

### redefineColumnName

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

### getName

    public String getName()

### getMappingColumn

    public Column getMappingColumn()

### isInsertable

    public boolean isInsertable()

### isUpdatable

    public boolean isUpdatable()

### setNullable

    public void setNullable(boolean nullable)

### setJoins

    public void setJoins(Map<String,Join> joins)

### getPropertyHolder

    public PropertyHolder getPropertyHolder()

### setPropertyHolder

    public void setPropertyHolder(PropertyHolder propertyHolder)

### setMappingColumn

    protected void setMappingColumn(Column mappingColumn)

### linkWithValue

    public void linkWithValue(SimpleValue value)

### addColumnBinding

    protected void addColumnBinding(SimpleValue value)

### getTable

    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

### isSecondary

    public boolean isSecondary()

### getJoin

    public Join getJoin()

### forceNotNull

    public void forceNotNull()

### setSecondaryTableName

    public void setSecondaryTableName(String secondaryTableName)

### buildColumnFromAnnotation

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

### buildColumnFromAnnotation

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

### checkPropertyConsistency

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

### addIndex

    public void addIndex(Index index,
                         boolean inSecondPass)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.