|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.lib.util.ParameterTemplate
public class ParameterTemplate
A template that allows parameter substitutions. Parameters should be
placed in the template in the form ${param-name}. Use the
setParameter(java.lang.String, java.lang.Object)
method to set the parameter values, which will be
substituted into the template on calls to write(java.io.OutputStream)
and
toString()
. If a parameter is encountered that hasn't been set, then
the parameter key is used to lookup the corresponding System property.
Constructor Summary | |
---|---|
ParameterTemplate()
|
Method Summary | |
---|---|
ParameterTemplate |
append(boolean value)
Add the given value to the internal template. |
ParameterTemplate |
append(char value)
Add the given value to the internal template. |
ParameterTemplate |
append(double value)
Add the given value to the internal template. |
ParameterTemplate |
append(File file)
Add the given value to the internal template. |
ParameterTemplate |
append(float value)
Add the given value to the internal template. |
ParameterTemplate |
append(InputStream in)
Add the given value to the internal template. |
ParameterTemplate |
append(int value)
Add the given value to the internal template. |
ParameterTemplate |
append(long value)
Add the given value to the internal template. |
ParameterTemplate |
append(Object value)
Add the given value to the internal template. |
ParameterTemplate |
append(Reader reader)
Add the given value to the internal template. |
ParameterTemplate |
append(short value)
Add the given value to the internal template. |
ParameterTemplate |
append(String value)
Add the given value to the internal template. |
void |
clearParameters()
Clear the recorded parameter values. |
Object |
getParameter(String name)
Return the value set for the given parameter. |
boolean |
hasParameter(String name)
Return true if the given parameter has been given a value. |
Object |
setParameter(String name,
Object val)
Set the value for the given parameter. |
void |
setParameters(Map params)
Set the values for all the parameters in the given map. |
String |
toString()
Return a copy of the internal value template with all parameters substituted with their current values. |
void |
write(File file)
Write the internal value template with all parameters substituted with their current values. |
void |
write(OutputStream out)
Write the internal value template with all parameters substituted with their current values. |
void |
write(Writer writer)
Write the internal value template with all parameters substituted with their current values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ParameterTemplate()
Method Detail |
---|
public ParameterTemplate append(String value)
public ParameterTemplate append(boolean value)
public ParameterTemplate append(char value)
public ParameterTemplate append(double value)
public ParameterTemplate append(float value)
public ParameterTemplate append(int value)
public ParameterTemplate append(long value)
public ParameterTemplate append(short value)
public ParameterTemplate append(Object value)
public ParameterTemplate append(InputStream in) throws IOException
IOException
public ParameterTemplate append(Reader reader) throws IOException
IOException
public ParameterTemplate append(File file) throws IOException
IOException
public boolean hasParameter(String name)
public Object getParameter(String name)
public Object setParameter(String name, Object val)
public void setParameters(Map params)
public void clearParameters()
public String toString()
toString
in class Object
public void write(OutputStream out) throws IOException
IOException
public void write(Writer writer) throws IOException
IOException
public void write(File file) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |