Examples of PhotoAlbumException


Examples of com.freewebsys.sns.service.PhotoAlbumException

  public void deletePhotoAlbumById(Integer id) throws PhotoAlbumException {
    try{
      PhotoAlbum photoAlbum = (PhotoAlbum) baseDao.findById(PhotoAlbum.class, id);
      baseDao.delete(photoAlbum);
    } catch (Exception e) {
      throw new PhotoAlbumException("PhotoAlbum删除异常");
    }
  }
View Full Code Here

Examples of com.freewebsys.sns.service.PhotoAlbumException

  @Transactional
  public void savePhotoAlbum(PhotoAlbum photoAlbum) throws PhotoAlbumException {
    try {
      baseDao.save(photoAlbum);
    } catch (Exception e) {
      throw new PhotoAlbumException("PhotoAlbum保存异常");
    }
  }
View Full Code Here

Examples of com.freewebsys.sns.service.PhotoAlbumException

  @Transactional
  public PhotoAlbum findPhotoAlbumById(Integer id) throws PhotoAlbumException {
    try {
      return (PhotoAlbum) baseDao.findById(PhotoAlbum.class, id);
    } catch (Exception e) {
      throw new PhotoAlbumException("PhotoAlbum按ID查询异常");
    }
  }
View Full Code Here

Examples of com.freewebsys.sns.service.PhotoAlbumException

      Object[] values = CommonDaoUtil.commonQuery(map);
      hql += values[0].toString();
      // Object[]需要进行强制转换.
      return baseDao.findPage(start, limit, hql, (Object[]) values[1]);
    } catch (Exception e) {
      throw new PhotoAlbumException("PhotoAlbum分页异常");
    }
  }
View Full Code Here

Examples of com.freewebsys.sns.service.PhotoAlbumException

      Object[] values = CommonDaoUtil.commonQuery(map);
      hql += values[0].toString();
      // Object[]需要进行强制转换.
      return baseDao.find(hql, (Object[]) values[1]);
    } catch (Exception e) {
      throw new PhotoAlbumException("查询PhotoAlbum全部异常");
    }
  }
View Full Code Here

Examples of org.richfaces.photoalbum.util.PhotoAlbumException

                } else if (searchInShared) {
                    strategy = new SearchSharedShelvesStrategy();
                } else if (searchInMy) {
                    strategy = new SearchMyShelvesStrategy();
                } else {
                    throw new PhotoAlbumException(Constants.WRONG_SEARCH_PARAMETERS_ERROR);
                }
                break;
            }
            case ALBUM: {
                if (searchInShared && searchInMy) {
                    strategy = new SearchBothAlbumsStrategy();
                } else if (searchInShared) {
                    strategy = new SearchSharedAlbumsStrategy();
                } else if (searchInMy) {
                    strategy = new SearchMyAlbumsStrategy();
                } else {
                    throw new PhotoAlbumException(Constants.WRONG_SEARCH_PARAMETERS_ERROR);
                }
                break;
            }
            case IMAGE: {
                if (searchInShared && searchInMy) {
                    strategy = new SearchBothImagesStrategy();
                } else if (searchInShared) {
                    strategy = new SearchSharedImagesStrategy();
                } else if (searchInMy) {
                    strategy = new SearchMyImagesStrategy();
                } else {
                    throw new PhotoAlbumException(Constants.WRONG_SEARCH_PARAMETERS_ERROR);
                }
                break;
            }
            case METATAG: {
                strategy = new SearchMetatagsStrategy();
                break;
            }
            default:
                throw new PhotoAlbumException(Constants.WRONG_SEARCH_PARAMETERS_ERROR);
        }
        return strategy.getQuery(em, parameters, queryString);
    }
View Full Code Here

Examples of org.richfaces.photoalbum.util.PhotoAlbumException

     */
    public List<Album> searchByAlbum(String searchQuery, boolean searchInMyAlbums, boolean searchInShared)
        throws PhotoAlbumException {
        Query query = searchQueryFactory.getQuery(SearchEntityEnum.ALBUM, user, searchInShared, searchInMyAlbums, searchQuery);
        if (null == query) {
            throw new PhotoAlbumException(Constants.WRONG_SEARCH_PARAMETERS_ERROR);
        }
        return (List<Album>) query.getResultList();
    }
View Full Code Here

Examples of org.richfaces.photoalbum.util.PhotoAlbumException

     */
    public List<Image> searchByImage(String searchQuery, boolean searchInMyAlbums, boolean searchInShared)
        throws PhotoAlbumException {
        Query query = searchQueryFactory.getQuery(SearchEntityEnum.IMAGE, user, searchInShared, searchInMyAlbums, searchQuery);
        if (null == query) {
            throw new PhotoAlbumException(Constants.WRONG_SEARCH_PARAMETERS_ERROR);
        }
        return (List<Image>) query.getResultList();
    }
View Full Code Here

Examples of org.richfaces.photoalbum.util.PhotoAlbumException

     */
    public List<User> searchByUsers(String searchQuery, boolean searchInMyAlbums, boolean searchInShared)
        throws PhotoAlbumException {
        Query query = searchQueryFactory.getQuery(SearchEntityEnum.USER, user, searchInShared, searchInMyAlbums, searchQuery);
        if (null == query) {
            throw new PhotoAlbumException(Constants.WRONG_SEARCH_PARAMETERS_ERROR);
        }
        return (List<User>) query.getResultList();
    }
View Full Code Here

Examples of org.richfaces.photoalbum.util.PhotoAlbumException

    public List<MetaTag> searchByTags(String searchQuery, boolean searchInMyAlbums, boolean searchInShared)
        throws PhotoAlbumException {
        Query query = searchQueryFactory
            .getQuery(SearchEntityEnum.METATAG, user, searchInShared, searchInMyAlbums, searchQuery);
        if (null == query) {
            throw new PhotoAlbumException(Constants.WRONG_SEARCH_PARAMETERS_ERROR);
        }
        return (List<MetaTag>) query.getResultList();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.