Package com.sparc.knappsack.components.entities

Examples of com.sparc.knappsack.components.entities.EventWatch


        }
    }

    @Override
    public EventWatch get(Long id) {
        EventWatch bookmark = null;
        if (id != null && id > 0) {
            bookmark = eventWatchDao.get(id);
        }
        return bookmark;
    }
View Full Code Here


        return bookmark;
    }

    @Override
    public EventWatch get(User user, Notifiable notifiable) {
        EventWatch eventWatch = null;

        if (user != null && notifiable != null) {
            eventWatch = eventWatchDao.get(user, notifiable.getId(), notifiable.getNotifiableType());
        }
View Full Code Here

    }

    @Override
    public boolean createEventWatch(User user, Notifiable notifiable, EventType... eventTypes) {
        if (user != null && notifiable != null && eventTypes != null && eventTypes.length > 0) {
            EventWatch eventWatch = new EventWatch();
            eventWatch.setNotifiableId(notifiable.getId());
            eventWatch.setUser(user);
            eventWatch.setNotifiableType(notifiable.getNotifiableType());
            eventWatch.getEventTypes().addAll(Arrays.asList(eventTypes));

            save(eventWatch);

            return true;
        }
View Full Code Here

        return false;
    }

    @Override
    public boolean delete(User user, Notifiable notifiable) {
        EventWatch eventWatch = get(user, notifiable);

        if (eventWatch != null) {
            delete(eventWatch.getId());
            return true;
        }

        return false;
    }
View Full Code Here

        return false;
    }

    @Override
    public boolean doesEventWatchExist(User user, Notifiable notifiable) {
        EventWatch eventWatch = get(user, notifiable);

        return eventWatch != null;
    }
View Full Code Here

TOP

Related Classes of com.sparc.knappsack.components.entities.EventWatch

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.