org.modeshape.jdbc.delegate
Class AbstractRepositoryDelegate

java.lang.Object
  extended by org.modeshape.jdbc.delegate.AbstractRepositoryDelegate
All Implemented Interfaces:
RepositoryDelegate
Direct Known Subclasses:
HttpRepositoryDelegate, LocalRepositoryDelegate

public abstract class AbstractRepositoryDelegate
extends Object
implements RepositoryDelegate

The AbstractRepositoryDelegate provides the common logic for the implementation of the RepositoryDelegate


Field Summary
protected static Logger LOGGER
           
 
Constructor Summary
AbstractRepositoryDelegate(String url, Properties info)
           
 
Method Summary
 Connection createConnection()
          Call to create the connection based on the implementation of this interface.
protected abstract  ConnectionInfo createConnectionInfo(String url, Properties info)
           
 DatabaseMetaData createMetaData(JcrConnection connection)
          Call to create the DatabaseMetaData
protected abstract  void createRepository()
           
 ConnectionInfo getConnectionInfo()
          Call to get the connection information.
 Repository getRepository()
           
 String getRepositoryName()
           
 Set<String> getRepositoryNames()
          Called to get all the repository names currently available in the JcrEngine.
protected  boolean isSessionAvailable()
           
 boolean isWrapperFor(Class<?> iface)
          
protected  void setRepository(Repository repository)
           
protected  void setRepositoryName(String repositoryName)
           
protected  void setRepositoryNames(Set<String> repositoryNames)
           
<T> T
unwrap(Class<T> iface)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.modeshape.jdbc.delegate.RepositoryDelegate
close, commit, execute, getDescriptor, isValid, nodeType, nodeTypes, rollback
 

Field Detail

LOGGER

protected static final Logger LOGGER
Constructor Detail

AbstractRepositoryDelegate

public AbstractRepositoryDelegate(String url,
                                  Properties info)
Method Detail

createConnectionInfo

protected abstract ConnectionInfo createConnectionInfo(String url,
                                                       Properties info)

getConnectionInfo

public ConnectionInfo getConnectionInfo()
Description copied from interface: RepositoryDelegate
Call to get the connection information.

Specified by:
getConnectionInfo in interface RepositoryDelegate
Returns:
ConnectionInfo

createRepository

protected abstract void createRepository()
                                  throws SQLException
Throws:
SQLException

isSessionAvailable

protected boolean isSessionAvailable()

createConnection

public Connection createConnection()
                            throws SQLException
Description copied from interface: RepositoryDelegate
Call to create the connection based on the implementation of this interface.

Specified by:
createConnection in interface RepositoryDelegate
Returns:
Connection
Throws:
SQLException

getRepository

public Repository getRepository()

setRepository

protected void setRepository(Repository repository)

getRepositoryName

public String getRepositoryName()

setRepositoryName

protected void setRepositoryName(String repositoryName)

getRepositoryNames

public Set<String> getRepositoryNames()
Description copied from interface: RepositoryDelegate
Called to get all the repository names currently available in the JcrEngine.

Specified by:
getRepositoryNames in interface RepositoryDelegate
Returns:
Set of repository names

setRepositoryNames

protected void setRepositoryNames(Set<String> repositoryNames)

isWrapperFor

public boolean isWrapperFor(Class<?> iface)

Specified by:
isWrapperFor in interface RepositoryDelegate
Returns:
boolean
See Also:
Wrapper.isWrapperFor(java.lang.Class)

unwrap

public <T> T unwrap(Class<T> iface)
         throws SQLException

Specified by:
unwrap in interface RepositoryDelegate
Returns:
T
Throws:
SQLException
See Also:
Wrapper.unwrap(java.lang.Class)

createMetaData

public DatabaseMetaData createMetaData(JcrConnection connection)
Description copied from interface: RepositoryDelegate
Call to create the DatabaseMetaData

Specified by:
createMetaData in interface RepositoryDelegate
Returns:
JcrMetaData


Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.