app/models/Posts.java
public SqlRow findPostByUserIdDescriptionRawQuery(Long userId, String description) {
		String selectQuery = "SELECT * FROM posts WHERE user_id=:userId AND post_description=:description ORDER BY created_date DESC LIMIT 1";
		SqlQuery rawQuery = Ebean.createSqlQuery(selectQuery);
		rawQuery.setParameter("userId", userId).setParameter("description", description);
		return rawQuery.findUnique();
	}
/**
	 * Finds latest post for user with description
	 * @param userId
	 * @param description
	 * @return
	 */
Finds latest post for user with description
@param userId
@param description
@return
Finds latest post for user with description @param userId @param description @return
public SqlRow findPostByUserIdDescriptionRawQuery(Long userId, String description) {
		String selectQuery = "SELECT * FROM posts WHERE user_id=:userId AND post_description=:description ORDER BY created_date DESC LIMIT 1";
		SqlQuery rawQuery = Ebean.createSqlQuery(selectQuery);
		rawQuery.setParameter("userId", userId).setParameter("description", description);
		return rawQuery.findUnique();
	}
public SqlRow findPostByUserIdDescriptionRawQuery ( Long userId , String description ) { String selectQuery = "SELECT * FROM posts WHERE user_id=:userId AND post_description=:description ORDER BY created_date DESC LIMIT 1" ; SqlQuery rawQuery = Ebean . createSqlQuery ( selectQuery ) ; rawQuery . setParameter ( "userId" , userId ) . setParameter ( "description" , description ) ; return rawQuery . findUnique ( ) ; }
Finds latest post for user with description
 @param userId
 @param description
 @return
Finds latest post for user with description @param userId @param description @return