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() |
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. |
protected void |
retrieveRepository()
Implementor is responsible for creating the repository.
|
void |
rollback() |
<T> T |
unwrap(Class<T> iface) |
commit, createConnection, getConnectionInfo, getRepository, getRepositoryName, getRepositoryNames, isWrapperFor, setRepository, 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)
descriptorKey
RepositoryDelegate.getDescriptor(java.lang.String)
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 retrieveRepository() throws SQLException
AbstractRepositoryDelegate
SQLException
public boolean isValid(int timeout) throws RepositoryException
RepositoryException
Connection.isValid(int)
public void closeStatement()
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
RepositoryDelegate.closeStatement()
public void close()
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
AbstractRepositoryDelegate
unwrap
in interface RepositoryDelegate
unwrap
in class AbstractRepositoryDelegate
T
- iface
- SQLException
Wrapper.unwrap(java.lang.Class)
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.