public interface DatabaseClient
Modifier and Type | Method and Description |
---|---|
DatabaseClientFactory.Authentication |
getAuthentication() |
Object |
getClientImplementation()
Returns the client object from the library that implements communication with the
server.
|
String |
getDatabase() |
String |
getHost() |
String |
getPassword() |
int |
getPort() |
SSLContext |
getSSLContext() |
DatabaseClientFactory.SSLHostnameVerifier |
getSSLHostnameVerifier() |
String |
getUser() |
<T extends ResourceManager> |
init(String resourceName,
T resourceManager)
Initializes a manager for a extension resource.
|
BinaryDocumentManager |
newBinaryDocumentManager()
Creates a document manager for documents with a binary format such as images.
|
GenericDocumentManager |
newDocumentManager()
Creates a document manager for documents with unknown or heterogeneous formats.
|
GraphManager |
newGraphManager()
Creates a manager for CRUD operations on semantic graphs.
|
JSONDocumentManager |
newJSONDocumentManager()
Creates a document manager for documents containing a JSON structure.
|
RequestLogger |
newLogger(OutputStream out)
Creates a logger for document and query requests.
|
<T,ID extends Serializable> |
newPojoRepository(Class<T> clazz,
Class<ID> idClass)
Creates a PojoRepository specific to the specified class and its id type.
|
QueryManager |
newQueryManager()
Creates a manager for querying the database.
|
RuleManager |
newRuleManager()
Creates a manager for building rules and rules-matching applications.
|
ServerConfigurationManager |
newServerConfigManager()
Creates a manager for configuring the REST server for the database.
|
ServerEvaluationCall |
newServerEval()
Creates a ServerEvaluationCall for eval and invoke of server-side xquery or
javascript code.
|
SPARQLQueryManager |
newSPARQLQueryManager()
Creates a manager for executing SPARQL queries and retrieving results.
|
TextDocumentManager |
newTextDocumentManager()
Creates a document manager for documents containing unstructured text.
|
XMLDocumentManager |
newXMLDocumentManager()
Creates a document manager for documents containing XML.
|
Transaction |
openTransaction()
Starts a transaction.
|
Transaction |
openTransaction(String name)
Starts a transaction with the specified name, which makes the transaction easier to recognize
when you get status reports.
|
Transaction |
openTransaction(String name,
int timeLimit)
Starts a transaction with the specified name and time limit.
|
void |
release()
Closes the database client and releases associated resources.
|
Transaction openTransaction() throws ForbiddenUserException, FailedRequestException
ForbiddenUserException
FailedRequestException
Transaction openTransaction(String name) throws ForbiddenUserException, FailedRequestException
name
- the transaction nameForbiddenUserException
FailedRequestException
Transaction openTransaction(String name, int timeLimit) throws ForbiddenUserException, FailedRequestException
name
- the transaction nametimeLimit
- the number of the transaction in secondsForbiddenUserException
FailedRequestException
GenericDocumentManager newDocumentManager()
BinaryDocumentManager newBinaryDocumentManager()
JSONDocumentManager newJSONDocumentManager()
TextDocumentManager newTextDocumentManager()
XMLDocumentManager newXMLDocumentManager()
QueryManager newQueryManager()
RuleManager newRuleManager()
ServerConfigurationManager newServerConfigManager()
GraphManager newGraphManager()
SPARQLQueryManager newSPARQLQueryManager()
<T,ID extends Serializable> PojoRepository<T,ID> newPojoRepository(Class<T> clazz, Class<ID> idClass)
T
- the pojo type this PojoRepository will manageID
- the scalar type of the id for pojos of type <T>clazz
- the class type for this PojoRepository to handleidClass
- the class type of the id field for this clazz, must obviously
be Serializable or we'll struggle to marshall it<T extends ResourceManager> T init(String resourceName, T resourceManager)
T
- the type of ResourceManager to init for the extension resourceresourceName
- the name of the extension resourceresourceManager
- the manager for the extension resourceRequestLogger newLogger(OutputStream out)
out
- the output stream for the logging outputvoid release()
Object getClientImplementation()
ServerEvaluationCall newServerEval()
String getHost()
int getPort()
String getDatabase()
String getUser()
String getPassword()
DatabaseClientFactory.Authentication getAuthentication()
SSLContext getSSLContext()
DatabaseClientFactory.SSLHostnameVerifier getSSLHostnameVerifier()
Copyright © 2013-2016 MarkLogic Corporation.