org.opencms.db
Class CmsSimpleQueryFragment

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

public class CmsSimpleQueryFragment
extends Object
implements I_CmsQueryFragment

A simple query fragment which takes its SQL string and query parameters as constructor arguments.

Since:
8.0.0

Constructor Summary
CmsSimpleQueryFragment(String fragment, List<Object> params)
          Creates a new instance.
CmsSimpleQueryFragment(String fragment, Object... params)
          Creates a new instance.
 
Method Summary
 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

CmsSimpleQueryFragment

public CmsSimpleQueryFragment(String fragment,
                              List<Object> params)
Creates a new instance.

Parameters:
fragment - the SQL fragment
params - the query parameters

CmsSimpleQueryFragment

public CmsSimpleQueryFragment(String fragment,
                              Object... params)
Creates a new instance.

Parameters:
fragment - the SQL fragment
params - the query parameters
Method Detail

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)