org.exolab.castor.jdo.drivers
Class HsqlQueryExpression.HsqlAliasInfo

java.lang.Object
  extended byorg.exolab.castor.jdo.drivers.HsqlQueryExpression.HsqlAliasInfo
Enclosing class:
HsqlQueryExpression

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
HsqlQueryExpression.HsqlAliasInfo(java.util.Vector joins)
          Public constructor.
 
Method Summary
 java.lang.String getAliasFor(java.lang.String table, JDBCQueryExpression.Join join)
          Get the alias for the given table and join
 java.util.Hashtable getAliasHash(java.lang.String table)
          Get the hash of aliases for the given table
 java.lang.String getAnAliasFor(java.lang.String table)
          Return any alias for the given table
 java.util.Enumeration getTables()
          Return a list of the tables involved in more than one outer join and they need an alias
 boolean tableExists(java.lang.String table)
          Check if the given table is involved in more thatn one oter join
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HsqlQueryExpression.HsqlAliasInfo

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

Method Detail

getTables

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


tableExists

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


getAnAliasFor

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

Parameters:
table - 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

getAliasFor

public java.lang.String getAliasFor(java.lang.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 java.util.Hashtable getAliasHash(java.lang.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


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