public interface Datastore
| Modifier and Type | Method and Description |
|---|---|
void |
addExternalLibrary(String name,
LibWrapper libWrapper)
Adds an external library for the given datastore
|
void |
delete(Object object)
Delete an object from the datastore
|
<T> void |
deleteById(Class<T> clazz,
String id)
Delete the object with the given ID from the datastore
|
<T> T |
find(Class<T> objectClass,
String id)
Find an object by the given id.
|
DatastoreDriver |
getDatastoreDriver()
Get the driver for the datastore
|
String |
getDataUnit()
Get the name of the data unit
|
LibWrapper |
getExternalLibrary(String name)
Get the external library with the given name
|
String |
getHost()
Get the host of the datastore
|
String |
getName()
Get the name of the datastore
|
Integer |
getPort()
Get the port of the datastore
|
String |
getProperty(String propertyName)
Get given property for datastore
|
<T> void |
migrate(Datastore to,
Class<T> objectClass,
MigrationCallback<T> callback,
String... ids)
Migrate the objects with the given ids to the given datastore
|
<T> void |
migrate(Datastore to,
Class<T> objectClass,
String id)
Migrate the object with the given id to the given datastore
|
void |
save(Object object)
Save an object in the datastore
|
void |
update(Object object)
Update an object in the datastore
|
String getName()
String getHost()
Integer getPort()
String getDataUnit()
DatastoreDriver getDatastoreDriver()
String getProperty(String propertyName)
propertyName - name of the propertyvoid addExternalLibrary(String name, LibWrapper libWrapper)
name - the name to use for the librarylibWrapper - the wrapper for the external libraryLibWrapper getExternalLibrary(String name)
name - the given namevoid save(Object object)
object - object to store in datastore<T> T find(Class<T> objectClass, String id)
T - type of the searched objectobjectClass - class of the wanted objectid - id to search forvoid delete(Object object)
object - the object to delete<T> void deleteById(Class<T> clazz, String id)
clazz - the class of the object to deleteid - the given IDvoid update(Object object)
object - the object to update<T> void migrate(Datastore to, Class<T> objectClass, String id)
to - the datastore to migrate toobjectClass - the class of the object to migrateid - the id of the object to migrate<T> void migrate(Datastore to, Class<T> objectClass, MigrationCallback<T> callback, String... ids)
to - the datastore to migrate toobjectClass - the class of the objects to migratecallback - the callback objectids - the ids of the objects to migrateCopyright © 2014. All Rights Reserved.