org.opencms.db
Class CmsCompositeQueryFragment

java.lang.Object
  extended by org.opencms.db.CmsCompositeQueryFragment
All Implemented Interfaces:
I_CmsQueryFragment

public class CmsCompositeQueryFragment
extends Object
implements I_CmsQueryFragment

A query fragment which aggregates the results from a list of other query fragments.

Since:
8.0.0

Constructor Summary
CmsCompositeQueryFragment()
           
 
Method Summary
 void add(I_CmsQueryFragment node)
          Adds a new query fragment.
 List<I_CmsQueryFragment> getNodes()
          Returns the wrapped query fragments.
 void setPrefix(String prefix)
          Sets the prefix string (will be inserted before the other fragments).
 void setSeparator(String separator)
          Sets the separator which should be inserted between the constituent query fragments.
 void setSuffix(String suffix)
          Sets the suffix string (will be inserted after the other fragments).
 void visit(CmsStatementBuilder builder)
          Generates the SQL and parameters and sends them to the statement builder .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsCompositeQueryFragment

public CmsCompositeQueryFragment()
Method Detail

add

public void add(I_CmsQueryFragment node)
Adds a new query fragment.

Parameters:
node - the query fragment

getNodes

public List<I_CmsQueryFragment> getNodes()
Returns the wrapped query fragments.

Returns:
a list of query fragments

setPrefix

public void setPrefix(String prefix)
Sets the prefix string (will be inserted before the other fragments).

Parameters:
prefix - the prefix string

setSeparator

public void setSeparator(String separator)
Sets the separator which should be inserted between the constituent query fragments.

Parameters:
separator - the separator string

setSuffix

public void setSuffix(String suffix)
Sets the suffix string (will be inserted after the other fragments).

Parameters:
suffix - the suffix string

visit

public void visit(CmsStatementBuilder builder)
Description copied from interface: I_CmsQueryFragment
Generates the SQL and parameters and sends them to the statement builder .

Specified by:
visit in interface I_CmsQueryFragment
Parameters:
builder - the statement builder
See Also:
I_CmsQueryFragment.visit(org.opencms.db.CmsStatementBuilder)