|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.db.CmsDbUtil
This class is used to create primary keys as integers for Cms database tables that don't have a UUID primary key.
Field Summary | |
static int |
UNKNOWN_ID
Indicates an unknown (or not set) id. |
Method Summary | |
static java.sql.Timestamp |
getTimestamp(java.sql.ResultSet result,
java.lang.String column)
This method tries to get the timestamp several times, because there is a timing problem in the mysql driver. |
static void |
init()
Initilizes this DB utils. |
static int |
nextId(java.lang.String tableName)
Creates a new primary key ID for a given table. |
static int |
nextId(java.lang.String dbPoolUrl,
java.lang.String tableName)
Creates a new primary key ID for a given table using JDBC connection specified by a pool URL. |
static void |
setDefaultPool(java.lang.String dbPoolUrl)
Sets the URL of the connection pool. |
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_ID
Method Detail |
public static java.sql.Timestamp getTimestamp(java.sql.ResultSet result, java.lang.String column) throws java.sql.SQLException
result
- the resultset to get the stamp fromcolumn
- the column to read the timestamp from
java.sql.SQLException
- if something goes wrongpublic static void init()
public static int nextId(java.lang.String tableName) throws CmsException
tableName
- the name of the table to create a new primary key ID
CmsException
- if something goes wrongpublic static int nextId(java.lang.String dbPoolUrl, java.lang.String tableName) throws CmsDataAccessException
dbPoolUrl
- the URL to access the connection pooltableName
- the name of the table to create a new primary key ID
CmsDataAccessException
- if something goes wrongpublic static void setDefaultPool(java.lang.String dbPoolUrl)
dbPoolUrl
- the URL to access the connection pool
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |