org.objectweb.medor.query.rdb.lib
Class BasicRdbQueryLeaf

java.lang.Object
  extended byBasicCloneable
      extended byorg.objectweb.medor.lib.BasicTupleStructure
          extended byorg.objectweb.medor.query.lib.BasicQueryTree
              extended byorg.objectweb.medor.query.rdb.lib.BasicRdbQueryLeaf
All Implemented Interfaces:
AnnotationsHolder, Cloneable, java.lang.Cloneable, QueryLeaf, QueryTree, RdbQueryLeaf, java.io.Serializable, TupleStructure
Direct Known Subclasses:
BasicRdbExpQueryLeaf, BasicRdbStringQueryLeaf

public abstract class BasicRdbQueryLeaf
extends BasicQueryTree
implements RdbQueryLeaf

Author:
S.Chassande-Barrioz
See Also:
Serialized Form

Field Summary
protected  DataStore ds
           
protected  boolean isSubquery
           
protected  java.lang.String query
           
protected  Expression sqlFilter
           
 
Fields inherited from class org.objectweb.medor.query.lib.BasicQueryTree
annotations, distinct, indexes, name, orderfields
 
Fields inherited from class org.objectweb.medor.lib.BasicTupleStructure
fields, logger, name2field
 
Constructor Summary
BasicRdbQueryLeaf()
           
BasicRdbQueryLeaf(java.lang.String _name, DataStore ds)
           
BasicRdbQueryLeaf(java.lang.String _name, DataStore ds, java.lang.String query)
           
 
Method Summary
 java.lang.Object clone(java.lang.Object clone, java.util.Map obj2clone)
           
 DataStore getDataStore()
           
 boolean isSubquery()
          Is the current query leaf a subquery (in particular for the case of aggregates).
 void setDataStore(DataStore ds)
           
 void setIsSubquery(boolean subquery)
          Indicates whether the current RdbExpQueryLeaf is a subquery of another Rdb query leaf (in particular in the case of subqueries).
 
Methods inherited from class org.objectweb.medor.query.lib.BasicQueryTree
getAnnotations, getDistinct, getName, getOrderBy, getTupleStructure, setDistinct, setOrderBy
 
Methods inherited from class org.objectweb.medor.lib.BasicTupleStructure
contains, contains, getField, getField, getFieldRank, getFields, getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.medor.query.rdb.api.RdbQueryLeaf
getSelectList, getSqlRequest, getSqlRequest
 
Methods inherited from interface org.objectweb.medor.query.api.QueryTree
getDistinct, getName, getOrderBy, getTupleStructure, setDistinct, setOrderBy
 
Methods inherited from interface org.objectweb.medor.query.api.AnnotationsHolder
getAnnotations
 
Methods inherited from interface org.objectweb.medor.api.Cloneable
clone
 

Field Detail

isSubquery

protected boolean isSubquery

sqlFilter

protected Expression sqlFilter

query

protected java.lang.String query

ds

protected DataStore ds
Constructor Detail

BasicRdbQueryLeaf

public BasicRdbQueryLeaf()

BasicRdbQueryLeaf

public BasicRdbQueryLeaf(java.lang.String _name,
                         DataStore ds)

BasicRdbQueryLeaf

public BasicRdbQueryLeaf(java.lang.String _name,
                         DataStore ds,
                         java.lang.String query)
Method Detail

clone

public java.lang.Object clone(java.lang.Object clone,
                              java.util.Map obj2clone)
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class BasicQueryTree
Throws:
java.lang.CloneNotSupportedException

isSubquery

public boolean isSubquery()
Description copied from interface: RdbQueryLeaf
Is the current query leaf a subquery (in particular for the case of aggregates).

Specified by:
isSubquery in interface RdbQueryLeaf
Returns:
true if the current RdbExpQueryLeaf is a subquery

setIsSubquery

public void setIsSubquery(boolean subquery)
Description copied from interface: RdbQueryLeaf
Indicates whether the current RdbExpQueryLeaf is a subquery of another Rdb query leaf (in particular in the case of subqueries).

The default value is false.

Specified by:
setIsSubquery in interface RdbQueryLeaf
Parameters:
subquery - is true when the current RdbExpQueryLeaf is a subquery of another Rdb query leaf/node, false otherwise.

getDataStore

public DataStore getDataStore()
Specified by:
getDataStore in interface QueryLeaf

setDataStore

public void setDataStore(DataStore ds)