Package org.hibernate.ejb

Examples of org.hibernate.ejb.HibernateEntityManager.find()


    @Override
    public void switchActivation(Long themeId) {
        HibernateEntityManager hem = (HibernateEntityManager) em.getDelegate();
        try {
            YFTheme theme = hem.find(YFTheme.class, themeId);
            if (theme.getActive()) {
                theme.setActive(false);
                hem.merge(theme);
            } else {
                YFTheme currentTheme = this.getCurrentTheme();
View Full Code Here


    @Override
    public YFTheme get(Long themeId) {
        HibernateEntityManager hem = (HibernateEntityManager) em.getDelegate();

        YFTheme theme = hem.find(YFTheme.class, themeId);

        return theme;
    }

    @Override
View Full Code Here

    }

    @Override
    public void update(Long themeId, String name, String description, Boolean isActive) {
        HibernateEntityManager hem = (HibernateEntityManager) em.getDelegate();
        YFTheme theme = hem.find(YFTheme.class, themeId);

        if (theme != null) {
            theme.setName(name);
            theme.setDescription(description);
            theme.setActive(isActive);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.