All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.versioneye.persistence.mongodb.ProjectdependencyDao Maven / Gradle / Ivy

Go to download

This is the java implementation of the VersionEye core services. It contains some buisiness logic and utility classes.

There is a newer version: 1.3.7
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy