public interface UGCRepository<T extends UGC>
extends org.craftercms.commons.mongo.CrudRepository<T>
| Modifier and Type | Method and Description |
|---|---|
long |
countAllFlagged(String context,
int start,
int pageSize,
List sortOrder) |
long |
countByTargetId(String contextId,
String threadId,
int levels) |
long |
countChildrenOf(String contextId,
String ugcId) |
long |
countFindByModerationStatus(ModerationStatus status,
String targetId,
String contextId) |
void |
deleteAttribute(String ugcId,
String contextId,
String[] attributeName)
Deletes an attribute Has to be full "dot notation" mode
|
void |
deleteUgc(String ugcId,
String contextId)
Deletes the given UGC and All its children.
|
Iterable<T> |
findAllFlagged(String context,
int start,
int pageSize,
List sortOrder) |
Iterable<T> |
findByModerationStatus(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)
Finds 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, listFilesByName, readFile, readFile, remove, remove, removeById, removeByStringId, 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 belongs to.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 ugcUGC.org.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 ignoredstart - 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, UGCNotFound
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 belongs to.org.craftercms.commons.mongo.MongoDataExceptionUGCNotFoundIterable<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(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(ModerationStatus status, String targetId, String contextId) throws org.craftercms.commons.mongo.MongoDataException
org.craftercms.commons.mongo.MongoDataExceptionCopyright © 2019 CrafterCMS. All Rights Reserved.