|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.cdo.server.db.CDODBUtil
public final class CDODBUtil
| Field Summary | |
|---|---|
static int |
DEFAULT_STATEMENT_CACHE_CAPACITY
|
static java.lang.String |
EXT_POINT_MAPPING_STRATEGIES
|
| Method Summary | |
|---|---|
static IMappingStrategy |
createHorizontalMappingStrategy(boolean auditing)
|
static IMappingStrategy |
createMappingStrategy(java.lang.String type)
Can only be used when Eclipse is running. |
static IPreparedStatementCache |
createStatementCache()
Creates a prepared statement cache with the default capacity. |
static IPreparedStatementCache |
createStatementCache(int capacity)
Creates a prepared statement cache with the given capacity. |
static IDBStore |
createStore(IMappingStrategy mappingStrategy,
org.eclipse.net4j.db.IDBAdapter dbAdapter,
org.eclipse.net4j.db.IDBConnectionProvider dbConnectionProvider)
|
static long |
getLong(CDOID id)
Get the long value of a CDOID (by delegating to CDOIDUtil.getLong(org.eclipse.emf.cdo.common.id.CDOID)) In
addition, provide a check for external IDs which are not supported by the DBStore |
static void |
sqlDump(java.sql.Connection conn,
java.lang.String sql)
Deprecated. Should only be used when debugging. |
static void |
sqlDump(org.eclipse.net4j.db.IDBConnectionProvider connectionProvider,
java.lang.String sql)
Deprecated. Should only be used when debugging. |
static int |
sqlUpdate(java.sql.PreparedStatement stmt,
boolean exactlyOne)
Execute update on the given prepared statement and handle common cases of return values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_STATEMENT_CACHE_CAPACITY
public static final java.lang.String EXT_POINT_MAPPING_STRATEGIES
| Method Detail |
|---|
public static IDBStore createStore(IMappingStrategy mappingStrategy,
org.eclipse.net4j.db.IDBAdapter dbAdapter,
org.eclipse.net4j.db.IDBConnectionProvider dbConnectionProvider)
public static IMappingStrategy createHorizontalMappingStrategy(boolean auditing)
public static IMappingStrategy createMappingStrategy(java.lang.String type)
#createHorizontalMappingStrategy()public static long getLong(CDOID id)
CDOIDUtil.getLong(org.eclipse.emf.cdo.common.id.CDOID)) In
addition, provide a check for external IDs which are not supported by the DBStore
id - the ID to convert to long
java.lang.IllegalArgumentException - if the ID is not convertibla
public static int sqlUpdate(java.sql.PreparedStatement stmt,
boolean exactlyOne)
throws java.sql.SQLException
stmt - the prepared statementexactlyOne - if true, the update count is checked to be 1. Else the update result is only
checked so that the update was successful (i.e. result code != Statement.EXECUTE_FAILED).
PreparedStatement.executeUpdate(). Can be used
by the caller to perform more advanced checks.
java.sql.SQLException - if PreparedStatement.executeUpdate() throws it.
java.lang.IllegalStateException - if the check indicated by excatlyOne indicates an error.
@Deprecated
public static void sqlDump(java.sql.Connection conn,
java.lang.String sql)
@Deprecated
public static void sqlDump(org.eclipse.net4j.db.IDBConnectionProvider connectionProvider,
java.lang.String sql)
public static IPreparedStatementCache createStatementCache()
default capacity.
createStatementCache(int)public static IPreparedStatementCache createStatementCache(int capacity)
|
Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||