com.versioneye.persistence.mongodb.ProjectdependencyDao Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of versioneye-core-j Show documentation
Show all versions of versioneye-core-j Show documentation
This is the java implementation of the VersionEye core services. It contains
some buisiness logic and utility classes.
package com.versioneye.persistence.mongodb;
import com.mongodb.DBCollection;
import com.versioneye.domain.Projectdependency;
import com.versioneye.persistence.IProjectdependencyDao;
import java.util.List;
/**
* Created by IntelliJ IDEA.
* User: reiz
* Date: 9/5/12
* Time: 11:40 AM
*/
public class ProjectdependencyDao implements IProjectdependencyDao {
private static final String PROJECTDEPENDENCY = "projectdependencies";
private MongoDB mongoDB;
private DBCollection getCollection(){
return mongoDB.getDb().getCollection(PROJECTDEPENDENCY);
}
public List getUniqProdKeys() {
DBCollection projectdependencies = getCollection();
return projectdependencies.distinct(Projectdependency.PROD_KEY);
}
public void setMongoDB(MongoDB mongoDB) {
this.mongoDB = mongoDB;
}
}