Package org.fastnate.generator.context
Class GeneratorColumn
java.lang.Object
org.fastnate.generator.context.NamedObject
org.fastnate.generator.context.GeneratorColumn
Contains the metadata for a column from a
GeneratorTable.- Author:
- Tobias Liefke
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanIndicates that the values of this column are not part of an insert statement, because they are generated by the database.private final intThe index of this column in the list of all columns of the associated table.private final StringThe name of this column, as given by the metamodel.private final StringThe name of this column, as used by the current dialect.private final GeneratorTableThe table of this column. -
Constructor Summary
ConstructorsConstructorDescriptionGeneratorColumn(GeneratorTable table, int index, String name, String qualifiedName, boolean autoGenerated) Creates a newGeneratorColumninstance. -
Method Summary
Modifier and TypeMethodDescriptionintgetIndex()The index of this column in the list of all columns of the associated table.getName()The name of this column, as given by the metamodel.The name of this column, as used by the current dialect.getTable()The table of this column.booleanIndicates that the values of this column are not part of an insert statement, because they are generated by the database.Methods inherited from class org.fastnate.generator.context.NamedObject
getUnquotedName, toString, unqoteObjectName
-
Field Details
-
table
The table of this column. -
index
private final int indexThe index of this column in the list of all columns of the associated table. -
name
The name of this column, as given by the metamodel. -
qualifiedName
The name of this column, as used by the current dialect. -
autoGenerated
private final boolean autoGeneratedIndicates that the values of this column are not part of an insert statement, because they are generated by the database.
-
-
Constructor Details
-
GeneratorColumn
public GeneratorColumn(GeneratorTable table, int index, String name, String qualifiedName, boolean autoGenerated) Creates a newGeneratorColumninstance.- Parameters:
table- The table of this column.index- The index of this column in the list of all columns of the associated table.name- The name of this column, as given by the metamodel.qualifiedName- The name of this column, as used by the current dialect.autoGenerated- Indicates that the values of this column are not part of an insert statement, because they are generated by the database.
-
-
Method Details
-
getQualifiedName
The name of this column, as used by the current dialect.- Specified by:
getQualifiedNamein classNamedObject- Returns:
- the name of the object, quoted according to the dialect
-
isAutoGenerated
public boolean isAutoGenerated()Indicates that the values of this column are not part of an insert statement, because they are generated by the database. -
getTable
The table of this column. -
getIndex
public int getIndex()The index of this column in the list of all columns of the associated table. -
getName
The name of this column, as given by the metamodel.- Specified by:
getNamein classNamedObject- Returns:
- the name of the object, possibly quoted with '"' or '`'
-