public class MySqlKeyValueProtobufDao extends org.springframework.jdbc.core.support.JdbcDaoSupport implements IProtobufDao
| Modifier and Type | Method and Description |
|---|---|
void |
addToList(String listKey,
String objectKey)
Add an object to a list
|
void |
archive(String key)
Mark the given key as archived.
|
com.google.protobuf.Message |
findByKey(String key)
Returns the object assigned to the given key
|
com.google.protobuf.Message |
findFieldsByKey(String key,
List<String> fieldsIgnored)
Returns partial object containing only the specified fields
|
List<String> |
findList(String listKey,
int start,
int count)
Returns list of objects starting from the given index; the list
will be maximum of size 'count'
|
List<com.google.protobuf.Message> |
getAll()
Returns map of key to object for all objects in the given data source
|
com.google.protobuf.Message |
getMessageDefaultInstance() |
static MySqlKeyValueProtobufDao |
newInstance(com.google.protobuf.Message messageDefaultInstancee,
Protos.DataSource dataSource) |
void |
store(String key,
com.google.protobuf.Message object)
Store the given object
|
void |
storeOrUpdate(String key,
com.google.protobuf.Message object)
Store or update the given object
|
public static MySqlKeyValueProtobufDao newInstance(com.google.protobuf.Message messageDefaultInstancee, Protos.DataSource dataSource)
public List<com.google.protobuf.Message> getAll()
IProtobufDaogetAll in interface IProtobufDaopublic com.google.protobuf.Message findByKey(String key)
IProtobufDaofindByKey in interface IProtobufDaokey - key assigned to the object to be fetchedpublic com.google.protobuf.Message findFieldsByKey(String key, List<String> fieldsIgnored)
IProtobufDaofindFieldsByKey in interface IProtobufDaokey - key assigned to the object to be fetchedfieldsIgnored - list of field names to be returnedpublic List<String> findList(String listKey, int start, int count)
IProtobufDaofindList in interface IProtobufDaolistKey - list keystart - the starting indexcount - the maximum count of objects to returnpublic void store(String key, com.google.protobuf.Message object)
IProtobufDaostore in interface IProtobufDaokey - the key assigned to the objectobject - the protobuf object to be storedpublic void addToList(String listKey, String objectKey)
IProtobufDaoaddToList in interface IProtobufDaolistKey - key associated to the listobjectKey - object keypublic void storeOrUpdate(String key, com.google.protobuf.Message object)
IProtobufDaostoreOrUpdate in interface IProtobufDaokey - the key assigned to the objectobject - the protobuf object to be storedpublic void archive(String key)
IProtobufDaoarchive in interface IProtobufDaokey - the key referring to the object to be archived.public com.google.protobuf.Message getMessageDefaultInstance()
getMessageDefaultInstance in interface IProtobufDaoCopyright © 2015. All rights reserved.