org.castor.cpa.persistence.sql.query
Class Qualifier

java.lang.Object
  extended by org.castor.cpa.persistence.sql.query.Qualifier
All Implemented Interfaces:
QueryObject
Direct Known Subclasses:
Table, TableAlias

public abstract class Qualifier
extends java.lang.Object
implements QueryObject

Abstract base class for all qualifiers.

Version:
$Revision: 8994 $ $Date: 2011-08-02 01:40:59 +0200 (Di, 02 Aug 2011) $
Author:
Ahmad Hassan, Ralf Joachim

Constructor Summary
protected Qualifier(java.lang.String name)
          Construct a qualifier with given name.
 
Method Summary
 void addFullJoin(Qualifier join)
          Method providing possibility to add full join.
 void addFullJoin(Qualifier join, Condition cond)
          Method providing possibility to add full join with a specific condition.
 void addInnerJoin(Qualifier join)
          Method providing possibility to add inner join.
 void addInnerJoin(Qualifier join, Condition cond)
          Method providing possibility to add inner join with a specific condition.
 void addJoin(Join join)
          Method providing possibility to add passed join.
 void addLeftJoin(Qualifier join)
          Method providing possibility to add left join.
 void addLeftJoin(Qualifier join, Condition cond)
          Method providing possibility to add left join with a specific condition.
 void addRightJoin(Qualifier join)
          Method providing possibility to add right join.
 void addRightJoin(Qualifier join, Condition cond)
          Method providing possibility to add right join with a specific condition.
 Column column(java.lang.String name)
          Builder method to create a column with given name belonging to this qualifier.
 java.util.List<Join> getJoins()
          Returns list of joins currently set.
 boolean hasJoin()
          Method to check if joins exist for this qualifier.
 java.lang.String name()
          Returns name of the qualifier.
 java.lang.String toString()
          Method constructing query string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.castor.cpa.persistence.sql.query.QueryObject
accept
 

Constructor Detail

Qualifier

protected Qualifier(java.lang.String name)
Construct a qualifier with given name.

Parameters:
name - Name of the qualifier.
Method Detail

name

public final java.lang.String name()
Returns name of the qualifier.

Returns:
Name of the qualifier.

getJoins

public final java.util.List<Join> getJoins()
Returns list of joins currently set.

Returns:
List of joins currently set.

column

public final Column column(java.lang.String name)
Builder method to create a column with given name belonging to this qualifier.

Parameters:
name - Name of the column.
Returns:
Column belonging to this qualifier.

addInnerJoin

public final void addInnerJoin(Qualifier join)
Method providing possibility to add inner join.

Parameters:
join - Qualifier to construct and add join for.

addInnerJoin

public final void addInnerJoin(Qualifier join,
                               Condition cond)
Method providing possibility to add inner join with a specific condition.

Parameters:
join - Qualifier to construct and add join for.
cond - Condition to be used for the join.

addLeftJoin

public final void addLeftJoin(Qualifier join)
Method providing possibility to add left join.

Parameters:
join - Qualifier to construct and add join for.

addLeftJoin

public final void addLeftJoin(Qualifier join,
                              Condition cond)
Method providing possibility to add left join with a specific condition.

Parameters:
join - Qualifier to construct and add join for.
cond - Condition to be used for the join.

addRightJoin

public final void addRightJoin(Qualifier join)
Method providing possibility to add right join.

Parameters:
join - Qualifier to construct and add join for.

addRightJoin

public final void addRightJoin(Qualifier join,
                               Condition cond)
Method providing possibility to add right join with a specific condition.

Parameters:
join - Qualifier to construct and add join for.
cond - Condition to be used for the join.

addFullJoin

public final void addFullJoin(Qualifier join)
Method providing possibility to add full join.

Parameters:
join - Qualifier to construct and add join for.

addFullJoin

public final void addFullJoin(Qualifier join,
                              Condition cond)
Method providing possibility to add full join with a specific condition.

Parameters:
join - Qualifier to construct and add join for.
cond - Condition to be used for the join.

addJoin

public final void addJoin(Join join)
Method providing possibility to add passed join.

Parameters:
join - Join to be added.

hasJoin

public final boolean hasJoin()
Method to check if joins exist for this qualifier.

Returns:
True: List of joins is not empty. False: List of joins is empty.

toString

public final java.lang.String toString()
Method constructing query string.

Overrides:
toString in class java.lang.Object
Returns:
Constructed query string.


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