org.eigenbase.sql.validate
Class SqlMonikerImpl

java.lang.Object
  extended by org.eigenbase.sql.validate.SqlMonikerImpl
All Implemented Interfaces:
SqlMoniker

public class SqlMonikerImpl
extends Object
implements SqlMoniker

A generic implementation of SqlMoniker.

Since:
May 31, 2005
Version:
$Id: //open/dev/farrago/src/org/eigenbase/sql/validate/SqlMonikerImpl.java#10 $
Author:
tleung

Field Summary
private  String[] names
           
private  SqlMonikerType type
           
 
Constructor Summary
SqlMonikerImpl(String[] names, SqlMonikerType type)
          Creates a moniker with an array of names.
SqlMonikerImpl(String name, SqlMonikerType type)
          Creates a moniker with a single name.
 
Method Summary
 String[] getFullyQualifiedNames()
          Returns the array of component names.
 SqlMonikerType getType()
          Returns the type of object referred to by this moniker.
 String id()
           
 SqlIdentifier toIdentifier()
          Creates a SqlIdentifier containing the fully-qualified name.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

names

private final String[] names

type

private final SqlMonikerType type
Constructor Detail

SqlMonikerImpl

public SqlMonikerImpl(String[] names,
                      SqlMonikerType type)
Creates a moniker with an array of names.


SqlMonikerImpl

public SqlMonikerImpl(String name,
                      SqlMonikerType type)
Creates a moniker with a single name.

Method Detail

getType

public SqlMonikerType getType()
Description copied from interface: SqlMoniker
Returns the type of object referred to by this moniker. Never null.

Specified by:
getType in interface SqlMoniker

getFullyQualifiedNames

public String[] getFullyQualifiedNames()
Description copied from interface: SqlMoniker
Returns the array of component names.

Specified by:
getFullyQualifiedNames in interface SqlMoniker

toIdentifier

public SqlIdentifier toIdentifier()
Description copied from interface: SqlMoniker
Creates a SqlIdentifier containing the fully-qualified name.

Specified by:
toIdentifier in interface SqlMoniker

toString

public String toString()
Overrides:
toString in class Object

id

public String id()
Specified by:
id in interface SqlMoniker