Home | Trees | Index | Help |
|
---|
Package Modeling :: Module DatabaseChannel :: Class DatabaseChannel |
|
The DatabaseChannel's reponsability is to fetch objects on behalf of a DatabaseContext.
It uses an concrete AdaptorChannel to perform the fetch, it then builds DatabaseObject from the fetched rows, and returns those objects to the requesting DatabaseContext --the DatabaseContext uses 'fetchObject()' to get each object after another.
Note about inheritance: the DatabaseChannel does not care about inheritance. When it gets a request/FetchSpecification for a given entity it fetches rows from the database table 'entity.externalName()' and from this one only, whatever the 'isDeep' flag of the FetchSpecification is. It is the DatabaseContext responsability to correctly drive the DatabaseChannel (see DatabaseContext.objectsWithFetchSpecification())
Method Summary | |
---|---|
Initializes a new DatabaseChannel and registers it with 'aDatabaseContext'. | |
Returns the underlying concrete AdaptorChannel. | |
Closes the underlying AdaptorChannel, cancels the pending fetch, and resets/flushes all internal state. | |
Returns the DatabaseContext which pilots the DatabaseChannel. | |
fetchesRawRows(self)
| |
channel.fetchRow | |
isFetchInProgress(self)
| |
Tells whether the fetched objects should be locked or not. | |
Tells whether the fetched objects should be refreshed or not. | |
Returns the number of rows that would be retrieved if the method selectObjectsWithFetchSpecification() was called with the same parameter. | |
The method follows the following steps: | |
This is automatically called by selectObjectsWithFetchSpecification() | |
This is automatically called by selectObjectsWithFetchSpecification(), according to the settings of the FetchSpecification the latter method got. | |
This is automatically called by selectObjectsWithFetchSpecification(), according to the settings of the FetchSpecification the latter method got. | |
This is automatically called by selectObjectsWithFetchSpecification(), according to the settings of the FetchSpecification the latter method got. | |
This is automatically called by selectObjectsWithFetchSpecification(), according to the settings of the FetchSpecification the latter method got. |
Method Details |
---|
__init__(self,
aDatabaseContext)
|
adaptorChannel(self)Returns the underlying concrete AdaptorChannel. |
cancelFetch(self)Closes the underlying AdaptorChannel, cancels the pending fetch, and resets/flushes all internal state. |
databaseContext(self)Returns the DatabaseContext which pilots the DatabaseChannel. |
fetchObject(self)
Posts ObjectsChangedInStoreNotification (updated) if isRefreshingObjects If no more object is to be fetched, it resets the DatabaseChannel and returns None. Note that if the object fetched is already registered within the Database, its snapshots is not refreshed, and it is substituted to the fetched row (unless the fetch isRefreshingObjects)
|
isLocking(self)Tells whether the fetched objects should be locked or not. If the DatabaseChannel has no fetch in progress, it returns false.
|
isRefreshingObjects(self)Tells whether the fetched objects should be refreshed or not. See also:
|
selectCountObjectsWithFetchSpecification(self, aFetchSpecification, anEditingContext=None)Returns the number of rows that would be retrieved if the method selectObjectsWithFetchSpecification() was called with the same parameter. Parameters:
|
selectObjectsWithFetchSpecification(self, aFetchSpecification, anEditingContext)The method follows the following steps:
Fetched objects can be then retrieved one after the other by calling the method fetchObject(). Inheritance and 'isDeep' flaf of aFetchSpecification: Note that aFetchSpecification's entity is the real destination entity for the fetched objects, not one of its superclasses. Inheritance is handled at a higher level, i.e. in DatabaseContext.objectsWithFetchSpecification(). The 'isDeep' flag is completely ignored.
|
setCurrentEditingContext(self, anEditingContext)This is automatically called by selectObjectsWithFetchSpecification() |
setCurrentEntity(self, anEntity)This is automatically called by selectObjectsWithFetchSpecification(), according to the settings of the FetchSpecification the latter method got. |
setFetchesRawRow(self, aBool)This is automatically called by selectObjectsWithFetchSpecification(), according to the settings of the FetchSpecification the latter method got. |
setIsLocking(self, isLocking)This is automatically called by selectObjectsWithFetchSpecification(), according to the settings of the FetchSpecification the latter method got. |
setIsRefreshingObjects(self, isRefreshingObjects)This is automatically called by selectObjectsWithFetchSpecification(), according to the settings of the FetchSpecification the latter method got. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 4 13:36:27 2006 | http://epydoc.sf.net |