org.exolab.castor.jdo.drivers

Class HsqlQueryExpression.HsqlAliasInfo

Enclosing Class:
HsqlQueryExpression

(package private) final class HsqlQueryExpression.HsqlAliasInfo
extends java.lang.Object

This class encapsulates the information of the aliases related to sql outer joins. This class is defined as inner to easily see the Join class. A further refactoring should make this class a top-level class

Constructor Summary

HsqlAliasInfo(Vector joins)
Public constructor.

Method Summary

String
getAliasFor(String table, JDBCQueryExpression.Join join)
Get the alias for the given table and join
Hashtable
getAliasHash(String table)
Get the hash of aliases for the given table
String
getAnAliasFor(String table)
Return any alias for the given table
Enumeration
getTables()
Return a list of the tables involved in more than one outer join and they need an alias
boolean
tableExists(String table)
Check if the given table is involved in more thatn one oter join

Constructor Details

HsqlAliasInfo

public HsqlAliasInfo(Vector joins)
Public constructor. This builds an alias info class from the joins participating in a query

Method Details

getAliasFor

public String getAliasFor(String table,
                          JDBCQueryExpression.Join join)
Get the alias for the given table and join

Parameters:
table - a not null table name that may participate in more than one outer join
join - a not null join name in which the given table participates given table

Returns:
the alias for the input table and join; or null if the table has no aliases because it does not participate in more than one outer join


getAliasHash

public Hashtable getAliasHash(String table)
Get the hash of aliases for the given table

Returns:
a Hashtable instance which keys are the join objects and the values are the alias names for the given table. If the table has no aliases it returns null


getAnAliasFor

public String getAnAliasFor(String table)
Return any alias for the given table

Parameters:

Returns:
an alias for the input table; or null if the table has no aliases because it does not participate in more than one outer join


getTables

public Enumeration getTables()
Return a list of the tables involved in more than one outer join and they need an alias


tableExists

public boolean tableExists(String table)
Check if the given table is involved in more thatn one oter join


Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com