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

de.tsl2.nano.service.util.finder.Id Maven / Gradle / Ivy

package de.tsl2.nano.service.util.finder;

import java.util.Arrays;
import java.util.Collection;

/**
 * id finder
 * 
 * @param  result bean type
 * @author Thomas Schneider, Thomas Schneider
 * @version $Revision$
 */
public class Id extends AbstractFinder {
    /** serialVersionUID */
    private static final long serialVersionUID = 4019550910630642421L;

    public Id(Class type, Object id, Class... relationsToLoad) {
        super(type, relationsToLoad);
        resultType = type;
        par = Arrays.asList(id);
    }

    @Override
    StringBuffer createQuery(StringBuffer currentQuery,
            Collection parameter,
            Collection> lazyRelations) {
        lazyRelations.addAll(Arrays.asList(relationsToLoad));
        return null;
    }
}