org.gibello.zql
Class ZAliasedName

java.lang.Object
  extended by org.gibello.zql.ZAliasedName
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ZFromItem, ZSelectItem

public class ZAliasedName
extends java.lang.Object
implements java.io.Serializable

A name/alias association
Names can have two forms:

See Also:
Serialized Form

Field Summary
static int FORM_COLUMN
           
static int FORM_TABLE
           
 
Constructor Summary
ZAliasedName()
           
ZAliasedName(java.lang.String fullname, int form)
          Create a new ZAliasedName given it's full name.
 
Method Summary
 java.lang.String getAlias()
           
 java.lang.String getColumn()
           
 java.lang.String getSchema()
           
 java.lang.String getTable()
           
 boolean isWildcard()
           
 void setAlias(java.lang.String a)
          Associate an alias with the current name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FORM_TABLE

public static int FORM_TABLE

FORM_COLUMN

public static int FORM_COLUMN
Constructor Detail

ZAliasedName

public ZAliasedName()

ZAliasedName

public ZAliasedName(java.lang.String fullname,
                    int form)
Create a new ZAliasedName given it's full name.

Parameters:
fullname - The full name: [[schema.]table.]column
form - The name form (FORM_TABLE or FORM_COLUMN)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getSchema

public java.lang.String getSchema()
Returns:
If the name is of the form schema.table.column, returns the schema part

getTable

public java.lang.String getTable()
Returns:
If the name is of the form [schema.]table.column, returns the schema part

getColumn

public java.lang.String getColumn()
Returns:
The name is of the form [[schema.]table.]column: return the column part

isWildcard

public boolean isWildcard()
Returns:
true if column is "*", false otherwise. Example: *, table.* are wildcards.

getAlias

public java.lang.String getAlias()
Returns:
the alias associated to the current name.

setAlias

public void setAlias(java.lang.String a)
Associate an alias with the current name.

Parameters:
a - the alias associated to the current name.