java.lang.Objectorg.objectweb.telosys.common.TelosysObject
org.objectweb.telosys.dal.dao.SequenceDAO
Standard DAO for sequences
Field Summary | |
static int |
MYSQL
|
static int |
ORACLE
|
static int |
POSTGRESQL
|
static int |
UNKNOWN
|
Constructor Summary | |
SequenceDAO(java.lang.String sSequenceName,
int iBaseType)
Constructor |
Method Summary | |
long |
currVal(java.sql.Connection con)
Get the 'currval' of the sequence (using the given database connection) |
long |
currVal(DatabaseSession session)
Get the 'currval' of the sequence (using the given database session) |
int |
getDatabaseType()
Returns the database type |
java.lang.String |
getSequenceName()
Returns the name of the sequence |
java.lang.String |
getSqlCurrVal()
Returns the SQL request used to get 'currval' |
java.lang.String |
getSqlNextVal()
Returns the SQL request used to get 'nextval' |
long |
nextVal()
Get the 'nextval' of the sequence (using the default database) |
long |
nextVal(java.sql.Connection con)
Get the 'nextval' of the sequence (using the given database connection) |
long |
nextVal(DatabaseSession session)
Get the 'nextval' of the sequence (using the given database session) |
long |
nextVal(int iDatabaseId)
Get the 'nextval' of the sequence (using the given database id) |
Methods inherited from class org.objectweb.telosys.common.TelosysObject |
error, error, error, getFlagTrace, info, setFlagTrace, trace, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int UNKNOWN
public static final int ORACLE
public static final int POSTGRESQL
public static final int MYSQL
Constructor Detail |
public SequenceDAO(java.lang.String sSequenceName, int iBaseType)
sSequenceName
- iBaseType
- Method Detail |
public java.lang.String getSequenceName()
public int getDatabaseType()
public java.lang.String getSqlNextVal()
public java.lang.String getSqlCurrVal()
public long nextVal() throws TelosysException
TelosysException
public long nextVal(int iDatabaseId) throws TelosysException
iDatabaseId
- : the database id to use
TelosysException
public long nextVal(DatabaseSession session) throws TelosysException
session
- : the database session to use
TelosysException
public long nextVal(java.sql.Connection con) throws TelosysException
con
- : the connection to use
TelosysException
public long currVal(DatabaseSession session) throws TelosysException
session
- : the database session to use
TelosysException
public long currVal(java.sql.Connection con) throws TelosysException
con
- : the connection to use
TelosysException