Package org.openblend.fejstbuk.domain

Examples of org.openblend.fejstbuk.domain.Like


    public void removePost(Post post) {
        em.remove(post);
    }

    public Like like(User user, Post post) {
        Like like = new Like();
        like.setPost(post);
        like.setUser(user);
        like.setTimestamp(new Date());
        em.persist(like);
        // post likes
        Set<Like> likes = post.getLikes();
        if (likes == null) {
            likes = new HashSet<Like>();
View Full Code Here


        }
        return null;
    }

    public void removeLike(long likeId) {
        Like like = em.find(Like.class, likeId);
        if (like != null) {
            dao.unlike(like);
        }
    }
View Full Code Here

TOP

Related Classes of org.openblend.fejstbuk.domain.Like

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.