public abstract class AbstractAliasFragment extends AbstractSQLFragment implements AliasFragment
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupportAS, COMMA, DEFAULT_SEPARATOR, EMPTY, EMPTY_ARRAY, INDENT, LEFT_PAREN, NEWLINE, RIGHT_PAREN, SPACE| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAliasFragment()
Creates an empty fragment.
|
protected |
AbstractAliasFragment(SQLFragment exp,
java.lang.String alias)
Creates a fragment with given expression and alias.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHaveAlias()
In certain circumstances an AliasFragment cannot have an alias.
|
protected boolean |
canUseAsAlias(java.lang.String exp)
Checks whether the given expression can be used as an alias.
|
java.lang.String |
getAlias()
Returns the alias portion of this SQLFragment.
|
SQLFragment |
getExpression()
Returns the expression portion of this SQLFragment.
|
java.lang.String |
getName()
Gets a "name" for this fragment.
|
java.lang.String |
getSQLText()
Returns the entire fragment (expression plus alias in external form).
|
java.lang.String |
getUsableAlias()
Obtains a String that can be used as an alias to this fragment.
|
void |
setAlias(java.lang.String alias)
Sets the alias part of the fragment.
|
void |
setExpression(SQLFragment expression)
Sets the expression part of the fragment.
|
java.lang.String |
toString() |
protected boolean |
useAsBeforeAlias()
Returns true if the current fragment should have an AS between expression
and alias.
|
appendToBuffer, appendToBuffer, argsToString, getStartOffset, getTextOrNull, getTextOrNull, getType, setStartOffset, surroundWithBrackets, surroundWithBracketssetParentcheckInit, checkInit, copyToImpl, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitialization, processPropertyChange, setIDaddObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, equalsImpl, findOwnedObject, findOwnedObject, findOwnedObject, findOwnedObject, findParent, fireObjectUpdated, firePropertyChanged, getChildSupport, getChildSupport, getID, getOwnedObjects, getOwnedObjects, getParent, getProperty, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeObjectListener, removeObjectListener, removeObjectListener, removeOwnedObject, removeThisAsParent, replaceReferenceIDs, setName, setProperties, setPropertyclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetStartOffsetgetParent, setParentaddObjectListener, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getID, getOwnedObjects, getOwnedObjects, getProperties, getProperty, getProperty, getReferenceIDs, getType, hashCode, removeObjectListener, removeOwnedObject, replaceReferenceIDs, setID, setName, setProperties, setPropertyprotected AbstractAliasFragment()
protected AbstractAliasFragment(SQLFragment exp, java.lang.String alias)
public java.lang.String getAlias()
getAlias in interface AliasFragmentpublic void setAlias(java.lang.String alias)
setAlias in interface AliasFragmentpublic boolean canHaveAlias()
public SQLFragment getExpression()
getExpression in interface AliasFragmentpublic void setExpression(SQLFragment expression)
setExpression in interface AliasFragmentpublic java.lang.String getSQLText()
getSQLText in interface AliasFragmentgetSQLText in interface SQLFragmentprotected boolean useAsBeforeAlias()
public java.lang.String getUsableAlias()
AliasFragmentgetUsableAlias in interface AliasFragmentpublic java.lang.String getName()
getName in interface DBObjectgetName in class AbstractSQLFragmentprotected boolean canUseAsAlias(java.lang.String exp)
public java.lang.String toString()
toString in class AbstractSQLFragment