Package org.apache.olio.workload.loader.framework

Examples of org.apache.olio.workload.loader.framework.ThreadConnection.addBatch()


        ThreadConnection c = ThreadConnection.getInstance();
        try {
            PreparedStatement s = c.prepareStatement(STATEMENT);
            s.setString(1, tag);
            s.setInt(2, id);
            c.addBatch();
        } catch (SQLException e) {
            logger.log(Level.SEVERE, e.getMessage(), e);
            Loader.increaseErrorCount();
        }
    }
View Full Code Here


                s.setString(3, comments[i]);
                s.setInt(4, ratings[i]);
                s.setInt(5, eventId * 20 + i);
                s.setDate(6, createdTimestamp);
                s.setDate(7, createdTimestamp);
                c.addBatch();
            }
        } catch (SQLException e) {
            logger.log(Level.SEVERE, e.getMessage(), e);
        }
    }
View Full Code Here

        try {
            for (int tagId : tagIds) {
                PreparedStatement s = c.prepareStatement(STATEMENT);
                s.setInt(1, tagId);
                s.setInt(2, eventId);
                c.addBatch();
            }
        } catch (SQLException e) {
            logger.log(Level.SEVERE, e.getMessage(), e);
        }
    }
View Full Code Here

                if (fields[i] != null)
                    s.setString(i + 1, fields[i]);
                else
                    s.setNull(i + 1, Types.VARCHAR);
            }
            c.addBatch();
        } catch (SQLException e) {
            logger.log(Level.SEVERE, e.getMessage(), e);
        }
    }
}
View Full Code Here

            PreparedStatement s = c.prepareStatement(STATEMENT);
            s.setInt(1, 129585);
            s.setString(2, "application/pdf");
            s.setString(3, "e" + eventId + ".pdf");
            s.setInt(4, this.eventId);
            c.addBatch();
        } catch (SQLException e) {
            logger.log(Level.SEVERE, e.getMessage(), e);
        }
    }
View Full Code Here

        try {
            for (int userId : userIdSet) {
                PreparedStatement s = c.prepareStatement(STATEMENT);
                s.setInt(1, userId);
                s.setInt(2, eventId);
                c.addBatch();
            }
        } catch (SQLException e) {
            logger.log(Level.SEVERE, e.getMessage(), e);
        }
    }
View Full Code Here

                s.setString(i + 1, fields[i]);
            s.setInt(9, addressId);
            s.setInt(10, imageId);
            s.setInt(11, id);
            s.setInt(12, thumbnail);
            c.addBatch();
        } catch (SQLException e) {
            logger.log(Level.SEVERE, e.getMessage(), e);
        }
    }
}
View Full Code Here

            s.setString(3, prefix + imageId + ".jpg");
            s.setInt(4, 1280);
            s.setInt(5, 960);
            s.setString(6, prefix + imageId + "t.jpg");
            s.setInt(7, this.imageKey);
            c.addBatch();
        } catch (SQLException e) {
            logger.log(Level.SEVERE, e.getMessage(), e);
        }
    }
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.