List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:January 4 2008 7:02pm
Subject:Rev 406: Reformatted some lines. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel

------------------------------------------------------------
revno: 406
revision-id:mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: devel
timestamp: Fri 2008-01-04 11:02:27 -0800
message:
  Reformatted some lines. 
modified:
  java/com/mysql/cluster/ndbj/NdbOperation.java
ndboperation.java-20070517181935-98huwjarzuh25b30-19
=== modified file 'java/com/mysql/cluster/ndbj/NdbOperation.java'
--- a/java/com/mysql/cluster/ndbj/NdbOperation.java	2007-12-26 22:53:00 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbOperation.java	2008-01-04 19:02:27 +0000
@@ -2,30 +2,47 @@
 
 
 /**
- * A NdbOperation object represents an operation using a primary key to access a row in a
table.
+ * A NdbOperation object represents an operation using a primary key to access
+ * a row in a table.
  * <br>The main way to use it is to follow the following steps:
  * <ol>
- * <li>create a NdbOperation object using startTransaction method on a Ndb object
- * <li>decide on the type of operation to perfom on the operation (readTuple(),
insertTuple(), updateTuple(), deleteTuple())
- * <li>define the search criteria for a row by setting the primary key using the
equal() method.
- *      For example, if you are reading a tuple with a single column as a primary key,
you execute the equal() method once on that column, 
- *      specifying the value of the column to indicate the row you are searching for.
- *     However, if your primary key consists of multiple columns (e.g., PRIMARY KEY(a, b,
c)), then you call the equal() method for 
+ * <li>create a NdbOperation object using startTransaction method on a Ndb
+ *     object
+ * <li>decide on the type of operation to perfom on the operation
+ *     (readTuple(), insertTuple(), updateTuple(), deleteTuple())
+ * <li>define the search criteria for a row by setting the primary key using
+ *     the equal() method.
+ *      For example, if you are reading a tuple with a single column as a
+ *      primary key, you execute the equal() method once on that column,
+ *      specifying the value of the column to indicate the row you are
+ *      searching for.
+ *     However, if your primary key consists of multiple columns
+ *      (e.g., PRIMARY KEY(a, b, c)), then you call the equal() method for
  *     all the of the columns in the primary key.<br>
- *     For examplee, for the following table: @code { create table t_multi (a int NOT
NULL, b int NOT NULL, c char(20), PRIMARY KEY (a,b)) engine=ndb;) }
- *     You would call 
- *     @code { 
- *     operation.equal("a", VAL); 
- *     operation.equal("b",VAL2); 
+ *     For examplee, for the following table:
+ *       @code { create table t_multi
+ *                 (a int NOT NULL,
+ *                  b int NOT NULL,
+ *                  c char(20),
+ *                  PRIMARY KEY (a,b)) engine=ndb;) }
+ *     You would call
+ *     @code {
+ *     operation.equal("a", VAL);
+ *     operation.equal("b",VAL2);
  *     }.
- * <li>For any rows found after you called the equal() method(s), you can get/set
the value of columns in those rows. These are known as <b>attribute
actions</b>.
- * <li>Commit the operation by calling the exec() method on the NdbTransaction
object.
+ * <li>For any rows found after you called the equal() method(s), you can
+ *     get/set the value of columns in those rows. These are known as
+ *     <b>attribute actions</b>.
+ * <li>Commit the operation by calling the exec() method on the NdbTransaction
+ *     object.
  * <li>Retrieve any results using a NdbResultSet.
  * </ol>
  * <p>
- * The following code assumes that the operation is executed on the following table
+ * The following code assumes that the operation is executed on the following
+ * table
  * <p>
- * <code> create table t (id int NOT NULL, val varchar(64), PRIMARY KEY id)
engine=ndb;
+ * <code> create table t (id int NOT NULL, val varchar(64), PRIMARY KEY id)
+ *   engine=ndb;
  * </code>
  * <p>
  * <code>
@@ -35,13 +52,14 @@
  *          <br>op.equal("id",PK_VAL);
  *          <br>op.getValue("val");
  *          <br>NdbResultSet rs = op.resultData();
- *         
<br>trans.execute(NdbTransaction.ExecType.Commit,NdbTransaction.AbortOption.AbortOnError,1
);
+ *          <br>trans.execute(NdbTransaction.ExecType.Commit,
+ *                            NdbTransaction.AbortOption.AbortOnError,1 );
  *          <br>while(rs.next())
  *          <br> String val = rs.getString(columnName);
  * </code>
  *
- * <p>An IllegalStateException is thrown if you attempt to invoke methods on this
class
- * after the close method has been called on instances.
+ * <p>An IllegalStateException is thrown if you attempt to invoke methods on
+ * this class after the close method has been called on instances.
  *
  * @see com.mysql.cluster.ndbj.NdbBase
  * @see com.mysql.cluster.ndbj.NdbTransaction
@@ -51,7 +69,8 @@
  * @see com.mysql.cluster.ndbj.NdbScanOperation
  * @see com.mysql.cluster.ndbj.NdbIndexScanOperation
  */
