Package org.apache.turbine.util.db

Examples of org.apache.turbine.util.db.Criteria$Criterion


            throw new EntityExistsException("The account '" +
                user.getUserName() + "' already exists");
        }
        String encrypted = TurbineSecurity.encryptPassword(initialPassword);
        user.setPassword(encrypted);
        Criteria criteria = TurbineUserPeer.buildCriteria(user);
        try
        {
            // we can safely assume that BaseObject derivate is used as User
            // implementation with this UserManager
            ((BaseObject)user).setPrimaryKey(
View Full Code Here


        if(!accountExists(user))
        {
            throw new UnknownEntityException("The account '" +
                user.getUserName() + "' does not exist");
        }
        Criteria criteria = new Criteria();
        criteria.add(TurbineUserPeer.USERNAME, user.getUserName());
        try
        {
            TurbineUserPeer.doDelete(criteria);
        }
        catch(Exception e)
View Full Code Here

        {
            synchronized(this)
            {
                if(allGroups == null)
                {
                    allGroups = getGroups( new Criteria() );
                }
            }
        }
        return allGroups;
    }
View Full Code Here

        {
            synchronized(this)
            {
                if(allRoles == null)
                {
                    allRoles = getRoles( new Criteria() );
                }
            }
        }
        return allRoles;
    }
View Full Code Here

        {
            synchronized(this)
            {
                if(allPermissions == null)
                {
                    allPermissions = getPermissions( new Criteria() );
                }
            }
        }
        return allPermissions;
    }
View Full Code Here

            {
                scheduleQueue = new JobQueue();
                mainLoop = new MainLoop();

                // Load all from cold storage.
                Vector jobs  = JobEntryPeer.doSelect(new Criteria());

                if ( jobs != null && jobs.size() > 0 )
                {
                    scheduleQueue.batchLoad(jobs);
                    restart();
View Full Code Here

        throws Exception
    {
        // First remove from DB.
        try
        {
            Criteria c = new Criteria()
                .add(JobEntryPeer.OID, je.getPrimaryKey());

            JobEntryPeer.doDelete(c);
        }
        catch(Exception ouch)
View Full Code Here

     *         the data backend.
     */
    public boolean accountExists( String username )
        throws DataBackendException
    {
        Criteria criteria = new Criteria();
        criteria.add(TurbineUserPeer.USERNAME, username);
        Vector users;
        try
        {
            users = TurbineUserPeer.doSelect(criteria);
        }
View Full Code Here

     *            storage.
     */
    public User retrieve( String username )
        throws UnknownEntityException, DataBackendException
    {
        Criteria criteria = new Criteria();
        criteria.add( TurbineUserPeer.USERNAME, username );
        Vector users;
        try
        {
            users = TurbineUserPeer.doSelect(criteria);
        }
View Full Code Here

     *         storage.
     */
    public User[] retrieve( Criteria criteria )
        throws DataBackendException
    {
        Criteria dbCriteria = new Criteria();
        Iterator keys = criteria.keySet().iterator();
        while(keys.hasNext())
        {
            String key = (String)keys.next();
            dbCriteria.add(TurbineUserPeer.getColumnName(key),
                criteria.get(key), criteria.getComparison(key));
        }
        Vector users = new Vector(0);
        try
        {
View Full Code Here

TOP

Related Classes of org.apache.turbine.util.db.Criteria$Criterion

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.