Package org.opencms.db
Class CmsCompositeQueryFragment
- java.lang.Object
-
- org.opencms.db.CmsCompositeQueryFragment
-
- All Implemented Interfaces:
I_CmsQueryFragment
public class CmsCompositeQueryFragment extends java.lang.Object implements I_CmsQueryFragment
A query fragment which aggregates the results from a list of other query fragments.- Since:
- 8.0.0
-
-
Constructor Summary
Constructors Constructor Description CmsCompositeQueryFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(I_CmsQueryFragment node)
Adds a new query fragment.java.util.List<I_CmsQueryFragment>
getNodes()
Returns the wrapped query fragments.void
setPrefix(java.lang.String prefix)
Sets the prefix string (will be inserted before the other fragments).void
setSeparator(java.lang.String separator)
Sets the separator which should be inserted between the constituent query fragments.void
setSuffix(java.lang.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 .
-
-
-
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 java.util.List<I_CmsQueryFragment> getNodes()
Returns the wrapped query fragments.- Returns:
- a list of query fragments
-
setPrefix
public void setPrefix(java.lang.String prefix)
Sets the prefix string (will be inserted before the other fragments).- Parameters:
prefix
- the prefix string
-
setSeparator
public void setSeparator(java.lang.String separator)
Sets the separator which should be inserted between the constituent query fragments.- Parameters:
separator
- the separator string
-
setSuffix
public void setSuffix(java.lang.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 interfaceI_CmsQueryFragment
- Parameters:
builder
- the statement builder- See Also:
I_CmsQueryFragment.visit(org.opencms.db.CmsStatementBuilder)
-
-