org.databene.model.storage
Interface StorageSystem

All Superinterfaces:
java.io.Closeable, DescriptorProvider, java.io.Flushable
All Known Implementing Classes:
AbstractStorageSystem, DBSystem

public interface StorageSystem
extends DescriptorProvider, java.io.Closeable, java.io.Flushable

Abstraction of an Entity storage system.


Created: 27.06.2007 23:02:21

Since:
0.4.0
Author:
Volker Bergmann

Method Summary
 void close()
          Closes the database.
 void flush()
          Assures that all data that has been store(Entity)d, is send to the target system.
 java.lang.String getId()
          Returns a name that identifies the database
<T> TypedIterable<T>
query(java.lang.String selector, Context context)
          Creates an Iterable for repetitive iteration through the results of the specified query.
 TypedIterable<Entity> queryEntities(java.lang.String type, java.lang.String selector, Context context)
          Creates an iterator that provides all entities of given type.
<T> TypedIterable<T>
queryEntityIds(java.lang.String entityName, java.lang.String selector, Context context)
          Queries for entity ids
 void store(Entity entity)
          Persists a new entity.
 void update(Entity entity)
          Updates an existing entity.
 
Methods inherited from interface org.databene.model.data.DescriptorProvider
getTypeDescriptor, getTypeDescriptors
 

Method Detail

getId

java.lang.String getId()
Returns a name that identifies the database

Specified by:
getId in interface DescriptorProvider

queryEntities

TypedIterable<Entity> queryEntities(java.lang.String type,
                                    java.lang.String selector,
                                    Context context)
Creates an iterator that provides all entities of given type.


queryEntityIds

<T> TypedIterable<T> queryEntityIds(java.lang.String entityName,
                                    java.lang.String selector,
                                    Context context)
Queries for entity ids


query

<T> TypedIterable<T> query(java.lang.String selector,
                           Context context)
Creates an Iterable for repetitive iteration through the results of the specified query.


store

void store(Entity entity)
Persists a new entity.


update

void update(Entity entity)
Updates an existing entity.


flush

void flush()
Assures that all data that has been store(Entity)d, is send to the target system.

Specified by:
flush in interface java.io.Flushable

close

void close()
Closes the database.

Specified by:
close in interface java.io.Closeable


Copyright © 2010. All Rights Reserved.