| |
|
| java.lang.Object org.apache.derby.impl.sql.GenericActivationHolder
GenericActivationHolder | final class GenericActivationHolder implements Activation(Code) | | This class holds an Activation, and passes through most of the calls
to the activation. The purpose of this class is to allow a PreparedStatement
to be recompiled without the caller having to detect this and get a new
activation.
In addition to the Activation, this class holds a reference to the
PreparedStatement that created it, along with a reference to the
GeneratedClass that was associated with the PreparedStatement at the time
this holder was created. These references are used to validate the
Activation, to ensure that an activation is used only with the
PreparedStatement that created it, and to detect when recompilation has
happened.
We detect recompilation by checking whether the GeneratedClass has changed.
If it has, we try to let the caller continue to use this ActivationHolder.
We create a new instance of the new GeneratedClass (that is, we create a
new Activation), and we compare the number and type of parameters. If these
are compatible, we copy the parameters from the old to the new Activation.
If they are not compatible, we throw an exception telling the user that
the Activation is out of date, and they need to get a new one.
author: Jeff Lichtman |
checkIfThisActivationHasHoldCursor | public boolean checkIfThisActivationHasHoldCursor(String tableName)(Code) | | Temporary tables can be declared with ON COMMIT DELETE ROWS. But if the table has a held curosr open at
commit time, data should not be deleted from the table. This method, (gets called at commit time) checks if this
activation held cursor and if so, does that cursor reference the passed temp table name.
true if this activation has held cursor and if it references the passed temp table name |
clearParentResultSets | public void clearParentResultSets()(Code) | | |
getMaxDynamicResults | public int getMaxDynamicResults()(Code) | | |
getNumSubqueries | public int getNumSubqueries()(Code) | | Get the number of subqueries in the entire query.
int The number of subqueries in the entire query. |
isInUse | public boolean isInUse()(Code) | | Is the activation in use?
true/false |
markUnused | public void markUnused()(Code) | | Mark the activation as unused.
|
|
|
|