Class GeneratorColumn

java.lang.Object
org.fastnate.generator.context.NamedObject
org.fastnate.generator.context.GeneratorColumn

public class GeneratorColumn extends NamedObject
Contains the metadata for a column from a GeneratorTable.
Author:
Tobias Liefke
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final boolean
    Indicates that the values of this column are not part of an insert statement, because they are generated by the database.
    private final int
    The index of this column in the list of all columns of the associated table.
    private final String
    The name of this column, as given by the metamodel.
    private final String
    The name of this column, as used by the current dialect.
    private final GeneratorTable
    The table of this column.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GeneratorColumn(GeneratorTable table, int index, String name, String qualifiedName, boolean autoGenerated)
    Creates a new GeneratorColumn instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The index of this column in the list of all columns of the associated table.
    The name of this column, as given by the metamodel.
    The name of this column, as used by the current dialect.
    The table of this column.
    boolean
    Indicates 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • table

      private final GeneratorTable table
      The table of this column.
    • index

      private final int index
      The index of this column in the list of all columns of the associated table.
    • name

      private final String name
      The name of this column, as given by the metamodel.
    • qualifiedName

      private final String qualifiedName
      The name of this column, as used by the current dialect.
    • autoGenerated

      private final boolean autoGenerated
      Indicates 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 new GeneratorColumn instance.
      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

      public String getQualifiedName()
      The name of this column, as used by the current dialect.
      Specified by:
      getQualifiedName in class NamedObject
      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

      public GeneratorTable 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

      public String getName()
      The name of this column, as given by the metamodel.
      Specified by:
      getName in class NamedObject
      Returns:
      the name of the object, possibly quoted with '"' or '`'