org.exolab.castor.jdo.drivers

Class HsqlQueryExpression.HsqlAliasInfo

final class HsqlQueryExpression.HsqlAliasInfo extends 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
StringgetAliasFor(String table, Join join)
Get the alias for the given table and join
HashtablegetAliasHash(String table)
Get the hash of aliases for the given table
StringgetAnAliasFor(String table)
Return any alias for the given table
EnumerationgetTables()
Return a list of the tables involved in more than one outer join and they need an alias
booleantableExists(String table)
Check if the given table is involved in more thatn one oter join

Constructor Detail

HsqlAliasInfo

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

Method Detail

getAliasFor

public String getAliasFor(String table, 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: name a not null table name

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