public class MongoProviderImpl extends CompatibilityDataProvider
Modifier and Type | Class and Description |
---|---|
static class |
MongoProviderImpl.MongoProviderDescriptor |
CompatibilityDataProvider.CompatabilityDataProviderDescriptor
Constructor and Description |
---|
MongoProviderImpl() |
MongoProviderImpl(MongoDBHolderService service) |
MongoProviderImpl(String host,
int port,
String database,
String collection,
String username,
hudson.util.Secret password) |
Modifier and Type | Method and Description |
---|---|
int |
count(com.mongodb.DBObject query) |
<T> T |
create(T t)
Method to create and insert an object into a database.
|
<T> T |
create(T t,
hudson.model.TaskListener listener)
Creates an instance of of a Java object in the database.
|
String |
getCollection() |
String |
getDatabase() |
hudson.model.Descriptor<CompatibilityDataProvider> |
getDescriptor() |
String |
getHost() |
hudson.util.Secret |
getPassword() |
int |
getPort() |
MongoDBHolderService |
getService() |
String |
getUsername() |
List<com.mongodb.DBObject> |
listAndSort(com.mongodb.DBObject query,
com.mongodb.BasicDBObject sorter) |
<T> T |
read(Object key,
Class<T> clazz) |
<T> List<T> |
readMany(com.mongodb.BasicDBObject query,
Class<T> clazz) |
void |
setCollection(String collection) |
void |
setDatabase(String database) |
void |
setHost(String host) |
void |
setPassword(hudson.util.Secret password) |
void |
setPort(int port) |
void |
setService(MongoDBHolderService service) |
void |
setUsername(String username) |
String |
toString() |
@DataBoundConstructor public MongoProviderImpl(String host, int port, String database, String collection, String username, hudson.util.Secret password)
public MongoProviderImpl(MongoDBHolderService service)
public MongoProviderImpl()
public hudson.model.Descriptor<CompatibilityDataProvider> getDescriptor()
public String getHost()
public void setHost(String host)
host
- the host to setpublic String getDatabase()
public void setDatabase(String database)
database
- the database to setpublic void setCollection(String collection)
collection
- the collection to setpublic String getCollection()
public String getUsername()
public void setUsername(String username)
username
- the username to setpublic int getPort()
public void setPort(int port)
port
- the port to setpublic hudson.util.Secret getPassword()
public void setPassword(hudson.util.Secret password)
password
- the password to setpublic MongoDBHolderService getService()
public void setService(MongoDBHolderService service)
service
- the service to setpublic <T> T create(T t) throws CompatibilityDataException
CompatibilityDataProvider
create
in class CompatibilityDataProvider
CompatibilityDataException
public <T> T create(T t, hudson.model.TaskListener listener) throws CompatibilityDataException
create
in class CompatibilityDataProvider
T
- t
- listener
- CompatibilityDataException
public <T> T read(Object key, Class<T> clazz) throws CompatibilityDataException
read
in class CompatibilityDataProvider
CompatibilityDataException
public <T> List<T> readMany(com.mongodb.BasicDBObject query, Class<T> clazz) throws CompatibilityDataException
CompatibilityDataException
public int count(com.mongodb.DBObject query) throws CompatibilityDataException
CompatibilityDataException
public List<com.mongodb.DBObject> listAndSort(com.mongodb.DBObject query, com.mongodb.BasicDBObject sorter) throws CompatibilityDataException
CompatibilityDataException
Copyright © 2004-2015. All Rights Reserved.