2.17.2: 2011-06-17

net.sf.basedb.info
Class QueryParameter

java.lang.Object
  extended by net.sf.basedb.info.QueryParameter

public class QueryParameter
extends Object

Hold information about a single parameter to a query. A parameter is represented by a colon-prefixed name in a query string, for example: name = :name. This class maps the parameter to an actual value.

Version:
2.5
Author:
nicklas
Last modified
$Date: 2008-09-11 22:05:50 +0200 (Thu, 11 Sep 2008) $

Field Summary
private  String name
           
private  String type
           
private  String value
           
 
Constructor Summary
QueryParameter()
          Create a new empty query parameter.
QueryParameter(String name, Float value)
          Useful constructor to create a parmeter where the value is a float.
QueryParameter(String name, Integer value)
          Useful constructor to create a parmeter where the value is an integer.
QueryParameter(String name, String value)
          Useful constructor to create a parmeter where the value is a string.
QueryParameter(String name, String type, String value)
          Create a new query parameter.
 
Method Summary
 String getName()
          Get the parameter name.
 String getType()
          Get the parameter type.
 String getValue()
          Set the parameter value.
 void setName(String name)
          Set the parameter name.
 void setType(String type)
          Set the parameter type.
 void setValue(String value)
          Set the parameter name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private String name

type

private String type

value

private String value
Constructor Detail

QueryParameter

public QueryParameter()
Create a new empty query parameter.


QueryParameter

public QueryParameter(String name,
                      String type,
                      String value)
Create a new query parameter.

Parameters:
name - The name of the parameter
type - The type of the parameter, as taken from the Type enumeration
value - The value of the parameter

QueryParameter

public QueryParameter(String name,
                      Integer value)
Useful constructor to create a parmeter where the value is an integer.

Parameters:
name - The name of the parameter
value - The value of the parameter

QueryParameter

public QueryParameter(String name,
                      Float value)
Useful constructor to create a parmeter where the value is a float.

Parameters:
name - The name of the parameter
value - The value of the parameter

QueryParameter

public QueryParameter(String name,
                      String value)
Useful constructor to create a parmeter where the value is a string.

Parameters:
name - The name of the parameter
value - The value of the parameter
Method Detail

getName

public String getName()
Get the parameter name.


setName

public void setName(String name)
Set the parameter name.


getType

public String getType()
Get the parameter type.

See Also:
Type

setType

public void setType(String type)
Set the parameter type.

See Also:
Type

getValue

public String getValue()
Set the parameter value.


setValue

public void setValue(String value)
Set the parameter name.


2.17.2: 2011-06-17