com.ail.core.persistence
Class QueryCommand

java.lang.Object
  extended by com.ail.core.Type
      extended by com.ail.core.command.AbstractCommand
          extended by com.ail.core.command.Command
              extended by com.ail.core.persistence.QueryCommand
All Implemented Interfaces:
CommandArg, QueryArg, java.io.Serializable, java.lang.Cloneable

public class QueryCommand
extends Command
implements QueryArg

Version:
$Revision: 1.3 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ail.core.Type
jXPathContext, NOT_PERSISTED
 
Constructor Summary
QueryCommand()
           
 
Method Summary
 CommandArg getArgs()
          Get the argument set associated with this command.
 java.lang.Object[] getQueryArgumentsArg()
          Getter for the list of arument values referenced in the query
 java.lang.String getQueryNameArg()
          Getter for the query property.
 java.util.List<?> getResultsListRet()
          Getter returning the results of the query
 Type getUniqueResultRet()
          Gets the unique result - assuming there was only one object returned.
 void setArgs(CommandArg arg)
          Update this Command object's arguments with those taken from the command arg passed in.
 void setQueryArgumentsArg(java.lang.Object... queryArgumentsArg)
          Setter for the list of argument values referenced in the query.
 void setQueryNameArg(java.lang.String queryName)
          Setter for the query string property.
 void setResultsListRet(java.util.List<java.lang.Object> resultsListRet)
          Setter for the list of query results
 void setUniqueResultRet(Type type)
          Set the unique result.
 
Methods inherited from class com.ail.core.command.Command
clone, getAccessor, getCallersCore, getConfiguration, getVersion, invoke, setAccessor, setCallersCore, setConfiguration, setService
 
Methods inherited from class com.ail.core.Type
addAttribute, deleteLock, deleteSerialVersion, fetchJXPathContext, getAttribute, getAttribute, getAttributeCount, getForeignSystemId, getLock, getSerialVersion, getSystemId, hasLock, hasSerialVersion, hasSystemId, isPersisted, markAsNotPersisted, mergeWithDataFrom, removeAttribute, removeAttribute, setAttribute, setForeignSystemId, setLock, setSerialVersion, setSystemId, xpathGet, xpathGet, xpathIterate, xpathSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ail.core.command.CommandArg
getCallersCore, setCallersCore
 

Constructor Detail

QueryCommand

public QueryCommand()
Method Detail

setArgs

public void setArgs(CommandArg arg)
Description copied from class: AbstractCommand
Update this Command object's arguments with those taken from the command arg passed in. This is in effect a bulk setter. This interface will be implemented by beans that have many more getters/setters to support their properties. The implementations of this method take 'that', and pull all the relevant properties into this.

Specified by:
setArgs in class AbstractCommand
Parameters:
arg - Source for arguments

getArgs

public CommandArg getArgs()
Description copied from class: AbstractCommand
Get the argument set associated with this command.

Specified by:
getArgs in class AbstractCommand
Returns:
This objects arguments.

setQueryArgumentsArg

public void setQueryArgumentsArg(java.lang.Object... queryArgumentsArg)
Description copied from interface: QueryArg
Setter for the list of argument values referenced in the query.

Specified by:
setQueryArgumentsArg in interface QueryArg
See Also:
QueryArg.getQueryArgumentsArg()

getQueryArgumentsArg

public java.lang.Object[] getQueryArgumentsArg()
Description copied from interface: QueryArg
Getter for the list of arument values referenced in the query

Specified by:
getQueryArgumentsArg in interface QueryArg
Returns:
List of argument objects

setQueryNameArg

public void setQueryNameArg(java.lang.String queryName)
Description copied from interface: QueryArg
Setter for the query string property.

Specified by:
setQueryNameArg in interface QueryArg
See Also:
#getQuery

getQueryNameArg

public java.lang.String getQueryNameArg()
Description copied from interface: QueryArg
Getter for the query property.

Specified by:
getQueryNameArg in interface QueryArg
Returns:
Value of query

getResultsListRet

public java.util.List<?> getResultsListRet()
Description copied from interface: QueryArg
Getter returning the results of the query

Specified by:
getResultsListRet in interface QueryArg
Returns:
list of results from the query

setResultsListRet

public void setResultsListRet(java.util.List<java.lang.Object> resultsListRet)
Description copied from interface: QueryArg
Setter for the list of query results

Specified by:
setResultsListRet in interface QueryArg
Parameters:
resultsListRet - List of results

getUniqueResultRet

public Type getUniqueResultRet()
Description copied from interface: QueryArg
Gets the unique result - assuming there was only one object returned. This is an alternative to getResultsList.

Specified by:
getUniqueResultRet in interface QueryArg
Returns:
Result of the query

setUniqueResultRet

public void setUniqueResultRet(Type type)
Description copied from interface: QueryArg
Set the unique result.

Specified by:
setUniqueResultRet in interface QueryArg
Parameters:
type - Result
See Also:
QueryArg.getUniqueResultRet()