|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencms.db.CmsDbUtil
public final class 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 Timestamp |
getTimestamp(ResultSet result,
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(String tableName)
Creates a new primary key ID for a given table. |
static int |
nextId(String dbPoolUrl,
String tableName)
Creates a new primary key ID for a given table using JDBC connection specified by a pool URL. |
static void |
setDefaultPool(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 Timestamp getTimestamp(ResultSet result,
String column)
throws SQLException
result - the resultset to get the stamp fromcolumn - the column to read the timestamp from
SQLException - if something goes wrongpublic static void init()
public static int nextId(String tableName)
throws CmsException
tableName - the name of the table to create a new primary key ID
CmsException - if something goes wrong
public static int nextId(String dbPoolUrl,
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(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 | |||||||||