com.atlassian.jira.upgrade.tasks.util
Class Sequences

java.lang.Object
  extended by com.atlassian.jira.upgrade.tasks.util.Sequences

public class Sequences
extends Object

Utility methods to manipulate entity engine database sequences.

Since:
v4.4

Constructor Summary
Sequences()
           
 
Method Summary
protected  String convertToSchemaTableName(String tableName)
           
protected  org.ofbiz.core.entity.GenericDelegator getDelegator()
           
 void update(Connection connection, String sequenceName, String tableName)
          Update the sequence value for the next id to use for this table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sequences

public Sequences()
Method Detail

update

public void update(Connection connection,
                   String sequenceName,
                   String tableName)
            throws SQLException
Update the sequence value for the next id to use for this table.

Parameters:
connection - The database connection to use to update the sequence.
sequenceName - The name of the sequence to update.
tableName - The name of the table that uses the value of the sequence for its primary key. The column which stores the PK is assumed to be named "id"
Throws:
SQLException - SQL exception

getDelegator

protected org.ofbiz.core.entity.GenericDelegator getDelegator()

convertToSchemaTableName

protected String convertToSchemaTableName(String tableName)


Copyright © 2002-2013 Atlassian. All Rights Reserved.