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.
 java.lang.Object execute(java.lang.String command)
          Executes a command on the storage system
 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> org.databene.commons.TypedIterable<T>
query(java.lang.String selector, org.databene.commons.Context context)
          Creates an Iterable for repetitive iteration through the results of the specified query.
 org.databene.commons.TypedIterable<Entity> queryEntities(java.lang.String type, java.lang.String selector, org.databene.commons.Context context)
          Creates an iterator that provides all entities of given type.
<T> org.databene.commons.TypedIterable<T>
queryEntityIds(java.lang.String entityName, java.lang.String selector, org.databene.commons.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

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


queryEntityIds

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


query

<T> org.databene.commons.TypedIterable<T> query(java.lang.String selector,
                                                org.databene.commons.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.


execute

java.lang.Object execute(java.lang.String command)
Executes a command on the storage system


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 © 2011. All Rights Reserved.