BEA Systems, Inc.


com.bea.ldi.server.common
Class QueryParameters

java.lang.Object
  |
  +--com.bea.ldi.server.common.QueryParameters

public class QueryParameters
extends java.lang.Object
implements java.io.Serializable

This class provides place for storing query execution parameters. The list of currently supported object types has as follows:

See Also:
Serialized Form

Constructor Summary
QueryParameters()
          Creates new instance with no parameters
QueryParameters(java.util.Map parameters)
          Creates new instance and copies parameters from specified map.
QueryParameters(QueryParameters queryParameters)
          Creates new instance and copies parameters from specified queryParameters
 
Method Summary
 java.util.Map getParameters()
           
 void setBoolean(java.lang.String parameterName, boolean value)
          Sets the designated parameter to a boolean value
 void setByte(java.lang.String parameterName, byte value)
          Sets the designated parameter to a byte value
 void setCalendar(java.lang.String parameterName, java.util.Calendar value)
          Deprecated. Use setDateTime(String, Calendar) instead.
 void setDate(java.lang.String parameterName, java.sql.Date value)
          Sets the designated parameter to a java.sql.Date value
 void setDateTime(java.lang.String parameterName, java.util.Calendar value)
          Sets the designated parameter to a java.util.Calendar value
 void setDateTime(java.lang.String parameterName, java.sql.Timestamp value)
          Sets the designated parameter to a java.sql.Timestamp value
 void setDecimal(java.lang.String parameterName, java.math.BigDecimal value)
          Sets the designated parameter to a java.math.BigDecimal value
 void setDouble(java.lang.String parameterName, double value)
          Sets the designated parameter to a double value
 void setFloat(java.lang.String parameterName, float value)
          Sets the designated parameter to a float value
 void setInt(java.lang.String parameterName, int value)
          Sets the designated parameter to an integer value
 void setInteger(java.lang.String parameterName, java.math.BigInteger value)
          Sets the designated parameter to an java.math.BigInteger value
 void setLong(java.lang.String parameterName, long value)
          Sets the designated parameter to a long value
 void setObject(java.lang.String parameterName, java.lang.Object value)
          Sets the designated parameter to an object instance The object type should be one of the supported parameter types.
 void setShort(java.lang.String parameterName, short value)
          Sets the designated parameter to a short value
 void setString(java.lang.String parameterName, java.lang.String value)
          Sets the designated parameter to a string value
 void setTime(java.lang.String parameterName, java.sql.Time value)
          Sets the designated parameter to a java.sql.Time value
 void setTimestamp(java.lang.String parameterName, java.sql.Timestamp value)
          Deprecated. Use setDateTime(String, Timestamp) instead.
 void setXMLData(java.lang.String parameterName, java.lang.String value)
          Sets the designated complex parameter to an XML element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryParameters

public QueryParameters()
Creates new instance with no parameters

QueryParameters

public QueryParameters(QueryParameters queryParameters)
Creates new instance and copies parameters from specified queryParameters

Parameters:
queryParameters - The query parameters to be copied to the new instance

QueryParameters

public QueryParameters(java.util.Map parameters)
Creates new instance and copies parameters from specified map. The map should contain mappings of parameter names to values of supported parameter types.

Parameters:
parameters - The parameters to be copied to the new instance
Throws:
java.lang.IllegalArgumentException - if a name or value in the map is invalid.
Method Detail

setBoolean

public void setBoolean(java.lang.String parameterName,
                       boolean value)
Sets the designated parameter to a boolean value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name is null.

setByte

public void setByte(java.lang.String parameterName,
                    byte value)
Sets the designated parameter to a byte value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name is null.

setCalendar

public void setCalendar(java.lang.String parameterName,
                        java.util.Calendar value)
Deprecated. Use setDateTime(String, Calendar) instead.
Sets the designated parameter to a java.util.Calendar value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name or value is null.

setDate

public void setDate(java.lang.String parameterName,
                    java.sql.Date value)
Sets the designated parameter to a java.sql.Date value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name is null.

setDateTime

public void setDateTime(java.lang.String parameterName,
                        java.util.Calendar value)
Sets the designated parameter to a java.util.Calendar value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name or value is null.

setDateTime

public void setDateTime(java.lang.String parameterName,
                        java.sql.Timestamp value)
Sets the designated parameter to a java.sql.Timestamp value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name is null.

setDecimal

public void setDecimal(java.lang.String parameterName,
                       java.math.BigDecimal value)
Sets the designated parameter to a java.math.BigDecimal value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name or the value is null.

setDouble

public void setDouble(java.lang.String parameterName,
                      double value)
Sets the designated parameter to a double value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name is null.

setFloat

public void setFloat(java.lang.String parameterName,
                     float value)
Sets the designated parameter to a float value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name is null.

setInt

public void setInt(java.lang.String parameterName,
                   int value)
Sets the designated parameter to an integer value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name is null.

setInteger

public void setInteger(java.lang.String parameterName,
                       java.math.BigInteger value)
Sets the designated parameter to an java.math.BigInteger value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name or the value is null.

setLong

public void setLong(java.lang.String parameterName,
                    long value)
Sets the designated parameter to a long value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name is null.

setShort

public void setShort(java.lang.String parameterName,
                     short value)
Sets the designated parameter to a short value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name is null.

setString

public void setString(java.lang.String parameterName,
                      java.lang.String value)
Sets the designated parameter to a string value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name or value is null.

setTime

public void setTime(java.lang.String parameterName,
                    java.sql.Time value)
Sets the designated parameter to a java.sql.Time value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name or value is null.

setTimestamp

public void setTimestamp(java.lang.String parameterName,
                         java.sql.Timestamp value)
Deprecated. Use setDateTime(String, Timestamp) instead.
Sets the designated parameter to a java.sql.Timestamp value

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name or value is null.

setObject

public void setObject(java.lang.String parameterName,
                      java.lang.Object value)
Sets the designated parameter to an object instance The object type should be one of the supported parameter types.

Parameters:
parameterName - is the name of the parameter to set
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name is null or value is of invalid type.

setXMLData

public void setXMLData(java.lang.String parameterName,
                       java.lang.String value)
Sets the designated complex parameter to an XML element.

Parameters:
parameterName - the name of the parameter to set
value - a string containing the XML representation of the XML element serving as the parameter value
Throws:
java.lang.IllegalArgumentException - if the parameter name is null or value is of invalid type.

getParameters

public java.util.Map getParameters()

Returns:
The parameters as a map

BEA Systems, Inc.

Documentation is available at
http://download.oracle.com/docs/cd/E13190_01/liquiddata/docs81