org.apache.derby.impl.tools.dblook
Class DB_Sequence

java.lang.Object
  extended by org.apache.derby.impl.tools.dblook.DB_Sequence

public class DB_Sequence
extends java.lang.Object

Dblook implementation for SEQUENCEs.


Constructor Summary
DB_Sequence()
           
 
Method Summary
private static java.lang.String createSequenceString(java.lang.String fullName, java.lang.String dataTypeName, long startValue, long minimumValue, long maximumValue, long increment, java.lang.String cycleOption)
           Generate DDL for a specific sequence.
static void doSequences(java.sql.Connection conn)
           Generate the DDL for all sequences and output it via Logs.java.
private static java.lang.String stripNotNull(java.lang.String datatypeName)
          Strip the trailing NOT NULL off of the string representation of a datatype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DB_Sequence

public DB_Sequence()
Method Detail

doSequences

public static void doSequences(java.sql.Connection conn)
                        throws java.sql.SQLException

Generate the DDL for all sequences and output it via Logs.java.

Parameters:
conn - Connection to the source database.
Throws:
java.sql.SQLException

stripNotNull

private static java.lang.String stripNotNull(java.lang.String datatypeName)
Strip the trailing NOT NULL off of the string representation of a datatype


createSequenceString

private static java.lang.String createSequenceString(java.lang.String fullName,
                                                     java.lang.String dataTypeName,
                                                     long startValue,
                                                     long minimumValue,
                                                     long maximumValue,
                                                     long increment,
                                                     java.lang.String cycleOption)
                                              throws java.sql.SQLException

Generate DDL for a specific sequence.

Parameters:
fullName - Fully qualified name of the sequence
dataTypeName - Name of the datatype of the sequence
startValue - First value to use in the range of the sequence
minimumValue - Smallest value in the range
maximumValue - Largest value in the range
increment - Step size of the sequence
cycleOption - CYCLE or NO CYCLE
Returns:
DDL for the current stored sequence
Throws:
java.sql.SQLException

Built on Thu 2011-03-10 11:54:14+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.