Class MySQLSequenceTable
- java.lang.Object
-
- edu.uiuc.ncsa.security.storage.sql.internals.Table
-
- org.cilogon.oauth2.servlet.storage.sequence.SequenceTable
-
- org.cilogon.oauth2.servlet.storage.sequence.MySQLSequenceTable
-
public class MySQLSequenceTable extends SequenceTable
In order to use an auto increment column in MySQL, you must use a regular table and have an extra, dummy column. You insert a dummy value into that then read off the returned auto increment value (this value should be the primary key) as a side effect. while it is possible to have a single auto increment column as the complete table, there is no way to actually then update it. MySQL requires another column which is supplied here.Created by Jeff Gaynor
on 5/9/12 at 11:50 AM
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cilogon.oauth2.servlet.storage.sequence.SequenceTable
SequenceTable.SequenceKeys
-
-
Constructor Summary
Constructors Constructor Description MySQLSequenceTable(SequenceTable.SequenceKeys keys, String schema, String tablenamePrefix, String tablename)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createColumnDescriptors()
String
createTableStatement(int startValue)
String
dropStatement()
protected String
dummyColumn(String... x)
String
nextValueStatement()
-
Methods inherited from class edu.uiuc.ncsa.security.storage.sql.internals.Table
createInsertStatement, createMassInsertStatement, createRegisterStatement, createSelectAllStatement, createSelectStatement, createTableStatement, createUpdateStatement, fqTablename, getColumnDescriptor, getColumnTypeTranslator, getCreateTableStatement, getFQTablename, getPrimaryKeyColumnName, getSchema, getTablename, getTablenamePrefix, setTablename, setTablenamePrefix, toString
-
-
-
-
Constructor Detail
-
MySQLSequenceTable
public MySQLSequenceTable(SequenceTable.SequenceKeys keys, String schema, String tablenamePrefix, String tablename)
-
-
Method Detail
-
createColumnDescriptors
public void createColumnDescriptors()
- Overrides:
createColumnDescriptors
in classedu.uiuc.ncsa.security.storage.sql.internals.Table
-
createTableStatement
public String createTableStatement(int startValue)
- Specified by:
createTableStatement
in classSequenceTable
-
nextValueStatement
public String nextValueStatement()
- Specified by:
nextValueStatement
in classSequenceTable
-
dropStatement
public String dropStatement()
- Specified by:
dropStatement
in classSequenceTable
-
-