public class Column extends Object
Constructor and Description |
---|
Column(String name,
PropertyInfo representedProperty,
Table inTable) |
Column(String name,
Table inTable) |
Modifier and Type | Method and Description |
---|---|
void |
addSpecification(String spec) |
ColumnDataType |
getDataType() |
Expression |
getDefaultValue() |
Table |
getInTable() |
String |
getName() |
Table |
getReferencedTable() |
PropertyInfo |
getRepresentedProperty() |
List<String> |
getSpecifications() |
boolean |
hasSpecificationIgnoringCase(String specIn) |
boolean |
isForeignKeyColumn() |
boolean |
isNotNull() |
boolean |
isObjectIdentifierColumn() |
boolean |
isPrimaryKeyColumn() |
void |
removeSpecification(String specIn) |
void |
setDataType(ColumnDataType dataType) |
void |
setDefaultValue(Expression defaultValue) |
void |
setForeignKeyColumn(boolean isForeignKeyColumn) |
void |
setInTable(Table inTable) |
void |
setName(String name) |
void |
setObjectIdentifierColumn(boolean isObjectIdentifierColumn) |
void |
setReferencedTable(Table refTable) |
void |
setRepresentedProperty(PropertyInfo representedProperty) |
void |
setSpecifications(List<String> specifications) |
String |
toString() |
public Column(String name, PropertyInfo representedProperty, Table inTable)
public void setName(String name)
public String getName()
public List<String> getSpecifications()
null
public void setSpecifications(List<String> specifications)
specifications
- the specifications to setpublic void addSpecification(String spec)
public ColumnDataType getDataType()
public void setDataType(ColumnDataType dataType)
dataType
- the dataType to setpublic Expression getDefaultValue()
public void setDefaultValue(Expression defaultValue)
defaultValue
- the defaultValue to setpublic PropertyInfo getRepresentedProperty()
public void setRepresentedProperty(PropertyInfo representedProperty)
representedProperty
- the representedProperty to setpublic Table getInTable()
public void setInTable(Table inTable)
inTable
- the inTable to setpublic void setObjectIdentifierColumn(boolean isObjectIdentifierColumn)
public boolean isObjectIdentifierColumn()
public boolean isForeignKeyColumn()
true
if this column is intended to store a foreign
key, otherwise false
NOTE: Even if this object does
not reference a specific table, it may still be intended to be
used as foreign key (to one or more tables, see
SqlConstants.RULE_TGT_SQL_CLS_DATATYPES_ONETOMANY_ONETABLE
. That a column is a foreign key is of interest when creating a
replication schema.public boolean isPrimaryKeyColumn()
true
if this column contains a 'PRIMARY KEY'
specification (case is ignored), else false
public boolean isNotNull()
true
if the column has a specification containing
"NOT NULL" (ignoring case), else false
.public void setForeignKeyColumn(boolean isForeignKeyColumn)
public Table getReferencedTable()
null
public void setReferencedTable(Table refTable)
public void removeSpecification(String specIn)
public boolean hasSpecificationIgnoringCase(String specIn)
Copyright © 2017. All rights reserved.