Пример #1
0
 @Override
 @HasPermission(action = UGC_READ, type = SocialPermission.class)
 public Iterable<T> search(
     final String contextId,
     final String query,
     final String sort,
     final int start,
     final int limit)
     throws UGCException {
   log.debug(
       "Finding all ugc of context {} with user query {} sorted by {} skipping {} and with a limit of {}",
       contextId,
       query,
       sort,
       start,
       limit);
   isQueryValid(query);
   try {
     return ugcRepository.findByUserQuery(contextId, query, sort, start, limit);
   } catch (MongoDataException ex) {
     log.error("Unable to find User with given query" + query + " sorted by " + sort, ex);
     throw new UGCException("Unable to find Ugc with user query ", ex);
   }
 }