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

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

Go to download

TSL2 JEE Service Access (Generic Services for Entity Access, JEE File-System-Connector, Generic Featuring, Job-Scheduling, BeanContainer, Batch, Comfortable Bean Query Definitions, JAAS, Authentification, Authorization, )

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