Based on second approach answered here I designed my JPA class.
@Entity(name = "SearchKeywordJPA")
@IdClass(SearchKeywordJPA.SearchKeyId.class)
public class SearchKeywordJPA implements Comparable<SearchKeywordJPA> {
    @Id
    private String keyword;
    @Id
    private long date;
    private String userUUID;
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SearchKeywordJPA that = (SearchKeywordJPA) o;
        if (date != that.date) return false;
        if (!keyword.equals(that.keyword)) return false;
        if (!userUUID.equals(that.userUUID)) return false;
        return true;
    }
    @Override
    public int hashCode() {
        int result = keyword.hashCode();
        result = 31 * result + (int) (date ^ (date >>> 32));
        result = 31 * result + userUUID.hashCode();
        return result;
    }
    @Override
    public String toString() {
        return "SearchKeywordJPA{" +
                "keyword='" + keyword + '\'' +
                ", date=" + date +
                ", userUUID='" + userUUID + '\'' +
                '}';
    }
    public String getKeyword() {
        return keyword;
    }
    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }
    public long getDate() {
        return date;
    }
    public void setDate(long date) {
        this.date = date;
    }
    public String getUserUUID() {
        return userUUID;
    }
    public void setUserUUID(String userUUID) {
        this.userUUID = userUUID;
    }
    @Override
    public int compareTo(SearchKeywordJPA searchRecord) {
        long comparedDate = searchRecord.date;
        if (this.date > comparedDate) {
            return 1;
        } else if (this.date == comparedDate) {
            return 0;
        } else {
            return -1;
        }
    }
    /**********************
     * Key class
     **********************/
    public class SearchKeyId {
        private int id;
        private int version;
    }
}
In my servlet I want to check datastore and store my object if is not exist.
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    ...
            for(SearchKeywordJPA item: applicationList) {
                if(!isRecorded(item))
                    storeRecord(item);
            }
        }
    private boolean isRecorded(SearchKeywordJPA record) {
        EntityManager em = EMF.get().createEntityManager();
        SearchKeywordJPA item = em.find(SearchKeywordJPA.class, record);
        return item != null;
    }
    private void storeRecord(SearchKeywordJPA record) {
        EntityManager em = EMF.get().createEntityManager();
        em.persist(record);
    }
However when I run, application crashes and log says
javax.persistence.PersistenceException: org.datanucleus.store.appengine.FatalNucleusUserException: Received a request to find an object of type com.twitterjaya.model.SearchKeywordJPA identified by SearchKeywordJPA{keyword='airasia', date=1335680686149, userUUID='FFFF0000'}.  This is not a valid representation of a primary key for an instance of com.twitterjaya.model.SearchKeywordJPA.
What is the reason? any suggestion would be appreciated. Thanks
 
     
     
    