Created
August 21, 2013 16:47
-
-
Save mastersobg/6296959 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static final String[] QUERY_GET_PERSONAL_PHOTOS_BY_FRIEND_ID = // | |
| { // | |
| "SELECT * FROM " + TABLE_NAME + " WITH(NOLOCK)" + // | |
| " WHERE " + C_USER_ID + "=?" + // | |
| " AND " + C_USER_PHOTO_ALBUM_ID + " IS NULL" + // | |
| " AND " + CRITERIA_NOTDELETED, // | |
| " ", //empty parameter must set for every call | |
| " ORDER BY " + C_SEQUENCE + " DESC"// | |
| }; | |
| private final static int QUERY_GET_PERSONAL_PHOTOS_BY_FRIEND_ID_CRITERIA_NOT_REJECTED_INDEX = 1; | |
| /** | |
| * Фотографии друга. | |
| * | |
| * @param chunkProperties | |
| * @param userId | |
| * a user identificator | |
| * @return ListChunk, заполненный PhotoED | |
| * @throws DAOSysException | |
| */ | |
| public IListChunk<PhotoED> getPersonalPhotosByFriendId(IChunkProperties chunkProperties, Long userId) | |
| throws DAOSysException { | |
| QUERY_GET_PERSONAL_PHOTOS_BY_FRIEND_ID[QUERY_GET_PERSONAL_PHOTOS_BY_FRIEND_ID_CRITERIA_NOT_REJECTED_INDEX] = CRITERIA_NOT_REJECTED; | |
| final String sql = StringUtils.join(QUERY_GET_PERSONAL_PHOTOS_BY_FRIEND_ID, " "); | |
| return get(sql, chunkProperties, userId); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment