public interface UGCRepository<T extends UGC>
extends org.craftercms.commons.mongo.CrudRepository<T>
| Modifier and Type | Method and Description |
|---|---|
long |
countByTargetId(String contextId,
String threadId,
int levels) |
long |
countChildrenOf(String contextId,
String ugcId) |
long |
countFindByModerationStatus(SocialUgc.ModerationStatus status,
String targetId,
String contextId) |
void |
deleteAttribute(String ugcId,
String contextId,
String[] attributeName)
Deletes a attribute Has to be full "dot notation" mode
|
void |
deleteUgc(String ugcId,
String contextId)
Deletes The Given UGC and All its children.
|
Iterable<T> |
findByModerationStatus(SocialUgc.ModerationStatus status,
String targetId,
String contextId,
int start,
int limit,
List<org.apache.commons.collections4.keyvalue.DefaultKeyValue<String,Boolean>> sortOrder) |
Iterable<T> |
findByTargetId(String targetId,
String contextId)
Finds all UGC's of a contextId that belongs to the given target-id.
|
Iterable<T> |
findByTargetId(String targetId,
String contextId,
int start,
int limit,
List<org.apache.commons.collections4.keyvalue.DefaultKeyValue<String,Boolean>> sortOrder,
int upToLevel) |
Iterable<T> |
findByUserQuery(String contextId,
String query,
String sort,
int start,
int limit)
Finds Ugcs by the given user query.
|
Iterable<T> |
findChildren(String ugcId,
String targetId,
String contextId,
int start,
int limit,
List sortOrder,
int upToLevel)
Finds all the children of a given ugc.
|
List<T> |
findChildrenOf(String ugcId,
int childrenCount,
String contextId)
Finds all the ugc and all its children.
|
T |
findUGC(String contextId,
String ugcId)
Find's a ugc with the given id and contextId.
|
void |
setAttributes(String ugcId,
String contextId,
Map<String,Object> attributes)
Adds the given attributes to the ugc.
|
count, count, count, deleteFile, deleteFile, find, find, findAll, findById, findByStringId, findOne, findOne, getFileInfo, getFileInfo, insert, insert, readFile, readFile, remove, remove, removeById, save, save, saveFile, saveFile, update, update, update, update, updateFile, updateFile, updateFileList<T> findChildrenOf(String ugcId, int childrenCount, String contextId) throws org.craftercms.commons.mongo.MongoDataException
ugcId - Id of the ugc to find and its children.childrenCount - How many Children Levels.contextId - Context ID of the UGCs.org.craftercms.commons.mongo.MongoDataExceptionIterable<T> findByTargetId(String targetId, String contextId) throws org.craftercms.commons.mongo.MongoDataException
targetId - Target Id which the ugs belong.contextId - Context ID of the UGCs.org.craftercms.commons.mongo.MongoDataExceptionvoid deleteAttribute(String ugcId, String contextId, String[] attributeName) throws org.craftercms.commons.mongo.MongoDataException
ugcId - Id of the ugc to remove the attribute.contextId - Context ID of the UGCs.attributeName - Attributes name(Full dot notation) to unset/deleteorg.craftercms.commons.mongo.MongoDataExceptionT findUGC(String contextId, String ugcId) throws org.craftercms.commons.mongo.MongoDataException
contextId - Context ID of the UGCs.ugcId - Id of the ugcorg.craftercms.commons.mongo.MongoDataExceptionvoid setAttributes(String ugcId, String contextId, Map<String,Object> attributes) throws org.craftercms.commons.mongo.MongoDataException
ugcId - Id of the ugc to add the attributes.contextId - Context ID of the UGCs.attributes - Attributes to add/removeWatcher to the UGC.org.craftercms.commons.mongo.MongoDataExceptionvoid deleteUgc(String ugcId, String contextId) throws org.craftercms.commons.mongo.MongoDataException
ugcId - Id of the ugccontextId - Context ID of the UGCs.org.craftercms.commons.mongo.MongoDataExceptionIterable<T> findByUserQuery(String contextId, String query, String sort, int start, int limit) throws org.craftercms.commons.mongo.MongoDataException
contextId - Context ID of the UGCs.query - Query to execute.sort - Sort query If null or empty it will be ignorestart - Where to startlimit - How many resultsorg.craftercms.commons.mongo.MongoDataExceptionIterable<T> findChildren(String ugcId, String targetId, String contextId, int start, int limit, List sortOrder, int upToLevel) throws org.craftercms.commons.mongo.MongoDataException
ugcId - Id of the ugc to find and its children.contextId - Context ID of the UGCs.limit - How many resultsstart - where to start.upToLevel - how many sub-children levels to lookup.targetId - Target Id which the ugs belong.org.craftercms.commons.mongo.MongoDataExceptionIterable<T> findByTargetId(String targetId, String contextId, int start, int limit, List<org.apache.commons.collections4.keyvalue.DefaultKeyValue<String,Boolean>> sortOrder, int upToLevel) throws org.craftercms.commons.mongo.MongoDataException
org.craftercms.commons.mongo.MongoDataExceptionlong countByTargetId(String contextId, String threadId, int levels) throws org.craftercms.commons.mongo.MongoDataException
org.craftercms.commons.mongo.MongoDataExceptionlong countChildrenOf(String contextId, String ugcId) throws org.craftercms.commons.mongo.MongoDataException
org.craftercms.commons.mongo.MongoDataExceptionIterable<T> findByModerationStatus(SocialUgc.ModerationStatus status, String targetId, String contextId, int start, int limit, List<org.apache.commons.collections4.keyvalue.DefaultKeyValue<String,Boolean>> sortOrder) throws org.craftercms.commons.mongo.MongoDataException
org.craftercms.commons.mongo.MongoDataExceptionlong countFindByModerationStatus(SocialUgc.ModerationStatus status, String targetId, String contextId) throws org.craftercms.commons.mongo.MongoDataException
org.craftercms.commons.mongo.MongoDataExceptionCopyright © 2014 CrafterCMS. All Rights Reserved.