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, fieldMapper, name, references, registry, sessionCount, sessionMaxCount
Constructor and Description |
---|
SQLDirectory(SQLDirectoryDescriptor config) |
Modifier and Type | Method and Description |
---|---|
protected void |
addSession(SQLSession session) |
protected void |
checkConnection() |
SQLDirectoryDescriptor |
getConfig() |
Connection |
getConnection() |
protected Connection |
getConnection(DataSource aDataSource)
Gets a physical connection from a datasource.
|
protected DataSource |
getDataSource()
DO NOT USE, use getConnection() instead.
|
Dialect |
getDialect() |
String |
getIdField()
Gets the id field of the schema for this directory.
|
String |
getName()
Gets the unique name of the directory, used for registering.
|
String |
getParentDirectory()
Gets the name of the parent directory.
|
String |
getPasswordField()
Gets the password field of the schema for this directory.
|
String |
getSchema()
Gets the schema name used by this directory.
|
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, getCache, getFieldMapper, getReference, getReferences, getReferences, invalidateCaches, invalidateDirectoryCache, isReference, orderEntries, removeSession, shutdown
public static final org.apache.commons.logging.Log log
public static final String TENANT_ID_FIELD
public SQLDirectory(SQLDirectoryDescriptor config)
protected void initConnection()
public SQLDirectoryDescriptor getConfig()
protected DataSource getDataSource() throws DirectoryException
DirectoryException
public Connection getConnection() throws DirectoryException
DirectoryException
protected 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 datasourceSQLException
public String getName()
Directory
public String getSchema()
Directory
public String getParentDirectory()
Directory
public String getIdField()
Directory
public String getPasswordField()
Directory
public Session getSession() throws DirectoryException
Directory
DirectoryException
- if a session cannot be createdprotected void checkConnection()
protected void addSession(SQLSession session) throws DirectoryException
DirectoryException
protected void registerInTx(SQLSession session) throws DirectoryException
DirectoryException
public Map<String,Field> getSchemaFieldMap()
public List<String> getStoredFieldNames()
public Dialect getDialect()
public boolean useNativeCase()
public boolean isMultiTenant()
Directory
true
if this directory is a multi tenant directory, false
otherwise.isMultiTenant
in interface Directory
isMultiTenant
in class AbstractDirectory
Copyright © 2015 Nuxeo SA. All rights reserved.