Package org.fastnate.generator.context
Class NamedObject
java.lang.Object
org.fastnate.generator.context.NamedObject
- Direct Known Subclasses:
GeneratorColumn,GeneratorTable
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringgetName()Resolves the name of this object, as given by the metamodel.abstract StringResolves the fully qualfified name of this object, as it is used by the dialect.Removes any quotes, if the object name contains them.toString()protected StringunqoteObjectName(String objectName) Removes any quotes from the given object.
-
Constructor Details
-
NamedObject
public NamedObject()
-
-
Method Details
-
getName
Resolves the name of this object, as given by the metamodel.- Returns:
- the name of the object, possibly quoted with '"' or '`'
-
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
Removes any quotes, if the object name contains them.- Returns:
- the object name without quotes
-
toString
-
unqoteObjectName
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
nullif no object name was given
-