equip.data.sql
Class DataKeyAllocateMax

java.lang.Object
  extended byequip.data.sql.DataKeyAllocateMax
All Implemented Interfaces:
IDataKeyAllocate

public class DataKeyAllocateMax
extends java.lang.Object
implements IDataKeyAllocate

class for generating a new SQL primary key as MAX in column+1 (assumes int).


Constructor Summary
DataKeyAllocateMax()
           
 
Method Summary
 java.lang.String allocateKey(java.lang.String keyType, java.lang.String dataTableName, java.lang.String dataKeyColumn, java.sql.Connection conn)
          allocate key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataKeyAllocateMax

public DataKeyAllocateMax()
Method Detail

allocateKey

public java.lang.String allocateKey(java.lang.String keyType,
                                    java.lang.String dataTableName,
                                    java.lang.String dataKeyColumn,
                                    java.sql.Connection conn)
allocate key.

Specified by:
allocateKey in interface IDataKeyAllocate
Parameters:
keyType - Key type (see CustomTableDataStore).
dataTableName - name of SQL table
dataKeyColumn - name of PK column in table
conn - open SQL connection to database