Examples of prepareCall()


Examples of java.sql.Connection.prepareCall()

    DaoResult<Folder> result = null;
    CallableStatement cStmt = null;
    Connection conn = null;
    try{           
      conn = dataSource.getConnection();
      cStmt = conn.prepareCall("call pageFoldersByOwnerId(?,?,?,?);");
      cStmt.setInt(1,owner.getId());
      cStmt.setInt(2,offset);
      cStmt.setInt(3,count);
      cStmt.registerOutParameter(4,Types.INTEGER);
      ResultSet rs = cStmt.executeQuery();
View Full Code Here

Examples of java.sql.Connection.prepareCall()

    Connection conn = null;
    CallableStatement cstmt = null;
    int upCnt = 0;
    try {
      conn = dataSource.getConnection();
      cstmt = conn.prepareCall("call removeAllBookmarksFromFolder(?)");
      cstmt.setInt(1,folder.getId());
      ResultSet rs = cstmt.executeQuery();
      if(rs.next()){
        upCnt = rs.getInt(1);
      }
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.SQLBuffer.prepareCall()

            JDBCFetchConfiguration fetch = (JDBCFetchConfiguration)
                q.getContext().getFetchConfiguration();

            PreparedStatement stmnt = null;
            try {
                stmnt = buf.prepareCall(conn);

                int index = 0;
                for (Iterator i = paramList.iterator(); i.hasNext();)
                    dict.setUnknown(stmnt, ++index, i.next(), null);
               
View Full Code Here

Examples of org.eclipse.persistence.queries.DatabaseQuery.prepareCall()

   */
  private String rewriteEclipseLink(Query query) {
    EJBQueryImpl qi = (EJBQueryImpl) query;
    Session session = this.entityManager.unwrap(JpaEntityManager.class).getActiveSession();
    DatabaseQuery databaseQuery = (qi).getDatabaseQuery();
    databaseQuery.prepareCall(session, new DatabaseRecord());
    String sqlString = databaseQuery.getTranslatedSQLString(session,  new DatabaseRecord());
   
    //ADD THE ALIAS in the select statement (necessary for the temporary table construction.. ex for the worksheet)
    int fromPosition = sqlString.indexOf("FROM");
    StringBuffer sqlQuery2 = new StringBuffer();
View Full Code Here

Examples of org.jooq.tools.jdbc.MockConnection.prepareCall()

                return new MockResult[] { new MockResult(recordOne) };
            }
        });

        CallableStatement stmt = connection.prepareCall("{ ? = call my_function(?, ?, ?, ?) }");

        stmt.registerOutParameter(1, Types.INTEGER);
        stmt.setInt(2, 2);
        stmt.registerOutParameter(3, Types.VARCHAR);
        stmt.setInt(4, 4);
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.