|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectBasicCloneable
org.objectweb.medor.lib.BasicTupleStructure
org.objectweb.medor.query.lib.BasicQueryTree
org.objectweb.medor.query.lib.BasicQueryNode
A BasicQueryNode is an implementation of QueryNode. It also implements QueryIndexGenerator and RWTupleStructure (it is its own TupleStructure).
Field Summary | |
---|---|
protected java.util.ArrayList |
children
|
protected Expression |
filter
|
protected int[] |
indexes
Contains ranges of attribute to be projected from the tuple resulting of the concatenation of the tuples from the children QueryTrees. |
protected java.util.HashSet |
inner
|
protected TupleLoader |
tupleLoader
|
Fields inherited from class org.objectweb.medor.query.lib.BasicQueryTree |
---|
annotations, distinct, name, orderfields |
Fields inherited from class org.objectweb.medor.lib.BasicTupleStructure |
---|
fields, logger, name2field |
Constructor Summary | |
---|---|
BasicQueryNode()
|
|
BasicQueryNode(java.lang.String name)
|
Method Summary | |
---|---|
CalculatedField |
addCalculatedField(java.lang.String name,
PType type,
Expression exp)
Creates and adds a CalculatedField to the TupleStructure of the QueryNode. |
protected void |
addChild(QueryTree qt)
|
protected void |
addField(Field f)
Adds a Field to the current RWTupleStructure |
PropagatedField |
addPropagatedField(java.lang.String name,
PType type,
QueryTreeField[] anc)
Creates and adds a PropagatedField to the TupleStructure of the QueryNode. |
java.lang.Object |
clone(java.lang.Object clone,
java.util.Map obj2clone)
|
QueryTree[] |
getChildren()
It retreives the array of the QueryTree used by this QueryNode. |
protected java.lang.String |
getFieldName(java.lang.String nodeName,
java.lang.String fieldName)
|
Expression |
getQueryFilter()
Retrieves the filter associated to the QueryTree. |
TupleLoader |
getTupleLoader()
Returns the TupleLoader currently associated with this QueryNode. |
abstract short |
getType()
It retrieves the operation type of the current QueryNode. |
boolean |
isOuter(QueryTree child)
Indicates whether a row of nulls should be inserted for the given child if the filter condition fails for all rows in that child. |
QueryTreeField |
removeField(java.lang.String name)
Removes a Field. |
QueryTreeField |
replace(QueryTreeField old,
QueryTreeField neo)
|
void |
setOuter(QueryTree child,
boolean value)
|
void |
setQueryFilter(Expression filter)
The setQueryFilter method will be overwritten for implementations which do not support the operation. |
void |
setTupleLoader(TupleLoader loader)
Associates a TupleLoader with this QueryNode. |
void |
updateCalculatedField(java.lang.String name,
Expression e)
|
protected void |
updateChildren()
Updates the list of children by screening all Fields and the query filter. |
void |
updatePropagatedField(java.lang.String name,
QueryTreeField[] previous)
|
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.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 |
protected java.util.ArrayList children
protected java.util.HashSet inner
protected TupleLoader tupleLoader
protected Expression filter
protected int[] indexes
Constructor Detail |
public BasicQueryNode()
public BasicQueryNode(java.lang.String name)
Method Detail |
public java.lang.Object clone(java.lang.Object clone, java.util.Map obj2clone) throws java.lang.CloneNotSupportedException
clone
in class BasicQueryTree
java.lang.CloneNotSupportedException
public PropagatedField addPropagatedField(java.lang.String name, PType type, QueryTreeField[] anc) throws MedorException
addPropagatedField
in interface QueryNode
name
- is the name of the Field to be added.type
- is the PType of the Field to be added.anc
- are the origin Fields for the PropagatedField to be created.
MedorException
- when a Field with the same name already exists.public CalculatedField addCalculatedField(java.lang.String name, PType type, Expression exp) throws MedorException
addCalculatedField
in interface QueryNode
name
- is the name of the Field to be added.type
- is the PType of the Field to be added.exp
- is the Expression for calculating the new Field.
MedorException
- when a Field with the same name already exists.public QueryTreeField removeField(java.lang.String name) throws MedorException
removeField
in interface QueryNode
name
- is the name of the Field to be removed.
MedorException
- when no Field with such name exist.public QueryTree[] getChildren()
QueryNode
getChildren
in interface QueryNode
public boolean isOuter(QueryTree child)
QueryNode
isOuter
in interface QueryNode
public void setOuter(QueryTree child, boolean value)
setOuter
in interface QueryNode
public QueryTreeField replace(QueryTreeField old, QueryTreeField neo)
replace
in interface QueryNode
public void setQueryFilter(Expression filter) throws java.lang.UnsupportedOperationException
setQueryFilter
in interface FilteredQueryTree
filter
- is the Expression representing the query filter of the current
QueryNode.
java.lang.UnsupportedOperationException
- when it is not supported
(for Union, Intersection, Cartesian, Projection).Expression
public Expression getQueryFilter()
FilteredQueryTree
getQueryFilter
in interface FilteredQueryTree
Expression
public abstract short getType()
QueryNode
getType
in interface QueryNode
public TupleLoader getTupleLoader()
QueryNode
getTupleLoader
in interface QueryNode
public void setTupleLoader(TupleLoader loader)
QueryNode
setTupleLoader
in interface QueryNode
public void updatePropagatedField(java.lang.String name, QueryTreeField[] previous) throws MedorException
updatePropagatedField
in interface QueryNode
MedorException
public void updateCalculatedField(java.lang.String name, Expression e) throws MedorException
updateCalculatedField
in interface QueryNode
MedorException
protected void addField(Field f)
f
- The Field to be added.protected void updateChildren()
protected java.lang.String getFieldName(java.lang.String nodeName, java.lang.String fieldName)
protected void addChild(QueryTree qt)
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |