Class MongoConnection
java.lang.Object
org.eclipse.persistence.internal.nosql.adapters.mongo.MongoConnection
- All Implemented Interfaces:
Connection
Connection to Mongo
This connection wraps a Mongo DB.
- Since:
- EclipseLink 2.4
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.mongodb.DB
protected boolean
protected MongoJCAConnectionSpec
protected MongoTransaction
-
Constructor Summary
ConstructorDescriptionMongoConnection
(com.mongodb.DB db, boolean isExternal, MongoJCAConnectionSpec spec) Create the connection on a native AQ session. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the AQ native session and the database connection.com.mongodb.DB
getDB()
Result sets are not supported.boolean
void
setExternal
(boolean isExternal)
-
Field Details
-
spec
-
transaction
-
db
protected com.mongodb.DB db -
isExternal
protected boolean isExternal
-
-
Constructor Details
-
MongoConnection
Create the connection on a native AQ session. The session must be connected to a JDBC connection.
-
-
Method Details
-
getDB
public com.mongodb.DB getDB() -
close
Close the AQ native session and the database connection.- Specified by:
close
in interfaceConnection
- Throws:
ResourceException
-
createInteraction
- Specified by:
createInteraction
in interfaceConnection
-
getConnectionSpec
-
getLocalTransaction
- Specified by:
getLocalTransaction
in interfaceConnection
-
getMongoTransaction
-
getMetaData
- Specified by:
getMetaData
in interfaceConnection
-
getResultSetInfo
Result sets are not supported.- Specified by:
getResultSetInfo
in interfaceConnection
-
isExternal
public boolean isExternal() -
setExternal
public void setExternal(boolean isExternal)
-