|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.cnes.sitools.datasource.mongodb.business.SitoolsMongoDBDataSource
public class SitoolsMongoDBDataSource
Encapsulation of javax.sql.DataSource for : - Schema connection management - Presentation of generic methods for SQL database consulting FIXME ne plus utiliser JdbcRowSet implementation de sun >> warning au runtime
Constructor Summary | |
---|---|
SitoolsMongoDBDataSource(SitoolsDataSourceModel key,
com.mongodb.Mongo mongo)
Object build by DataSource encapsulation |
Method Summary | |
---|---|
void |
close()
Close all connections |
int |
countQuery(MongoDBRequestModel request)
Gets the number of records for a given request model |
int |
countQuery(java.lang.String json,
java.lang.String collectionName)
Gets the number of records for a given query |
java.util.List<java.lang.Object> |
distinctQuery(java.lang.String key,
MongoDBRequestModel request)
Make the SQL request |
com.mongodb.DB |
getDatabase()
Get a DB object to the database of the DataSource |
DataSourceType |
getDataSourceType()
Get the type of the datasource |
SitoolsDataSourceModel |
getDsModel()
Gets the DataSource Model |
org.restlet.Restlet |
getExplorer()
Gets the explorer value |
java.util.List<java.lang.String> |
getMetadata(java.lang.String collectionName)
Get the list of fields of a collection |
com.mongodb.Mongo |
getMongo()
Gets the mongo value |
java.util.List<Table> |
getTableList()
Gets the tableList value |
java.util.List<java.lang.String> |
getTableNameList()
Gets the tableNameList value |
com.mongodb.DBCursor |
limitedQuery(MongoDBRequestModel request)
Execute a query |
void |
setDsModel(SitoolsDataSourceModel dsModel)
Sets the data source model |
void |
setExplorer(org.restlet.Restlet explorer)
Sets the value of explorer |
void |
setMongo(com.mongodb.Mongo mongo)
Sets the value of mongo |
void |
setTableList(java.util.List<Table> tableList)
Sets the value of tableList |
void |
setTableNameList(java.util.List<java.lang.String> tableNameList)
Sets the value of tableNameList |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SitoolsMongoDBDataSource(SitoolsDataSourceModel key, com.mongodb.Mongo mongo)
key
- the key associated to the sourcemongo
- the mongo db instanceMethod Detail |
---|
public java.util.List<java.lang.String> getMetadata(java.lang.String collectionName)
collectionName
- the name of the mongoDB collection
public java.util.List<java.lang.Object> distinctQuery(java.lang.String key, MongoDBRequestModel request)
key
- the keyrequest
- the mongoBD request model
public com.mongodb.DBCursor limitedQuery(MongoDBRequestModel request)
request
- the mongoBD request model
public int countQuery(java.lang.String json, java.lang.String collectionName)
json
- the json querycollectionName
- the collection name to query
public int countQuery(MongoDBRequestModel request)
request
- the mongoBD request model
public SitoolsDataSourceModel getDsModel()
getDsModel
in interface SitoolsDataSource
public void setDsModel(SitoolsDataSourceModel dsModel)
setDsModel
in interface SitoolsDataSource
dsModel
- the dsModel to setpublic org.restlet.Restlet getExplorer()
public void setExplorer(org.restlet.Restlet explorer)
explorer
- the explorer to setpublic java.util.List<java.lang.String> getTableNameList()
public void setTableNameList(java.util.List<java.lang.String> tableNameList)
tableNameList
- the tableNameList to setpublic java.util.List<Table> getTableList()
public void setTableList(java.util.List<Table> tableList)
tableList
- the tableList to setpublic void close()
close
in interface SitoolsDataSource
public com.mongodb.DB getDatabase()
DB
object to the database of the DataSource
DB
objectpublic com.mongodb.Mongo getMongo()
public void setMongo(com.mongodb.Mongo mongo)
mongo
- the mongo to setpublic DataSourceType getDataSourceType()
SitoolsDataSource
getDataSourceType
in interface SitoolsDataSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |