Package org.apache.roller

Examples of org.apache.roller.RollerException


    /**
     * @see org.apache.roller.pojos.RefererManager#getReferers(java.lang.String)
     */
    public List getReferers(WebsiteData website) throws RollerException {
        if (website==null )
            throw new RollerException("website is null");
       
        try {
            Session session = ((HibernatePersistenceStrategy)strategy).getSession();
            Criteria criteria = session.createCriteria(RefererData.class);
            criteria.add(Expression.eq("website",website));
            criteria.addOrder(Order.desc("totalHits"));
           
            return criteria.list();
        } catch (HibernateException e) {
            throw new RollerException(e);
        }
    }
View Full Code Here


    /**
     * @see org.apache.roller.pojos.RefererManager#getTodaysReferers(String)
     */
    public List getTodaysReferers(WebsiteData website) throws RollerException {
        if (website==null )
            throw new RollerException("website is null");
       
        try {
            Session session = ((HibernatePersistenceStrategy)strategy).getSession();
            Criteria criteria = session.createCriteria(RefererData.class);
            criteria.add(Expression.eq("website", website));
            criteria.add(Expression.gt("dayHits", new Integer(0)));
            criteria.addOrder(Order.desc("dayHits"));
           
            return criteria.list();
        } catch (HibernateException e) {
            throw new RollerException(e);
        }
    }
View Full Code Here

     * org.apache.roller.pojos.WebsiteData, java.lang.String)
     */
    public List getReferersToDate(WebsiteData website, String date)
            throws RollerException {
        if (website==null )
            throw new RollerException("website is null");
       
        if (date==null )
            throw new RollerException("Date is null");
       
        try {
            Session session = ((HibernatePersistenceStrategy)strategy).getSession();
            Criteria criteria = session.createCriteria(RefererData.class);
            criteria.add(Expression.eq("website", website));
            criteria.add(Expression.eq("dateString", date));
            criteria.add(Expression.eq("duplicate", Boolean.FALSE));
            criteria.addOrder(Order.desc("totalHits"));
           
            return criteria.list();
        } catch (HibernateException e) {
            throw new RollerException(e);
        }
    }
View Full Code Here

     * @see org.apache.roller.pojos.RefererManager#getReferersToEntry(
     * java.lang.String, java.lang.String)
     */
    public List getReferersToEntry(String entryid) throws RollerException {
        if (null == entryid)
            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"));
           
            criteria.addOrder(Order.desc("totalHits"));
           
            return criteria.list();
        } catch (HibernateException e) {
            throw new RollerException(e);
        }
    }
View Full Code Here

            criteria.add(Expression.eq("website", website));
            criteria.add(Expression.eq("refererUrl", refererUrl));
           
            return criteria.list();
        } catch (HibernateException e) {
            throw new RollerException(e);
        }
    }
View Full Code Here

            criteria.add(conjunction);
            criteria.add(disjunction);
           
            return criteria.list();
        } catch (HibernateException e) {
            throw new RollerException(e);
        }
    }
View Full Code Here

            Criteria criteria = session.createCriteria(PingTargetData.class);
            criteria.add(Expression.isNotNull("website"));
            List allCustomTargets = criteria.list();
            removeTargets(allCustomTargets);
        } catch (HibernateException e) {
            throw new RollerException(e);
        }
    }
View Full Code Here

            Criteria criteria = session.createCriteria(PingTargetData.class);
            criteria.add(Expression.isNull("website"));
            criteria.addOrder(Order.asc("name"));
            return criteria.list();
        } catch (HibernateException e) {
            throw new RollerException(e);
        }
       
    }
View Full Code Here

            Criteria criteria = session.createCriteria(PingTargetData.class);
            criteria.add(Expression.eq("website", website));
            criteria.addOrder(Order.asc("name"));
            return criteria.list();
        } catch (HibernateException e) {
            throw new RollerException(e);
        }
    }
View Full Code Here

           
            mLogger.info("Upgrade to 130 complete.");
           
        } catch (SQLException e) {
            mLogger.error("Problem upgrading database to version 130", e);
            throw new RollerException("Problem upgrading database to version 130", e);
        }
       
        // If someone is upgrading to 1.3.x then we are setting the db version
        // for the first time.  Normally we would just updateDatabaseVersion()
        UpgradeDatabase.setDatabaseVersion(con, 130);
View Full Code Here

TOP

Related Classes of org.apache.roller.RollerException

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.