public class MySqlProtobufDao 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 |
addToObjectWeight(String listKey,
String objectKey,
long count) |
void |
addToOrderedList(String listKey,
String objectKey,
long weight) |
void |
delete(String key)
Delete the given object
|
List<String> |
findAllList(String listKey) |
List<com.google.protobuf.Message> |
findAllListObjects(String listKey) |
List<String> |
findAllListsForObject(String objectKey) |
List<String> |
findAllOrderedListAscending(String listKey) |
List<String> |
findAllOrderedListDescending(String listKey) |
List<com.google.protobuf.Message> |
findAllOrderedListObjectsAscending(String listKey) |
List<com.google.protobuf.Message> |
findAllOrderedListObjectsDescending(String listKey) |
com.google.protobuf.Message |
findByKey(String key)
Returns the object assigned to the given key
|
com.google.protobuf.Message |
findFieldsByKey(String key,
List<String> fields)
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> |
findListObjects(String listKey,
int start,
int count) |
List<String> |
findOrderedListAscending(String listKey,
int start,
int conut) |
List<String> |
findOrderedListDescending(String listKey,
int start,
int conut) |
List<com.google.protobuf.Message> |
findOrderedListObjectsAscending(String listKey,
int start,
int count) |
List<com.google.protobuf.Message> |
findOrderedListObjectsDescending(String listKey,
int start,
int count) |
com.google.protobuf.Message |
getMessageDefaultInstance() |
long |
getObjectWeight(String listKey,
String objectKey) |
static MySqlProtobufDao |
newInstance(com.google.protobuf.Message messageDefaultInstance,
Protos.DataSource dataSource) |
void |
removeFromAllLists(String objectKey) |
void |
removeFromList(String listKey,
String objectKey)
Remove an object from a list
|
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 MySqlProtobufDao newInstance(com.google.protobuf.Message messageDefaultInstance, Protos.DataSource dataSource)
public 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> fields)
IProtobufDaofindFieldsByKey in interface IProtobufDaokey - key assigned to the object to be fetchedfields - list of field names to be returnedpublic List<String> findList(String listKey, int start, int count)
IProtobufDaofindList in interface IProtobufDaolistKey - the list keystart - the starting indexcount - the maximum count of objects to returnpublic List<String> findAllList(String listKey)
findAllList in interface IProtobufDaopublic List<com.google.protobuf.Message> findListObjects(String listKey, int start, int count)
findListObjects in interface IProtobufDaopublic List<com.google.protobuf.Message> findAllListObjects(String listKey)
findAllListObjects in interface IProtobufDaopublic List<com.google.protobuf.Message> findOrderedListObjectsAscending(String listKey, int start, int count)
findOrderedListObjectsAscending in interface IProtobufDaopublic List<com.google.protobuf.Message> findAllOrderedListObjectsAscending(String listKey)
findAllOrderedListObjectsAscending in interface IProtobufDaopublic List<com.google.protobuf.Message> findOrderedListObjectsDescending(String listKey, int start, int count)
findOrderedListObjectsDescending in interface IProtobufDaopublic List<com.google.protobuf.Message> findAllOrderedListObjectsDescending(String listKey)
findAllOrderedListObjectsDescending in interface IProtobufDaopublic List<String> findOrderedListAscending(String listKey, int start, int conut)
findOrderedListAscending in interface IProtobufDaopublic List<String> findAllOrderedListAscending(String listKey)
findAllOrderedListAscending in interface IProtobufDaopublic List<String> findOrderedListDescending(String listKey, int start, int conut)
findOrderedListDescending in interface IProtobufDaopublic List<String> findAllOrderedListDescending(String listKey)
findAllOrderedListDescending in interface IProtobufDaopublic List<String> findAllListsForObject(String objectKey)
findAllListsForObject in interface IProtobufDaopublic 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 delete(String key)
IProtobufDaodelete in interface IProtobufDaokey - the key assigned to the objectpublic void addToList(String listKey, String objectKey)
IProtobufDaoaddToList in interface IProtobufDaolistKey - key associated to the listobjectKey - object keypublic void removeFromList(String listKey, String objectKey)
IProtobufDaoremoveFromList in interface IProtobufDaolistKey - key associated to the listobjectKey - object keypublic void removeFromAllLists(String objectKey)
removeFromAllLists in interface IProtobufDaopublic void addToOrderedList(String listKey, String objectKey, long weight)
addToOrderedList in interface IProtobufDaopublic long getObjectWeight(String listKey, String objectKey)
getObjectWeight in interface IProtobufDaopublic void addToObjectWeight(String listKey, String objectKey, long count)
addToObjectWeight in interface IProtobufDaopublic 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 com.google.protobuf.Message getMessageDefaultInstance()
getMessageDefaultInstance in interface IProtobufDaoCopyright © 2015. All rights reserved.