=== modified file 'interface/ndbapi/NdbTransaction.i'
--- a/interface/ndbapi/NdbTransaction.i	2008-05-22 17:05:11 +0000
+++ b/interface/ndbapi/NdbTransaction.i	2008-06-03 14:35:21 +0000
@@ -263,6 +263,294 @@
 
   }
 
+  NdbOperation* getUpdateOperation(const char* aTableName)
+  {
+    NdbOperation * theOp = self->getNdbOperation(aTableName);
+    if (theOp != NULL)
+    {
+      theOp->updateTuple();
+    }
+    return theOp;
+  }
+
+  NdbOperation* getUpdateOperation(const class NdbDictTable* aTable)
+  {
+    NdbOperation * theOp = self->getNdbOperation(aTable);
+    if (theOp != NULL)
+    {
+      theOp->updateTuple();
+    }
+    return theOp;
+  }
+
+  NdbOperation* getInsertOperation(const char* aTableName)
+  {
+    NdbOperation * theOp = self->getNdbOperation(aTableName);
+    if (theOp != NULL)
+    {
+      theOp->insertTuple();
+    }
+    return theOp;
+  }
+
+  NdbOperation* getInsertOperation(const class NdbDictTable* aTable)
+  {
+    NdbOperation * theOp = self->getNdbOperation(aTable);
+    if (theOp != NULL)
+    {
+      theOp->insertTuple();
+    }
+    return theOp;
+  }
+
+  NdbOperation* getDeleteOperation(const char* aTableName)
+  {
+    NdbOperation * theOp = self->getNdbOperation(aTableName);
+    if (theOp != NULL)
+    {
+      theOp->deleteTuple();
+    }
+    return theOp;
+  }
+
+  NdbOperation* getDeleteOperation(const class NdbDictTable* aTable)
+  {
+    NdbOperation * theOp = self->getNdbOperation(aTable);
+    if (theOp != NULL)
+    {
+      theOp->deleteTuple();
+    }
+    return theOp;
+  }
+
+  NdbIndexOperation* getDeleteUniqueOperation(const class NdbDictIndex* anIndex,
+                                              const class NdbDictTable* aTable)
+  {
+    NdbIndexOperation * theOp = self->getNdbIndexOperation(anIndex, aTable);
+    if (theOp != NULL)
+    {
+      theOp->deleteTuple();
+    }
+    return theOp;
+  }
+
+  NdbIndexOperation* getDeleteUniqueOperation(const char* anIndexName,
+                                              const char* aTableName)
+  {
+    NdbIndexOperation * theOp = self->getNdbIndexOperation(anIndexName, aTableName);
+    if (theOp != NULL)
+    {
+      theOp->deleteTuple();
+    }
+    return theOp;
+  }
+
+  NdbIndexOperation* getDeleteUniqueOperation(const class NdbDictIndex* anIndex)
+  {
+    NdbIndexOperation * theOp = self->getNdbIndexOperation(anIndex);
+    if (theOp != NULL)
+    {
+      theOp->deleteTuple();
+    }
+    return theOp;
+  }
+  
+  NdbIndexOperation* getSelectUniqueOperation(const class NdbDictIndex* anIndex,
+                                              const class NdbDictTable* aTable,
+                                              NdbOperation::LockMode lockMode)
+  {
+    NdbIndexOperation * theOp = self->getNdbIndexOperation(anIndex, aTable);
+    if (theOp != NULL)
+    {
+      theOp->readTuple(lockMode);
+    }
+    return theOp;  
+  }
+
+  NdbIndexOperation* getSelectUniqueOperation(const char* anIndexName,
+                                              const char* aTableName,
+                                              NdbOperation::LockMode lockMode)
+  {
+    NdbIndexOperation * theOp = self->getNdbIndexOperation(anIndexName, aTableName);
+    if (theOp != NULL)
+    {
+      theOp->readTuple(lockMode);
+    }
+    return theOp;  
+  }
+
+  NdbIndexOperation* getUpdateUniqueOperation(const class NdbDictIndex* anIndex,
+                                              const class NdbDictTable* aTable)
+  {
+    NdbIndexOperation * theOp = self->getNdbIndexOperation(anIndex, aTable);
+    if (theOp != NULL)
+    {
+      theOp->updateTuple();
+    }
+    return theOp;
+  }
+
+  NdbIndexOperation* getUpdateUniqueOperation(const char* anIndexName,
+                                              const char* aTableName)
+  {
+    NdbIndexOperation * theOp = self->getNdbIndexOperation(anIndexName, aTableName);
+    if (theOp != NULL)
+    {
+      theOp->updateTuple();
+    }
+    return theOp;  
+  }
+
+  NdbScanOperation* getSelectScanOperation(const char* aTableName,
+                                           NdbOperation::LockMode lockMode,
+                                           NdbScanOperation::ScanFlag scanFlag,
+                                           int parallel,
+                                           int batch)
+  {
+    NdbScanOperation * theOp = self->getNdbScanOperation(aTableName);
+    if (theOp != NULL)
+    {
+      theOp->readTuples(lockMode, scanFlag, (Uint32)parallel, (Uint32)batch);
+    }
+    return theOp;
+  }
+
+  NdbScanOperation* getSelectScanOperation(const class NdbDictTable* aTable,
+                                           NdbOperation::LockMode lockMode,
+                                           NdbScanOperation::ScanFlag scanFlag,
+                                           int parallel,
+                                           int batch)
+  {
+    NdbScanOperation * theOp = self->getNdbScanOperation(aTable);
+    if (theOp != NULL)
+    {
+      theOp->readTuples(lockMode, scanFlag, (Uint32)parallel, (Uint32)batch);
+    }
+    return theOp;
+  }
+
+  NdbScanOperation* getSelectScanOperation(const class NdbDictTable* aTable,
+                                           NdbOperation::LockMode lockMode,
+                                           int scanFlag,
+                                           int parallel,
+                                           int batch)
+  {
+    NdbScanOperation * theOp = self->getNdbScanOperation(aTable);
+    if (theOp != NULL)
+    {
+      theOp->readTuples(lockMode, (Uint32)scanFlag, (Uint32)parallel, (Uint32)batch);
+    }
+    return theOp;
+  }
+
+  NdbScanOperation* getSelectScanOperation(const char* aTableName,
+                                           NdbOperation::LockMode lockMode,
+                                           int scanFlag,
+                                           int parallel,
+                                           int batch)
+  {
+    NdbScanOperation * theOp = self->getNdbScanOperation(aTableName);
+    if (theOp != NULL)
+    {
+      theOp->readTuples(lockMode, (Uint32)scanFlag, (Uint32)parallel, (Uint32)batch);
+    }
+    return theOp;
+  }
+  
+  NdbIndexScanOperation* getSelectIndexScanOperation(const char* anIndexName,
+                                                     const char* aTableName,
+                                                     NdbOperation::LockMode lockMode,
+                                                     NdbScanOperation::ScanFlag scanFlag,
+                                                     int parallel,
+                                                     int batch)
+  {
+    NdbIndexScanOperation * theOp = self->getNdbIndexScanOperation(anIndexName, aTableName);
+    
+    if (theOp != NULL)
+    {
+      theOp->readTuples(lockMode, scanFlag, (Uint32)parallel, (Uint32)batch);
+    }
+    return theOp;
+  }
+
+  NdbIndexScanOperation* getSelectIndexScanOperation(NdbDictIndex* anIndex,
+                                                     NdbDictTable* aTable,
+                                                     NdbOperation::LockMode lockMode,
+                                                     NdbScanOperation::ScanFlag scanFlag,
+                                                     int parallel,
+                                                     int batch)
+  {
+    NdbIndexScanOperation * theOp = self->getNdbIndexScanOperation(anIndex, aTable);
+    
+    if (theOp != NULL)
+    {
+      theOp->readTuples(lockMode, scanFlag, (Uint32)parallel, (Uint32)batch);
+    }
+    return theOp;
+  }
+  
+  NdbIndexScanOperation* getSelectIndexScanOperation(NdbDictIndex* anIndex,
+                                                     NdbOperation::LockMode lockMode,
+                                                     NdbScanOperation::ScanFlag scanFlag,
+                                                     int parallel,
+                                                     int batch)
+  {
+    NdbIndexScanOperation * theOp = self->getNdbIndexScanOperation(anIndex);
+    
+    if (theOp != NULL)
+    {
+      theOp->readTuples(lockMode, scanFlag, (Uint32)parallel, (Uint32)batch);
+    }
+    return theOp;
+  }
+  
+  NdbIndexScanOperation* getSelectIndexScanOperation(const char* anIndexName,
+                                                     const char* aTableName,
+                                                     NdbOperation::LockMode lockMode,
+                                                     int scanFlag,
+                                                     int parallel,
+                                                     int batch)
+  {
+    NdbIndexScanOperation * theOp = self->getNdbIndexScanOperation(anIndexName, aTableName);
+    
+    if (theOp != NULL)
+    {
+      theOp->readTuples(lockMode, (Uint32)scanFlag, (Uint32)parallel, (Uint32)batch);
+    }
+    return theOp;
+  }
+  
+  NdbIndexScanOperation* getSelectIndexScanOperation(NdbDictIndex* anIndex,
+                                                     NdbDictTable* aTable,
+                                                     NdbOperation::LockMode lockMode,
+                                                     int scanFlag,
+                                                     int parallel,
+                                                     int batch)
+  {
+    NdbIndexScanOperation * theOp = self->getNdbIndexScanOperation(anIndex, aTable);
+    
+    if (theOp != NULL)
+    {
+      theOp->readTuples(lockMode, (Uint32)scanFlag, (Uint32)parallel, (Uint32)batch);
+    }
+    return theOp;
+  }
+
+  NdbIndexScanOperation* getSelectIndexScanOperation(NdbDictIndex* anIndex,
+                                                     NdbOperation::LockMode lockMode,
+                                                     int scanFlag,
+                                                     int parallel,
+                                                     int batch)
+  {
+    NdbIndexScanOperation * theOp = self->getNdbIndexScanOperation(anIndex);
+    
+    if (theOp != NULL)
+    {
+      theOp->readTuples(lockMode, (Uint32)scanFlag, (Uint32)parallel, (Uint32)batch);
+    }
+    return theOp;
+  }
+
   %ndbnoexception;
 
   const NdbOperation * getNextCompletedOperation(const NdbOperation * op=NULL) {

=== modified file 'java/com/mysql/cluster/ndbj/NdbOperationFactory.java'
--- a/java/com/mysql/cluster/ndbj/NdbOperationFactory.java	2008-02-16 17:04:54 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbOperationFactory.java	2008-06-03 14:35:21 +0000
@@ -1,5 +1,6 @@
 package com.mysql.cluster.ndbj;
 
+import com.mysql.cluster.ndbj.NdbOperation.LockMode;
 import com.mysql.cluster.ndbj.NdbScanOperation.ScanFlag;
 
 public interface NdbOperationFactory {
@@ -37,16 +38,6 @@
 	
 	/**
 	 * Creates a NdbOperation (primary key operation) and adds it to the transaction.
-	 * @param tableName the table to be operated upon
-	 * @return an NdbOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the 
-	 * Operation object could not be created
-	 */
-	public abstract NdbOperation getSelectOperation(String tableName) 
-	throws NdbApiException;
-
-	/**
-	 * Creates a NdbOperation (primary key operation) and adds it to the transaction.
 	 * @param aTable the table to be operated upon
 	 * @param theLockMode the lock mode to use
 	 * @return an NdbOperation object
@@ -61,15 +52,6 @@
 	 * @return an NdbOperation object
 	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
 	 */
-	public abstract NdbOperation getSelectOperation(NdbTable table) 
-	throws NdbApiException;
-	
-	/**
-	 * Creates a NdbOperation (primary key operation) and adds it to the transaction.
-	 * @param aTable the table to be operated upon
-	 * @return an NdbOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
 	public abstract NdbOperation getUpdateOperation(String tableName)
 			throws NdbApiException;
 
@@ -132,16 +114,6 @@
 	
 	/**
 	 * Creates a NdbIndexOperation (secondary unique index operation) and adds it to the transaction.
-	 * @param indexName the index to use
-	 * @param tableName the table to be operated upon
-	 * @return an NdbOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public abstract NdbIndexOperation getSelectUniqueOperation(String indexName, String tableName) 
-	throws NdbApiException;
-
-	/**
-	 * Creates a NdbIndexOperation (secondary unique index operation) and adds it to the transaction.
 	 * @param index the index to use 
 	 * @param table the table to be operated upon
 	 * @param theLockMode the lock mode to use
@@ -153,15 +125,6 @@
 
 	/**
 	 * Creates a NdbIndexOperation (secondary unique index operation) and adds it to the transaction.
-	 * @param index the index to use 
-	 * @param table the table to be operated upon
-	 * @return an NdbOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public abstract NdbIndexOperation getSelectUniqueOperation(NdbIndex index, NdbTable table) 
-	throws NdbApiException;
-	/**
-	 * Creates a NdbIndexOperation (secondary unique index operation) and adds it to the transaction.
 	 * @param aTable the table to be operated upon
 	 * @return an NdbOperation object
 	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
@@ -209,152 +172,105 @@
 	/**
 	 * Creates a NdbScanOperation (table scan operation) and adds it to the transaction.
 	 * @param aTable the table to be operated upon
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbScanOperation getSelectScanOperation(String tableName) 
-	throws NdbApiException;
-	
-	/**
-	 * Creates a NdbScanOperation (table scan operation) and adds it to the transaction.
-	 * @param aTable the table to be operated upon
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbScanOperation getSelectScanOperation(NdbTable table) 
-	throws NdbApiException;
-	
-	/**
-	 * Creates a NdbScanOperation (table scan operation) and adds it to the transaction.
-	 * @param aTable the table to be operated upon
-	 * @param scanFlag flag controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbScanOperation getSelectScanOperation(String tableName, ScanFlag scanFlag) 
-	throws NdbApiException;
-	
-	/**
-	 * Creates a NdbScanOperation (table scan operation) and adds it to the transaction.
-	 * @param aTable the table to be operated upon
-	 * @param scanFlag flag controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbScanOperation getSelectScanOperation(NdbTable table, ScanFlag scanFlag)
-	throws NdbApiException;
-
-	/**
-	 * Creates a NdbScanOperation (table scan operation) and adds it to the transaction.
-	 * @param aTable the table to be operated upon
-	 * @param scanFlag OR'd set of ScanFlags controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbScanOperation getSelectScanOperation(NdbTable table, long scanFlag)
-	throws NdbApiException;
-	
-	/**
-	 * Creates a NdbScanOperation (table scan operation) and adds it to the transaction.
-	 * @param aTable the table to be operated upon
-	 * @param scanFlag OR'd set of ScanFlags controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbScanOperation getSelectScanOperation(String tableName, long scanFlag)
-	throws NdbApiException;
-
-	/**
-	 * Creates a NdbIndexScanOperation (index scan operation) and adds it to the transaction.
-	 * @param indexName the index to be scanned
-	 * @param tableName the table to be operated upon
-	 * @return an NdbIndexScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(String indexName, String tableName) 
-	throws NdbApiException;
-	
-	/**
-	 * Creates an NdbIndexScanOperation (index scan operation) and adds it to the transaction.
-	 * @param index the index to be scanned
-	 * @param table the table to be operated upon
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index, NdbTable table) 
-	throws NdbApiException;
-	
-	/**
-	 * Creates a NdbIndexScanOperation (Index scan operation) and adds it to the transaction.
-	 * @param index the index to be scanned
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index) 
-	throws NdbApiException;
-	
-	/**
-	 * Creates a NdbIndexScanOperation (index scan operation) and adds it to the transaction.
-	 * @param indexName the index to be scanned
-	 * @param tableName the table to be operated upon
-	 * @param scanFlag flag controlling the operation of the scan
-	 * @return an NdbIndexScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(String indexName, String tableName, ScanFlag scanFlag) 
-	throws NdbApiException;
-	
-	/**
-	 * Creates an NdbIndexScanOperation (index scan operation) and adds it to the transaction.
-	 * @param index the index to be scanned
-	 * @param table the table to be operated upon
-	 * @param scanFlag flag controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index, NdbTable table, ScanFlag scanFlag)
-	throws NdbApiException;
-	
-	/**
-	 * Creates a NdbIndexScanOperation (Index scan operation) and adds it to the transaction.
-	 * @param index the index to be scanned
-	 * @param scanFlag flag controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index, ScanFlag scanFlag)
-	throws NdbApiException;
-	
-	/**
-	 * Creates a NdbIndexScanOperation (index scan operation) and adds it to the transaction.
-	 * @param indexName the index to be scanned
-	 * @param tableName the table to be operated upon
-	 * @param scanFlag OR'd set of ScanFlags controlling the operation of the scan
-	 * @return an NdbIndexScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(String indexName, String tableName, long scanFlag) 
-	throws NdbApiException;
-	
-	/**
-	 * Creates an NdbIndexScanOperation (index scan operation) and adds it to the transaction.
-	 * @param index the index to be scanned
-	 * @param table the table to be operated upon
-	 * @param scanFlag OR'd set of ScanFlags controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index, NdbTable table, long scanFlag)
-	throws NdbApiException;
-	
-	/**
-	 * Creates a NdbIndexScanOperation (Index scan operation) and adds it to the transaction.
-	 * @param index the index to be scanned
-	 * @param scanFlag OR'd set of ScanFlags controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index, long scanFlag)
+	 * @param scanFlag flag controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
+	 */
+	public NdbScanOperation getSelectScanOperation(String tableName, LockMode lockMode, ScanFlag scanFlag, int parallel, int batch) 
+	throws NdbApiException;
+	
+	/**
+	 * Creates a NdbScanOperation (table scan operation) and adds it to the transaction.
+	 * @param aTable the table to be operated upon
+	 * @param scanFlag flag controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
+	 */
+	public NdbScanOperation getSelectScanOperation(NdbTable table, LockMode lockMode, ScanFlag scanFlag, int parallel, int batch)
+	throws NdbApiException;
+
+	/**
+	 * Creates a NdbScanOperation (table scan operation) and adds it to the transaction.
+	 * @param aTable the table to be operated upon
+	 * @param scanFlag OR'd set of ScanFlags controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
+	 */
+	public NdbScanOperation getSelectScanOperation(NdbTable table, LockMode lockMode, int scanFlag, int parallel, int batch)
+	throws NdbApiException;
+	
+	/**
+	 * Creates a NdbScanOperation (table scan operation) and adds it to the transaction.
+	 * @param aTable the table to be operated upon
+	 * @param scanFlag OR'd set of ScanFlags controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
+	 */
+	public NdbScanOperation getSelectScanOperation(String tableName, LockMode lockMode, int scanFlag, int parallel, int batch)
+	throws NdbApiException;
+
+	/**
+	 * Creates a NdbIndexScanOperation (index scan operation) and adds it to the transaction.
+	 * @param indexName the index to be scanned
+	 * @param tableName the table to be operated upon
+	 * @param scanFlag flag controlling the operation of the scan
+	 * @return an NdbIndexScanOperation object
+	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
+	 */
+	public NdbIndexScanOperation getSelectIndexScanOperation(String indexName, String tableName, LockMode lockMode, ScanFlag scanFlag, int parallel, int batch) 
+	throws NdbApiException;
+	
+	/**
+	 * Creates an NdbIndexScanOperation (index scan operation) and adds it to the transaction.
+	 * @param index the index to be scanned
+	 * @param table the table to be operated upon
+	 * @param scanFlag flag controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
+	 */
+	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index, NdbTable table, LockMode lockMode, ScanFlag scanFlag, int parallel, int batch)
+	throws NdbApiException;
+	
+	/**
+	 * Creates a NdbIndexScanOperation (Index scan operation) and adds it to the transaction.
+	 * @param index the index to be scanned
+	 * @param scanFlag flag controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
+	 */
+	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index, LockMode lockMode, ScanFlag scanFlag, int parallel, int batch)
+	throws NdbApiException;
+	
+	/**
+	 * Creates a NdbIndexScanOperation (index scan operation) and adds it to the transaction.
+	 * @param indexName the index to be scanned
+	 * @param tableName the table to be operated upon
+	 * @param scanFlag OR'd set of ScanFlags controlling the operation of the scan
+	 * @return an NdbIndexScanOperation object
+	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
+	 */
+	public NdbIndexScanOperation getSelectIndexScanOperation(String indexName, String tableName, LockMode lockMode, int scanFlag, int parallel, int batch) 
+	throws NdbApiException;
+	
+	/**
+	 * Creates an NdbIndexScanOperation (index scan operation) and adds it to the transaction.
+	 * @param index the index to be scanned
+	 * @param table the table to be operated upon
+	 * @param scanFlag OR'd set of ScanFlags controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
+	 */
+	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index, NdbTable table, LockMode lockMode, int scanFlag, int parallel, int batch)
+	throws NdbApiException;
+	
+	/**
+	 * Creates a NdbIndexScanOperation (Index scan operation) and adds it to the transaction.
+	 * @param index the index to be scanned
+	 * @param scanFlag OR'd set of ScanFlags controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException if tableName is null or empty, the object has been closed, or the Operation object could not be created
+	 */
+	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index, LockMode lockMode, int scanFlag, int parallel, int batch)
 	throws NdbApiException;
 	
 }

