public class JDBCConnection extends Object
Modifier and Type | Field and Description |
---|---|
Connection |
connection
The actual connection.
|
boolean |
countExecutes |
protected Dialect |
dialect
The dialect.
|
int |
executeCount |
JDBCLogger |
logger |
protected Model |
model
The model used to do the mapping.
|
protected boolean |
noSharing
Whether this connection must never be shared (long-lived).
|
protected boolean |
setClientInfo |
protected SQLInfo |
sqlInfo
The SQL information.
|
protected boolean |
supportsBatchUpdates |
protected XAResource |
xaresource |
Constructor and Description |
---|
JDBCConnection()
for tests only
|
JDBCConnection(Model model,
SQLInfo sqlInfo,
boolean noSharing)
Creates a new Mapper.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkConcurrentUpdate(Throwable e)
Checks the SQL error we got and determine if a concurrent update happened.
|
void |
close() |
void |
closeConnections() |
protected void |
closeStatement(Statement s) |
protected void |
closeStatement(Statement s,
ResultSet r) |
protected void |
countExecute() |
static String |
getDataSourceName(String repositoryName)
Gets the datasource to use for the given repository.
|
Mapper.Identification |
getIdentification() |
String |
getRepositoryName() |
protected void |
openBaseConnection() |
protected void |
openConnections() |
public Connection connection
protected boolean supportsBatchUpdates
protected XAResource xaresource
protected final boolean noSharing
public boolean countExecutes
public int executeCount
public final JDBCLogger logger
protected boolean setClientInfo
public JDBCConnection(Model model, SQLInfo sqlInfo, boolean noSharing)
model
- the modelsqlInfo
- the sql infonoSharing
- whether to use no-sharing mode for the connectionpublic JDBCConnection()
public String getRepositoryName()
public Mapper.Identification getIdentification()
protected void countExecute()
public static String getDataSourceName(String repositoryName)
protected void openConnections()
protected void openBaseConnection() throws SQLException
SQLException
public void close()
public void closeConnections()
protected void checkConcurrentUpdate(Throwable e) throws ConcurrentUpdateException
e
- the exceptionConcurrentUpdateException
protected void closeStatement(Statement s) throws SQLException
SQLException
protected void closeStatement(Statement s, ResultSet r) throws SQLException
SQLException
Copyright © 2016 Nuxeo SA. All rights reserved.