Class NamedObject

java.lang.Object
org.fastnate.generator.context.NamedObject
Direct Known Subclasses:
GeneratorColumn, GeneratorTable

public abstract class NamedObject extends Object
Base class for database schema objects that have a (possibly quoted) name. Depending on the dialect the quoting of the name is changed during generation.
Author:
Tobias Liefke
  • Constructor Details

    • NamedObject

      public NamedObject()
  • Method Details

    • getName

      public abstract String getName()
      Resolves the name of this object, as given by the metamodel.
      Returns:
      the name of the object, possibly quoted with '"' or '`'
    • getQualifiedName

      public abstract String getQualifiedName()
      Resolves the fully qualfified name of this object, as it is used by the dialect.
      Returns:
      the name of the object, quoted according to the dialect
    • getUnquotedName

      public String getUnquotedName()
      Removes any quotes, if the object name contains them.
      Returns:
      the object name without quotes
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • unqoteObjectName

      protected String unqoteObjectName(String objectName)
      Removes any quotes from the given object.
      Parameters:
      objectName - the name of the object, as given by the metamodel
      Returns:
      the object name without quotes or null if no object name was given