public interface TelepatInternalDB
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connection with the internal DB
|
void |
deleteChannelObjects(java.lang.String channelIdentifier)
Delete all objects stored in a specific channel
|
void |
deleteObject(java.lang.String channelIdentifier,
TelepatBaseModel object)
Delete an object from the internal DB
|
void |
empty()
Empty the internal DB
|
java.util.List<TelepatBaseModel> |
getChannelObjects(java.lang.String channelIdentifier,
java.lang.Class type)
Retrieve a list of all stored objects for a channel
|
TelepatBaseModel |
getObject(java.lang.String channelIdentifier,
int id,
java.lang.Class type)
Retrieve a stored object
|
java.lang.Object |
getOperationsData(java.lang.String key,
java.lang.Object defaultValue,
java.lang.Class type)
Telepat internal metadata - get a stored value
|
boolean |
objectExists(java.lang.String channelIdentifier,
int id)
Checks if an object exists in the internal DB
|
void |
persistObject(java.lang.String channelIdentifier,
TelepatBaseModel object)
Save an objects to the internal DB
|
void |
persistObjects(java.lang.String channelIdentifier,
TelepatBaseModel[] objects)
Save an array of objects to the internal DB
|
void |
setOperationsData(java.lang.String key,
java.lang.Object value)
Telepat internal metadata - sets a value on a specific key
|
void setOperationsData(java.lang.String key,
java.lang.Object value)
key - - the metadata keyvalue - - the metadata valuejava.lang.Object getOperationsData(java.lang.String key,
java.lang.Object defaultValue,
java.lang.Class type)
key - the key the value is stored ondefaultValue - the default value to return if the key does not existtype - the type the return value should be casted toboolean objectExists(java.lang.String channelIdentifier,
int id)
channelIdentifier - the identifier of the channel the object is stored inid - the Telepat object IDTelepatBaseModel getObject(java.lang.String channelIdentifier, int id, java.lang.Class type)
channelIdentifier - the identifier of the channel the object is stored inid - the Telepat object IDtype - the class the object should be casted tojava.util.List<TelepatBaseModel> getChannelObjects(java.lang.String channelIdentifier, java.lang.Class type)
channelIdentifier - the identifier of the channel the object is stored intype - the class the objects should be casted tovoid persistObject(java.lang.String channelIdentifier,
TelepatBaseModel object)
channelIdentifier - the identifier of the channel the object is stored inobject - the object to storevoid persistObjects(java.lang.String channelIdentifier,
TelepatBaseModel[] objects)
channelIdentifier - the identifier of the channel the object is stored inobjects - an array of objects to storevoid deleteObject(java.lang.String channelIdentifier,
TelepatBaseModel object)
channelIdentifier - the identifier of the channel the object is stored inobject - the object to deletevoid deleteChannelObjects(java.lang.String channelIdentifier)
channelIdentifier - the identifier of the channel the object is stored invoid empty()
void close()