|
WebObjects 5.2.3 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
EOAdaptorChannel invokes its delegate for nearly every operation that would affect data in the database server. The delegate can use these methods to preempt these operations, modify their results, or simply track activity.
| Method Summary | |
void |
adaptorChannelDidChangeResultSet(EOAdaptorChannel channel)
Invoked from fetchRow when a select operation
resulted in multiple result sets. |
void |
adaptorChannelDidEvaluateExpression(EOAdaptorChannel channel,
EOSQLExpression expression)
Invoked from evaluateExpression to tell the
delegate that a query language expression has been evaluated by
the database server. |
void |
adaptorChannelDidExecuteStoredProcedure(EOAdaptorChannel channel,
EOStoredProcedure storedProcedure,
NSDictionary values)
Invoked from executeStoredProcedure after
storedProcedure is executed successfully
with the arguments in values. |
void |
adaptorChannelDidFetchRow(EOAdaptorChannel channel,
NSMutableDictionary row)
Invoked from fetchRow after a row is fetched
successfully. |
void |
adaptorChannelDidFinishFetching(EOAdaptorChannel channel)
Invoked from fetchRow to tell the delegate that
fetching is finished for the current select operation. |
Throwable |
adaptorChannelDidPerformOperations(EOAdaptorChannel channel,
NSArray operations,
Throwable exception)
Invoked from performAdaptorOperations. |
void |
adaptorChannelDidSelectAttributes(EOAdaptorChannel channel,
NSArray attributes,
EOFetchSpecification fetchSpec,
boolean lock,
EOEntity entity)
Invoked from selectAttributes to tell the delegate
that some rows have been selected in the database server. |
NSDictionary |
adaptorChannelShouldConstructStoredProcedureReturnValues(EOAdaptorChannel channel)
Invoked from returnValuesForLastStoredProcedureInvocation to
tell the delegate that object is constructing
return values for the last stored procedure evaluated. |
boolean |
adaptorChannelShouldEvaluateExpression(EOAdaptorChannel channel,
EOSQLExpression expression)
Invoked from evaluateExpression to tell the
delegate that the adaptor channel object is sending
expression to the database server. |
NSDictionary |
adaptorChannelShouldExecuteStoredProcedure(EOAdaptorChannel channel,
EOStoredProcedure storedProcedure,
NSDictionary values)
Invoked from executeStoredProcedure to tell the
delegate that the adaptor channel object is
executing storedProcedure with the arguments in
values. |
NSDictionary |
adaptorChannelShouldReturnValuesForStoredProcedure(EOAdaptorChannel channel,
NSDictionary values)
Invoked from returnValuesForLastStoredProcedureInvocation to
tell the delegate that object is returning values
for a stored procedure. |
boolean |
adaptorChannelShouldSelectAttributes(EOAdaptorChannel channel,
NSArray attributes,
EOFetchSpecification fetchSpec,
boolean lock,
EOEntity entity)
Invoked from selectAttributes to ask the delegate
whether a select operation should be performed by the adaptor
channel object for the attributes of
entity using the fetch specification
fetchSpec, locking the database rows or not
according to the Boolean parameter lock. |
void |
adaptorChannelWillFetchRow(EOAdaptorChannel channel)
Invoked from fetchRow to tell the delegate that a
single row will be fetched. |
NSArray |
adaptorChannelWillPerformOperations(EOAdaptorChannel channel,
NSArray operations)
Invoked from performAdaptorOperations to tell the
delegate that object is performing the
EOAdaptorOperations in operations. |
| Method Detail |
public void adaptorChannelDidChangeResultSet(EOAdaptorChannel channel)
fetchRow when a select operation
resulted in multiple result sets. This method tells the delegate
that the next invocation of fetchRow will fetch
from the next result set. This method is invoked when
fetchRow returns null and there are
still result sets left to fetch. The delegate can invoke
setAttributesToFetch to prepare for fetching the
new rows.
channel - An adaptor channel object.EOAdaptorChannel.fetchRow(),
EOAdaptorChannel.setAttributesToFetch(NSArray attributes)
public void adaptorChannelDidEvaluateExpression(EOAdaptorChannel channel,
EOSQLExpression expression)
evaluateExpression to tell the
delegate that a query language expression has been evaluated by
the database server.
channel - An adaptor channel object.expression - A query language expression.EOAdaptorChannel.evaluateExpression(EOSQLExpression expression),
EOSQLExpression
public void adaptorChannelDidExecuteStoredProcedure(EOAdaptorChannel channel,
EOStoredProcedure storedProcedure,
NSDictionary values)
executeStoredProcedure after
storedProcedure is executed successfully
with the arguments in values.
channel - An adaptor channel object.storedProcedure - The stored procedure that has been
executed.values - The arguments used to execute
storedProcedure.EOAdaptorChannel.executeStoredProcedure(
EOStoredProcedure storedProcedure,
NSDictionary values),
EOStoredProcedure
public void adaptorChannelDidFetchRow(EOAdaptorChannel channel,
NSMutableDictionary row)
fetchRow after a row is fetched
successfully. This method is not invoked if an exception occurs
during the fetch or if fetchRow returns
null because there are no more rows in the current
result set. The delegate may modify row, which will
be returned from fetchRow.
channel - An adaptor channel object.row - The row fetched.EOAdaptorChannel.fetchRow()public void adaptorChannelDidFinishFetching(EOAdaptorChannel channel)
fetchRow to tell the delegate that
fetching is finished for the current select operation. This
method is invoked when a fetch ends in fetchRow
because there are no more result sets.
channel - An adaptor channel object.EOAdaptorChannel.fetchRow()
public Throwable adaptorChannelDidPerformOperations(EOAdaptorChannel channel,
NSArray operations,
Throwable exception)
performAdaptorOperations. The
exception parameter is null if no
exception was thrown while operations were
performed, otherwise, exception is the thrown
exception. The delegate can return the same or a different
exception, which is re-thrown by
performAdaptorOperation. Or it can return
null to prevent the adaptor channel from throwing
an exception.
channel - An adaptor channel object.operations - An array containing the adaptor operations
being executed when this method was invoked.exception - The exception that was thrown during
performAdaptorOperations, or
null if no exception was thrown.
exception, or a
different exception, or null.EOAdaptorChannel.performAdaptorOperations(NSArray adaptorOps)
public void adaptorChannelDidSelectAttributes(EOAdaptorChannel channel,
NSArray attributes,
EOFetchSpecification fetchSpec,
boolean lock,
EOEntity entity)
selectAttributes to tell the delegate
that some rows have been selected in the database server. The
delegate may take whatever action it needs based on this
information.
channel - An adaptor channel object.attributes - An array of the attributes selected based on fetchSpec.fetchSpec - Describes the row(s) to be selected.lock - true if the rows are locked.entity - The entity corresponding to the row(s) to be selected.EOAdaptorChannel.selectAttributes(NSArray attributes,
EOFetchSpecification fetchSpecification,
boolean flag, EOEntity entity),
EOEntity,
EOFetchSpecificationpublic NSDictionary adaptorChannelShouldConstructStoredProcedureReturnValues(EOAdaptorChannel channel)
returnValuesForLastStoredProcedureInvocation to
tell the delegate that object is constructing
return values for the last stored procedure evaluated. If the
delegate returns a value other than null,
returnValuesForLastStoredProcedureInvocation will
return that value immediately rather than constructing a return
value from the execution of the stored procedure.
channel - An adaptor channel object.
null if the adaptor channel should
construct return values from the last executed
stored procedure, or an alternative return value.EOAdaptorChannel.returnValuesForLastStoredProcedureInvocation()
public boolean adaptorChannelShouldEvaluateExpression(EOAdaptorChannel channel,
EOSQLExpression expression)
evaluateExpression to tell the
delegate that the adaptor channel object is sending
expression to the database server. The delegate
should return true to permit the adaptor channel to
send expression to the server. If the delegate
returns false, the adaptor channel does not send
the expression and returns immediately. When the delegate
returns false, the adaptor channel expects that the
implementor of the delegate has done the work that
evaluateExpression would have done. The delegate
can create a new EOSQLExpression and send the expression itself
before returning false.
channel - An adaptor channel object.expression - The expression to be sent to the database
server.
true to permits the adaptor
channel to send expression to the
database server.EOAdaptorChannel.evaluateExpression(EOSQLExpression
expression),
EOSQLExpression
public NSDictionary adaptorChannelShouldExecuteStoredProcedure(EOAdaptorChannel channel,
EOStoredProcedure storedProcedure,
NSDictionary values)
executeStoredProcedure to tell the
delegate that the adaptor channel object is
executing storedProcedure with the arguments in
values. The delegate can return a different
dictionary of arguments to pass to the stored procedure, or
null to permit the adaptor channel to use the
original values.
channel - An adaptor channel object.storedProcedure - A stored procedure.values - The original arguments to be passed to
storedProcedure.
storedProcedure
or null to use the original
values.EOAdaptorChannel.executeStoredProcedure(EOStoredProcedure
storedProcedure, NSDictionary values),
EOStoredProcedure
public NSDictionary adaptorChannelShouldReturnValuesForStoredProcedure(EOAdaptorChannel channel,
NSDictionary values)
returnValuesForLastStoredProcedureInvocation to
tell the delegate that object is returning values
for a stored procedure. If the delegate returns a value other
than null, that value is returned from
returnValuesForLastStoredProcedureInvocation
instead of values.
channel - An adaptor channel object.values - The values returned by the channel for a stored
procedure.
null if the adaptor channel should
return the values from the last executed stored
procedure, oa dictionary of alternate return
values.EOAdaptorChannel.returnValuesForLastStoredProcedureInvocation()
public boolean adaptorChannelShouldSelectAttributes(EOAdaptorChannel channel,
NSArray attributes,
EOFetchSpecification fetchSpec,
boolean lock,
EOEntity entity)
selectAttributes to ask the delegate
whether a select operation should be performed by the adaptor
channel object for the attributes of
entity using the fetch specification
fetchSpec, locking the database rows or not
according to the Boolean parameter lock. If the
delegate wants to perform a different select it should invoke
selectAttributes itself with a new fetch
specification, and return false (indicating
that the adaptor channel should not perform the select itself).
The delegate should not modify fetchSpec but
rather should create a new fetch specification if needed.
channel - An adaptor channel object.attributes - An array of the attributes to fetch.fetchSpec - Describes the row(s) to be fetched.lock - If true, the rows are locked
during the fetch.entity - The entity corresponding to the row(s) to be
fetched.
true to enable the adaptor
channel to perform the specified fetch,
false if the delegate will
perform its own fetch.
returns false.EOAdaptorChannel.selectAttributes(NSArray attributes,
EOFetchSpecification fetchSpecification,
boolean flag, EOEntity entity),
EOEntity,
EOFetchSpecificationpublic void adaptorChannelWillFetchRow(EOAdaptorChannel channel)
fetchRow to tell the delegate that a
single row will be fetched. The delegate can determine the
attributes used by the fetch by sending
attributesToFetch to object, and can
change the set of attributes to fetch by sending
setAttributesToFetch to object.
The adaptor channel performs the actual fetch.
channel - An adaptor channel object.EOAdaptorChannel.fetchRow(),
EOAdaptorChannel.attributesToFetch(),
EOAdaptorChannel.setAttributesToFetch(NSArray attributes)
public NSArray adaptorChannelWillPerformOperations(EOAdaptorChannel channel,
NSArray operations)
performAdaptorOperations to tell the
delegate that object is performing the
EOAdaptorOperations in operations. The delegate may
return operations or a different NSArray for the
adaptor channel to perform. If the delegate returns
null, the adaptor channel does not perform the
operations and returns from the method immediately.
channel - An adaptor channel object.operations - An array of adaptor operations.
null.EOAdaptorChannel.performAdaptorOperations(NSArray adaptorOps)
|
Last updated Thu Oct 21 15:04:16 PDT 2004. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||