Column.java

// license-header java merge-point
//
/**
 * @author Generated on 09/21/2012 13:39:17-0400 Do not modify by hand!
 *
 * TEMPLATE:     ValueObject.vsl in andromda-java-cartridge.
 * MODEL CLASS:  JDBCMetadataModel::org.andromda.jdbcmetadata::Column
 * STEREOTYPE:   ValueObject
 */
package org.andromda.jdbcmetadata;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import javax.persistence.FetchType;
import javax.persistence.TemporalType;
import org.apache.commons.lang.builder.CompareToBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * <p>Each column in the table has a record here, even if excluded.</p>
 */
public class Column
    implements Serializable, Comparable<Column>
{
    /** The serial version UID of this class. Needed for serialization. */
    private static final long serialVersionUID = -2658538618826755483L;

    // Class attributes
    /**
     * <p>Data source dependent type name. Denormalized from getTable().getName()</p>
     */
    protected String tableName;
    /**
     * <p>The sequence number of the column within the table. Used to order columns and attributes
     * for comparison.</p>
     */
    protected int seqNum;
    /**
     * boolean setter for primitive attribute, so we can tell if it's initialized
     */
    protected boolean setSeqNum = false;
    /**
     * <p>The SQL database column name.</p>
     */
    protected String columnName;
    /**
     * <p>true if the column should not be included in reverse engineering. default=false.</p>
     */
    protected boolean excluded = false;
    /**
     * boolean setter for primitive attribute, so we can tell if it's initialized
     */
    protected boolean setExcluded = false;
    /**
     * <p>Data source dependent SQL data type name, from JDBCMetadata results.</p>
     */
    protected String sqlType;
    /**
     * <p>The Java Type derived from the umlType mapping from the database type, plus multiplicity
     * to indicate primitive/wrapped type.</p>
     */
    protected String javaType;
    /**
     * <p>Java datatype from java.sql.Types from JDBC metadata.</p>
     */
    protected String jdbcType;
    /**
     * <p>For numeric data, this is the maximum precision. For character data, this is the length in
     * characters. For datetime datatypes, this is the length in characters of the String
     * representation (assuming the maximum allowed precision of the fractional seconds component).
     * For binary data, this is the length in bytes. For the ROWID datatype, this is the length in
     * bytes. Null is returned for data types where the column size is not applicable.</p>
     */
    protected int colSize;
    /**
     * boolean setter for primitive attribute, so we can tell if it's initialized
     */
    protected boolean setColSize = false;
    /**
     * <p>The number of fractional digits. Null is returned for data types where DECIMAL_DIGITS is
     * not applicable.</p>
     */
    protected Integer decPlaces;
    /**
     * <p>If a column is defined as NOT NULL. True if column is an identifier (PK column) because
     * they are filled in by the DBMS or ORM framework.</p>
     */
    protected boolean nullable;
    /**
     * boolean setter for primitive attribute, so we can tell if it's initialized
     */
    protected boolean setNullable = false;
    /**
     * <p>default value for the column, which should be interpreted as a string when the value is
     * enclosed in single quotes (may be null)</p>
     */
    protected String defaultValue;
    /**
     * <p>The full DBMS specific SQL DDL definition for the column, including NOT NULL and DEFAULT,
     * if applicable.</p>
     */
    protected String sqlDefinition;
    /**
     * <p>If the column belongs to a unique index. default=false, even though the UML2 default when
     * creating a new attribute is true (causes lots of unintended problems when generating code).
     * Used to set 'Unique' value for the UML attribute, which will create findBy methods for each
     * unique attribute..</p>
     */
    protected boolean unique = false;
    /**
     * boolean setter for primitive attribute, so we can tell if it's initialized
     */
    protected boolean setUnique = false;
    /**
     * <p>The multiplicity lowerBound. 0 means the attribute is not required.</p>
     */
    protected int lowerBound;
    /**
     * boolean setter for primitive attribute, so we can tell if it's initialized
     */
    protected boolean setLowerBound = false;
    /**
     * <p>The multiplicity upperBound. Normally 1. Should be * for FK 1:M relationships.</p>
     */
    protected int upperBound;
    /**
     * boolean setter for primitive attribute, so we can tell if it's initialized
     */
    protected boolean setUpperBound = false;
    /**
     * <p>If the column is automatically incremented as an Identity column.</p>
     */
    protected boolean autoincrement = false;
    /**
     * boolean setter for primitive attribute, so we can tell if it's initialized
     */
    protected boolean setAutoincrement = false;
    /**
     * <p>If the column is part of a primary key, the sequence number of the column within the key.
     * 0 if not a PK column.</p>
     */
    protected int pkSeqNum;
    /**
     * boolean setter for primitive attribute, so we can tell if it's initialized
     */
    protected boolean setPkSeqNum = false;
    /**
     * <p>sequence name, autoincrement, etc. Can be set globally or for this table/entity.</p>
     */
    protected String generatorName;
    /**
     * <p>The column physical name translated into a UML/Java logical name</p>
     */
    protected String umlName;
    /**
     * <p>The UML datatype for the column, from the UML Standard Profile or PrimitiveTypes Profile
     * or the andromda-datatype profile libraries.</p>
     */
    protected String umlType;
    /**
     * <p>Java default value expression for the attribute, derived from database default value plus
     * mappings plus expression translation. i.e. CURRENT_DATE is today's date with no time portion,
     * the Java expression (requires commons-lang) is
     * org.apache.commons.lang.time.DateUtils.truncate(new java.util.Date(),
     * java.util.Calendar.DAY_OF_MONTH)).</p>
     */
    protected String javaDefault;
    /**
     * <p>The hibernate_type used in the andromda_hibernate_type annotation
     * (attribute.overrideType), which indicates a default override of the standard hibernate type
     * with the @org.hibernate.annotations.Type annotation. For example CHAR(1) could be mapped to
     * hibernateType yes_no. If not overridden, the hibernate defaults are used.</p>
     */
    protected String hibernateType;
    /**
     * <p>The column description from the JDBC metadata</p>
     */
    protected String description;
    /**
     * <p>Whether the column is included in SQL INSERT statements generated by the persistence
     * provider.</p>
     */
    protected boolean insertable = true;
    /**
     * boolean setter for primitive attribute, so we can tell if it's initialized
     */
    protected boolean setInsertable = false;
    /**
     * <p>(Optional) Whether the column is included in SQL UPDATE statements generated by the
     * persistence provider.</p>
     */
    protected boolean updatable = true;
    /**
     * boolean setter for primitive attribute, so we can tell if it's initialized
     */
    protected boolean setUpdatable = false;
    /**
     * <p>If the uml attribute is transient. Adds javax.persistent.Transient annotation.</p>
     */
    protected boolean transientValue = false;
    /**
     * boolean setter for primitive attribute, so we can tell if it's initialized
     */
    protected boolean setTransientValue = false;
    /**
     * <p>If the uml attribute is a version indicator. Adds javax.persistent.Version annotation.</p>
     */
    protected boolean version = false;
    /**
     * boolean setter for primitive attribute, so we can tell if it's initialized
     */
    protected boolean setVersion = false;
    /**
     * <p>The FetchType value for the @ManyToOne and @ManyToMany annotations on
     * the column. The default for @ManyToOne is EAGER and @ManyToMany and @OneToMany is LAZY unless
     * overridden.</p><p></p>
     */
    protected FetchType fetchType;
    /**
     * <p>The hibernate temporal (date/time/datetime) type used in the andromda_hibernate_type
     * annotation (attribute.overrideType), which indicates a default override of the standard
     * hibernate type with the @javax.persistence.Temporal TemporalType
     * annotation. DATE, TIME, TIMESTAMP values, default if null/unspecified=DATE.</p>
     */
    protected TemporalType temporalType;

    // Class associationEnds
    /**
     * <p>The Table that owns this column.</p>
     */
    protected Table table;

    /**
     * <p>The PK sequence number of the column referred to by the FK column.</p>
     */
    protected Collection<FKColumn> fkSequences;

    /**
     * <p>Not null if the column is part of the table PK. Used to see if a column should have
     * Identifier stereotype when creating the column.</p>
     */
    protected Table pkTable;

    /**
     * <p>The FK Column number referred to by this PK column.</p>
     */
    protected Collection<FKColumn> fkRefSequences;

    /** Default Constructor with no properties */
    public Column()
    {
        // Documented empty block - avoid compiler warning - no super constructor
    }

    /**
     * Constructor taking only required properties
     * @param tableNameIn String <p>Data source dependent type name. Denormalized from getTable().getName()</p>
     * @param seqNumIn int <p>The sequence number of the column within the table. Used to order columns and attributes for
comparison.</p>
     * @param columnNameIn String <p>The SQL database column name.</p>
     * @param excludedIn boolean <p>true if the column should not be included in reverse engineering. default=false.</p>
     * @param sqlTypeIn String <p>Data source dependent SQL data type name, from JDBCMetadata results.</p>
     * @param javaTypeIn String <p>The Java Type derived from the umlType mapping from the database type, plus multiplicity to
indicate primitive/wrapped type.</p>
     * @param jdbcTypeIn String <p>Java datatype from java.sql.Types from JDBC metadata.</p>
     * @param colSizeIn int <p>For numeric data, this is the maximum precision. For character data, this is the length in
characters. For datetime datatypes, this is the length in characters of the String representation
(assuming the maximum allowed precision of the fractional seconds component). For binary data, this
is the length in bytes. For the ROWID datatype, this is the length in bytes. Null is returned for
data types where the column size is not applicable.</p>
     * @param nullableIn boolean <p>If a column is defined as NOT NULL. True if column is an identifier (PK column) because they are
filled in by the DBMS or ORM framework.</p>
     * @param sqlDefinitionIn String <p>The full DBMS specific SQL DDL definition for the column, including NOT NULL and DEFAULT, if
applicable.</p>
     * @param uniqueIn boolean <p>If the column belongs to a unique index. default=false, even though the UML2 default when
creating a new attribute is true (causes lots of unintended problems when generating code). Used to
set 'Unique' value for the UML attribute, which will create findBy methods for each unique
attribute..</p>
     * @param lowerBoundIn int <p>The multiplicity lowerBound. 0 means the attribute is not required.</p>
     * @param upperBoundIn int <p>The multiplicity upperBound. Normally 1. Should be * for FK 1:M relationships.</p>
     * @param autoincrementIn boolean <p>If the column is automatically incremented as an Identity column.</p>
     * @param pkSeqNumIn int <p>If the column is part of a primary key, the sequence number of the column within the key. 0 if
not a PK column.</p>
     * @param generatorNameIn String <p>sequence name, autoincrement, etc. Can be set globally or for this table/entity.</p>
     * @param umlNameIn String <p>The column physical name translated into a UML/Java logical name</p>
     * @param umlTypeIn String <p>The UML datatype for the column, from the UML Standard Profile or PrimitiveTypes Profile or the
andromda-datatype profile libraries.</p>
     * @param javaDefaultIn String <p>Java default value expression for the attribute, derived from database default value plus
mappings plus expression translation. i.e. CURRENT_DATE is today's date with no time portion, the
Java expression (requires commons-lang) is org.apache.commons.lang.time.DateUtils.truncate(new
java.util.Date(), java.util.Calendar.DAY_OF_MONTH)).</p>
     * @param hibernateTypeIn String <p>The hibernate_type used in the andromda_hibernate_type annotation (attribute.overrideType), which
indicates a default override of the standard hibernate type with the @org.hibernate.annotations.Type
annotation. For example CHAR(1) could be mapped to hibernateType yes_no. If not overridden, the
hibernate defaults are used.</p>
     * @param descriptionIn String <p>The column description from the JDBC metadata</p>
     * @param insertableIn boolean <p>Whether the column is included in SQL INSERT statements generated by the persistence
provider.</p>
     * @param updatableIn boolean <p>(Optional) Whether the column is included in SQL UPDATE statements generated by the persistence
provider.</p>
     * @param transientValueIn boolean <p>If the uml attribute is transient. Adds javax.persistent.Transient annotation.</p>
     * @param versionIn boolean <p>If the uml attribute is a version indicator. Adds javax.persistent.Version annotation.</p>
     * @param tableIn Table <p>The Table that owns this column.</p>
     */
    public Column(final String tableNameIn, final int seqNumIn, final String columnNameIn, final boolean excludedIn, final String sqlTypeIn, final String javaTypeIn, final String jdbcTypeIn, final int colSizeIn, final boolean nullableIn, final String sqlDefinitionIn, final boolean uniqueIn, final int lowerBoundIn, final int upperBoundIn, final boolean autoincrementIn, final int pkSeqNumIn, final String generatorNameIn, final String umlNameIn, final String umlTypeIn, final String javaDefaultIn, final String hibernateTypeIn, final String descriptionIn, final boolean insertableIn, final boolean updatableIn, final boolean transientValueIn, final boolean versionIn, final Table tableIn)
    {
        this.tableName = tableNameIn;
        this.seqNum = seqNumIn;
        this.setSeqNum = true;
        this.columnName = columnNameIn;
        this.excluded = excludedIn;
        this.setExcluded = true;
        this.sqlType = sqlTypeIn;
        this.javaType = javaTypeIn;
        this.jdbcType = jdbcTypeIn;
        this.colSize = colSizeIn;
        this.setColSize = true;
        this.nullable = nullableIn;
        this.setNullable = true;
        this.sqlDefinition = sqlDefinitionIn;
        this.unique = uniqueIn;
        this.setUnique = true;
        this.lowerBound = lowerBoundIn;
        this.setLowerBound = true;
        this.upperBound = upperBoundIn;
        this.setUpperBound = true;
        this.autoincrement = autoincrementIn;
        this.setAutoincrement = true;
        this.pkSeqNum = pkSeqNumIn;
        this.setPkSeqNum = true;
        this.generatorName = generatorNameIn;
        this.umlName = umlNameIn;
        this.umlType = umlTypeIn;
        this.javaDefault = javaDefaultIn;
        this.hibernateType = hibernateTypeIn;
        this.description = descriptionIn;
        this.insertable = insertableIn;
        this.setInsertable = true;
        this.updatable = updatableIn;
        this.setUpdatable = true;
        this.transientValue = transientValueIn;
        this.setTransientValue = true;
        this.version = versionIn;
        this.setVersion = true;
        this.table = tableIn;
    }

    /**
     * Constructor with all properties
     * @param tableNameIn String
     * @param seqNumIn int
     * @param columnNameIn String
     * @param excludedIn boolean
     * @param sqlTypeIn String
     * @param javaTypeIn String
     * @param jdbcTypeIn String
     * @param colSizeIn int
     * @param decPlacesIn Integer
     * @param nullableIn boolean
     * @param defaultValueIn String
     * @param sqlDefinitionIn String
     * @param uniqueIn boolean
     * @param lowerBoundIn int
     * @param upperBoundIn int
     * @param autoincrementIn boolean
     * @param pkSeqNumIn int
     * @param generatorNameIn String
     * @param umlNameIn String
     * @param umlTypeIn String
     * @param javaDefaultIn String
     * @param hibernateTypeIn String
     * @param descriptionIn String
     * @param insertableIn boolean
     * @param updatableIn boolean
     * @param transientValueIn boolean
     * @param versionIn boolean
     * @param fetchTypeIn FetchType
     * @param temporalTypeIn TemporalType
     * @param tableIn Table
     * @param fkSequencesIn Collection<FKColumn>
     * @param pkTableIn Table
     * @param fkRefSequencesIn Collection<FKColumn>
     */
    public Column(final String tableNameIn, final int seqNumIn, final String columnNameIn, final boolean excludedIn, final String sqlTypeIn, final String javaTypeIn, final String jdbcTypeIn, final int colSizeIn, final Integer decPlacesIn, final boolean nullableIn, final String defaultValueIn, final String sqlDefinitionIn, final boolean uniqueIn, final int lowerBoundIn, final int upperBoundIn, final boolean autoincrementIn, final int pkSeqNumIn, final String generatorNameIn, final String umlNameIn, final String umlTypeIn, final String javaDefaultIn, final String hibernateTypeIn, final String descriptionIn, final boolean insertableIn, final boolean updatableIn, final boolean transientValueIn, final boolean versionIn, final FetchType fetchTypeIn, final TemporalType temporalTypeIn, final Table tableIn, final Collection<FKColumn> fkSequencesIn, final Table pkTableIn, final Collection<FKColumn> fkRefSequencesIn)
    {
        this.tableName = tableNameIn;
        this.seqNum = seqNumIn;
        this.setSeqNum = true;
        this.columnName = columnNameIn;
        this.excluded = excludedIn;
        this.setExcluded = true;
        this.sqlType = sqlTypeIn;
        this.javaType = javaTypeIn;
        this.jdbcType = jdbcTypeIn;
        this.colSize = colSizeIn;
        this.setColSize = true;
        this.decPlaces = decPlacesIn;
        this.nullable = nullableIn;
        this.setNullable = true;
        this.defaultValue = defaultValueIn;
        this.sqlDefinition = sqlDefinitionIn;
        this.unique = uniqueIn;
        this.setUnique = true;
        this.lowerBound = lowerBoundIn;
        this.setLowerBound = true;
        this.upperBound = upperBoundIn;
        this.setUpperBound = true;
        this.autoincrement = autoincrementIn;
        this.setAutoincrement = true;
        this.pkSeqNum = pkSeqNumIn;
        this.setPkSeqNum = true;
        this.generatorName = generatorNameIn;
        this.umlName = umlNameIn;
        this.umlType = umlTypeIn;
        this.javaDefault = javaDefaultIn;
        this.hibernateType = hibernateTypeIn;
        this.description = descriptionIn;
        this.insertable = insertableIn;
        this.setInsertable = true;
        this.updatable = updatableIn;
        this.setUpdatable = true;
        this.transientValue = transientValueIn;
        this.setTransientValue = true;
        this.version = versionIn;
        this.setVersion = true;
        this.fetchType = fetchTypeIn;
        this.temporalType = temporalTypeIn;
        this.table = tableIn;
        this.fkSequences = fkSequencesIn;
        this.pkTable = pkTableIn;
        this.fkRefSequences = fkRefSequencesIn;
    }

    /**
     * Copies constructor from other Column
     *
     * @param otherBean Cannot be <code>null</code>
     * @throws NullPointerException if the argument is <code>null</code>
     */
    public Column(final Column otherBean)
    {
        this.tableName = otherBean.getTableName();
        this.seqNum = otherBean.getSeqNum();
        this.setSeqNum = true;
        this.columnName = otherBean.getColumnName();
        this.excluded = otherBean.isExcluded();
        this.setExcluded = true;
        this.sqlType = otherBean.getSqlType();
        this.javaType = otherBean.getJavaType();
        this.jdbcType = otherBean.getJdbcType();
        this.colSize = otherBean.getColSize();
        this.setColSize = true;
        this.decPlaces = otherBean.getDecPlaces();
        this.nullable = otherBean.isNullable();
        this.setNullable = true;
        this.defaultValue = otherBean.getDefaultValue();
        this.sqlDefinition = otherBean.getSqlDefinition();
        this.unique = otherBean.isUnique();
        this.setUnique = true;
        this.lowerBound = otherBean.getLowerBound();
        this.setLowerBound = true;
        this.upperBound = otherBean.getUpperBound();
        this.setUpperBound = true;
        this.autoincrement = otherBean.isAutoincrement();
        this.setAutoincrement = true;
        this.pkSeqNum = otherBean.getPkSeqNum();
        this.setPkSeqNum = true;
        this.generatorName = otherBean.getGeneratorName();
        this.umlName = otherBean.getUmlName();
        this.umlType = otherBean.getUmlType();
        this.javaDefault = otherBean.getJavaDefault();
        this.hibernateType = otherBean.getHibernateType();
        this.description = otherBean.getDescription();
        this.insertable = otherBean.isInsertable();
        this.setInsertable = true;
        this.updatable = otherBean.isUpdatable();
        this.setUpdatable = true;
        this.transientValue = otherBean.isTransientValue();
        this.setTransientValue = true;
        this.version = otherBean.isVersion();
        this.setVersion = true;
        this.fetchType = otherBean.getFetchType();
        this.temporalType = otherBean.getTemporalType();
        this.table = otherBean.getTable();
        this.fkSequences = otherBean.getFkSequences();
        this.pkTable = otherBean.getPkTable();
        this.fkRefSequences = otherBean.getFkRefSequences();
    }

    /**
     * Copies all properties from the argument value object into this value object.
     * @param otherBean Cannot be <code>null</code>
     */
    public void copy(final Column otherBean)
    {
        if (null != otherBean)
        {
            this.setTableName(otherBean.getTableName());
            this.setSeqNum(otherBean.getSeqNum());
            this.setSeqNum = true;
            this.setColumnName(otherBean.getColumnName());
            this.setExcluded(otherBean.isExcluded());
            this.setExcluded = true;
            this.setSqlType(otherBean.getSqlType());
            this.setJavaType(otherBean.getJavaType());
            this.setJdbcType(otherBean.getJdbcType());
            this.setColSize(otherBean.getColSize());
            this.setColSize = true;
            this.setDecPlaces(otherBean.getDecPlaces());
            this.setNullable(otherBean.isNullable());
            this.setNullable = true;
            this.setDefaultValue(otherBean.getDefaultValue());
            this.setSqlDefinition(otherBean.getSqlDefinition());
            this.setUnique(otherBean.isUnique());
            this.setUnique = true;
            this.setLowerBound(otherBean.getLowerBound());
            this.setLowerBound = true;
            this.setUpperBound(otherBean.getUpperBound());
            this.setUpperBound = true;
            this.setAutoincrement(otherBean.isAutoincrement());
            this.setAutoincrement = true;
            this.setPkSeqNum(otherBean.getPkSeqNum());
            this.setPkSeqNum = true;
            this.setGeneratorName(otherBean.getGeneratorName());
            this.setUmlName(otherBean.getUmlName());
            this.setUmlType(otherBean.getUmlType());
            this.setJavaDefault(otherBean.getJavaDefault());
            this.setHibernateType(otherBean.getHibernateType());
            this.setDescription(otherBean.getDescription());
            this.setInsertable(otherBean.isInsertable());
            this.setInsertable = true;
            this.setUpdatable(otherBean.isUpdatable());
            this.setUpdatable = true;
            this.setTransientValue(otherBean.isTransientValue());
            this.setTransientValue = true;
            this.setVersion(otherBean.isVersion());
            this.setVersion = true;
            this.setFetchType(otherBean.getFetchType());
            this.setTemporalType(otherBean.getTemporalType());
            this.setTable(otherBean.getTable());
            this.setFkSequences(otherBean.getFkSequences());
            this.setPkTable(otherBean.getPkTable());
            this.setFkRefSequences(otherBean.getFkRefSequences());
        }
    }

    /**
     * <p>Data source dependent type name. Denormalized from getTable().getName()</p>
     * Get the tableName Attribute
     * @return tableName String
     */
    public String getTableName()
    {
        return this.tableName;
    }

    /**
     * <p>Data source dependent type name. Denormalized from getTable().getName()</p>
     * @param value String
     */
    public void setTableName(final String value)
    {
        this.tableName = value;
    }

    /**
     * <p>The sequence number of the column within the table. Used to order columns and attributes
     * for comparison.</p>
     * Get the seqNum Attribute
     * @return seqNum int
     */
    public int getSeqNum()
    {
        return this.seqNum;
    }

    /**
     * <p>The sequence number of the column within the table. Used to order columns and attributes
     * for comparison.</p>
     * @param value int
     */
    public void setSeqNum(final int value)
    {
        this.seqNum = value;
        this.setSeqNum = true;
    }

    /**
     * Return true if the primitive attribute seqNum is set, through the setter or constructor
     * @return true if the attribute value has been set
     */
    public boolean isSetSeqNum()
    {
        return this.setSeqNum;
    }

    /**
     * <p>The SQL database column name.</p>
     * Get the columnName Attribute
     * @return columnName String
     */
    public String getColumnName()
    {
        return this.columnName;
    }

    /**
     * <p>The SQL database column name.</p>
     * @param value String
     */
    public void setColumnName(final String value)
    {
        this.columnName = value;
    }

    /**
     * <p>true if the column should not be included in reverse engineering. default=false.</p>
     * Get the excluded Attribute
     * @return excluded boolean
     */
    public boolean isExcluded()
    {
        return this.excluded;
    }

    /**
     * <p>true if the column should not be included in reverse engineering. default=false.</p>
     * Duplicates isBoolean method, for use as Jaxb2 compatible object
     * Get the excluded Attribute
     * @return excluded boolean
     */
    @Deprecated
    public boolean getExcluded()
    {
        return this.excluded;
    }

    /**
     * <p>true if the column should not be included in reverse engineering. default=false.</p>
     * @param value boolean
     */
    public void setExcluded(final boolean value)
    {
        this.excluded = value;
        this.setExcluded = true;
    }

    /**
     * Return true if the primitive attribute excluded is set, through the setter or constructor
     * @return true if the attribute value has been set
     */
    public boolean isSetExcluded()
    {
        return this.setExcluded;
    }

    /**
     * <p>Data source dependent SQL data type name, from JDBCMetadata results.</p>
     * Get the sqlType Attribute
     * @return sqlType String
     */
    public String getSqlType()
    {
        return this.sqlType;
    }

    /**
     * <p>Data source dependent SQL data type name, from JDBCMetadata results.</p>
     * @param value String
     */
    public void setSqlType(final String value)
    {
        this.sqlType = value;
    }

    /**
     * <p>The Java Type derived from the umlType mapping from the database type, plus multiplicity
     * to indicate primitive/wrapped type.</p>
     * Get the javaType Attribute
     * @return javaType String
     */
    public String getJavaType()
    {
        return this.javaType;
    }

    /**
     * <p>The Java Type derived from the umlType mapping from the database type, plus multiplicity
     * to indicate primitive/wrapped type.</p>
     * @param value String
     */
    public void setJavaType(final String value)
    {
        this.javaType = value;
    }

    /**
     * <p>Java datatype from java.sql.Types from JDBC metadata.</p>
     * Get the jdbcType Attribute
     * @return jdbcType String
     */
    public String getJdbcType()
    {
        return this.jdbcType;
    }

    /**
     * <p>Java datatype from java.sql.Types from JDBC metadata.</p>
     * @param value String
     */
    public void setJdbcType(final String value)
    {
        this.jdbcType = value;
    }

    /**
     * <p>For numeric data, this is the maximum precision. For character data, this is the length in
     * characters. For datetime datatypes, this is the length in characters of the String
     * representation (assuming the maximum allowed precision of the fractional seconds component).
     * For binary data, this is the length in bytes. For the ROWID datatype, this is the length in
     * bytes. Null is returned for data types where the column size is not applicable.</p>
     * Get the colSize Attribute
     * @return colSize int
     */
    public int getColSize()
    {
        return this.colSize;
    }

    /**
     * <p>For numeric data, this is the maximum precision. For character data, this is the length in
     * characters. For datetime datatypes, this is the length in characters of the String
     * representation (assuming the maximum allowed precision of the fractional seconds component).
     * For binary data, this is the length in bytes. For the ROWID datatype, this is the length in
     * bytes. Null is returned for data types where the column size is not applicable.</p>
     * @param value int
     */
    public void setColSize(final int value)
    {
        this.colSize = value;
        this.setColSize = true;
    }

    /**
     * Return true if the primitive attribute colSize is set, through the setter or constructor
     * @return true if the attribute value has been set
     */
    public boolean isSetColSize()
    {
        return this.setColSize;
    }

    /**
     * <p>The number of fractional digits. Null is returned for data types where DECIMAL_DIGITS is
     * not applicable.</p>
     * Get the decPlaces Attribute
     * @return decPlaces Integer
     */
    public Integer getDecPlaces()
    {
        return this.decPlaces;
    }

    /**
     * <p>The number of fractional digits. Null is returned for data types where DECIMAL_DIGITS is
     * not applicable.</p>
     * @param value Integer
     */
    public void setDecPlaces(final Integer value)
    {
        this.decPlaces = value;
    }

    /**
     * <p>If a column is defined as NOT NULL. True if column is an identifier (PK column) because
     * they are filled in by the DBMS or ORM framework.</p>
     * Get the nullable Attribute
     * @return nullable boolean
     */
    public boolean isNullable()
    {
        return this.nullable;
    }

    /**
     * <p>If a column is defined as NOT NULL. True if column is an identifier (PK column) because
     * they are filled in by the DBMS or ORM framework.</p>
     * Duplicates isBoolean method, for use as Jaxb2 compatible object
     * Get the nullable Attribute
     * @return nullable boolean
     */
    @Deprecated
    public boolean getNullable()
    {
        return this.nullable;
    }

    /**
     * <p>If a column is defined as NOT NULL. True if column is an identifier (PK column) because
     * they are filled in by the DBMS or ORM framework.</p>
     * @param value boolean
     */
    public void setNullable(final boolean value)
    {
        this.nullable = value;
        this.setNullable = true;
    }

    /**
     * Return true if the primitive attribute nullable is set, through the setter or constructor
     * @return true if the attribute value has been set
     */
    public boolean isSetNullable()
    {
        return this.setNullable;
    }

    /**
     * <p>default value for the column, which should be interpreted as a string when the value is
     * enclosed in single quotes (may be null)</p>
     * Get the defaultValue Attribute
     * @return defaultValue String
     */
    public String getDefaultValue()
    {
        return this.defaultValue;
    }

    /**
     * <p>default value for the column, which should be interpreted as a string when the value is
     * enclosed in single quotes (may be null)</p>
     * @param value String
     */
    public void setDefaultValue(final String value)
    {
        this.defaultValue = value;
    }

    /**
     * <p>The full DBMS specific SQL DDL definition for the column, including NOT NULL and DEFAULT,
     * if applicable.</p>
     * Get the sqlDefinition Attribute
     * @return sqlDefinition String
     */
    public String getSqlDefinition()
    {
        return this.sqlDefinition;
    }

    /**
     * <p>The full DBMS specific SQL DDL definition for the column, including NOT NULL and DEFAULT,
     * if applicable.</p>
     * @param value String
     */
    public void setSqlDefinition(final String value)
    {
        this.sqlDefinition = value;
    }

    /**
     * <p>If the column belongs to a unique index. default=false, even though the UML2 default when
     * creating a new attribute is true (causes lots of unintended problems when generating code).
     * Used to set 'Unique' value for the UML attribute, which will create findBy methods for each
     * unique attribute..</p>
     * Get the unique Attribute
     * @return unique boolean
     */
    public boolean isUnique()
    {
        return this.unique;
    }

    /**
     * <p>If the column belongs to a unique index. default=false, even though the UML2 default when
     * creating a new attribute is true (causes lots of unintended problems when generating code).
     * Used to set 'Unique' value for the UML attribute, which will create findBy methods for each
     * unique attribute..</p>
     * Duplicates isBoolean method, for use as Jaxb2 compatible object
     * Get the unique Attribute
     * @return unique boolean
     */
    @Deprecated
    public boolean getUnique()
    {
        return this.unique;
    }

    /**
     * <p>If the column belongs to a unique index. default=false, even though the UML2 default when
     * creating a new attribute is true (causes lots of unintended problems when generating code).
     * Used to set 'Unique' value for the UML attribute, which will create findBy methods for each
     * unique attribute..</p>
     * @param value boolean
     */
    public void setUnique(final boolean value)
    {
        this.unique = value;
        this.setUnique = true;
    }

    /**
     * Return true if the primitive attribute unique is set, through the setter or constructor
     * @return true if the attribute value has been set
     */
    public boolean isSetUnique()
    {
        return this.setUnique;
    }

    /**
     * <p>The multiplicity lowerBound. 0 means the attribute is not required.</p>
     * Get the lowerBound Attribute
     * @return lowerBound int
     */
    public int getLowerBound()
    {
        return this.lowerBound;
    }

    /**
     * <p>The multiplicity lowerBound. 0 means the attribute is not required.</p>
     * @param value int
     */
    public void setLowerBound(final int value)
    {
        this.lowerBound = value;
        this.setLowerBound = true;
    }

    /**
     * Return true if the primitive attribute lowerBound is set, through the setter or constructor
     * @return true if the attribute value has been set
     */
    public boolean isSetLowerBound()
    {
        return this.setLowerBound;
    }

    /**
     * <p>The multiplicity upperBound. Normally 1. Should be * for FK 1:M relationships.</p>
     * Get the upperBound Attribute
     * @return upperBound int
     */
    public int getUpperBound()
    {
        return this.upperBound;
    }

    /**
     * <p>The multiplicity upperBound. Normally 1. Should be * for FK 1:M relationships.</p>
     * @param value int
     */
    public void setUpperBound(final int value)
    {
        this.upperBound = value;
        this.setUpperBound = true;
    }

    /**
     * Return true if the primitive attribute upperBound is set, through the setter or constructor
     * @return true if the attribute value has been set
     */
    public boolean isSetUpperBound()
    {
        return this.setUpperBound;
    }

    /**
     * <p>If the column is automatically incremented as an Identity column.</p>
     * Get the autoincrement Attribute
     * @return autoincrement boolean
     */
    public boolean isAutoincrement()
    {
        return this.autoincrement;
    }

    /**
     * <p>If the column is automatically incremented as an Identity column.</p>
     * Duplicates isBoolean method, for use as Jaxb2 compatible object
     * Get the autoincrement Attribute
     * @return autoincrement boolean
     */
    @Deprecated
    public boolean getAutoincrement()
    {
        return this.autoincrement;
    }

    /**
     * <p>If the column is automatically incremented as an Identity column.</p>
     * @param value boolean
     */
    public void setAutoincrement(final boolean value)
    {
        this.autoincrement = value;
        this.setAutoincrement = true;
    }

    /**
     * Return true if the primitive attribute autoincrement is set, through the setter or constructor
     * @return true if the attribute value has been set
     */
    public boolean isSetAutoincrement()
    {
        return this.setAutoincrement;
    }

    /**
     * <p>If the column is part of a primary key, the sequence number of the column within the key.
     * 0 if not a PK column.</p>
     * Get the pkSeqNum Attribute
     * @return pkSeqNum int
     */
    public int getPkSeqNum()
    {
        return this.pkSeqNum;
    }

    /**
     * <p>If the column is part of a primary key, the sequence number of the column within the key.
     * 0 if not a PK column.</p>
     * @param value int
     */
    public void setPkSeqNum(final int value)
    {
        this.pkSeqNum = value;
        this.setPkSeqNum = true;
    }

    /**
     * Return true if the primitive attribute pkSeqNum is set, through the setter or constructor
     * @return true if the attribute value has been set
     */
    public boolean isSetPkSeqNum()
    {
        return this.setPkSeqNum;
    }

    /**
     * <p>sequence name, autoincrement, etc. Can be set globally or for this table/entity.</p>
     * Get the generatorName Attribute
     * @return generatorName String
     */
    public String getGeneratorName()
    {
        return this.generatorName;
    }

    /**
     * <p>sequence name, autoincrement, etc. Can be set globally or for this table/entity.</p>
     * @param value String
     */
    public void setGeneratorName(final String value)
    {
        this.generatorName = value;
    }

    /**
     * <p>The column physical name translated into a UML/Java logical name</p>
     * Get the umlName Attribute
     * @return umlName String
     */
    public String getUmlName()
    {
        return this.umlName;
    }

    /**
     * <p>The column physical name translated into a UML/Java logical name</p>
     * @param value String
     */
    public void setUmlName(final String value)
    {
        this.umlName = value;
    }

    /**
     * <p>The UML datatype for the column, from the UML Standard Profile or PrimitiveTypes Profile
     * or the andromda-datatype profile libraries.</p>
     * Get the umlType Attribute
     * @return umlType String
     */
    public String getUmlType()
    {
        return this.umlType;
    }

    /**
     * <p>The UML datatype for the column, from the UML Standard Profile or PrimitiveTypes Profile
     * or the andromda-datatype profile libraries.</p>
     * @param value String
     */
    public void setUmlType(final String value)
    {
        this.umlType = value;
    }

    /**
     * <p>Java default value expression for the attribute, derived from database default value plus
     * mappings plus expression translation. i.e. CURRENT_DATE is today's date with no time portion,
     * the Java expression (requires commons-lang) is
     * org.apache.commons.lang.time.DateUtils.truncate(new java.util.Date(),
     * java.util.Calendar.DAY_OF_MONTH)).</p>
     * Get the javaDefault Attribute
     * @return javaDefault String
     */
    public String getJavaDefault()
    {
        return this.javaDefault;
    }

    /**
     * <p>Java default value expression for the attribute, derived from database default value plus
     * mappings plus expression translation. i.e. CURRENT_DATE is today's date with no time portion,
     * the Java expression (requires commons-lang) is
     * org.apache.commons.lang.time.DateUtils.truncate(new java.util.Date(),
     * java.util.Calendar.DAY_OF_MONTH)).</p>
     * @param value String
     */
    public void setJavaDefault(final String value)
    {
        this.javaDefault = value;
    }

    /**
     * <p>The hibernate_type used in the andromda_hibernate_type annotation
     * (attribute.overrideType), which indicates a default override of the standard hibernate type
     * with the @org.hibernate.annotations.Type annotation. For example CHAR(1) could be mapped to
     * hibernateType yes_no. If not overridden, the hibernate defaults are used.</p>
     * Get the hibernateType Attribute
     * @return hibernateType String
     */
    public String getHibernateType()
    {
        return this.hibernateType;
    }

    /**
     * <p>The hibernate_type used in the andromda_hibernate_type annotation
     * (attribute.overrideType), which indicates a default override of the standard hibernate type
     * with the @org.hibernate.annotations.Type annotation. For example CHAR(1) could be mapped to
     * hibernateType yes_no. If not overridden, the hibernate defaults are used.</p>
     * @param value String
     */
    public void setHibernateType(final String value)
    {
        this.hibernateType = value;
    }

    /**
     * <p>The column description from the JDBC metadata</p>
     * Get the description Attribute
     * @return description String
     */
    public String getDescription()
    {
        return this.description;
    }

    /**
     * <p>The column description from the JDBC metadata</p>
     * @param value String
     */
    public void setDescription(final String value)
    {
        this.description = value;
    }

    /**
     * <p>Whether the column is included in SQL INSERT statements generated by the persistence
     * provider.</p>
     * Get the insertable Attribute
     * @return insertable boolean
     */
    public boolean isInsertable()
    {
        return this.insertable;
    }

    /**
     * <p>Whether the column is included in SQL INSERT statements generated by the persistence
     * provider.</p>
     * Duplicates isBoolean method, for use as Jaxb2 compatible object
     * Get the insertable Attribute
     * @return insertable boolean
     */
    @Deprecated
    public boolean getInsertable()
    {
        return this.insertable;
    }

    /**
     * <p>Whether the column is included in SQL INSERT statements generated by the persistence
     * provider.</p>
     * @param value boolean
     */
    public void setInsertable(final boolean value)
    {
        this.insertable = value;
        this.setInsertable = true;
    }

    /**
     * Return true if the primitive attribute insertable is set, through the setter or constructor
     * @return true if the attribute value has been set
     */
    public boolean isSetInsertable()
    {
        return this.setInsertable;
    }

    /**
     * <p>(Optional) Whether the column is included in SQL UPDATE statements generated by the
     * persistence provider.</p>
     * Get the updatable Attribute
     * @return updatable boolean
     */
    public boolean isUpdatable()
    {
        return this.updatable;
    }

    /**
     * <p>(Optional) Whether the column is included in SQL UPDATE statements generated by the
     * persistence provider.</p>
     * Duplicates isBoolean method, for use as Jaxb2 compatible object
     * Get the updatable Attribute
     * @return updatable boolean
     */
    @Deprecated
    public boolean getUpdatable()
    {
        return this.updatable;
    }

    /**
     * <p>(Optional) Whether the column is included in SQL UPDATE statements generated by the
     * persistence provider.</p>
     * @param value boolean
     */
    public void setUpdatable(final boolean value)
    {
        this.updatable = value;
        this.setUpdatable = true;
    }

    /**
     * Return true if the primitive attribute updatable is set, through the setter or constructor
     * @return true if the attribute value has been set
     */
    public boolean isSetUpdatable()
    {
        return this.setUpdatable;
    }

    /**
     * <p>If the uml attribute is transient. Adds javax.persistent.Transient annotation.</p>
     * Get the transientValue Attribute
     * @return transientValue boolean
     */
    public boolean isTransientValue()
    {
        return this.transientValue;
    }

    /**
     * <p>If the uml attribute is transient. Adds javax.persistent.Transient annotation.</p>
     * Duplicates isBoolean method, for use as Jaxb2 compatible object
     * Get the transientValue Attribute
     * @return transientValue boolean
     */
    @Deprecated
    public boolean getTransientValue()
    {
        return this.transientValue;
    }

    /**
     * <p>If the uml attribute is transient. Adds javax.persistent.Transient annotation.</p>
     * @param value boolean
     */
    public void setTransientValue(final boolean value)
    {
        this.transientValue = value;
        this.setTransientValue = true;
    }

    /**
     * Return true if the primitive attribute transientValue is set, through the setter or constructor
     * @return true if the attribute value has been set
     */
    public boolean isSetTransientValue()
    {
        return this.setTransientValue;
    }

    /**
     * <p>If the uml attribute is a version indicator. Adds javax.persistent.Version annotation.</p>
     * Get the version Attribute
     * @return version boolean
     */
    public boolean isVersion()
    {
        return this.version;
    }

    /**
     * <p>If the uml attribute is a version indicator. Adds javax.persistent.Version annotation.</p>
     * Duplicates isBoolean method, for use as Jaxb2 compatible object
     * Get the version Attribute
     * @return version boolean
     */
    @Deprecated
    public boolean getVersion()
    {
        return this.version;
    }

    /**
     * <p>If the uml attribute is a version indicator. Adds javax.persistent.Version annotation.</p>
     * @param value boolean
     */
    public void setVersion(final boolean value)
    {
        this.version = value;
        this.setVersion = true;
    }

    /**
     * Return true if the primitive attribute version is set, through the setter or constructor
     * @return true if the attribute value has been set
     */
    public boolean isSetVersion()
    {
        return this.setVersion;
    }

    /**
     * <p>The FetchType value for the @ManyToOne and @ManyToMany annotations on
     * the column. The default for @ManyToOne is EAGER and @ManyToMany and @OneToMany is LAZY unless
     * overridden.</p><p></p>
     * Get the fetchType Attribute
     * @return fetchType FetchType
     */
    public FetchType getFetchType()
    {
        return this.fetchType;
    }

    /**
     * <p>The FetchType value for the @ManyToOne and @ManyToMany annotations on
     * the column. The default for @ManyToOne is EAGER and @ManyToMany and @OneToMany is LAZY unless
     * overridden.</p><p></p>
     * @param value FetchType
     */
    public void setFetchType(final FetchType value)
    {
        this.fetchType = value;
    }

    /**
     * <p>The hibernate temporal (date/time/datetime) type used in the andromda_hibernate_type
     * annotation (attribute.overrideType), which indicates a default override of the standard
     * hibernate type with the @javax.persistence.Temporal TemporalType
     * annotation. DATE, TIME, TIMESTAMP values, default if null/unspecified=DATE.</p>
     * Get the temporalType Attribute
     * @return temporalType TemporalType
     */
    public TemporalType getTemporalType()
    {
        return this.temporalType;
    }

    /**
     * <p>The hibernate temporal (date/time/datetime) type used in the andromda_hibernate_type
     * annotation (attribute.overrideType), which indicates a default override of the standard
     * hibernate type with the @javax.persistence.Temporal TemporalType
     * annotation. DATE, TIME, TIMESTAMP values, default if null/unspecified=DATE.</p>
     * @param value TemporalType
     */
    public void setTemporalType(final TemporalType value)
    {
        this.temporalType = value;
    }

    /**
     * <p>The Table that owns this column.</p>
     * Get the table Association
     * @return this.table Table
     */
    public Table getTable()
    {
        return this.table;
    }

    /**
     * Sets the table
     * @param value Table
     */
    public void setTable(Table value)
    {
        this.table = value;
    }

    /**
     * <p>The PK sequence number of the column referred to by the FK column.</p>
     * Get the fkSequences Association
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the object.
     * @return this.fkSequences Collection<FKColumn>
     */
    public Collection<FKColumn> getFkSequences()
    {
        if (this.fkSequences == null)
        {
            this.fkSequences = new ArrayList<FKColumn>();
        }
        return this.fkSequences;
    }

    /**
     * Sets the fkSequences
     * @param value Collection<FKColumn>
     */
    public void setFkSequences(Collection<FKColumn> value)
    {
        this.fkSequences = value;
    }

    /**
     * <p>Not null if the column is part of the table PK. Used to see if a column should have
     * Identifier stereotype when creating the column.</p>
     * Get the pkTable Association
     * @return this.pkTable Table
     */
    public Table getPkTable()
    {
        return this.pkTable;
    }

    /**
     * Sets the pkTable
     * @param value Table
     */
    public void setPkTable(Table value)
    {
        this.pkTable = value;
    }

    /**
     * <p>The FK Column number referred to by this PK column.</p>
     * Get the fkRefSequences Association
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the object.
     * @return this.fkRefSequences Collection<FKColumn>
     */
    public Collection<FKColumn> getFkRefSequences()
    {
        if (this.fkRefSequences == null)
        {
            this.fkRefSequences = new ArrayList<FKColumn>();
        }
        return this.fkRefSequences;
    }

    /**
     * Sets the fkRefSequences
     * @param value Collection<FKColumn>
     */
    public void setFkRefSequences(Collection<FKColumn> value)
    {
        this.fkRefSequences = value;
    }

    /**
     * @param object to compare this object against
     * @return boolean if equal
     * @see Object#equals(Object)
     */
    @Override
    public boolean equals(final Object object)
    {
        if (object==null || object.getClass() != this.getClass())
        {
             return false;
        }
        // Check if the same object instance
        if (object==this)
        {
            return true;
        }
        Column rhs = (Column) object;
        return new EqualsBuilder()
            .append(this.getTableName(), rhs.getTableName())
            .append(this.getSeqNum(), rhs.getSeqNum())
            .append(this.getColumnName(), rhs.getColumnName())
            .append(this.isExcluded(), rhs.isExcluded())
            .append(this.getSqlType(), rhs.getSqlType())
            .append(this.getJavaType(), rhs.getJavaType())
            .append(this.getJdbcType(), rhs.getJdbcType())
            .append(this.getColSize(), rhs.getColSize())
            .append(this.getDecPlaces(), rhs.getDecPlaces())
            .append(this.isNullable(), rhs.isNullable())
            .append(this.getDefaultValue(), rhs.getDefaultValue())
            .append(this.getSqlDefinition(), rhs.getSqlDefinition())
            .append(this.isUnique(), rhs.isUnique())
            .append(this.getLowerBound(), rhs.getLowerBound())
            .append(this.getUpperBound(), rhs.getUpperBound())
            .append(this.isAutoincrement(), rhs.isAutoincrement())
            .append(this.getPkSeqNum(), rhs.getPkSeqNum())
            .append(this.getGeneratorName(), rhs.getGeneratorName())
            .append(this.getUmlName(), rhs.getUmlName())
            .append(this.getUmlType(), rhs.getUmlType())
            .append(this.getJavaDefault(), rhs.getJavaDefault())
            .append(this.getHibernateType(), rhs.getHibernateType())
            .append(this.getDescription(), rhs.getDescription())
            .append(this.isInsertable(), rhs.isInsertable())
            .append(this.isUpdatable(), rhs.isUpdatable())
            .append(this.isTransientValue(), rhs.isTransientValue())
            .append(this.isVersion(), rhs.isVersion())
            .append(this.getFetchType(), rhs.getFetchType())
            .append(this.getTemporalType(), rhs.getTemporalType())
            .append(this.getTable(), rhs.getTable())
            .append(this.getFkSequences(), rhs.getFkSequences())
            .append(this.getPkTable(), rhs.getPkTable())
            .append(this.getFkRefSequences(), rhs.getFkRefSequences())
            .isEquals();
    }

    /**
     * @param object to compare this object against
     * @return int if equal
     * @see Comparable#compareTo(Object)
     */
    public int compareTo(final Column object)
    {
        if (object==null)
        {
            return -1;
        }
        // Check if the same object instance
        if (object==this)
        {
            return 0;
        }
        return new CompareToBuilder()
            .append(this.getTableName(), object.getTableName())
            .append(this.getSeqNum(), object.getSeqNum())
            .append(this.getColumnName(), object.getColumnName())
            .append(this.isExcluded(), object.isExcluded())
            .append(this.getSqlType(), object.getSqlType())
            .append(this.getJavaType(), object.getJavaType())
            .append(this.getJdbcType(), object.getJdbcType())
            .append(this.getColSize(), object.getColSize())
            .append(this.getDecPlaces(), object.getDecPlaces())
            .append(this.isNullable(), object.isNullable())
            .append(this.getDefaultValue(), object.getDefaultValue())
            .append(this.getSqlDefinition(), object.getSqlDefinition())
            .append(this.isUnique(), object.isUnique())
            .append(this.getLowerBound(), object.getLowerBound())
            .append(this.getUpperBound(), object.getUpperBound())
            .append(this.isAutoincrement(), object.isAutoincrement())
            .append(this.getPkSeqNum(), object.getPkSeqNum())
            .append(this.getGeneratorName(), object.getGeneratorName())
            .append(this.getUmlName(), object.getUmlName())
            .append(this.getUmlType(), object.getUmlType())
            .append(this.getJavaDefault(), object.getJavaDefault())
            .append(this.getHibernateType(), object.getHibernateType())
            .append(this.getDescription(), object.getDescription())
            .append(this.isInsertable(), object.isInsertable())
            .append(this.isUpdatable(), object.isUpdatable())
            .append(this.isTransientValue(), object.isTransientValue())
            .append(this.isVersion(), object.isVersion())
            .append(this.getFetchType(), object.getFetchType())
            .append(this.getTemporalType(), object.getTemporalType())
            .append(this.getTable(), object.getTable())
            .append(this.getFkSequences(), object.getFkSequences())
            .append(this.getPkTable(), object.getPkTable())
            .append(this.getFkRefSequences(), object.getFkRefSequences())
            .toComparison();
    }

    /**
     * @return int hashCode value
     * @see Object#hashCode()
     */
    @Override
    public int hashCode()
    {
        return new HashCodeBuilder(1249046965, -82296885)
            .append(this.getTableName())
            .append(this.getSeqNum())
            .append(this.getColumnName())
            .append(this.isExcluded())
            .append(this.getSqlType())
            .append(this.getJavaType())
            .append(this.getJdbcType())
            .append(this.getColSize())
            .append(this.getDecPlaces())
            .append(this.isNullable())
            .append(this.getDefaultValue())
            .append(this.getSqlDefinition())
            .append(this.isUnique())
            .append(this.getLowerBound())
            .append(this.getUpperBound())
            .append(this.isAutoincrement())
            .append(this.getPkSeqNum())
            .append(this.getGeneratorName())
            .append(this.getUmlName())
            .append(this.getUmlType())
            .append(this.getJavaDefault())
            .append(this.getHibernateType())
            .append(this.getDescription())
            .append(this.isInsertable())
            .append(this.isUpdatable())
            .append(this.isTransientValue())
            .append(this.isVersion())
            .append(this.getFetchType())
            .append(this.getTemporalType())
            .append(this.getTable())
            //Commented out to avoid commons-lang-2.4 recursion StackOverflowError: https://issues.apache.org/jira/browse/LANG-456
            //.append(this.getFkSequences())
            .append(this.getPkTable())
            //Commented out to avoid commons-lang-2.4 recursion StackOverflowError: https://issues.apache.org/jira/browse/LANG-456
            //.append(this.getFkRefSequences())
            .toHashCode();
    }

    /**
     * @return String representation of object
     * @see Object#toString()
     */
    @Override
    public String toString()
    {
        return new ToStringBuilder(this)
            .append("tableName", this.getTableName())
            .append("seqNum", this.getSeqNum())
            .append("columnName", this.getColumnName())
            .append("excluded", this.isExcluded())
            .append("sqlType", this.getSqlType())
            .append("javaType", this.getJavaType())
            .append("jdbcType", this.getJdbcType())
            .append("colSize", this.getColSize())
            .append("decPlaces", this.getDecPlaces())
            .append("nullable", this.isNullable())
            .append("defaultValue", this.getDefaultValue())
            .append("sqlDefinition", this.getSqlDefinition())
            .append("unique", this.isUnique())
            .append("lowerBound", this.getLowerBound())
            .append("upperBound", this.getUpperBound())
            .append("autoincrement", this.isAutoincrement())
            .append("pkSeqNum", this.getPkSeqNum())
            .append("generatorName", this.getGeneratorName())
            .append("umlName", this.getUmlName())
            .append("umlType", this.getUmlType())
            .append("javaDefault", this.getJavaDefault())
            .append("hibernateType", this.getHibernateType())
            .append("description", this.getDescription())
            .append("insertable", this.isInsertable())
            .append("updatable", this.isUpdatable())
            .append("transientValue", this.isTransientValue())
            .append("version", this.isVersion())
            .append("fetchType", this.getFetchType())
            .append("temporalType", this.getTemporalType())
            .append("table", this.getTable())
            .append("fkSequences", this.getFkSequences())
            .append("pkTable", this.getPkTable())
            .append("fkRefSequences", this.getFkRefSequences())
            .toString();
    }

    /**
     * Compares the properties of this instance to the properties of the argument. This method will return
     * {@code false} as soon as it detects that the argument is {@code null} or not of the same type as
     * (or a sub-type of) this instance's type.
     *
     * <p/>For array, collection or map properties the comparison will be done one level deep, in other words:
     * the elements will be compared using the {@code equals()} operation.
     *
     * <p/>Note that two properties will be considered equal when both values are {@code null}.
     *
     * @param thatObject the object containing the properties to compare against this instance
     * @return this method will return {@code true} in case the argument has the same type as this class, or is a
     *      sub-type of this class and all properties as found on this class have equal values when queried on that
     *      argument instance; in all other cases this method will return {@code false}
     */
    public boolean equalProperties(final Object thatObject)
    {
        if (thatObject == null || !this.getClass().isAssignableFrom(thatObject.getClass()))
        {
            return false;
        }

        final Column that = (Column)thatObject;

        return
            equal(this.getTableName(), that.getTableName())
            && equal(this.getSeqNum(), that.getSeqNum())
            && equal(this.getColumnName(), that.getColumnName())
            && equal(this.isExcluded(), that.isExcluded())
            && equal(this.getSqlType(), that.getSqlType())
            && equal(this.getJavaType(), that.getJavaType())
            && equal(this.getJdbcType(), that.getJdbcType())
            && equal(this.getColSize(), that.getColSize())
            && equal(this.getDecPlaces(), that.getDecPlaces())
            && equal(this.isNullable(), that.isNullable())
            && equal(this.getDefaultValue(), that.getDefaultValue())
            && equal(this.getSqlDefinition(), that.getSqlDefinition())
            && equal(this.isUnique(), that.isUnique())
            && equal(this.getLowerBound(), that.getLowerBound())
            && equal(this.getUpperBound(), that.getUpperBound())
            && equal(this.isAutoincrement(), that.isAutoincrement())
            && equal(this.getPkSeqNum(), that.getPkSeqNum())
            && equal(this.getGeneratorName(), that.getGeneratorName())
            && equal(this.getUmlName(), that.getUmlName())
            && equal(this.getUmlType(), that.getUmlType())
            && equal(this.getJavaDefault(), that.getJavaDefault())
            && equal(this.getHibernateType(), that.getHibernateType())
            && equal(this.getDescription(), that.getDescription())
            && equal(this.isInsertable(), that.isInsertable())
            && equal(this.isUpdatable(), that.isUpdatable())
            && equal(this.isTransientValue(), that.isTransientValue())
            && equal(this.isVersion(), that.isVersion())
            && equal(this.getFetchType(), that.getFetchType())
            && equal(this.getTemporalType(), that.getTemporalType())
            && equal(this.getTable(), that.getTable())
            && equal(this.getFkSequences(), that.getFkSequences())
            && equal(this.getPkTable(), that.getPkTable())
            && equal(this.getFkRefSequences(), that.getFkRefSequences())
        ;
    }

    /**
     * This is a convenient helper method which is able to detect whether or not two values are equal. Two values
     * are equal when they are both {@code null}, are arrays of the same length with equal elements or are
     * equal objects (this includes {@link Collection} and {@link java.util.Map} instances).
     *
     * <p/>Note that for array, collection or map instances the comparison runs one level deep.
     *
     * @param first the first object to compare, may be {@code null}
     * @param second the second object to compare, may be {@code null}
     * @return this method will return {@code true} in case both objects are equal as explained above;
     *      in all other cases this method will return {@code false}
     */
    protected static boolean equal(final Object first, final Object second)
    {
        final boolean equal;

        if (first == null)
        {
            equal = (second == null);
        }
        else if (first.getClass().isArray() && (second != null) && second.getClass().isArray())
        {
            equal = Arrays.equals((Object[])first, (Object[])second);
        }
        else // note that the following also covers Collection and java.util.Map
        {
            equal = first.equals(second);
        }

        return equal;
    }

    // Column value-object java merge-point
}