Package org.apache.tapestry.contrib.jdbc

Examples of org.apache.tapestry.contrib.jdbc.StatementAssembly.addParameter()


        if (publisherId != null)
        {
            assembly.addSep(" AND ");
            assembly.add("book.PUBLISHER_ID = ");
            assembly.addParameter(publisherId);
        }
       
        if (ownerId != null)
        {
          assembly.addSep(" AND ");
View Full Code Here


       
        if (ownerId != null)
        {
          assembly.addSep(" AND ");
          assembly.add("book.OWNER_ID = ");
          assembly.addParameter(ownerId);
        }

        addSortOrdering(assembly, ordering);

        return assembly.createStatement(connection);
View Full Code Here

        StatementAssembly assembly = buildBaseBookQuery();

        assembly.addSep(" AND ");
        assembly.add(personColumn);
        assembly.add(" = ");
        assembly.addParameter(personId);

        addSortOrdering(assembly, sortOrdering);

        return assembly.createStatement(connection);
    }
View Full Code Here

        // Get books held by the borrower but not owned by the borrower.

        assembly.addSep(" AND ");
        assembly.add("book.HOLDER_ID = ");
        assembly.addParameter(borrowerId);
        assembly.addSep(" AND ");
        assembly.add("book.HOLDER_ID <> book.OWNER_ID");

        addSortOrdering(assembly, sortOrdering);
View Full Code Here

            connection = getConnection();

            StatementAssembly assembly = buildBasePersonQuery();
            assembly.newLine("WHERE ");
            assembly.add("PERSON_ID = ");
            assembly.addParameter(personId);
            assembly.newLine("ORDER BY LAST_NAME, FIRST_NAME");

            statement = assembly.createStatement(connection);

            set = statement.executeQuery();
View Full Code Here

            connection = getConnection();

            StatementAssembly assembly = buildBaseBookQuery();
            assembly.addSep(" AND ");
            assembly.add("book.BOOK_ID = ");
            assembly.addParameter(bookId);

            statement = assembly.createStatement(connection);

            set = statement.executeQuery();
View Full Code Here

    {
        StatementAssembly assembly = new StatementAssembly();

        assembly.add("UPDATE BOOK");
        assembly.newLine("SET OWNER_ID = ");
        assembly.addParameter(adminId);
        assembly.newLine("WHERE OWNER_ID IN (");
        assembly.addParameterList(deletedPersonIds, ", ");
        assembly.add(")");

        executeUpdate(assembly);
View Full Code Here

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

            assembly.add("LOWER(EMAIL) = ");
            assembly.addParameter(trimmedEmail);

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

            if (set.next())
View Full Code Here

            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);
View Full Code Here

            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())
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.