public class SQLTemplate
extends bboss.org.apache.velocity.runtime.resource.Resource
SQLTemplate.java
Description: sql语句模板
bboss workgroup
Copyright (c) 2009
| 构造器和说明 |
|---|
SQLTemplate(SQLInfo sqlinfo)
Default constructor
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.String |
evaluate(java.util.Map variablevalues) |
void |
initDocument()
initializes the document.
|
void |
merge(bboss.org.apache.velocity.context.Context context,
java.io.Writer writer)
The AST node structure is merged with the
context to produce the final output.
|
void |
merge(bboss.org.apache.velocity.context.Context context,
java.io.Writer writer,
java.util.List macroLibraries)
The AST node structure is merged with the
context to produce the final output.
|
boolean |
process()
gets the named resource as a stream, parses and inits
|
getData, getEncoding, getLastModified, getName, getResourceLoader, getType, isSourceModified, requiresChecking, setData, setEncoding, setLastModified, setModificationCheckInterval, setName, setResourceLoader, setRuntimeServices, setType, touchpublic SQLTemplate(SQLInfo sqlinfo)
public boolean process()
throws bboss.org.apache.velocity.exception.ResourceNotFoundException,
bboss.org.apache.velocity.exception.ParseErrorException
process 在类中 bboss.org.apache.velocity.runtime.resource.Resourcebboss.org.apache.velocity.exception.ResourceNotFoundException - if template not found
from any available source.bboss.org.apache.velocity.exception.ParseErrorException - if template cannot be parsed due
to syntax (or other) error.java.io.IOException - problem reading input streampublic void initDocument()
throws bboss.org.apache.velocity.exception.TemplateInitException
bboss.org.apache.velocity.exception.TemplateInitException - When a problem occurs during the document initialization.public void merge(bboss.org.apache.velocity.context.Context context,
java.io.Writer writer)
throws bboss.org.apache.velocity.exception.ResourceNotFoundException,
bboss.org.apache.velocity.exception.ParseErrorException,
bboss.org.apache.velocity.exception.MethodInvocationException
context - Conext with data elements accessed by templatewriter - output writer for rendered templatebboss.org.apache.velocity.exception.ResourceNotFoundException - if template not found
from any available source.bboss.org.apache.velocity.exception.ParseErrorException - if template cannot be parsed due
to syntax (or other) error.bboss.org.apache.velocity.exception.MethodInvocationException - When a method on a referenced object in the context could not invoked.public java.lang.String evaluate(java.util.Map variablevalues)
throws bboss.org.apache.velocity.exception.ResourceNotFoundException,
bboss.org.apache.velocity.exception.ParseErrorException,
bboss.org.apache.velocity.exception.MethodInvocationException
bboss.org.apache.velocity.exception.ResourceNotFoundExceptionbboss.org.apache.velocity.exception.ParseErrorExceptionbboss.org.apache.velocity.exception.MethodInvocationExceptionpublic void merge(bboss.org.apache.velocity.context.Context context,
java.io.Writer writer,
java.util.List macroLibraries)
throws bboss.org.apache.velocity.exception.ResourceNotFoundException,
bboss.org.apache.velocity.exception.ParseErrorException,
bboss.org.apache.velocity.exception.MethodInvocationException
context - Conext with data elements accessed by templatewriter - output writer for rendered templatemacroLibraries - a list of template files containing macros to be used when mergingbboss.org.apache.velocity.exception.ResourceNotFoundException - if template not found
from any available source.bboss.org.apache.velocity.exception.ParseErrorException - if template cannot be parsed due
to syntax (or other) error.bboss.org.apache.velocity.exception.MethodInvocationException - When a method on a referenced object in the context could not invoked.