rum.repository

class rum.repository.Repository(resource, factory, parent=None, remote_name=None, parent_id=None)

A base repository.

Handles all access to the data backend.

It also implemenents the IDataManager interface so it can participate in a transaction.

abort(transaction)

See IDataManager.

commit(transaction)

See IDataManager.

get_id(obj)

Returns a string representing the id for this object. This expression should always be True:

repository.get(repository.get_id(obj)) == obj
sortKey()

See IDataManager.

split_id(id)

Returns a tuple with the components of an id

tpc_abort(transaction)

See IDataManager.

tpc_begin(transaction)

See IDataManager.

tpc_finish(transaction)

See IDataManager.

tpc_vote(transaction)

See IDataManager.

rum.repository.names_for_resource(self, resource)

Return (singular, plural) names for resource.

RepositoryFactory

class rum.repository.RepositoryFactory(scan_modules=[], models=[], field_factory=None)
__call__(resource, parent=None, remote_name=None, action=None, parent_id=None)
get(resource, parent=None, remote_name=None, action=None, args=None)

Returns a class implementing rum.interfaces.IRepository.

names_for_resource(resource)

Return (singular, plural) names for resource.

register_from(obj)

Registers resources it finds and knows how to handle in obj-

classmethod set_names(obj, singular, plural)

Registers the singular and plural names for obj and its instances.

Repository

class rum.repository.Repository(resource, factory, parent=None, remote_name=None, parent_id=None)

A base repository.

Handles all access to the data backend.

It also implemenents the IDataManager interface so it can participate in a transaction.

abort(transaction)

See IDataManager.

commit(transaction)

See IDataManager.

get_id(obj)

Returns a string representing the id for this object. This expression should always be True:

repository.get(repository.get_id(obj)) == obj
sortKey()

See IDataManager.

split_id(id)

Returns a tuple with the components of an id

tpc_abort(transaction)

See IDataManager.

tpc_begin(transaction)

See IDataManager.

tpc_finish(transaction)

See IDataManager.

tpc_vote(transaction)

See IDataManager.

Table Of Contents

Previous topic

rum.controller

Next topic

rum.query

This Page