|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.uwyn.rife.database.queries.ReadQueryTemplate
public class ReadQueryTemplate
An instance of ReadQueryTemplate will obtain a SQL from a
Template block. If the template is provided but no block name,
the entire content of the template will be used as the SQL query.
This allows you to write your custom SQL queries in dedicated templates,
to name them, and to use them together with the functionalities that are
provided by DbQueryManager
| Constructor Summary | |
|---|---|
ReadQueryTemplate()
Creates a new empty instance of ReadQueryTemplate. |
|
ReadQueryTemplate(Template template)
Creates a new instance of ReadQueryTemplate with the
template instance whose content provides the SQL query that will be
executed. |
|
ReadQueryTemplate(Template template,
String block)
Creates a new instance of ReadQueryTemplate with the
template instance and block name that provide the SQL that will
be executed. |
|
| Method Summary | |
|---|---|
ReadQueryTemplate |
block(String block)
Sets the name of the template block. |
void |
clear()
|
String |
getBlock()
Retrieves the name of the template block. |
com.uwyn.rife.database.capabilities.Capabilities |
getCapabilities()
|
QueryParameters |
getParameters()
|
String |
getSql()
|
Template |
getTemplate()
Retrieves the template instance. |
void |
setBlock(String block)
Sets the name of the template block. |
void |
setExcludeUnsupportedCapabilities(boolean flag)
|
void |
setTemplate(Template template)
Sets the template instance. |
ReadQueryTemplate |
template(Template template)
Sets the template instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReadQueryTemplate()
ReadQueryTemplate.
public ReadQueryTemplate(Template template)
ReadQueryTemplate with the
template instance whose content provides the SQL query that will be
executed.
template - the template instance
public ReadQueryTemplate(Template template,
String block)
ReadQueryTemplate with the
template instance and block name that provide the SQL that will
be executed.
template - the template instanceblock - the name of the template block| Method Detail |
|---|
public ReadQueryTemplate template(Template template)
template - the template instance
ReadQueryTemplate instance.setTemplate(com.uwyn.rife.template.Template),
getTemplate()public void setTemplate(Template template)
template - the template instancetemplate(com.uwyn.rife.template.Template),
getTemplate()public Template getTemplate()
null if no template instance was provided
template(com.uwyn.rife.template.Template),
setTemplate(com.uwyn.rife.template.Template)public ReadQueryTemplate block(String block)
block - the name of the template block
ReadQueryTemplate instance.setBlock(java.lang.String),
getBlock()public void setBlock(String block)
block - the name of the template blockblock(java.lang.String),
getBlock()public String getBlock()
null if no block name was provided
block(java.lang.String),
setBlock(java.lang.String)public void clear()
clear in interface Querypublic String getSql()
getSql in interface Querypublic QueryParameters getParameters()
getParameters in interface Querypublic com.uwyn.rife.database.capabilities.Capabilities getCapabilities()
getCapabilities in interface Querypublic void setExcludeUnsupportedCapabilities(boolean flag)
setExcludeUnsupportedCapabilities in interface Query
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||