public class LocalRepositoryDelegate extends AbstractRepositoryDelegate
Modifier and Type | Field and Description |
---|---|
static RepositoryDelegateFactory |
FACTORY |
protected static Set<LocalSession> |
TRANSACTION_IDS |
logger
Constructor and Description |
---|
LocalRepositoryDelegate(String url,
Properties info,
LocalJcrDriver.JcrContextFactory contextFactory) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Call to close the delegate connection and any outstanding transactions will be closed.
|
void |
closeStatement()
Called when the
Statement the is closed. |
protected ConnectionInfo |
createConnectionInfo(String url,
Properties info)
Returns a
ConnectionInfo object which represents the information of a specific connection, from a given url format
and some Properties |
QueryResult |
execute(String query,
String language)
This execute method is used for redirection so that the JNDI implementation can control calling execute.
|
String |
explain(String query,
String language)
Generate the plan for the
query based on the specified JCR language. |
String |
getDescriptor(String descriptorKey)
Returns the value for the requested
descriptorKey |
protected LocalJcrDriver.JcrContextFactory |
getJcrContext() |
protected void |
initRepository()
The implementing class is responsible for creating the repository in an optimal way, since this will be called each time a
connection is created.
|
boolean |
isValid(int timeout) |
NodeType |
nodeType(String name)
Call to get
NodeType based on specified name |
List<NodeType> |
nodeTypes()
Call to get all the
NodeType s defined. |
void |
rollback() |
<T> T |
unwrap(Class<T> iface) |
commit, createConnection, getConnectionInfo, getRepositoryName, getRepositoryNames, isWrapperFor, setRepositoryName, setRepositoryNames
public static final RepositoryDelegateFactory FACTORY
protected static final Set<LocalSession> TRANSACTION_IDS
public LocalRepositoryDelegate(String url, Properties info, LocalJcrDriver.JcrContextFactory contextFactory)
protected ConnectionInfo createConnectionInfo(String url, Properties info)
AbstractRepositoryDelegate
ConnectionInfo
object which represents the information of a specific connection, from a given url format
and some Properties
url
- a non-null
string which represents a jdbc urlinfo
- a non-null
Properties
instance which may contain extra information needed by the connectionConnectionInfo
instance, never null
protected LocalJcrDriver.JcrContextFactory getJcrContext()
public String getDescriptor(String descriptorKey)
RepositoryDelegate
descriptorKey
public NodeType nodeType(String name) throws RepositoryException
RepositoryDelegate
NodeType
based on specified nameRepositoryException
public List<NodeType> nodeTypes() throws RepositoryException
RepositoryDelegate
NodeType
s defined.RepositoryException
public QueryResult execute(String query, String language) throws RepositoryException
query
- is the query expression to executelanguage
- is the JCR language the query
should be executed based on.RepositoryException
Statement.execute(java.lang.String)
public String explain(String query, String language) throws RepositoryException
RepositoryDelegate
query
based on the specified JCR language.query
- is the query expression to executelanguage
- is the JCR language the query
should be executed based on.RepositoryException
protected void initRepository() throws SQLException
AbstractRepositoryDelegate
SQLException
public boolean isValid(int timeout) throws RepositoryException
RepositoryException
Connection.isValid(int)
public void closeStatement()
RepositoryDelegate
Statement
the is closed. This enables the underlying connection to the JcrRepository remain open
until the statement is finished using it.closeStatement
in interface RepositoryDelegate
closeStatement
in class AbstractRepositoryDelegate
public void close()
RepositoryDelegate
close
in interface RepositoryDelegate
close
in class AbstractRepositoryDelegate
Connection.close()
public void rollback() throws RepositoryException
rollback
in interface RepositoryDelegate
rollback
in class AbstractRepositoryDelegate
RepositoryException
Connection.rollback()
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap
in interface RepositoryDelegate
unwrap
in class AbstractRepositoryDelegate
SQLException
Wrapper.unwrap(java.lang.Class)
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.