=== modified file 'java/com/mysql/cluster/ndbj/NdbOperationFactoryImpl.java'
--- a/java/com/mysql/cluster/ndbj/NdbOperationFactoryImpl.java	2008-05-08 16:14:03 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbOperationFactoryImpl.java	2008-06-03 14:35:21 +0000
@@ -84,606 +84,321 @@
 	/*
 	 * (non-Javadoc)
 	 * 
-	 * @see com.mysql.cluster.ndbj.NdbOperationFactory#getSelectOperation(java.lang.String)
-	 */
-	public NdbOperation getSelectOperation(String tableName)
-			throws NdbApiException {
-		NdbOperationImpl theOperation = (NdbOperationImpl) getNdbOperation(tableName);
-		theOperation.readTuple(lockMode);
-		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
 	 * @see com.mysql.cluster.ndbj.NdbOperationFactory#getSelectOperation(com.mysql.cluster.ndbj.NdbTable,com.mysql.cluster.ndbj.NdbOperation.LockMode)
 	 */
 	public abstract NdbOperation getSelectOperation(NdbTable table,
 			NdbOperation.LockMode theLockMode) throws NdbApiException;
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.mysql.cluster.ndbj.NdbOperationFactory#getSelectOperation(com.mysql.cluster.ndbj.NdbTable)
-	 */
-	public NdbOperation getSelectOperation(NdbTable table)
-			throws NdbApiException {
-		NdbOperationImpl theOperation = (NdbOperationImpl) getNdbOperation(table);
-		theOperation.readTuple(lockMode);
-		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbOperation (primary key operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param aTable
-	 *            the table to be operated upon
-	 * @return an NdbOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbOperation getUpdateOperation(String tableName)
-			throws NdbApiException {
-		NdbOperationImpl theOperation = (NdbOperationImpl) getNdbOperation(tableName);
-		theOperation.updateTuple();
-		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbOperation (primary key operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param aTable
-	 *            the table to be operated upon
-	 * @return an NdbOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbOperation getUpdateOperation(NdbTable table)
-			throws NdbApiException {
-		NdbOperationImpl theOperation = (NdbOperationImpl) getNdbOperation(table);
-		theOperation.updateTuple();
-		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbOperation (primary key operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param aTable
-	 *            the table to be operated upon
-	 * @return an NdbOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbOperation getInsertOperation(String tableName)
-			throws NdbApiException {
-		NdbOperationImpl theOperation = (NdbOperationImpl) getNdbOperation(tableName);
-		theOperation.insertTuple();
-		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbOperation (primary key operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param aTable
-	 *            the table to be operated upon
-	 * @return an NdbOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbOperation getInsertOperation(NdbTable table)
-			throws NdbApiException {
-		NdbOperationImpl theOperation = (NdbOperationImpl) getNdbOperation(table);
-		theOperation.insertTuple();
-		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbOperation (primary key operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param aTable
-	 *            the table to be operated upon
-	 * @return an NdbOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbOperation getDeleteOperation(String tableName)
-			throws NdbApiException {
-		NdbOperationImpl theOperation = (NdbOperationImpl) getNdbOperation(tableName);
-		theOperation.deleteTuple();
-		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbOperation (primary key operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param aTable
-	 *            the table to be operated upon
-	 * @return an NdbOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbOperation getDeleteOperation(NdbTable table)
-			throws NdbApiException {
-		NdbOperationImpl theOperation = (NdbOperationImpl) getNdbOperation(table);
-		theOperation.deleteTuple();
-		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
-
+	/**
+	 * Creates a NdbOperation (primary key operation) and adds it to the
+	 * transaction.
+	 * 
+	 * @param aTable
+	 *            the table to be operated upon
+	 * @return an NdbOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	public abstract NdbOperation getUpdateOperation(String tableName)
+			throws NdbApiException;
+
+	/**
+	 * Creates a NdbOperation (primary key operation) and adds it to the
+	 * transaction.
+	 * 
+	 * @param aTable
+	 *            the table to be operated upon
+	 * @return an NdbOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	public abstract NdbOperation getUpdateOperation(NdbTable table)
+			throws NdbApiException;
+
+	/**
+	 * Creates a NdbOperation (primary key operation) and adds it to the
+	 * transaction.
+	 * 
+	 * @param aTable
+	 *            the table to be operated upon
+	 * @return an NdbOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	public abstract NdbOperation getInsertOperation(String tableName)
+			throws NdbApiException;
+
+	/**
+	 * Creates a NdbOperation (primary key operation) and adds it to the
+	 * transaction.
+	 * 
+	 * @param aTable
+	 *            the table to be operated upon
+	 * @return an NdbOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	public abstract NdbOperation getInsertOperation(NdbTable table)
+			throws NdbApiException;
+
+	/**
+	 * Creates a NdbOperation (primary key operation) and adds it to the
+	 * transaction.
+	 * 
+	 * @param aTable
+	 *            the table to be operated upon
+	 * @return an NdbOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	public abstract NdbOperation getDeleteOperation(String tableName)
+			throws NdbApiException;
+
+	/**
+	 * Creates a NdbOperation (primary key operation) and adds it to the
+	 * transaction.
+	 * 
+	 * @param aTable
+	 *            the table to be operated upon
+	 * @return an NdbOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	public abstract NdbOperation getDeleteOperation(NdbTable table)
+			throws NdbApiException;
 	
 	/* (non-Javadoc)
 	 * @see com.mysql.cluster.ndbj.NdbOperationFactory#getDeleteUniqueOperation(com.mysql.cluster.ndbj.NdbTable)
 	 */
-	public NdbIndexOperation getDeleteUniqueOperation(NdbIndex index, NdbTable table)
-			throws NdbApiException {
-		NdbIndexOperationImpl theOperation = (NdbIndexOperationImpl) getNdbIndexOperation(index, table);
-		theOperation.deleteTuple();
-		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
+	public abstract NdbIndexOperation getDeleteUniqueOperation(NdbIndex index, NdbTable table)
+			throws NdbApiException;
 
 	/* (non-Javadoc)
 	 * @see com.mysql.cluster.ndbj.NdbOperationFactory#getDeleteUniqueOperation(java.lang.String)
 	 */
-	public NdbIndexOperation getDeleteUniqueOperation(String indexName, String tableName)
-			throws NdbApiException {
-		NdbIndexOperationImpl theOperation = (NdbIndexOperationImpl) getNdbIndexOperation(indexName, tableName);
-		theOperation.deleteTuple();
-		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
+	public abstract NdbIndexOperation getDeleteUniqueOperation(String indexName, String tableName)
+			throws NdbApiException;
 
 	/* (non-Javadoc)
 	 * @see com.mysql.cluster.ndbj.NdbOperationFactory#getDeleteUniqueOperation(com.mysql.cluster.ndbj.NdbIndex)
 	 */
-	public NdbIndexOperation getDeleteUniqueOperation(NdbIndex index)
-			throws NdbApiException {
-		NdbIndexOperationImpl theOperation = (NdbIndexOperationImpl) getNdbIndexOperation(index);
-		theOperation.deleteTuple();
-		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
+	public abstract NdbIndexOperation getDeleteUniqueOperation(NdbIndex index)
+			throws NdbApiException;
+
 	/* (non-Javadoc)
 	 * @see com.mysql.cluster.ndbj.NdbOperationFactory#getSelectUniqueOperation(com.mysql.cluster.ndbj.NdbIndex, com.mysql.cluster.ndbj.NdbTable, com.mysql.cluster.ndbj.NdbOperation.LockMode)
 	 */
-	public NdbIndexOperation getSelectUniqueOperation(NdbIndex index,
-			NdbTable table, LockMode theLockMode) throws NdbApiException {
-		NdbIndexOperationImpl theOperation = (NdbIndexOperationImpl) getNdbIndexOperation(index,table);
-		theOperation.readTuple(theLockMode);
-		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
-
-	/* (non-Javadoc)
-	 * @see com.mysql.cluster.ndbj.NdbOperationFactory#getSelectUniqueOperation(com.mysql.cluster.ndbj.NdbIndex, com.mysql.cluster.ndbj.NdbTable)
-	 */
-	public NdbIndexOperation getSelectUniqueOperation(NdbIndex index,
-			NdbTable table) throws NdbApiException {
-		NdbIndexOperationImpl theOperation = (NdbIndexOperationImpl) getNdbIndexOperation(index,table);
-		theOperation.readTuple(lockMode);
-		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
-
+	public abstract NdbIndexOperation getSelectUniqueOperation(NdbIndex index,
+			NdbTable table, LockMode theLockMode) throws NdbApiException;
 
 	/* (non-Javadoc)
 	 * @see com.mysql.cluster.ndbj.NdbOperationFactory#getSelectUniqueOperation(java.lang.String, java.lang.String, com.mysql.cluster.ndbj.NdbOperation.LockMode)
 	 */
-	public NdbIndexOperation getSelectUniqueOperation(String indexName,
-			String tableName, LockMode theLockMode) throws NdbApiException {
-		NdbIndexOperationImpl theOperation = (NdbIndexOperationImpl) getNdbIndexOperation(indexName,tableName);
-		theOperation.readTuple(theLockMode);
-		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
-
-	/* (non-Javadoc)
-	 * @see com.mysql.cluster.ndbj.NdbOperationFactory#getSelectUniqueOperation(java.lang.String, java.lang.String)
-	 */
-	public NdbIndexOperation getSelectUniqueOperation(String indexName,
-			String tableName) throws NdbApiException {
-		NdbIndexOperationImpl theOperation = (NdbIndexOperationImpl) getNdbIndexOperation(indexName,tableName);
-		theOperation.readTuple(lockMode);
-		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
+	public abstract NdbIndexOperation getSelectUniqueOperation(String indexName,
+			String tableName, LockMode theLockMode) throws NdbApiException;
 
 	/* (non-Javadoc)
 	 * @see com.mysql.cluster.ndbj.NdbOperationFactory#getUpdateUniqueOperation(com.mysql.cluster.ndbj.NdbTable)
 	 */
-	public NdbIndexOperation getUpdateUniqueOperation(NdbIndex index, NdbTable table)
-			throws NdbApiException {
-		NdbIndexOperationImpl theOperation = (NdbIndexOperationImpl) getNdbIndexOperation(index,table);
-		theOperation.updateTuple();
-		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
+	public abstract NdbIndexOperation getUpdateUniqueOperation(NdbIndex index, NdbTable table)
+			throws NdbApiException;
 
 	/* (non-Javadoc)
 	 * @see com.mysql.cluster.ndbj.NdbOperationFactory#getUpdateUniqueOperation(java.lang.String)
 	 */
-	public NdbIndexOperation getUpdateUniqueOperation(String indexName, String tableName)
-			throws NdbApiException {
-		NdbIndexOperationImpl theOperation = (NdbIndexOperationImpl) getNdbIndexOperation(indexName, tableName);
-		theOperation.updateTuple();
-		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
-				theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbScanOperation (table scan operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param aTable
-	 *            the table to be operated upon
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbScanOperation getSelectScanOperation(String tableName)
-			throws NdbApiException {
-		NdbScanOperationImpl theOperation = (NdbScanOperationImpl) getNdbScanOperation(tableName);
-		theOperation.readTuples(lockMode);
-		createdOperations.put(new Long(NdbScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbScanOperation (table scan operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param aTable
-	 *            the table to be operated upon
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbScanOperation getSelectScanOperation(NdbTable table)
-			throws NdbApiException {
-		NdbScanOperationImpl theOperation = (NdbScanOperationImpl) getNdbScanOperation(table);
-		theOperation.readTuples(lockMode);
-		createdOperations.put(new Long(NdbScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbScanOperation (table scan operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param aTable
-	 *            the table to be operated upon
-	 * @param scanFlag
-	 *            flag controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbScanOperation getSelectScanOperation(String tableName,
-			ScanFlag scanFlag) throws NdbApiException {
-		NdbScanOperationImpl theOperation = (NdbScanOperationImpl) getNdbScanOperation(tableName);
-		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
-		createdOperations.put(new Long(NdbScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbScanOperation (table scan operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param aTable
-	 *            the table to be operated upon
-	 * @param scanFlag
-	 *            flag controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbScanOperation getSelectScanOperation(NdbTable table,
-			ScanFlag scanFlag) throws NdbApiException {
-		NdbScanOperationImpl theOperation = (NdbScanOperationImpl) getNdbScanOperation(table);
-		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
-		createdOperations.put(new Long(NdbScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbScanOperation (table scan operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param aTable
-	 *            the table to be operated upon
-	 * @param scanFlag
-	 *            OR'd set of ScanFlags controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbScanOperation getSelectScanOperation(NdbTable table, long scanFlag)
-			throws NdbApiException {
-		NdbScanOperationImpl theOperation = (NdbScanOperationImpl) getNdbScanOperation(table);
-		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
-		createdOperations.put(new Long(NdbScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbScanOperation (table scan operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param aTable
-	 *            the table to be operated upon
-	 * @param scanFlag
-	 *            OR'd set of ScanFlags controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbScanOperation getSelectScanOperation(String tableName,
-			long scanFlag) throws NdbApiException {
-		NdbScanOperationImpl theOperation = (NdbScanOperationImpl) getNdbScanOperation(tableName);
-		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
-		createdOperations.put(new Long(NdbScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbIndexScanOperation (index scan operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param indexName
-	 *            the index to be scanned
-	 * @param tableName
-	 *            the table to be operated upon
-	 * @return an NdbIndexScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(String indexName,
-			String tableName) throws NdbApiException {
-		NdbIndexScanOperationImpl theOperation = (NdbIndexScanOperationImpl) getNdbIndexScanOperation(
-				indexName, tableName);
-		theOperation.readTuples(lockMode);
-		createdOperations.put(new Long(NdbIndexScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates an NdbIndexScanOperation (index scan operation) and adds it to
-	 * the transaction.
-	 * 
-	 * @param index
-	 *            the index to be scanned
-	 * @param table
-	 *            the table to be operated upon
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index,
-			NdbTable table) throws NdbApiException {
-		NdbIndexScanOperationImpl theOperation = (NdbIndexScanOperationImpl) getNdbIndexScanOperation(
-				index, table);
-		theOperation.readTuples(lockMode);
-		createdOperations.put(new Long(NdbIndexScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbIndexScanOperation (Index scan operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param index
-	 *            the index to be scanned
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index)
-			throws NdbApiException {
-		NdbIndexScanOperationImpl theOperation = (NdbIndexScanOperationImpl) getNdbIndexScanOperation(index);
-		theOperation.readTuples(lockMode);
-		createdOperations.put(new Long(NdbIndexScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbIndexScanOperation (index scan operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param indexName
-	 *            the index to be scanned
-	 * @param tableName
-	 *            the table to be operated upon
-	 * @param scanFlag
-	 *            flag controlling the operation of the scan
-	 * @return an NdbIndexScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(String indexName,
-			String tableName, ScanFlag scanFlag) throws NdbApiException {
-		NdbIndexScanOperationImpl theOperation = (NdbIndexScanOperationImpl) getNdbIndexScanOperation(
-				indexName, tableName);
-		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
-		createdOperations.put(new Long(NdbScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates an NdbIndexScanOperation (index scan operation) and adds it to
-	 * the transaction.
-	 * 
-	 * @param index
-	 *            the index to be scanned
-	 * @param table
-	 *            the table to be operated upon
-	 * @param scanFlag
-	 *            flag controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index,
-			NdbTable table, ScanFlag scanFlag) throws NdbApiException {
-		NdbIndexScanOperationImpl theOperation = (NdbIndexScanOperationImpl) getNdbIndexScanOperation(
-				index, table);
-		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
-		createdOperations.put(new Long(NdbIndexScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbIndexScanOperation (Index scan operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param index
-	 *            the index to be scanned
-	 * @param scanFlag
-	 *            flag controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index,
-			ScanFlag scanFlag) throws NdbApiException {
-		NdbIndexScanOperationImpl theOperation = (NdbIndexScanOperationImpl) getNdbIndexScanOperation(index);
-		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
-		createdOperations.put(new Long(NdbScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbIndexScanOperation (index scan operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param indexName
-	 *            the index to be scanned
-	 * @param tableName
-	 *            the table to be operated upon
-	 * @param scanFlag
-	 *            OR'd set of ScanFlags controlling the operation of the scan
-	 * @return an NdbIndexScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(String indexName,
-			String tableName, long scanFlag) throws NdbApiException {
-		NdbIndexScanOperationImpl theOperation = (NdbIndexScanOperationImpl) getNdbIndexScanOperation(
-				indexName, tableName);
-		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
-		createdOperations.put(new Long(NdbScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates an NdbIndexScanOperation (index scan operation) and adds it to
-	 * the transaction.
-	 * 
-	 * @param index
-	 *            the index to be scanned
-	 * @param table
-	 *            the table to be operated upon
-	 * @param scanFlag
-	 *            OR'd set of ScanFlags controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index,
-			NdbTable table, long scanFlag) throws NdbApiException {
-		NdbIndexScanOperationImpl theOperation = (NdbIndexScanOperationImpl) getNdbIndexScanOperation(
-				index, table);
-		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
-		createdOperations.put(new Long(NdbIndexScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	/**
-	 * Creates a NdbIndexScanOperation (Index scan operation) and adds it to the
-	 * transaction.
-	 * 
-	 * @param index
-	 *            the index to be scanned
-	 * @param scanFlag
-	 *            OR'd set of ScanFlags controlling the operation of the scan
-	 * @return an NdbScanOperation object
-	 * @throws NdbApiException
-	 *             if tableName is null or empty, the object has been closed, or
-	 *             the Operation object could not be created
-	 */
-	public NdbIndexScanOperation getSelectIndexScanOperation(NdbIndex index,
-			long scanFlag) throws NdbApiException {
-		NdbIndexScanOperationImpl theOperation = (NdbIndexScanOperationImpl) getNdbIndexScanOperation(index);
-		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
-		createdOperations.put(new Long(NdbScanOperationImpl
-				.getCPtr(theOperation)), theOperation);
-		return theOperation;
-	}
-
-	
-	
+	public abstract NdbIndexOperation getUpdateUniqueOperation(String indexName, String tableName)
+			throws NdbApiException;
+
+	/**
+	 * Creates a NdbScanOperation (table scan operation) and adds it to the
+	 * transaction.
+	 * 
+	 * @param aTable
+	 *            the table to be operated upon
+	 * @param scanFlag
+	 *            flag controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+
+	public abstract NdbScanOperation getSelectScanOperation(String tableName,
+			LockMode lockMode, ScanFlag scanFlag, int parallel, int batch
+			) throws NdbApiException;
+
+	/**
+	 * Creates a NdbScanOperation (table scan operation) and adds it to the
+	 * transaction.
+	 * 
+	 * @param aTable
+	 *            the table to be operated upon
+	 * @param scanFlag
+	 *            flag controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	public abstract NdbScanOperation getSelectScanOperation(NdbTable table,
+			LockMode lockMode, ScanFlag scanFlag, int parallel, int batch
+			) throws NdbApiException;
+
+	/**
+	 * Creates a NdbScanOperation (table scan operation) and adds it to the
+	 * transaction.
+	 * 
+	 * @param aTable
+	 *            the table to be operated upon
+	 * @param scanFlag
+	 *            OR'd set of ScanFlags controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	public abstract NdbScanOperation getSelectScanOperation(NdbTable table,
+			LockMode lockMode, int scanFlag, int parallel, int batch
+			) throws NdbApiException;
+
+	/**
+	 * Creates a NdbScanOperation (table scan operation) and adds it to the
+	 * transaction.
+	 * 
+	 * @param aTable
+	 *            the table to be operated upon
+	 * @param scanFlag
+	 *            OR'd set of ScanFlags controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	
+	public abstract NdbScanOperation getSelectScanOperation(String tableName,
+			LockMode lockMode, int scanFlag, int parallel, int batch
+			) throws NdbApiException;
+
+	/**
+	 * Creates a NdbIndexScanOperation (index scan operation) and adds it to the
+	 * transaction.
+	 * 
+	 * @param indexName
+	 *            the index to be scanned
+	 * @param tableName
+	 *            the table to be operated upon
+	 * @param scanFlag
+	 *            flag controlling the operation of the scan
+	 * @return an NdbIndexScanOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	public abstract NdbIndexScanOperation getSelectIndexScanOperation(
+			String indexName, String tableName,
+			LockMode lockMode, ScanFlag scanFlag, int parallel, int batch
+			) throws NdbApiException;
+
+	/**
+	 * Creates an NdbIndexScanOperation (index scan operation) and adds it to
+	 * the transaction.
+	 * 
+	 * @param index
+	 *            the index to be scanned
+	 * @param table
+	 *            the table to be operated upon
+	 * @param scanFlag
+	 *            flag controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	public abstract NdbIndexScanOperation getSelectIndexScanOperation(
+			NdbIndex index, NdbTable table,
+			LockMode lockMode, ScanFlag scanFlag, int parallel, int batch
+			) throws NdbApiException;
+
+	/**
+	 * Creates a NdbIndexScanOperation (Index scan operation) and adds it to the
+	 * transaction.
+	 * 
+	 * @param index
+	 *            the index to be scanned
+	 * @param scanFlag
+	 *            flag controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	public abstract NdbIndexScanOperation getSelectIndexScanOperation(
+			NdbIndex index,
+			LockMode lockMode, ScanFlag scanFlag, int parallel, int batch
+			) throws NdbApiException;
+
+	/**
+	 * Creates a NdbIndexScanOperation (index scan operation) and adds it to the
+	 * transaction.
+	 * 
+	 * @param indexName
+	 *            the index to be scanned
+	 * @param tableName
+	 *            the table to be operated upon
+	 * @param scanFlag
+	 *            OR'd set of ScanFlags controlling the operation of the scan
+	 * @return an NdbIndexScanOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	public abstract NdbIndexScanOperation getSelectIndexScanOperation(
+			String indexName, String tableName,
+			LockMode lockMode, int scanFlag, int parallel, int batch
+			) throws NdbApiException;
+
+	/**
+	 * Creates an NdbIndexScanOperation (index scan operation) and adds it to
+	 * the transaction.
+	 * 
+	 * @param index
+	 *            the index to be scanned
+	 * @param table
+	 *            the table to be operated upon
+	 * @param scanFlag
+	 *            OR'd set of ScanFlags controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	public abstract NdbIndexScanOperation getSelectIndexScanOperation(
+			NdbIndex index, NdbTable table,
+			LockMode lockMode, int scanFlag, int parallel, int batch
+			) throws NdbApiException;
+
+	/**
+	 * Creates a NdbIndexScanOperation (Index scan operation) and adds it to the
+	 * transaction.
+	 * 
+	 * @param index
+	 *            the index to be scanned
+	 * @param scanFlag
+	 *            OR'd set of ScanFlags controlling the operation of the scan
+	 * @return an NdbScanOperation object
+	 * @throws NdbApiException
+	 *             if tableName is null or empty, the object has been closed, or
+	 *             the Operation object could not be created
+	 */
+	public abstract NdbIndexScanOperation getSelectIndexScanOperation(
+			NdbIndex index,
+			LockMode lockMode, int scanFlag, int parallel, int batch
+			) throws NdbApiException;
+
 }

=== modified file 'java/com/mysql/cluster/ndbj/examples/CRUDandScan.java'
--- a/java/com/mysql/cluster/ndbj/examples/CRUDandScan.java	2008-05-22 17:05:11 +0000
+++ b/java/com/mysql/cluster/ndbj/examples/CRUDandScan.java	2008-06-03 14:35:21 +0000
@@ -233,7 +233,7 @@
 			 * how we want to lock the row. Here we say LM_CommittedRead - read the
 			 * last committed values for the row.
 		     */
-			NdbOperation op = trans.getSelectOperation("ndbj_multi_pk",NdbOperation.LockMode.LM_CommittedRead);
+			NdbOperation op = trans.getSelectOperation("ndbj_multi_pk", NdbOperation.LockMode.LM_CommittedRead);
 
 			/**
 			 * Here we have a multi-part primary key, and we call equal() on both parts of the primary key. 
@@ -435,12 +435,11 @@
 			 * how we want to lock the row. Here we say LM_CommittedRead - read the
 			 * last committed values for the row.
 			 */
-		    trans.setOperationLockMode(NdbOperation.LockMode.LM_CommittedRead);
 		    
 		    /**
 		     * An NdbOperationRef object represents a Primary Key operation. We can read a row using the supplied primary key.  
 		     */
-			NdbIndexScanOperation op = trans.getSelectIndexScanOperation("PRIMARY","ndbj_multi_pk",NdbScanOperation.ScanFlag.DESCENDING);
+			NdbIndexScanOperation op = trans.getSelectIndexScanOperation("PRIMARY","ndbj_multi_pk", NdbOperation.LockMode.LM_CommittedRead, NdbScanOperation.ScanFlag.DESCENDING, 0, 0);
 
 			
 			/**
@@ -517,12 +516,11 @@
 			 * how we want to lock the row. Here we say LM_CommittedRead - read the
 			 * last committed values for the row.
 			 */
-		    trans.setOperationLockMode(NdbOperation.LockMode.LM_CommittedRead);
 		    
 		    /**
 		     * An NdbOperationRef object represents a Primary Key operation. We can read a row using the supplied primary key.  
 		     */
-			NdbIndexScanOperation op = trans.getSelectIndexScanOperation("lastname_idx","ndbj_multi_pk",NdbScanOperation.ScanFlag.ORDER_BY);
+			NdbIndexScanOperation op = trans.getSelectIndexScanOperation("lastname_idx","ndbj_multi_pk", NdbOperation.LockMode.LM_CommittedRead, NdbScanOperation.ScanFlag.ORDER_BY, 0, 0);
 
 			
 			/**
@@ -598,12 +596,11 @@
 			 * how we want to lock the row. Here we say LM_CommittedRead - read the
 			 * last committed values for the row.
 			 */
-		    trans.setOperationLockMode(NdbOperation.LockMode.LM_CommittedRead);
 		    
 		    /**
 		     * An NdbOperationRef object represents a Primary Key operation. We can read a row using the supplied primary key.  
 		     */
-			NdbScanOperation op = trans.getSelectScanOperation("ndbj_multi_pk",NdbScanOperation.ScanFlag.DESCENDING);
+			NdbScanOperation op = trans.getSelectScanOperation("ndbj_multi_pk", NdbOperation.LockMode.LM_CommittedRead, NdbScanOperation.ScanFlag.DESCENDING, 0, 0);
 		
 			/**
 			 * We do not call the equal() method, as we want to scan all rows in the table. The equal() method specifies a search

=== modified file 'java/com/mysql/cluster/ndbj/examples/JoinUsingScanAndIndexScan.java'
--- a/java/com/mysql/cluster/ndbj/examples/JoinUsingScanAndIndexScan.java	2008-05-22 17:05:11 +0000
+++ b/java/com/mysql/cluster/ndbj/examples/JoinUsingScanAndIndexScan.java	2008-06-03 14:35:21 +0000
@@ -208,9 +208,7 @@
 		     */
 		    trans = ndb.startTransaction();
 		    
-		    trans.setOperationLockMode(NdbOperation.LockMode.LM_CommittedRead);
-		    
-		    NdbScanOperation op_a = trans.getSelectScanOperation("ndbj_join_a");
+		    NdbScanOperation op_a = trans.getSelectScanOperation("ndbj_join_a", NdbOperation.LockMode.LM_CommittedRead, 0, 0, 0);
 			
 			op_a.getValue("id");
 			NdbResultSet rs_a = op_a.resultData();
@@ -235,7 +233,7 @@
 				 */
 
 				NdbIndexScanOperation op_b = trans.getSelectIndexScanOperation("idx_id_a","ndbj_join_b",
-						NdbScanOperation.ScanFlag.DESCENDING);
+						NdbOperation.LockMode.LM_Read, NdbScanOperation.ScanFlag.DESCENDING, 0, 0);
 				
 				/**
 				 * Here we have a multi-part primary key, and we call equal() on both parts of the primary key. 

=== modified file 'java/com/mysql/cluster/ndbj/examples/ReadRowsUsingTableScan.java'
--- a/java/com/mysql/cluster/ndbj/examples/ReadRowsUsingTableScan.java	2008-05-22 17:05:11 +0000
+++ b/java/com/mysql/cluster/ndbj/examples/ReadRowsUsingTableScan.java	2008-06-03 14:35:21 +0000
@@ -134,12 +134,11 @@
 			 * how we want to lock the row. Here we say LM_CommittedRead - read the
 			 * last committed values for the row.
 		     */
-		    trans.setOperationLockMode(NdbOperation.LockMode.LM_CommittedRead);
 		    
 		    /**
 		     * An NdbOperationRef object represents a Primary Key operation. We can read a row using the supplied primary key.  
 		     */
-			NdbScanOperation op = trans.getSelectScanOperation("ndbj_test",NdbScanOperation.ScanFlag.DESCENDING);
+			NdbScanOperation op = trans.getSelectScanOperation("ndbj_test",NdbOperation.LockMode.LM_CommittedRead,NdbScanOperation.ScanFlag.DESCENDING,0,0);
 
 			
 			/**

=== modified file 'java/com/mysql/cluster/ndbj/examples/ReadUsingOrderedIndexOnPK.java'
--- a/java/com/mysql/cluster/ndbj/examples/ReadUsingOrderedIndexOnPK.java	2008-05-22 17:05:11 +0000
+++ b/java/com/mysql/cluster/ndbj/examples/ReadUsingOrderedIndexOnPK.java	2008-06-03 14:35:21 +0000
@@ -113,17 +113,10 @@
 		    trans = ndb.startTransaction();
 		    
 
-			/**
-			 * The operation will be used to read many rows using the index. We need to specify
-			 * how we want to lock the row. Here we say LM_CommittedRead - read the
-			 * last committed values for the row.
-			 */
-			trans.setOperationLockMode(NdbOperation.LockMode.LM_CommittedRead);
-			
 		    /**
 		     * An NdbOperationRef object represents a Primary Key operation. We can read a row using the supplied primary key.  
 		     */
-			NdbIndexScanOperation op = trans.getSelectIndexScanOperation("PRIMARY","ndbj_test",NdbScanOperation.ScanFlag.DESCENDING);
+			NdbIndexScanOperation op = trans.getSelectIndexScanOperation("PRIMARY","ndbj_test",NdbOperation.LockMode.LM_CommittedRead,NdbScanOperation.ScanFlag.DESCENDING,0,0);
 
 			/**
 			 * Here we have a multi-part primary key, and we are able to call equal() on both parts of the primary key.
@@ -200,12 +193,11 @@
 			 * how we want to lock the row. Here we say LM_CommittedRead - read the
 			 * last committed values for the row.
 			 */
-			trans.setOperationLockMode(NdbOperation.LockMode.LM_CommittedRead);
 			
             /**
              * An NdbOperationRef object represents a Primary Key operation. We can read a row using the supplied primary key.  
              */
-            NdbIndexScanOperation op = trans.getSelectIndexScanOperation("PRIMARY","ndbj_test",NdbScanOperation.ScanFlag.DESCENDING);
+            NdbIndexScanOperation op = trans.getSelectIndexScanOperation("PRIMARY","ndbj_test",NdbOperation.LockMode.LM_CommittedRead,NdbScanOperation.ScanFlag.DESCENDING,0,0);
             
             /**
              * Here we have a multi-part primary key, and we call equal() on both parts of the primary key.
@@ -280,12 +272,11 @@
 			 * how we want to lock the row. Here we say LM_CommittedRead - read the
 			 * last committed values for the row.
 			 */
-			trans.setOperationLockMode(NdbOperation.LockMode.LM_CommittedRead);
 			
             /**
              * An NdbOperationRef object represents a Primary Key operation. We can read a row using the supplied primary key.  
              */
-            NdbIndexScanOperation op = trans.getSelectIndexScanOperation("PRIMARY","ndbj_test",NdbScanOperation.ScanFlag.DESCENDING);
+            NdbIndexScanOperation op = trans.getSelectIndexScanOperation("PRIMARY","ndbj_test",NdbOperation.LockMode.LM_CommittedRead,NdbScanOperation.ScanFlag.DESCENDING,0,0);
 
             
             /**

=== modified file 'java/com/mysql/cluster/ndbj/examples/TestAsync.java'
--- a/java/com/mysql/cluster/ndbj/examples/TestAsync.java	2007-12-27 01:47:40 +0000
+++ b/java/com/mysql/cluster/ndbj/examples/TestAsync.java	2008-06-03 14:35:21 +0000
@@ -149,9 +149,8 @@
     System.out.println("Getting list of ids");
 
     NdbTransaction myTransaction = myNdb.startTransaction();
-    myTransaction.setOperationLockMode(NdbOperation.LockMode.LM_CommittedRead);
 
-    NdbScanOperation myScanOperation=myTransaction.getSelectScanOperation(table_name);
+    NdbScanOperation myScanOperation=myTransaction.getSelectScanOperation(table_name,NdbOperation.LockMode.LM_CommittedRead,0,0,0);
     
     myScanOperation.getValue("ATTR1");
     

=== modified file 'java/ndbj.i'
--- a/java/ndbj.i	2008-05-20 16:41:08 +0000
+++ b/java/ndbj.i	2008-06-03 14:35:21 +0000
@@ -94,6 +94,12 @@
   $1=*($1_ltype*)&$input;
 %}
 
+%typemap(jstype) NdbScanOperation::ScanFlag "NdbScanOperation.ScanFlag"
+%typemap(javaout) NdbScanOperation::ScanFlag {
+  return NdbScanOperation.ScanFlag.swigToEnum
+    (ndbjJNI.NdbScanOperationImpl_getScanFlag(swigCPtr, this));
+ }
+
 %include "NdbClusterConnection.i"
 %include "Ndb.i"
 %include "NdbDictionary.i"

=== modified file 'java/testsuite/ndbj/MultiPartPrimaryKeyStringTest.java'
--- a/java/testsuite/ndbj/MultiPartPrimaryKeyStringTest.java	2008-05-22 01:15:27 +0000
+++ b/java/testsuite/ndbj/MultiPartPrimaryKeyStringTest.java	2008-06-03 14:35:21 +0000
@@ -110,8 +110,7 @@
 
 		NdbDictionary theDict = ndb.getDictionary();
 		NdbTable theTable = theDict.getTable(tablename);
-		trans.setOperationLockMode(LockMode.LM_CommittedRead);
-		NdbScanOperation scanop = trans.getSelectScanOperation(theTable);
+		NdbScanOperation scanop = trans.getSelectScanOperation(theTable,LockMode.LM_CommittedRead,0,0,0);
 
 		scanop.getValue(col1);
 		scanop.getValue(col2);
@@ -149,8 +148,7 @@
 		// again, read the first row with the composite key via the PK index
 		trans = ndb.startTransaction();
 
-		trans.setOperationLockMode(LockMode.LM_Exclusive);
-		idxscanop = trans.getSelectIndexScanOperation("PRIMARY", tablename);
+		idxscanop = trans.getSelectIndexScanOperation("PRIMARY", tablename, LockMode.LM_Exclusive, 0, 0, 0);
 
 		idxscanop.equalString(col1, col1Val);
 		idxscanop.equalString(col2, col2Val);
@@ -173,8 +171,7 @@
 		// scan the index, but skip the first row
 		trans = ndb.startTransaction();
 
-		trans.setOperationLockMode(LockMode.LM_Exclusive);
-		idxscanop = trans.getSelectIndexScanOperation("PRIMARY", tablename);
+		idxscanop = trans.getSelectIndexScanOperation("PRIMARY", tablename, LockMode.LM_Exclusive, 0, 0, 0);
 
 		idxscanop.whereGreaterThanEqualTo(col1, col1Val);
 		idxscanop.whereGreaterThan(col2, col2Val);

=== modified file 'java/testsuite/ndbj/NdbBlobTest.java'
--- a/java/testsuite/ndbj/NdbBlobTest.java	2008-05-22 01:15:27 +0000
+++ b/java/testsuite/ndbj/NdbBlobTest.java	2008-06-03 14:35:21 +0000
@@ -61,8 +61,7 @@
 		////////////////////////////////////////////
 		// scan the index and check the blob values, knowing blob length
 		trans = ndb.startTransaction();
-		trans.setOperationLockMode(LockMode.LM_Exclusive);
-		scanop = trans.getSelectIndexScanOperation("PRIMARY", tablename);
+		scanop = trans.getSelectIndexScanOperation("PRIMARY", tablename, LockMode.LM_Exclusive, 0, 0, 0);
 
 		scanop.setBoundInt(col1, NdbIndexScanOperation.BoundType.BoundLE, 0);
 		scanop.getBlob(col2, 8000); // <--- Knowledge of Blob Length
@@ -90,7 +89,7 @@
 		// check a single value via pk, not knowing length
 		trans = ndb.startTransaction();
 
-		op = trans.getSelectOperation(tablename);
+		op = trans.getSelectOperation(tablename, LockMode.LM_Read);
 
 		op.equalInt(col1, 1);
 		op.getBlob(col2);
@@ -114,7 +113,7 @@
 		// check a single value via pk, knowing blob length
 		trans = ndb.startTransaction();
 
-		op = trans.getSelectOperation(tablename);
+		op = trans.getSelectOperation(tablename, LockMode.LM_Read);
 
 		op.equalInt(col1, 1);
 		op.getBlob(col2, 8000); // <--- Knowledge of Blob Length
@@ -137,7 +136,7 @@
 		////////////////////////////////////////////
 		// get blob handle via pk, not knowing length
 		trans = ndb.startTransaction();
-		op = trans.getSelectOperation(tablename);
+		op = trans.getSelectOperation(tablename, LockMode.LM_Read);
 		op.equalInt(0, 1);
 
 		b = op.getBlobHandle(col2);
@@ -158,7 +157,7 @@
 		// get blob handle via pk, knowing blob length
 		trans = ndb.startTransaction();
 
-		op = trans.getSelectOperation(tablename);
+		op = trans.getSelectOperation(tablename, LockMode.LM_Read);
 
 		op.equalInt(0, 1);
 		b = op.getBlobHandle(col2);
@@ -223,8 +222,7 @@
 		////////////////////////////////////////////
 		// delete all rows via scan
 		trans = ndb.startTransaction();
-		trans.setOperationLockMode(LockMode.LM_Exclusive);
-		scanop = trans.getSelectIndexScanOperation( "PRIMARY", tablename);
+		scanop = trans.getSelectIndexScanOperation( "PRIMARY", tablename, LockMode.LM_Exclusive, 0, 0, 0);
 
 		scanop.setBoundInt(col1, NdbIndexScanOperation.BoundType.BoundLE, 1);
 		scanop.getValue(col1);

=== modified file 'java/testsuite/ndbj/NdbOperationByteLongTest.java'
--- a/java/testsuite/ndbj/NdbOperationByteLongTest.java	2008-05-22 01:15:27 +0000
+++ b/java/testsuite/ndbj/NdbOperationByteLongTest.java	2008-06-03 14:35:21 +0000
@@ -89,8 +89,7 @@
 
 		// lookup the first row via index
 		trans = ndb.startTransaction();
-		trans.setOperationLockMode(LockMode.LM_Exclusive);
-		scanop = trans.getSelectIndexScanOperation("PRIMARY",tablename);
+		scanop = trans.getSelectIndexScanOperation("PRIMARY",tablename,LockMode.LM_Exclusive,0,0,0);
 
 		scanop.equalBytes(col1, pkID1);
 

=== modified file 'java/testsuite/ndbj/NdbOperationIDTest.java'
--- a/java/testsuite/ndbj/NdbOperationIDTest.java	2008-05-30 04:59:35 +0000
+++ b/java/testsuite/ndbj/NdbOperationIDTest.java	2008-06-03 14:35:21 +0000
@@ -115,9 +115,8 @@
 		/////////////////////////////////////////////////
 		// read row and check values
 		trans = ndb.startTransaction();
-		trans.setOperationLockMode(LockMode.LM_CommittedRead);
 
-		op = trans.getSelectOperation(tablename);
+		op = trans.getSelectOperation(tablename,LockMode.LM_CommittedRead);
 
 		op.equalInt(col1,int_val);
 		op.getValue(col1);

=== modified file 'java/testsuite/ndbj/NdbOperationMultiPartPrimaryKeyTest.java'
--- a/java/testsuite/ndbj/NdbOperationMultiPartPrimaryKeyTest.java	2008-05-19 20:13:45 +0000
+++ b/java/testsuite/ndbj/NdbOperationMultiPartPrimaryKeyTest.java	2008-06-03 14:35:21 +0000
@@ -63,8 +63,7 @@
 		trans.close();
 
 		trans = ndb.startTransaction();
-		trans.setOperationLockMode(LockMode.LM_Exclusive);
-		op = trans.getSelectOperation(tablename);
+		op = trans.getSelectOperation(tablename,LockMode.LM_Exclusive);
 
 		op.equalString(col1,col1Val);
 		op.equalString(col2,col2Val);

=== modified file 'java/testsuite/ndbj/NdbOperationTest.java'
--- a/java/testsuite/ndbj/NdbOperationTest.java	2008-05-30 04:59:35 +0000
+++ b/java/testsuite/ndbj/NdbOperationTest.java	2008-06-03 14:35:21 +0000
@@ -90,8 +90,7 @@
 		trans.close();
 	
 		trans = ndb.startTransaction();
-		trans.setOperationLockMode(LockMode.LM_Exclusive);
-		op = trans.getSelectOperation(tablename);
+		op = trans.getSelectOperation(tablename,LockMode.LM_Exclusive);
 		op.equalInt(col1,int_val);
 		op.getValue(col1);
 		op.getValue(col2);

=== modified file 'java/testsuite/ndbj/NdbScanFilterTest.java'
--- a/java/testsuite/ndbj/NdbScanFilterTest.java	2008-05-19 20:13:45 +0000
+++ b/java/testsuite/ndbj/NdbScanFilterTest.java	2008-06-03 14:35:21 +0000
@@ -61,9 +61,7 @@
 	{
 		NdbTransaction scanTrans = ndb.startTransaction();
 
-		trans.setOperationLockMode(LockMode.LM_CommittedRead);
-
-		NdbScanOperation scan = scanTrans.getSelectScanOperation(tablename);
+		NdbScanOperation scan = scanTrans.getSelectScanOperation(tablename,LockMode.LM_CommittedRead,0,0,0);
 
 		sd.defineFiltering(scan);
 

=== modified file 'java/testsuite/ndbj/NdbScanTest.java'
--- a/java/testsuite/ndbj/NdbScanTest.java	2008-05-19 20:13:45 +0000
+++ b/java/testsuite/ndbj/NdbScanTest.java	2008-06-03 14:35:21 +0000
@@ -69,8 +69,7 @@
 
 		trans = ndb.startTransaction();
 
-		trans.setOperationLockMode(LockMode.LM_CommittedRead);
-		NdbScanOperation sop = trans.getSelectScanOperation(tablename);
+		NdbScanOperation sop = trans.getSelectScanOperation(tablename,LockMode.LM_CommittedRead,0,0,0);
 
 		sop.getValue(col2);
 		sop.getValue(col3);

=== modified file 'java/testsuite/ndbj/NullSetTest.java'
--- a/java/testsuite/ndbj/NullSetTest.java	2008-05-19 20:13:45 +0000
+++ b/java/testsuite/ndbj/NullSetTest.java	2008-06-03 14:35:21 +0000
@@ -50,8 +50,7 @@
 		trans.close();
 
 		trans = ndb.startTransaction();
-		trans.setOperationLockMode(LockMode.LM_Exclusive);
-		op = trans.getSelectOperation(tablename);
+		op = trans.getSelectOperation(tablename,LockMode.LM_Exclusive);
 
 		op.equalBytes("id",pkID);
 		op.getValue(col2);
@@ -89,8 +88,7 @@
 		trans.close();
 
 		trans = ndb.startTransaction();
-		trans.setOperationLockMode(LockMode.LM_Exclusive);
-		op = trans.getSelectOperation(tablename);
+		op = trans.getSelectOperation(tablename,LockMode.LM_Exclusive);
 
 		op.equalBytes(col1,pkID);
 		op.getValue(col2);

=== modified file 'java/testsuite/ndbj/OrderedIndexScanTest.java'
--- a/java/testsuite/ndbj/OrderedIndexScanTest.java	2008-05-19 20:13:45 +0000
+++ b/java/testsuite/ndbj/OrderedIndexScanTest.java	2008-06-03 14:35:21 +0000
@@ -34,10 +34,9 @@
 
 	public void testOIScan() throws NdbApiException, SQLException {
 		trans = ndb.startTransaction();
-		trans.setOperationLockMode(LockMode.LM_CommittedRead);
 		NdbIndexScanOperation iop=
 			trans.getSelectIndexScanOperation("PRIMARY", theTableName,
-					NdbIndexScanOperation.ScanFlag.ORDER_BY);
+					LockMode.LM_CommittedRead,NdbIndexScanOperation.ScanFlag.ORDER_BY,0,0);
 
 		iop.equalInt(0,1);
 

=== modified file 'java/testsuite/ndbj/Utf8InsertReadTest.java'
--- a/java/testsuite/ndbj/Utf8InsertReadTest.java	2008-05-30 04:46:12 +0000
+++ b/java/testsuite/ndbj/Utf8InsertReadTest.java	2008-06-03 14:35:21 +0000
@@ -49,7 +49,7 @@
 
 		NdbResultSet[] theResults = new NdbResultSet[NUM_INSERTS];
 		for (int i = 0; i < NUM_INSERTS; i++) {
-			NdbOperation op = trans.getSelectOperation(tablename);
+			NdbOperation op = trans.getSelectOperation(tablename,NdbOperation.LockMode.LM_Read);
 			op.equalInt(col1, i);
 			op.getValue(col2);
 			theResults[i] = op.resultData();
@@ -69,7 +69,7 @@
 
 		// test retrieving the data with NdbScanFilter
 		trans = ndb.startTransaction();
-		NdbScanOperation scanop = trans.getSelectScanOperation(tablename);
+		NdbScanOperation scanop = trans.getSelectScanOperation(tablename,NdbOperation.LockMode.LM_Read,0,0,0);
 		NdbScanFilter scanFilter = scanop.getNdbScanFilter();
 		scanFilter.begin();
 		scanFilter.eq(col2, col2Val);



