org.databene.benerator
Interface StorageSystem

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

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

Abstract interface characterizing an Entity storage system. An implementation of this interface must inherit the class AbstractStorageSystem if it is needs to be forward compatible.


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
 org.databene.webdecs.DataSource<?> query(java.lang.String selector, boolean simplify, org.databene.commons.Context context)
          Creates an Iterable for repetitive iteration through the results of the specified query.
 org.databene.webdecs.DataSource<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.
 org.databene.webdecs.DataSource<?> queryEntityIds(java.lang.String type, 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
getDataModel, getTypeDescriptor, getTypeDescriptors, setDataModel
 

Method Detail

getId

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

Specified by:
getId in interface DescriptorProvider

queryEntities

org.databene.webdecs.DataSource<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

org.databene.webdecs.DataSource<?> queryEntityIds(java.lang.String type,
                                                  java.lang.String selector,
                                                  org.databene.commons.Context context)
Queries for entity ids


query

org.databene.webdecs.DataSource<?> query(java.lang.String selector,
                                         boolean simplify,
                                         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 © 2013. All Rights Reserved.