org.inria.ns.reflex.modules.rdbms
Class SelectAction

java.lang.Object
  extended by org.inria.ns.reflex.processor.core.AbstractAction
      extended by org.inria.ns.reflex.processor.core.AbstractSetAction
          extended by org.inria.ns.reflex.modules.rdbms.QueryAction
              extended by org.inria.ns.reflex.modules.rdbms.SelectAction
All Implemented Interfaces:
Computable, Executable, Presentable, Unwrappable, NamespaceContextFactory

public class SelectAction
extends QueryAction

At runtime, the <rdbms:select> element perform a SQL SELECT statement.

<rdbms:select connection="{Expression}"
     query="SELECT EMPLOYEES WHERE ID = ?"
     name="result-set"
     xmlns:rdbms="http://ns.inria.org/active-tags/rdbms">
   <xcl:param value="{ $employee-id }"/>
 </rdbms:select>

Author:
Philippe Poulard

Nested Class Summary
 
Nested classes/interfaces inherited from class org.inria.ns.reflex.processor.core.AbstractAction
AbstractAction.ParameterAdapter, AbstractAction.UselessAction
 
Nested classes/interfaces inherited from interface org.inria.ns.reflex.structures.Unwrappable
Unwrappable.Unwrapper
 
Field Summary
 
Fields inherited from class org.inria.ns.reflex.processor.core.AbstractSetAction
NO_VALUE
 
Fields inherited from class org.inria.ns.reflex.processor.core.AbstractAction
actions, parent, processorInstance
 
Fields inherited from interface org.inria.ns.reflex.structures.Unwrappable
UNWRAPPER
 
Constructor Summary
SelectAction(Expression connection, String statement, Element element, AbstractAction parent)
          Create a new instance of SelectAction.
 
Method Summary
 Object runQuery(PreparedStatement statement)
          Run the query.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for SelectAction.
 
Methods inherited from class org.inria.ns.reflex.modules.rdbms.QueryAction
getComputedValue, getStatement, unwrap
 
Methods inherited from class org.inria.ns.reflex.processor.core.AbstractSetAction
addProperty, getComputedName, getName, getValue, runAction, scope, unmarshalScope
 
Methods inherited from class org.inria.ns.reflex.processor.core.AbstractAction
addAction, addFallbackAction, createContext, getCanonicalPath, getFallbackAction, getLocalFallbackAction, getLogger, getNamespaceContext, getNode, getParent, recover, recover, removeFallbackAction, reorganize, run, runActions, toPrettyString, toPrettyString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SelectAction

public SelectAction(Expression connection,
                    String statement,
                    Element element,
                    AbstractAction parent)
             throws XMLException
Create a new instance of SelectAction.

Parameters:
connection - The connection to use for execute this query, that will be the value of the property, as an Expression.
statement - The statement to perform.
node - The node from which the action has been unmarshalled. Used for namespace prefix resolution when performing XPath expressions.
parent - The action depending from.
Throws:
XMLException - When the action can't be created.
Method Detail

unmarshal

public static AbstractAction unmarshal(AbstractAction parent,
                                       Element element)
                                throws XMLException
XML unmarshaller for SelectAction.

Parameters:
parent - The action depending from.
e - The XML element to unmarshall.
Returns:
The DeleteAction created.
Throws:
XMLException - When the element and its content is not those expected.

runQuery

public Object runQuery(PreparedStatement statement)
                throws SQLException
Run the query.

Specified by:
runQuery in class QueryAction
Parameters:
statement - The statement to run. The parameters, if any, have already been set.
Returns:
An XResult.
Throws:
SQLException
See Also:
QueryAction.runQuery(java.sql.PreparedStatement), XComponent, XResult