org.objectweb.cjdbc.common.sql.schema
Class AliasedDatabaseTable

java.lang.Object
  extended byorg.objectweb.cjdbc.common.sql.schema.AliasedDatabaseTable
All Implemented Interfaces:
java.io.Serializable

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

An AliasedDatabaseTable represents a database table with an alias name. Example:

  SELECT x.price FROM item x
 

In this case, the item table has an alias named x.

Version:
1.0
Author:
Emmanuel Cecchet
See Also:
Serialized Form

Field Summary
private  java.lang.String alias
          Alias name or null if no alias is defined.
private static long serialVersionUID
           
private  DatabaseTable table
          Database table.
 
Constructor Summary
AliasedDatabaseTable(DatabaseTable table, java.lang.String alias)
          Creates a new AliasedDatabaseTable instance.
 
Method Summary
 boolean equals(java.lang.Object other)
          Two AliasedDatabaseTable are considered equal if they represent the same table and have the same alias.
 java.lang.String getAlias()
          Gets the alias name.
 DatabaseTable getTable()
          Returns the DatabaseTable object corresponding to this database.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

table

private DatabaseTable table
Database table.


alias

private java.lang.String alias
Alias name or null if no alias is defined.

Constructor Detail

AliasedDatabaseTable

public AliasedDatabaseTable(DatabaseTable table,
                            java.lang.String alias)
Creates a new AliasedDatabaseTable instance.

Parameters:
table - a DatabaseTable value
alias - the alias name, null if no alias is defined
Method Detail

getTable

public DatabaseTable getTable()
Returns the DatabaseTable object corresponding to this database.

Returns:
a DatabaseTable value

getAlias

public java.lang.String getAlias()
Gets the alias name.

Returns:
the alias name. Returns null if no alias is set.

equals

public boolean equals(java.lang.Object other)
Two AliasedDatabaseTable are considered equal if they represent the same table and have the same alias.

Parameters:
other - the object to compare with
Returns:
true if the 2 objects are the same


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.