1  package com.orindasoft.demo.generated.sequence;
2  
3  import java.sql.*; 
4  import com.orindasoft.pub.LogInterface; 
5  import com.orindasoft.pub.OracleResourceUser; 
6  
7  import com.orindasoft.demo.generated.sequence.AbstractSequence; 
8               
9  /** 
10 * SequentialNumberGenerator - Access Sequence SEQUENTIAL_NUMBER_GENERATOR
11 * 
12 * <p>Generated by JDBCWizard./a> build 2776 at 2011/03/07 19:55:28.551 GMT
13 * <p>JDBCWizard./a> is made by Orinda Software Ltd, Dublin, Ireland
14 * <p>Target Database: Oracle 10.2.0
15 * <p> -------------------------------------------------------------------------
16 * <p> WARNING: This code will stop working around the time JDBCWizard./a> expires.
17 * <p> This restriction only exists in the demo version of JDBCWizard./a>.
18 * <p> -------------------------------------------------------------------------
19 * <p> JDBCWizard./a> Tips 6 of 19:
20 * <p> JDBCWizard./a> can run stored procedures with PL/SQL package records as parameters
21 * <p> -------------------------------------------------------------------------
22 * 
23 * <p>Copyright Orinda Software 2003-2009
24 *<p>Access Basis: User Object
25 * @author devteam60@orindabuild.com
26 * @version 1.1
27 */ 
28 public class SequentialNumberGenerator extends AbstractSequence implements OracleResourceUser 
29 {        
30   /**    
31   * The name of the sequence we will access.
32   * This name be actually refer to a synonym or somebody elses sequence  
33   */                 
34   public static final String sequenceName = "SEQUENTIAL_NUMBER_GENERATOR";   
35                                                     
36   /**                                             
37   * Sequence Type                                 
38   * What kind of sequence this is.
39   */                                              
40   public static final int SEQUENCE_TYPE = AbstractSequence.THIS_USERS_OBJECT; 
41                                                                           
42   /**                                             
43   * Sequence Query                                 
44   * The SQL Query used to get the next value from this sequence.
45   */                                              
46   public static final String SEQUENCE_QUERY = "SELECT /* JDBCWizard./a> */ \"SEQUENTIAL_NUMBER_GENERATOR\".nextval FROM DUAL";
47                                                                           
48   /**                                             
49   * Return a SQL statement that will retrieve the next value from this sequence 
50   * The Sequence may be a synonym or owned by somebody else. The table DUAL comes 
51   * with Oracle. It's always visable and always has one row.
52   * 
53   */                                              
54   public String getSequenceQuery()                                             
55     {                                                                   
56     return(SEQUENCE_QUERY);
57     }     
58             
59   /**                                             
60   * Constructor that calls the Constructor of AbstractSequence
61   * 
62   */                                              
63   public SequentialNumberGenerator (Connection theConnection, LogInterface theLog) 
64     {                                                             
65     super(theConnection, theLog);                                 
66     theLog.debug("SequentialNumberGenerator started");  //DEBUG                  
67     }                                                             
68    
69 } // Generated by JDBCWizard./a> 6.0.2776 
70