app/models/Posts.java
public Map<String, Long> createPost(Users user, String description){
		Map<String, Long> response = null;
		Ebean.beginTransaction();
		
		try{
			Posts insertPost = new Posts();
			insertPost.user = user;
			insertPost.postDescription = description.trim();
			insertPost.createdDate = new Date().getTime();
			Ebean.insert(insertPost);
			
			response = new HashMap<String, Long>();
			response.put(ApiResponseKeys.POST_ID.toString(), findPostByUserIdDescription(user.id, description).id);
			Ebean.commitTransaction();
		} finally {
			if (Ebean.currentTransaction() != null) {
				Ebean.currentTransaction().rollback();
			}
		}
		
		return response;
	}
/**
	 * Creates Posts By user in session
	 * @param user
	 * @param description
	 * @return
	 */
Creates Posts By user in session
@param user
@param description
@return
Creates Posts By user in session @param user @param description @return
public Map<String, Long> createPost(Users user, String description){
		Map<String, Long> response = null;
		Ebean.beginTransaction();
		try{
			Posts insertPost = new Posts();
			insertPost.user = user;
			insertPost.postDescription = description.trim();
			insertPost.createdDate = new Date().getTime();
			Ebean.insert(insertPost);
			response = new HashMap<String, Long>();
			response.put(ApiResponseKeys.POST_ID.toString(), findPostByUserIdDescription(user.id, description).id);
			Ebean.commitTransaction();
		} finally {
			if (Ebean.currentTransaction() != null) {
				Ebean.currentTransaction().rollback();
			}
		}
		return response;
	}
public Map < String , Long > createPost ( Users user , String description ) { Map < String , Long > response = null ; Ebean . beginTransaction ( ) ; try { Posts insertPost = new Posts ( ) ; insertPost . user = user ; insertPost . postDescription = description . trim ( ) ; insertPost . createdDate = new Date ( ) . getTime ( ) ; Ebean . insert ( insertPost ) ; response = new HashMap < String , Long > ( ) ; response . put ( ApiResponseKeys . POST_ID . toString ( ) , findPostByUserIdDescription ( user . id , description ) . id ) ; Ebean . commitTransaction ( ) ; } finally { if ( Ebean . currentTransaction ( ) != null ) { Ebean . currentTransaction ( ) . rollback ( ) ; } } return response ; }
Creates Posts By user in session
 @param user
 @param description
 @return
Creates Posts By user in session @param user @param description @return