org.edg.info.sqlutil.parsql
Class AliasedName

java.lang.Object
  extended byorg.edg.info.sqlutil.parsql.AliasedName
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
FromItem, SelectItem

public class AliasedName
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
          Indicates the name of a column.
static int FORM_TABLE
          Indicates the name of a table.
 
Constructor Summary
AliasedName()
          Creates a new AliasedName object.
AliasedName(java.lang.String fullName, int form)
          Create a new AliasedName given it's full name.
 
Method Summary
 java.lang.String getAlias()
          Returns the alias associated with the current name.
 java.lang.String getColumn()
          Returns the column part of the name [[schema.]table.]column
 java.lang.String getSchema()
          Returns the schema part of the name [[schema.]table.]column
 java.lang.String getTable()
          Returns the table part of the name [[schema.]table.]column
 boolean isWildcard()
          Determines if this name is a wild card.
 void setAlias(java.lang.String a)
          Associate an alias with the current name.
 java.lang.String toString()
          Returns a String representation of this name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FORM_TABLE

public static final int FORM_TABLE
Indicates the name of a table.

See Also:
Constant Field Values

FORM_COLUMN

public static final int FORM_COLUMN
Indicates the name of a column.

See Also:
Constant Field Values
Constructor Detail

AliasedName

public AliasedName()
Creates a new AliasedName object.


AliasedName

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

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

setAlias

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

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

getAlias

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

Returns:
the alias associated with the current name.

getColumn

public java.lang.String getColumn()
Returns the column part of the name [[schema.]table.]column

Returns:
The column part of the name [[schema.]table.]column

getSchema

public java.lang.String getSchema()
Returns the schema part of the name [[schema.]table.]column

Returns:
The schema part of the name [[schema.]table.]column

getTable

public java.lang.String getTable()
Returns the table part of the name [[schema.]table.]column

Returns:
The table part of the name [[schema.]table.]column

isWildcard

public boolean isWildcard()
Determines if this name is a wild card.

Returns:
true if column is "", false otherwise. Example: , table. are wildcards.

toString

public java.lang.String toString()
Returns a String representation of this name.

Returns:
A String representation of this name.