Examples of PerfArticle


Examples of org.apache.ojb.performance.PerfArticle

            Connection con = getConnection();
            con.setAutoCommit(false);
            PreparedStatement stmt = con.prepareStatement(buf.toString());
            for (int i = 0; i < arr.length; i++)
            {
                PerfArticle article = arr[i];
                // use Identity to set pk field value
                Identity oid = new Identity(article, broker);
                stmt.setLong(1, article.getArticleId().longValue());
                stmt.setString(2, article.getArticleName());
                stmt.setInt(3, article.getMinimumStock());
                stmt.setDouble(4, article.getPrice());
                stmt.setString(5, article.getUnit());
                stmt.setInt(6, article.getStock());
                stmt.setInt(7, article.getSupplierId());
                stmt.executeUpdate();
            }
            con.commit();
            con.setAutoCommit(true);
            stmt.close();
View Full Code Here

Examples of org.apache.ojb.performance.PerfArticle

            Statement stmt = con.createStatement();
            ResultSet rs = stmt.executeQuery(sql);
            ArrayList list = new ArrayList();
            while (rs.next())
            {
                PerfArticle article = new PerfArticleImpl();
                article.setArticleId(new Long(rs.getLong("ARTICLE_ID")));
                article.setArticleName(rs.getString("ARTICLE_NAME"));
                article.setMinimumStock(rs.getInt("MINIMUM_STOCK"));
                article.setPrice(rs.getDouble("PRICE"));
                article.setUnit(rs.getString("UNIT"));
                article.setStock(rs.getInt("STOCK"));
                article.setSupplierId(rs.getInt("SUPPLIER_ID"));
                list.add(article);
            }
            rs.close();
            stmt.close();
            releaseConnection();
View Full Code Here

Examples of org.apache.ojb.performance.PerfArticle

            Connection con = getConnection();
            con.setAutoCommit(false);
            PreparedStatement stmt = con.prepareStatement(buf.toString());
            for (int i = 0; i < arr.length; i++)
            {
                PerfArticle article = arr[i];
                stmt.setString(1, article.getArticleName());
                stmt.setInt(2, article.getMinimumStock());
                stmt.setDouble(3, article.getPrice());
                stmt.setString(4, article.getUnit());
                stmt.setInt(5, article.getStock());
                stmt.setInt(6, article.getSupplierId());
                stmt.setLong(7, article.getArticleId().longValue());
                stmt.executeUpdate();
            }
            con.commit();
            con.setAutoCommit(true);
            stmt.close();
View Full Code Here

Examples of org.apache.ojb.performance.PerfArticle

            Connection con = getConnection();
            con.setAutoCommit(false);
            PreparedStatement stmt = con.prepareStatement(sql);
            for (int i = 0; i < arr.length; i++)
            {
                PerfArticle article = arr[i];
                stmt.setLong(1, article.getArticleId().longValue());
                stmt.execute();
            }
            con.commit();
            con.setAutoCommit(true);
            stmt.close();
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.