Package java.sql

Examples of java.sql.ResultSet.updateLong()


        rs.updateDate(7, null);
        rs.updateTime(8, null);
        rs.updateTimestamp(9, null);
        rs.updateDouble(10, 0.0);
        rs.updateFloat(11, (float) 0.0);
        rs.updateLong(12, 0L);
        rs.updateObject(13, null);
        rs.updateShort(14, (short) 0);
        rs.updateCharacterStream(15, new StringReader("test"), 0);
        rs.updateBinaryStream(16, new ByteArrayInputStream(new byte[] { (byte) 0xff, 0x00 }), 0);
        rs.insertRow();
View Full Code Here


        rs.updateDate("D", Date.valueOf("2005-09-21"));
        rs.updateTime("T", Time.valueOf("21:46:28"));
        rs.updateTimestamp("TS", Timestamp.valueOf("2005-09-21 21:47:09.567890123"));
        rs.updateDouble("DB", 1.725);
        rs.updateFloat("R", (float) 2.5);
        rs.updateLong("L", Long.MAX_VALUE);
        rs.updateObject("O_I", 10);
        rs.updateShort("SH", Short.MIN_VALUE);
        // auml, ouml, uuml
        rs.updateCharacterStream("CL", new StringReader("\u00ef\u00f6\u00fc"), 0);
        rs.updateBinaryStream("BL", new ByteArrayInputStream(new byte[] { (byte) 0xab, 0x12 }), 0);
View Full Code Here

      try {
        while (rs.next()) {
          long oid = rs.getLong(2);
         
          if (oid > 0) {
            rs.updateLong(1, expires);
          }
          else {
            try {
              notifyOrphan(rs.getBytes(3));
            } catch (Exception e) {
View Full Code Here

                        + entity.getName());
            }

            long nextId = rs.getLong(1);

            rs.updateLong(1, nextId + pkCacheSize);
            rs.updateRow();

            if (rs.next()) {
                throw new CayenneException("More than one PK record for table: "
                        + entity.getName());
View Full Code Here

          if (v instanceof String)
            rs.updateString(idx++, (String) v);
          else if (v instanceof Boolean)
            rs.updateBoolean(idx++, (Boolean) v);
          else if (v instanceof Long)
            rs.updateLong(idx++, (Long) v);
          else
            throw new Error("Unknown value type " + v.getClass() + " (" + v + ")");
        }
        rs.updateRow();
      }
View Full Code Here

                        + entity.getName());
            }

            long nextId = rs.getLong(1);

            rs.updateLong(1, nextId + pkCacheSize);
            rs.updateRow();

            if (rs.next()) {
                throw new CayenneException("More than one PK record for table: "
                        + entity.getName());
View Full Code Here

                ResultSet.CONCUR_UPDATABLE);
        ResultSet rs = s.executeQuery(SELECT_STMT);
        rs.next();

        for (int i = 1; i <= COLUMNS; i++) {
            rs.updateLong(i, 2L);
            assertEquals("Expected rs.getLong(" + i +
                         ") to match updated value", 2L, rs.getLong(i));
        }
        rs.updateRow();
        rs.close();
View Full Code Here

                        + entity.getName());
            }

            long nextId = rs.getLong(1);

            rs.updateLong(1, nextId + pkCacheSize);
            rs.updateRow();

            if (rs.next()) {
                throw new CayenneException("More than one PK record for table: "
                        + entity.getName());
View Full Code Here

        while (rs1.next()) {
            if (rs1.getInt(1) == updateRowId) {
                rs1.updateClob(4, value);
                rs1.updateInt(1, updateIdVal);
                rs1.updateInt(2, 0);
                rs1.updateLong(3, dlen);
                rs1.updateRow();
                break;
            }
        }
View Full Code Here

                ResultSet.CONCUR_UPDATABLE);
        ResultSet rs = s.executeQuery(SELECT_STMT);
        rs.next();

        for (int i = 1; i <= COLUMNS; i++) {
            rs.updateLong(i, 2L);
            assertEquals("Expected rs.getLong(" + i +
                         ") to match updated value", 2L, rs.getLong(i));
        }
        rs.updateRow();
        rs.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.