public static Post mapRestResourceToDomainEntity( com.lbi.mytestapplication.rest.ressource.Post postRsc) { Post post = new Post(); post.setQueue(postRsc.getQueue()); post.setMessage(postRsc.getMessage()); post.setId(postRsc.getId()); return post; }