org.apache.tuscany.sca.data.collection
Interface Collection<K,D>

All Known Subinterfaces:
Collection<K,D>, ItemCollection, ItemCollection, LocalItemCollection, LocalItemCollection, Resource, Widget
All Known Implementing Classes:
CompositeConfigurationCollectionImpl, ContributionCollectionImpl, DeployableCompositeCollectionImpl, DeployedCompositeCollectionImpl, FileCollectionImpl, NodeProcessCollectionFacadeImpl, NodeProcessCollectionImpl

public interface Collection<K,D>

Provides access to a collection of data items.


Method Summary
 void delete(K key)
          Delete an item.
 D get(K key)
          Retrieves an item.
 Entry<K,D>[] getAll()
          Get the whole collection.
 K post(K key, D item)
          Creates a new item.
 void put(K key, D item)
          Updates an item.
 Entry<K,D>[] query(java.lang.String queryString)
          Returns a collection resulting from a query.
 

Method Detail

getAll

Entry<K,D>[] getAll()
Get the whole collection.

Returns:
the whole collection.

query

Entry<K,D>[] query(java.lang.String queryString)
Returns a collection resulting from a query.

Returns:
the collection.

post

K post(K key,
       D item)
Creates a new item.

Parameters:
key -
item -
Returns:

get

D get(K key)
      throws NotFoundException
Retrieves an item.

Parameters:
key -
Returns:
Throws:
NotFoundException

put

void put(K key,
         D item)
         throws NotFoundException
Updates an item.

Parameters:
key -
item -
Throws:
NotFoundException

delete

void delete(K key)
            throws NotFoundException
Delete an item.

Parameters:
key -
Throws:
NotFoundException