Examples of createAlias()


Examples of org.hibernate.Criteria.createAlias()

            throw new RollerException("entryid is null");
       
        try {
            Session session = ((HibernatePersistenceStrategy)strategy).getSession();
            Criteria criteria = session.createCriteria(RefererData.class);
            criteria.createAlias("weblogEntry","e");
           
            criteria.add(Expression.eq("e.id", entryid));
            criteria.add(Expression.isNotNull("title"));
            criteria.add(Expression.isNotNull("excerpt"));
           
View Full Code Here

Examples of org.hibernate.Criteria.createAlias()

            Criteria criteria = session.createCriteria(CommentData.class);
           
            if (entry != null) {
                criteria.add(Expression.eq("weblogEntry", entry));
            } else if (website != null) {
                criteria.createAlias("weblogEntry","e");
                criteria.add(Expression.eq("e.website", website));
            }
           
            if (searchString != null) {
                criteria.add(Expression.disjunction()
View Full Code Here

Examples of org.hibernate.Criteria.createAlias()

            throw new RollerException("website is null");
       
        try {
            Session session = ((HibernatePersistenceStrategy)this.strategy).getSession();
            Criteria criteria = session.createCriteria(WeblogCategoryAssoc.class);
            criteria.createAlias("category","c");
           
            criteria.add(Expression.eq("c.website", website));
            criteria.add(Expression.isNull("ancestorCategory"));
            criteria.add(Expression.eq("relation", WeblogCategoryAssoc.PARENT));
           
View Full Code Here

Examples of org.hibernate.Criteria.createAlias()

        if (includeRoot) return getWeblogCategories(website);
       
        try {
            Session session = ((HibernatePersistenceStrategy)this.strategy).getSession();
            Criteria criteria = session.createCriteria(WeblogCategoryAssoc.class);
            criteria.createAlias("category", "c");
            criteria.add(Expression.eq("c.website", website));
            criteria.add(Expression.isNotNull("ancestorCategory"));
            criteria.add(Expression.eq("relation", "PARENT"));
            Iterator assocs = criteria.list().iterator();
            List cats = new ArrayList();
View Full Code Here

Examples of org.hibernate.Criteria.createAlias()

            Criteria criteria = session.createCriteria(WeblogEntryData.class);
           
            if (website != null) {
                criteria.add(Expression.eq("website", website));
            } else {
                criteria.createAlias("website","w");
                criteria.add(Expression.eq("w.enabled", Boolean.TRUE));
            }
           
            if (startDate != null) {
                criteria.add(
View Full Code Here

Examples of org.hibernate.Criteria.createAlias()

        {
            List sameNames;
            try {
                Session session = ((HibernatePersistenceStrategy)this.strategy).getSession();
                Criteria criteria = session.createCriteria(WeblogCategoryAssoc.class);
                criteria.createAlias("category", "c");
                criteria.add(Expression.eq("c.name", cat.getName()));
                criteria.add(Expression.eq("ancestorCategory", parent));
                criteria.add(Expression.eq("relation", Assoc.PARENT));
                sameNames = criteria.list();
            } catch (HibernateException e) {
View Full Code Here

Examples of org.hibernate.Criteria.createAlias()

        if (website == null)
            throw new RollerException("website is null");
        try {
            Session session = ((HibernatePersistenceStrategy) strategy).getSession();
            Criteria criteria = session.createCriteria(FolderAssoc.class);
            criteria.createAlias("folder", "f");
            criteria.add(Expression.eq("f.website", website));
            criteria.add(Expression.isNull("ancestorFolder"));
            criteria.add(Expression.eq("relation", FolderAssoc.PARENT));
            List results = criteria.list();
            if (results.size() > 1) {
View Full Code Here

Examples of org.hibernate.Criteria.createAlias()

        if (null != parent) {
            List sameNames;
            try {
                Session session = ((HibernatePersistenceStrategy) strategy).getSession();
                Criteria criteria = session.createCriteria(FolderAssoc.class);
                criteria.createAlias("folder", "f");
                criteria.add(Expression.eq("f.name", folder.getName()));
                criteria.add(Expression.eq("ancestorFolder", parent));
                criteria.add(Expression.eq("relation", Assoc.PARENT));
                sameNames = criteria.list();
            } catch (HibernateException e) {
View Full Code Here

Examples of org.hibernate.Criteria.createAlias()

       
        try {
            Session session = ((HibernatePersistenceStrategy)this.strategy).getSession();
            Criteria criteria = session.createCriteria(UserData.class);
            if (website != null) {
                criteria.createAlias("permissions","permissions");
                criteria.add(Expression.eq("permissions.website", website));
            }
            if (enabled != null) {
                criteria.add(Expression.eq("enabled", enabled));
            }
View Full Code Here

Examples of org.hibernate.Criteria.createAlias()

       
        try {
            Session session = ((HibernatePersistenceStrategy)this.strategy).getSession();
            Criteria criteria = session.createCriteria(WebsiteData.class);
            if (user != null) {
                criteria.createAlias("permissions","permissions");
                criteria.add(Expression.eq("permissions.user", user));
                criteria.add(Expression.eq("permissions.pending", Boolean.FALSE));
            }
            if (enabled != null) {
                criteria.add(Expression.eq("enabled", enabled));
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.