-public interface NdbOperation extends NdbBaseOperationEquals, NdbInterpretedOperation,
NdbBaseOperationSet {
+public interface NdbOperation extends NdbBaseOperationEquals,
+                              NdbInterpretedOperation, NdbBaseOperationSet {
 
     public enum LockMode {
         LM_Read(0), ///< Read with shared lock
@@ -60,62 +79,67 @@
 
         public int type = 0;
 
-        public int swigValue() { 
-        		return this.type;
+        public int swigValue() {
+            return this.type;
         }
         private LockMode(int type) {
                 this.type = type;
         }
     }
-	/**
-	 * Creates a blob handle NdbBlob.
-	 * <br>A second call with same argument returns the previously created handle.
-	 * The handle is linked to the operation and is maintained automatically.
-	 *
-	 * @param  columnId integer position (offset) of column number in schema definition
(columnId starts from  position '1' for the first column in a schema)
-	 * @return NdbBlob object
-	 * @throws NdbApiException if there was a problem in the cluster when selecting this
column.
-	 * @note getting a blob handle on a non-existing column yields a seg fault,
-	 *       see bug report http://bugs.mysql.com/bug.php?id=21036
-	 *
-	 */
-	public abstract NdbBlob getBlobHandle(long columnId)
-			throws NdbApiException;
-	@Deprecated
-	public abstract NdbBlob getNdbBlobHandle(long columnId)
-		throws NdbApiException;
-
-	/**
-	 * Gets a BlobHandle object using the String name for the Blob column in
-	 * the the table. The BlobHandle object can be used to read/write the Blob.
-	 * @param columnName name of the Column in the Schema
-	 * @return NdbBlob object
-     * @throws NdbApiException if there was a problem in the cluster when selecting this
column.
-	 */
-	public abstract NdbBlob getBlobHandle(String columnName)
-			throws NdbApiException;
-	@Deprecated
-	public abstract NdbBlob getNdbBlobHandle(String columnName)
-		throws NdbApiException;
-
-	/**
+    /**
+     * Creates a blob handle NdbBlob.
+     * <br>A second call with same argument returns the previously created
+     *  handle.
+     * The handle is linked to the operation and is maintained automatically.
+     *
+     * @param  columnId integer position (offset) of column number in schema
+     *         definition (columnId starts from  position '1' for the first
+     *         column in a schema)
+     * @return NdbBlob object
+     * @throws NdbApiException if there was a problem in the cluster when
+     *         selecting this column.
+     * @note getting a blob handle on a non-existing column yields a seg fault,
+     *       see bug report http://bugs.mysql.com/bug.php?id=21036
+     *
+	 */
+    public abstract NdbBlob getBlobHandle(long columnId)
+        throws NdbApiException;
+    @Deprecated
+    public abstract NdbBlob getNdbBlobHandle(long columnId)
+        throws NdbApiException;
+
+    /**
+     * Gets a BlobHandle object using the String name for the Blob column in
+     * the the table. The BlobHandle object can be used to read/write the Blob.
+     * @param columnName name of the Column in the Schema
+	 * @return NdbBlob object
+     * @throws NdbApiException if there was a problem in the cluster when
+     *  selecting this column.
+	 */
+    public abstract NdbBlob getBlobHandle(String columnName)
+        throws NdbApiException;
+    @Deprecated
+    public abstract NdbBlob getNdbBlobHandle(String columnName)
+        throws NdbApiException;
+
+    /**
 	 * TIMESTAMP_MAX is "2037-12-31 23:59:59", which is
-	 * 2144361599000L in long UNIX format.  
+     * 2144361599000L in long UNIX format.
      * <br>In sql/my_time.h, it's set to 0x7FFFFFFFL
-	 */
-	public static final long TIMESTAMP_MAX = 2144361599000L * 1000L;
-//  <br>In Java format, it is (2144361599000L * 1000L), as the unit for Java
Timestamp is nano-seconds, whereas the unit for UNIX Timestamp is milliseconds.
-// Hence, we multiply the UNIX TIMESTAMP_MAX by 1000 to get the max Timestamp in Java.
-
-	/**
-	 * TIMESTAMP_MIN is the minimum Timestamp value, which is 0, or
-	 * "1970-01-01 00:00:00.
-	 */
-	public static final long TIMESTAMP_MIN = 0L;
-
-
-	public NdbTable getTable();
-
-
+     *
+     * <br>In Java format, it is (2144361599000L * 1000L), as the unit for Java
+     * Timestamp is nano-seconds, whereas the unit for UNIX Timestamp is
+     * milliseconds. Hence, we multiply the UNIX TIMESTAMP_MAX by 1000 to
+     * get the max Timestamp in Java.
+     */
+    public static final long TIMESTAMP_MAX = 2144361599000L * 1000L;
+
+    /**
+     * TIMESTAMP_MIN is the minimum Timestamp value, which is 0, or
+     * "1970-01-01 00:00:00.
+     */
+    public static final long TIMESTAMP_MIN = 0L;
+
+    public NdbTable getTable();
 
 }

Thread
Rev 406: Reformatted some lines. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/develMonty Taylor4 Jan