org.modeshape.jdbc.delegate
Interface RepositoryDelegate

All Known Implementing Classes:
AbstractRepositoryDelegate, HttpRepositoryDelegate, LocalRepositoryDelegate

public interface RepositoryDelegate

Represents the communication interface thru which the JDBC logic will obtain a connection and issue commands to the Jcr layer.


Method Summary
 void close()
          Call to close the delegate connection.
 void commit()
           
 Connection createConnection()
          Call to create the connection based on the implementation of this interface.
 DatabaseMetaData createMetaData(JcrConnection connection)
          Call to create the DatabaseMetaData
 QueryResult execute(String query, String language)
          Call to execute the sql query based on the specified Jcr language.
 ConnectionInfo getConnectionInfo()
          Call to get the connection information.
 String getDescriptor(String descriptorKey)
          Returns the value for the requested descriptorKey
 Set<String> getRepositoryNames()
          Called to get all the repository names currently available in the JcrEngine.
 boolean isValid(int timeout)
           
 boolean isWrapperFor(Class<?> iface)
           
 NodeType nodeType(String name)
          Call to get NodeType based on specified name
 List<NodeType> nodeTypes()
          Call to get all the NodeTypes defined.
 void rollback()
           
<T> T
unwrap(Class<T> iface)
           
 

Method Detail

getConnectionInfo

ConnectionInfo getConnectionInfo()
Call to get the connection information.

Returns:
ConnectionInfo

nodeType

NodeType nodeType(String name)
                  throws RepositoryException
Call to get NodeType based on specified name

Parameters:
name -
Returns:
NodeType
Throws:
RepositoryException

nodeTypes

List<NodeType> nodeTypes()
                         throws RepositoryException
Call to get all the NodeTypes defined.

Returns:
List of all the node types.
Throws:
RepositoryException

execute

QueryResult execute(String query,
                    String language)
                    throws RepositoryException
Call to execute the sql query based on the specified Jcr language.

Parameters:
query - is the sql query to execute
language - is the JCR language the query should be executed based on.
Returns:
QueryResult is the JCR query result
Throws:
RepositoryException

createConnection

Connection createConnection()
                            throws SQLException
Call to create the connection based on the implementation of this interface.

Returns:
Connection
Throws:
SQLException

commit

void commit()
            throws RepositoryException
Throws:
RepositoryException
See Also:
Connection.commit()

rollback

void rollback()
              throws RepositoryException
Throws:
RepositoryException
See Also:
Connection.rollback()

isValid

boolean isValid(int timeout)
                throws RepositoryException
Parameters:
timeout -
Returns:
boolean indicating if timeout is valid
Throws:
RepositoryException
See Also:
Connection.isValid(int)

close

void close()
Call to close the delegate connection.

See Also:
Connection.close()

createMetaData

DatabaseMetaData createMetaData(JcrConnection connection)
                                throws RepositoryException
Call to create the DatabaseMetaData

Parameters:
connection -
Returns:
JcrMetaData
Throws:
RepositoryException

isWrapperFor

boolean isWrapperFor(Class<?> iface)
Parameters:
iface -
Returns:
boolean
See Also:
Wrapper.isWrapperFor(java.lang.Class)

unwrap

<T> T unwrap(Class<T> iface)
         throws SQLException
Type Parameters:
T -
Parameters:
iface -
Returns:
T
Throws:
SQLException
See Also:
Wrapper.unwrap(java.lang.Class)

getRepositoryNames

Set<String> getRepositoryNames()
                               throws RepositoryException
Called to get all the repository names currently available in the JcrEngine.

Returns:
Set of repository names
Throws:
RepositoryException

getDescriptor

String getDescriptor(String descriptorKey)
Returns the value for the requested descriptorKey

Parameters:
descriptorKey -
Returns:
String descriptor value


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