Package java.sql

Examples of java.sql.Connection.prepareCall()


    List<Bookmark> bmarks = new ArrayList<Bookmark>();
    CallableStatement stmt = null;
    Connection conn = null;
    try{       
      conn = dataSource.getConnection();
      stmt = conn.prepareCall("call pageCommunityBookmarkSearch(?,?,?,?)");
      stmt.setString(1,searchQuery);
      stmt.setInt(2,offset);
      stmt.setInt(3,count);
      stmt.registerOutParameter(4,Types.INTEGER);
      ResultSet rs = stmt.executeQuery();
View Full Code Here


    List<Bookmark> bmarks = new ArrayList<Bookmark>();
    CallableStatement stmt = null;
    Connection conn = null;
    try{       
      conn = dataSource.getConnection();
      stmt = conn.prepareCall("call pageUserBookmarkSearch(?,?,?,?,?)");
      stmt.setString(1,searchQuery);
      stmt.setInt(2,user.getId());
      stmt.setInt(3,offset);
      stmt.setInt(4,count);
      stmt.registerOutParameter(5,Types.INTEGER);
View Full Code Here

    CallableStatement stmt = null;
    DaoResult<Bookmark> result = null;
    List<Bookmark> bmarks = new ArrayList<Bookmark>();
    try {
      conn = dataSource.getConnection();
      stmt = conn.prepareCall("call pageBookmarksUserId(?,?,?,?,?,?);");
      stmt.setInt(1,user.getId());
      stmt.setInt(2,offset);
      stmt.setInt(3,count);
      stmt.registerOutParameter(4, Types.INTEGER);   
      stmt.setInt(5,sortBy);
View Full Code Here

    CallableStatement stmt = null;
    DaoResult<Bookmark> result = null;
    List<Bookmark> bmarks = new ArrayList<Bookmark>();
    try {
      conn = dataSource.getConnection();
      stmt = conn.prepareCall("call pageBookmarksUserIdTagId(?,?,?,?,?,?,?)");
      stmt.setLong(1,user.getId());
      stmt.setLong(2,tag.getId());
      stmt.setLong(3,offset);
      stmt.setInt(4,count);
      stmt.registerOutParameter(5, Types.INTEGER);     
View Full Code Here

    Connection conn = null;
    CallableStatement stmt = null;   
    List<Bookmark> bmarks = new ArrayList<Bookmark>();
    try {
      conn = dataSource.getConnection();
      stmt = conn.prepareCall("call getPopularBookmarks(?,?,?)");
      stmt.setTimestamp(1,new Timestamp(start.getTime()));
      stmt.setTimestamp(2,new Timestamp(end.getTime()));
      stmt.setInt(3,maxCount);
      ResultSet rs = stmt.executeQuery();
      while(rs.next()){
View Full Code Here

    Connection conn = null;
    CallableStatement cStmt = null;
    int id = -1;
    try{
      conn = dataSource.getConnection();
      cStmt = conn.prepareCall("call createPointMarker(PointFromWKB(?),?,?,?)");
      byte[] buf = wkbWriter.write(pm.getPoint());
      cStmt.setBytes(1,buf);
      cStmt.setString(2,pm.getNotes());
      cStmt.setInt(3,pm.getMarkerIconId());
      cStmt.registerOutParameter(4,Types.INTEGER);
View Full Code Here

    logger.debug("addPointMarker: bm=" + bm + ", ptMarker=" + ptMarker);
    Connection conn = null;
    CallableStatement cStmt = null;
    try{
      conn = dataSource.getConnection();
      cStmt = conn.prepareCall("call addPointMarker(?,?)");
      cStmt.setInt(1,bm.getId());
      cStmt.setInt(2,ptMarker.getId());
      cStmt.execute()
      return true;
    }catch(Exception e){
View Full Code Here

    logger.debug("removePointMarker: bm=" + bm + ", ptMarker=" + ptMarker);
    Connection conn = null;
    CallableStatement cStmt = null;
    try{
      conn = dataSource.getConnection();
      cStmt = conn.prepareCall("call removePointMarker(?,?)");
      cStmt.setInt(1,bm.getId());
      cStmt.setInt(2,ptMarker.getId());
      cStmt.execute()
      return true;
    }catch(Exception e){
View Full Code Here

    CallableStatement stmt = null;
    DaoResult<Bookmark> result= null;
    List<Bookmark> bmarks = new ArrayList<Bookmark>();
    try {
      conn = dataSource.getConnection();
      stmt = conn.prepareCall("call pageArcBookmarkHasGeomMarker(?,?,?,?)");
      stmt.setInt(1,user.getId());
      stmt.setInt(2,offset);
      stmt.setInt(3,count);
      stmt.registerOutParameter(4,Types.INTEGER);
      ResultSet rs = stmt.executeQuery();
View Full Code Here

    CallableStatement stmt = null;
    DaoResult<Bookmark> result= null;
    List<Bookmark> bmarks = new ArrayList<Bookmark>();
    try {
      conn = dataSource.getConnection();
      stmt = conn.prepareCall("call pageFlrBookmarkHasGeomMarker(?,?,?,?)");
      stmt.setInt(1,folder.getId());
      stmt.setInt(2,offset);
      stmt.setInt(3,count);
      stmt.registerOutParameter(4,Types.INTEGER);
      ResultSet rs = stmt.executeQuery();
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.