Home | Trees | Index | Help |
|
---|
Package Modeling :: Package interfaces :: Module AdaptorChannel :: Class IAdaptorChannel |
|
Base
--+
|
IAdaptorChannel
Method Summary | |
---|---|
__init__(self,
anAdaptorContext)
| |
adaptorContext(self)
| |
addStoredProceduresNamed(self,
storedProcedureNames,
aModel)
| |
attributesToFetch(self)
| |
cancelFetch(self)
| |
Implemented by concrete AdaptorChannels to close the channel. | |
delegate(self)
| |
Calls 'deleteRowsDescribedByQualifier()' on itself and make sure that one and only one row was deleted. | |
Implemented by subclasses to delete the rows identified by the parameters. | |
describeModelWithTableNames(self,
tableNames)
| |
describeResults(self)
| |
describeStoredProcedureNames(self)
| |
describeTableNames(self)
| |
dictionaryWithObjectsForAttributes(self,
objects,
attributes)
| |
Extract the SQL statement from 'anSQLexpression' and sends it to the database for execution. | |
executeStoredProcedure(self,
aStoredProcedure,
values)
| |
When there is no more result, this method should return 'None' and do whatever is necessary to make sure that 'isFetchInProgress()' returns false. | |
insertRow(self,
row,
anEntity)
| |
isFetchInProgress(self)
| |
abstract | |
lockRowComparingAttributes(self,
atts,
anEntity,
aQualifier,
snapshot)
| |
Implemented by subclasses to make sure that the Adaptor Layer (mainly, AdaptorChannel and its context) has a working connection/channel to the Database. | |
Examines 'anAdaptorOperation' and executes the corresponding method. | |
Iterates on each item in 'adaptorOperations' and calls 'performAdaptorOperation()' with that item as a parameter. | |
Implemented by subclasses to return a list of dictionaries, whose keys are PK attributes' names and values the corresponding PK value. | |
returnValuesForLastStoredProcedureInvocation(self)
| |
Implemented by concrete adaptors to return the number of rows that would be fetched if selectAttributes() is called with the same arguments. | |
Implemented by concrete AdaptorChannels to select... | |
setAttributesToFetch(self,
attributes)
| |
setDelegate(self,
aDelegate)
| |
Calls 'updateValuesInRowsDescribedByQualifier' on itself and make sure that one and only one row was updated. | |
Implemented by subclasses to update the rows identified by the parameters. |
Method Details |
---|
closeChannel(self)Implemented by concrete AdaptorChannels to close the channel. Implementation should follow the following recommendations regarding this method's side-effects:
abstract |
deleteRowDescribedByQualifier(self, aQualifier, anEntity)Calls 'deleteRowsDescribedByQualifier()' on itself and make sure that one and only one row was deleted. If the returned value from 'deleteRowsDescribedByQualifier()' is not one, it raises GeneralAdaptorException. Subclasses should not override this method. Parameters: see deleteRowsDescribedByQualifier() |
deleteRowsDescribedByQualifier(self, aQualifier, anEntity)Implemented by subclasses to delete the rows identified by the parameters. This method returns the number of rows deleted. Parameters:
See also: deleteRowDescribedByQualifier(), performAdaptorOperation() |
evaluateExpression(self, anSQLexpression)Extract the SQL statement from 'anSQLexpression' and sends it to the database for execution. If its AdaptorContext did not have an opened transaction when this method is called, it should automatically start a new transaction which is ended before the method returns. Note that this method is not used at all by the framework itself, thus subclasses have no obligation to implement it. Parameter: anSQLexpression -- the SQLExpression object to execute See also: SQLExpression.statement(), AdaptorContext.hasOpenTransaction() |
fetchRow(self)When there is no more result, this method should return 'None' and do whatever is necessary to make sure that 'isFetchInProgress()' returns false. |
isOpen(self)abstract |
openChannel(self)Implemented by subclasses to make sure that the Adaptor Layer (mainly, AdaptorChannel and its context) has a working connection/channel to the Database. This method should silently returns if everything was already set. Raises if the communication channel cannot be opened ; reasons for this to happen can be (non exhaustively):
abstract |
performAdaptorOperation(self, anAdaptorOperation)Examines 'anAdaptorOperation' and executes the corresponding method. Given that 'operator' is anAdaptorOperation.operator(), and that constants used below (such as 'ADAPTOR_INSERT_OPERATOR') are defined in class DatabaseOperation, this is how things work:
AdaptorChannel provide a default implementation for this method, and subclasses should not override this method. Raises GeneralAdaptorException in case of failure Parameter: adaptorOperation -- the AdaptorOperation to execute See also: performAdaptorOperations(), DatabaseOperation |
performAdaptorOperations(self, adaptorOperations)Iterates on each item in 'adaptorOperations' and calls 'performAdaptorOperation()' with that item as a parameter. AdaptorChannel provide a default implementation for this method, and subclasses should not override this method. Parameter: adaptorOperations -- a sequence of AdaptorOperation objects |
primaryKeysForNewRowsWithEntity(self, count, anEntity)Implemented by subclasses to return a list of dictionaries, whose keys are PK attributes' names and values the corresponding PK value. Since the framework does not handle compound primary keys, it should return an empty list if 'anEntity' defines more than one PK.
|
rowCountForSelectAttributes(self, attributes, aFetchSpecification, shouldLock, anEntity)Implemented by concrete adaptors to return the number of rows that would be fetched if selectAttributes() is called with the same arguments. Parameters: see selectAttributes() |
selectAttributes(self, attributes, aFetchSpecification, shouldLock, anEntity)Implemented by concrete AdaptorChannels to select... Parameters:
abstract |
updateValuesInRowDescribedByQualifier(self, row, aQualifier, anEntity)Calls 'updateValuesInRowsDescribedByQualifier' on itself and make sure that one and only one row was updated. If the returned value from 'updateValuesInRowsDescribedByQualifier' is not exactly one, it raises GeneralAdaptorException. Subclasses should not override this method. Parameters: see updateValuesInRowsDescribedByQualifier |
updateValuesInRowsDescribedByQualifier(self, row, aQualifier, anEntity)Implemented by subclasses to update the rows identified by the parameters. This method returns the number of updated rows. Parameters:
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 4 13:36:20 2006 | http://epydoc.sf.net |