Examples of IStatement


Examples of it.eng.qbe.statement.IStatement

 
  public static transient Logger logger = Logger.getLogger(ValidateCatalogueAction.class);
 
  public void service(SourceBean request, SourceBean response) {
    Query query;
    IStatement statement;
    boolean validationResult = false;
    String jpaQueryStr;
    String sqlQueryStr;
   
    logger.debug("IN");
   
    try {
      super.service(request, response);
           
      Set queries = getEngineInstance().getQueryCatalogue().getAllQueries(false);
      logger.debug("Query catalogue contains [" + queries.size() + "] first-class query");
     
      Iterator it = queries.iterator();
      while(it.hasNext()) {
        query = (Query)it.next();
        logger.debug("Validating query [" + query.getName() +"] ...");
       
        statement = getEngineInstance().getDataSource().createStatement( query );
        statement.setParameters( getEnv() );
       
        jpaQueryStr = statement.getQueryString();
        //sqlQueryStr = statement.getSqlQueryString();
        logger.debug("Validating query (HQL/JPQL): [" +  jpaQueryStr+ "]");
        //logger.debug("Validating query (SQL): [" + sqlQueryStr + "]");
       
        try {
View Full Code Here

Examples of org.apache.tapestry.contrib.jdbc.IStatement

     *
     **/

    public int masterQuery(MasterQueryParameters parameters, SortOrdering sortOrdering)
    {
        IStatement statement = null;
        Connection connection = null;

        // Forget any current results.

        _results = null;
View Full Code Here

Examples of org.apache.tapestry.contrib.jdbc.IStatement

     *
     **/

    public int ownerQuery(Integer ownerId, SortOrdering sortOrdering)
    {
        IStatement statement = null;
        Connection connection = null;

        // Forget any current results.

        _results = null;
View Full Code Here

Examples of org.apache.tapestry.contrib.jdbc.IStatement

     *
     **/

    public int holderQuery(Integer holderId, SortOrdering sortOrdering)
    {
        IStatement statement = null;
        Connection connection = null;

        // Forget any current results.

        _results = null;
View Full Code Here

Examples of org.apache.tapestry.contrib.jdbc.IStatement

        return getResultCount();
    }

    public int borrowerQuery(Integer borrowerId, SortOrdering sortOrdering)
    {
        IStatement statement = null;
        Connection connection = null;

        // Forget any current results.

        _results = null;
View Full Code Here

Examples of org.apache.tapestry.contrib.jdbc.IStatement

    }

    public Publisher[] getPublishers()
    {
        Connection connection = null;
        IStatement statement = null;
        ResultSet set = null;

        List list = new ArrayList();

        try
        {
            connection = getConnection();

            StatementAssembly assembly = new StatementAssembly();

            assembly.newLine("SELECT PUBLISHER_ID, NAME");
            assembly.newLine("FROM PUBLISHER");
            assembly.newLine("ORDER BY NAME");

            statement = assembly.createStatement(connection);

            set = statement.executeQuery();

            while (set.next())
            {
                Integer primaryKey = (Integer) set.getObject(1);
                String name = set.getString(2);
View Full Code Here

Examples of org.apache.tapestry.contrib.jdbc.IStatement

     **/

    public Person[] getPersons()
    {
        Connection connection = null;
        IStatement statement = null;
        ResultSet set = null;

        List list = new ArrayList();

        try
        {
            connection = getConnection();

            StatementAssembly assembly = buildBasePersonQuery();
            assembly.newLine("ORDER BY LAST_NAME, FIRST_NAME");

            statement = assembly.createStatement(connection);

            set = statement.executeQuery();

            Object[] columns = new Object[Person.N_COLUMNS];

            while (set.next())
            {
View Full Code Here

Examples of org.apache.tapestry.contrib.jdbc.IStatement

     **/

    public Person getPerson(Integer personId) throws FinderException
    {
        Connection connection = null;
        IStatement statement = null;
        ResultSet set = null;

        Person result = null;

        try
        {
            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();

            if (!set.next())
                throw new FinderException("Person #" + personId + " does not exist.");

            Object[] columns = new Object[Person.N_COLUMNS];
View Full Code Here

Examples of org.apache.tapestry.contrib.jdbc.IStatement

     **/

    public Book getBook(Integer bookId) throws FinderException
    {
        Connection connection = null;
        IStatement statement = null;
        ResultSet set = null;

        Book result = null;

        try
        {
            connection = getConnection();

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

            statement = assembly.createStatement(connection);

            set = statement.executeQuery();

            if (!set.next())
                throw new FinderException("Book " + bookId + " does not exist.");

            Object[] columns = new Object[Book.N_COLUMNS];
View Full Code Here

Examples of org.apache.tapestry.contrib.jdbc.IStatement

    }

    private void executeUpdate(StatementAssembly assembly) throws XRemoveException
    {
        Connection connection = null;
        IStatement statement = null;

        try
        {
            connection = getConnection();

            statement = assembly.createStatement(connection);

            statement.executeUpdate();

            statement.close();
            statement = null;

            connection.close();
            connection = null;
        }
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.