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
FieldsModifier and TypeFieldDescriptionprotected com.mongodb.DBprotected booleanprotected MongoJCAConnectionSpecprotected MongoTransaction -
Constructor Summary
ConstructorsConstructorDescriptionMongoConnection(com.mongodb.DB db, boolean isExternal, MongoJCAConnectionSpec spec) Create the connection on a native AQ session. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the AQ native session and the database connection.com.mongodb.DBgetDB()Result sets are not supported.booleanvoidsetExternal(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:
closein interfaceConnection- Throws:
ResourceException
-
createInteraction
- Specified by:
createInteractionin interfaceConnection
-
getConnectionSpec
-
getLocalTransaction
- Specified by:
getLocalTransactionin interfaceConnection
-
getMongoTransaction
-
getMetaData
- Specified by:
getMetaDatain interfaceConnection
-
getResultSetInfo
Result sets are not supported.- Specified by:
getResultSetInfoin interfaceConnection
-
isExternal
public boolean isExternal() -
setExternal
public void setExternal(boolean isExternal)
-