public class SQLDirectory extends AbstractDirectory
| Modifier and Type | Class and Description |
|---|---|
protected class |
SQLDirectory.TxSessionCleaner |
| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.logging.Log |
log |
static String |
TENANT_ID_FIELD |
cache, descriptor, fieldMapper, references, registry, sessionCount, sessionMaxCount| Constructor and Description |
|---|
SQLDirectory(SQLDirectoryDescriptor descriptor) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSession(SQLSession session) |
protected void |
checkConnection() |
Connection |
getConnection() |
protected Connection |
getConnection(DataSource aDataSource)
Gets a physical connection from a datasource.
|
protected DataSource |
getDataSource()
DO NOT USE, use getConnection() instead.
|
SQLDirectoryDescriptor |
getDescriptor()
To be implemented with a more specific return type.
|
Dialect |
getDialect() |
Map<String,Field> |
getSchemaFieldMap() |
Session |
getSession()
Creates a session for accessing entries in this directory.
|
List<String> |
getStoredFieldNames() |
Table |
getTable() |
protected void |
initConnection()
Lazy init connection
|
boolean |
isMultiTenant()
Returns
true if this directory is a multi tenant directory, false otherwise. |
protected void |
registerInTx(SQLSession session) |
String |
toString() |
boolean |
useNativeCase() |
addReference, addReferences, addSession, doSanityChecks, getCache, getFieldMapper, getIdField, getName, getParentDirectory, getPasswordField, getReference, getReferences, getReferences, getSchema, invalidateCaches, invalidateDirectoryCache, isReadOnly, isReference, orderEntries, removeSession, setReadOnly, shutdownpublic static final org.apache.commons.logging.Log log
public static final String TENANT_ID_FIELD
public SQLDirectory(SQLDirectoryDescriptor descriptor)
public SQLDirectoryDescriptor getDescriptor()
AbstractDirectorygetDescriptor in class AbstractDirectoryprotected void initConnection()
protected DataSource getDataSource() throws DirectoryException
DirectoryExceptionpublic Connection getConnection() throws DirectoryException
DirectoryExceptionprotected Connection getConnection(DataSource aDataSource) throws SQLException
A few retries are done to work around databases that have problems with many open/close in a row.
aDataSource - the datasourceSQLExceptionpublic Session getSession() throws DirectoryException
DirectoryDirectoryException - if a session cannot be createdprotected void checkConnection()
protected void addSession(SQLSession session) throws DirectoryException
DirectoryExceptionprotected void registerInTx(SQLSession session) throws DirectoryException
DirectoryExceptionpublic Map<String,Field> getSchemaFieldMap()
public List<String> getStoredFieldNames()
public Dialect getDialect()
public boolean useNativeCase()
public boolean isMultiTenant()
Directorytrue if this directory is a multi tenant directory, false otherwise.isMultiTenant in interface DirectoryisMultiTenant in class AbstractDirectoryCopyright © 2016 Nuxeo SA. All rights reserved.