Package org.apache.tapestry.vlib.ejb

Examples of org.apache.tapestry.vlib.ejb.RegistrationException


        throws RegistrationException, CreateException, RemoteException
    {
        IPersonHome home;

        if (password == null || password.trim().length() == 0)
            throw new RegistrationException("Must specify a password.");

        validateUniquePerson(firstName, lastName, email);

        home = getPersonHome();
View Full Code Here


            statement = assembly.createStatement(connection);
            set = statement.executeQuery();

            if (set.next())
                throw new RegistrationException("Email address is already in use by another user.");

            close(null, statement, set);

            assembly = new StatementAssembly();
            assembly.newLine("SELECT PERSON_ID");
            assembly.newLine("FROM PERSON");
            assembly.newLine("WHERE ");

            assembly.add("LOWER(FIRST_NAME) = ");
            assembly.addParameter(trimmedFirstName);
            assembly.addSep(" AND ");
            assembly.add("LOWER(LAST_NAME) = ");
            assembly.addParameter(trimmedLastName);

            statement = assembly.createStatement(connection);
            set = statement.executeQuery();

            if (set.next())
                throw new RegistrationException("Name provided is already in use by another user.");

        }
        catch (SQLException e)
        {
            throw new RegistrationException("Could not access database: " + e.getMessage(), e);
        }
        finally
        {
            close(connection, statement, set);
        }
View Full Code Here

        throws RegistrationException, CreateException, RemoteException
    {
        IPersonHome home;

        if (password == null || password.trim().length() == 0)
            throw new RegistrationException("Must specify a password.");

        validateUniquePerson(firstName, lastName, email);

        home = getPersonHome();
View Full Code Here

            statement = assembly.createStatement(connection);
            set = statement.executeQuery();

            if (set.next())
                throw new RegistrationException("Email address is already in use by another user.");

            close(null, statement, set);

            assembly = new StatementAssembly();
            assembly.newLine("SELECT PERSON_ID");
            assembly.newLine("FROM PERSON");
            assembly.newLine("WHERE ");

            assembly.add("LOWER(FIRST_NAME) = ");
            assembly.addParameter(trimmedFirstName);
            assembly.addSep(" AND ");
            assembly.add("LOWER(LAST_NAME) = ");
            assembly.addParameter(trimmedLastName);

            statement = assembly.createStatement(connection);
            set = statement.executeQuery();

            if (set.next())
                throw new RegistrationException("Name provided is already in use by another user.");

        }
        catch (SQLException e)
        {
            throw new RegistrationException("Could not access database: " + e.getMessage(), e);
        }
        finally
        {
            close(connection, statement, set);
        }
View Full Code Here

        throws RegistrationException, CreateException, RemoteException
    {
        IPersonHome home;

        if (password == null || password.trim().length() == 0)
            throw new RegistrationException("Must specify a password.");

        validateUniquePerson(firstName, lastName, email);

        home = getPersonHome();
View Full Code Here

            statement = assembly.createStatement(connection);
            set = statement.executeQuery();

            if (set.next())
                throw new RegistrationException("Email address is already in use by another user.");

            close(null, statement, set);

            assembly = new StatementAssembly();
            assembly.newLine("SELECT PERSON_ID");
            assembly.newLine("FROM PERSON");
            assembly.newLine("WHERE ");

            assembly.add("LOWER(FIRST_NAME) = ");
            assembly.addParameter(trimmedFirstName);
            assembly.addSep(" AND ");
            assembly.add("LOWER(LAST_NAME) = ");
            assembly.addParameter(trimmedLastName);

            statement = assembly.createStatement(connection);
            set = statement.executeQuery();

            if (set.next())
                throw new RegistrationException("Name provided is already in use by another user.");

        }
        catch (SQLException e)
        {
            throw new RegistrationException("Could not access database: " + e.getMessage(), e);
        }
        finally
        {
            close(connection, statement, set);
        }
View Full Code Here

            throws RegistrationException, CreateException, RemoteException
    {
        IPersonHome home;

        if (password == null || password.trim().length() == 0)
            throw new RegistrationException("Must specify a password.");

        validateUniquePerson(firstName, lastName, email);

        home = getPersonHome();
View Full Code Here

            statement = assembly.createStatement(connection);
            set = statement.executeQuery();

            if (set.next())
                throw new RegistrationException("Email address is already in use by another user.");

            close(null, statement, set);

            assembly = new StatementAssembly();
            assembly.newLine("SELECT PERSON_ID");
            assembly.newLine("FROM PERSON");
            assembly.newLine("WHERE ");

            assembly.add("LOWER(FIRST_NAME) = ");
            assembly.addParameter(trimmedFirstName);
            assembly.addSep(" AND ");
            assembly.add("LOWER(LAST_NAME) = ");
            assembly.addParameter(trimmedLastName);

            statement = assembly.createStatement(connection);
            set = statement.executeQuery();

            if (set.next())
                throw new RegistrationException("Name provided is already in use by another user.");

        }
        catch (SQLException e)
        {
            throw new RegistrationException("Could not access database: " + e.getMessage(), e);
        }
        finally
        {
            close(connection, statement, set);
        }
View Full Code Here

        throws RegistrationException, CreateException, RemoteException
    {
        IPersonHome home;

        if (password == null || password.trim().length() == 0)
            throw new RegistrationException("Must specify a password.");

        validateUniquePerson(firstName, lastName, email);

        home = getPersonHome();
View Full Code Here

            statement = assembly.createStatement(connection);
            set = statement.executeQuery();

            if (set.next())
                throw new RegistrationException(
                        "Email address is already in use by another user.");

            close(null, statement, set);

            assembly = new StatementAssembly();
            assembly.newLine("SELECT PERSON_ID");
            assembly.newLine("FROM PERSON");
            assembly.newLine("WHERE ");

            assembly.add("LOWER(FIRST_NAME) = ");
            assembly.addParameter(trimmedFirstName);
            assembly.addSep(" AND ");
            assembly.add("LOWER(LAST_NAME) = ");
            assembly.addParameter(trimmedLastName);

            statement = assembly.createStatement(connection);
            set = statement.executeQuery();

            if (set.next())
                throw new RegistrationException(
                        "Name provided is already in use by another user.");

        }
        catch (SQLException e)
        {
            throw new RegistrationException("Could not access database: "
                    + e.getMessage(), e);
        }
        finally
        {
            close(connection, statement, set);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.vlib.ejb.RegistrationException

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.