GNDMS 0.6.0
RESTful verison of GNDMS
Public Member Functions | Package Functions

de.zib.gndms.model.common.repository.Dao< K, M, D > Interface Reference

Inheritance diagram for de.zib.gndms.model.common.repository.Dao< K, M, D >:
de.zib.gndms.model.common.repository.QueuedDao< K, M, D > de.zib.gndms.model.common.repository.TransientDao< K, M, D > de.zib.gndms.model.common.repository.QueuedTransientDao< K, M, D >

List of all members.

Public Member Functions

create (D descriptor)
 Creates a fresh instance of M matching descriptor.
void add (M model, K key)
 Addes a model to the dao.
get (K key) throws NoSuchElementException
 Used to retrive an model object form the dao.
void deleteByKey (K key)
 Deletes a model matching the given key.
void delete (M model)
 Deletes model from the repo.

Package Functions

create ()
 Creates a fresh instance of M.

Detailed Description

Author:
try ma ik jo rr a zib
Version:
$Id$

Date: 23.12.2010, Time: 11:57:13

K - The key type for the model M - The model type. D - A possible descriptor to select a model.

The model key seperation is necessary to keep be able to use old model classes w/o key.


Member Function Documentation

void de.zib.gndms.model.common.repository.Dao< K, M, D >.add ( model,
key 
)

Addes a model to the dao.

Parameters:
modelThe model to add, with the key to use.

Implemented in de.zib.gndms.model.common.repository.QueuedTransientDao< K, M, D >, and de.zib.gndms.model.common.repository.TransientDao< K, M, D >.

K de.zib.gndms.model.common.repository.Dao< K, M, D >.create ( descriptor)

Creates a fresh instance of M matching descriptor.

This can be used fine grained construction, i.e. if M is a base class.

Parameters:
descriptorThe descriptor of the object, i.e. class.
Returns:
The key of the new instance.

Implemented in de.zib.gndms.model.common.repository.TransientDao< K, M, D >.

K de.zib.gndms.model.common.repository.Dao< K, M, D >.create ( ) [package]

Creates a fresh instance of M.

Returns:
The key of the new instance.
void de.zib.gndms.model.common.repository.Dao< K, M, D >.delete ( model)

Deletes model from the repo.

Parameters:
modelThe model to delete.
Note:
M must implement equals.

Implemented in de.zib.gndms.model.common.repository.QueuedTransientDao< K, M, D >, and de.zib.gndms.model.common.repository.TransientDao< K, M, D >.

void de.zib.gndms.model.common.repository.Dao< K, M, D >.deleteByKey ( key)

Deletes a model matching the given key.

Parameters:
keyThe key.

NOTE: Stupid type erasure.

Implemented in de.zib.gndms.model.common.repository.QueuedTransientDao< K, M, D >, and de.zib.gndms.model.common.repository.TransientDao< K, M, D >.

M de.zib.gndms.model.common.repository.Dao< K, M, D >.get ( key) throws NoSuchElementException

Used to retrive an model object form the dao.

Parameters:
keyThe key of the object.
Returns:

Implemented in de.zib.gndms.model.common.repository.QueuedDao< K, M, D >, and de.zib.gndms.model.common.repository.TransientDao< K, M, D >.


The documentation for this interface was generated from the following file:
 All Classes Namespaces Functions Variables