public abstract class AbstractAliasFragment extends AbstractSQLFragment implements AliasFragment
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupportCOMMA, DEFAULT_SEPARATOR, EMPTY, EMPTY_ARRAY, INDENT, NEWLINE, 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. 
 | 
void | 
setName(java.lang.String name)
Does nothing for this fragment - an alias fragment's name is derived from it's alias or expression. 
 | 
java.lang.String | 
toString()  | 
protected boolean | 
useAsBeforeAlias()
Returns true if the current fragment should have an AS between expression and alias. 
 | 
appendToBuffer, argsToString, getStartOffset, getTextOrNull, getTextOrNull, getType, setStartOffset, surroundWithBrackets, surroundWithBracketssetParentcheckInit, checkInit, copyToImpl, equalsImpl, fireObjectUpdated, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitializationaddObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, findOwnedObject, findParent, firePropertyChanged, getChildSupport, getID, getOwnedObjects, getOwnedObjects, getParent, getProperty, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeObjectListener, removeObjectListener, removeObjectListener, removeOwnedObject, removeThisAsParent, replaceReferenceIDs, setID, setProperties, setPropertyclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetStartOffsetgetParent, setParentaddObjectListener, copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, findOwnedObject, getID, getOwnedObjects, getOwnedObjects, getProperties, getReferenceIDs, getType, removeObjectListener, removeOwnedObject, replaceReferenceIDs, setIDgetProperty, getProperty, 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 AbstractDBObjectpublic void setName(java.lang.String name)
setName in interface DBObjectsetName in class AbstractDBObjectname - a string containing the new name for this object.protected boolean canUseAsAlias(java.lang.String exp)
public java.lang.String toString()
toString in class AbstractSQLFragment