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

de.tsl2.nano.service.util.finder.All 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, )

The newest version!
package de.tsl2.nano.service.util.finder;

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

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

    public All(Class type, Class... relationsToLoad) {
        super(type, relationsToLoad);
        resultType = type;
    }

    @Override
    StringBuffer createQuery(StringBuffer currentQuery,
            Collection parameter,
            Collection> lazyRelations) {
        lazyRelations.addAll(Arrays.asList(relationsToLoad));
        //the super class will create the main query
        return currentQuery;
    }
}