com.j256.ormlite.stmt
Class SelectArg

java.lang.Object
  extended by com.j256.ormlite.stmt.BaseSelectArg
      extended by com.j256.ormlite.stmt.SelectArg
All Implemented Interfaces:
ArgumentHolder

public class SelectArg
extends BaseSelectArg
implements ArgumentHolder

An argument to a select SQL statement. After the query is constructed, the caller can set the value on this argument and run the query. Then the argument can be set again and the query re-executed. This is equivalent in SQL to a ? argument.

NOTE: If the argument has not been set by the time the query is executed, an exception will be thrown.

NOTE: For protections sake, the object cannot be reused with different column names.

Author:
graywatson

Constructor Summary
SelectArg()
           
 
Method Summary
protected  Object getValue()
          Return the stored value.
protected  boolean isValueSet()
          Return true if the value is set.
 void setValue(Object value)
          Store the value.
 
Methods inherited from class com.j256.ormlite.stmt.BaseSelectArg
getColumnName, getFieldType, getSqlArgValue, setMetaInfo, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.j256.ormlite.stmt.ArgumentHolder
getColumnName, getFieldType, getSqlArgValue, setMetaInfo
 

Constructor Detail

SelectArg

public SelectArg()
Method Detail

getValue

protected Object getValue()
Description copied from class: BaseSelectArg
Return the stored value.

Specified by:
getValue in class BaseSelectArg

setValue

public void setValue(Object value)
Description copied from class: BaseSelectArg
Store the value.

Specified by:
setValue in interface ArgumentHolder
Specified by:
setValue in class BaseSelectArg

isValueSet

protected boolean isValueSet()
Description copied from class: BaseSelectArg
Return true if the value is set.

Specified by:
isValueSet in class BaseSelectArg


Copyright © 2011. All Rights Reserved.