org.objectweb.telosys.dal.dao
Class StandardQuery

java.lang.Object
  extended byorg.objectweb.telosys.dal.dao.StandardQuery
All Implemented Interfaces:
ListQuery

public class StandardQuery
extends java.lang.Object
implements ListQuery

Standard implementation of ListQuery


Constructor Summary
StandardQuery(int iKeySize, java.lang.String sSqlSelectData, java.lang.String sSqlSelectCount, java.lang.String sSqlDelete)
          Constructor for a standard LIST QUERY object
 
Method Summary
 int getParamCount()
          Returns the number of parameters for the query
 java.lang.Object getParameter(int iIndex)
          Get the value of a parameter
 java.lang.String getParametersString()
          Return the query parameters as a String
 java.lang.String getSqlCount()
          Return the SQL request "select count(*) from ..."
 java.lang.String getSqlDelete()
          Return the SQL request "delete from ..."
 java.lang.String getSqlSelect()
          Return the SQL request "select ... from ..."
 void setParameter(int iIndex, int iValue)
          Set the value of a parameter
 void setParameter(int iIndex, long lValue)
          Set the value of a parameter
 void setParameter(int iIndex, java.lang.Object oValue)
          Set the value of a parameter
 void setParameter(int iIndex, short shValue)
          Set the value of a parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardQuery

public StandardQuery(int iKeySize,
                     java.lang.String sSqlSelectData,
                     java.lang.String sSqlSelectCount,
                     java.lang.String sSqlDelete)
Constructor for a standard LIST QUERY object

Parameters:
iKeySize -
sSqlSelectData -
sSqlSelectCount -
sSqlDelete -
Method Detail

getParamCount

public int getParamCount()
Description copied from interface: ListQuery
Returns the number of parameters for the query

Specified by:
getParamCount in interface ListQuery
Returns:

getParametersString

public java.lang.String getParametersString()
Description copied from interface: ListQuery
Return the query parameters as a String

Specified by:
getParametersString in interface ListQuery
Returns:

getSqlSelect

public java.lang.String getSqlSelect()
Description copied from interface: ListQuery
Return the SQL request "select ... from ..."

Specified by:
getSqlSelect in interface ListQuery
Returns:

getSqlDelete

public java.lang.String getSqlDelete()
Description copied from interface: ListQuery
Return the SQL request "delete from ..."

Specified by:
getSqlDelete in interface ListQuery
Returns:

getSqlCount

public java.lang.String getSqlCount()
Description copied from interface: ListQuery
Return the SQL request "select count(*) from ..."

Specified by:
getSqlCount in interface ListQuery
Returns:

setParameter

public void setParameter(int iIndex,
                         java.lang.Object oValue)
Description copied from interface: ListQuery
Set the value of a parameter

Specified by:
setParameter in interface ListQuery
Parameters:
iIndex - index of the parameter to set ( 1 to N )
oValue - value of the parameter

setParameter

public void setParameter(int iIndex,
                         short shValue)
Description copied from interface: ListQuery
Set the value of a parameter

Specified by:
setParameter in interface ListQuery
Parameters:
iIndex - index of the parameter to set ( 1 to N )
shValue - value of the parameter

setParameter

public void setParameter(int iIndex,
                         int iValue)
Description copied from interface: ListQuery
Set the value of a parameter

Specified by:
setParameter in interface ListQuery
Parameters:
iIndex - index of the parameter to set ( 1 to N )
iValue - value of the parameter

setParameter

public void setParameter(int iIndex,
                         long lValue)
Description copied from interface: ListQuery
Set the value of a parameter

Specified by:
setParameter in interface ListQuery
Parameters:
iIndex - index of the parameter to set ( 1 to N )
lValue - value of the parameter

getParameter

public java.lang.Object getParameter(int iIndex)
Description copied from interface: ListQuery
Get the value of a parameter

Specified by:
getParameter in interface ListQuery
Parameters:
iIndex - index of the parameter ( 1 to N )
Returns:
the value