org.eobjects.metamodel.query
Class FromClause

java.lang.Object
  extended by org.eobjects.metamodel.util.BaseObject
      extended by org.eobjects.metamodel.query.AbstractQueryClause<FromItem>
          extended by org.eobjects.metamodel.query.FromClause
All Implemented Interfaces:
Serializable, QueryClause<FromItem>

public class FromClause
extends AbstractQueryClause<FromItem>

Represents the FROM clause of a query containing FromItem's.

See Also:
FromItem, Serialized Form

Field Summary
 
Fields inherited from class org.eobjects.metamodel.query.AbstractQueryClause
DELIM_AND, DELIM_COMMA, PREFIX_FROM, PREFIX_GROUP_BY, PREFIX_HAVING, PREFIX_ORDER_BY, PREFIX_SELECT, PREFIX_WHERE
 
Constructor Summary
FromClause(Query query)
           
 
Method Summary
 String getAlias(Table table)
          Gets the alias of a table, if it is registered (and visible, ie. not part of a sub-query) in the FromClause
 FromItem getItemByReference(String reference)
          Retrieves a table by it's reference which may be it's alias or it's qualified table name.
 
Methods inherited from class org.eobjects.metamodel.query.AbstractQueryClause
addItem, addItem, addItems, addItems, decorateIdentity, getItem, getItemCount, getItems, isEmpty, removeItem, removeItem, removeItems, setItems, toSql, toSql, toString
 
Methods inherited from class org.eobjects.metamodel.util.BaseObject
classEquals, equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FromClause

public FromClause(Query query)
Method Detail

getAlias

public String getAlias(Table table)
Gets the alias of a table, if it is registered (and visible, ie. not part of a sub-query) in the FromClause

Parameters:
table - the table to get the alias for
Returns:
the alias or null if none is found

getItemByReference

public FromItem getItemByReference(String reference)
Retrieves a table by it's reference which may be it's alias or it's qualified table name. Typically, this method is used to resolve a SelectItem with a reference like "foo.bar", where "foo" may either be an alias or a table name

Parameters:
reference -
Returns:
a FromItem which matches the provided reference string


Copyright © 2007-2013. All Rights Reserved.