// Path: src/main/java/com/jaxio/jpa/querybyexample/PropertySelector.java
// public static <E, F> PropertySelector<E, F> newPropertySelector(Attribute<?, ?>... fields) {
//     return new PropertySelector<E, F>(checkNotNull(fields));
// }


import static com.jaxio.jpa.querybyexample.PropertySelector.newPropertySelector;
import static org.apache.commons.lang.StringUtils.isNotBlank;
import com.google.common.base.Function;
import org.apache.commons.lang.builder.ToStringBuilder;
import javax.persistence.metamodel.Attribute;
import javax.persistence.metamodel.SingularAttribute;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.Set;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Lists.transform;
import static com.google.common.collect.Maps.newHashMap;
import static com.google.common.collect.Sets.newHashSet;
    }

    public <D extends Comparable<? super D>> SearchParameters range(D from, D to, Attribute<?, ?>... attributes) {
        return range(new Range<D, D>(from, to, attributes));
    }

    // -----------------------------------
    // Search by property selector support
    // -----------------------------------

    public List<PropertySelector<?, ?>> getProperties() {
        return properties;
    }

    public void addProperty(PropertySelector<?, ?> propertySelector) {
        properties.add(checkNotNull(propertySelector));
    }

    public boolean hasProperties() {
        return !properties.isEmpty();
    }

    public SearchParameters property(PropertySelector<?, ?>... propertySelectors) {
        for (PropertySelector<?, ?> propertySelector : checkNotNull(propertySelectors)) {
            addProperty(propertySelector);
        }
        return this;
    }

    public <F> SearchParameters property(Attribute<?, ?> fields, F... selected) {
// Path: src/main/java/com/jaxio/jpa/querybyexample/PropertySelector.java
// public static <E, F> PropertySelector<E, F> newPropertySelector(Attribute<?, ?>... fields) {
//     return new PropertySelector<E, F>(checkNotNull(fields));
// }


// Path: src/main/java/com/jaxio/jpa/querybyexample/SearchParameters.java
import static com.jaxio.jpa.querybyexample.PropertySelector.newPropertySelector;
import static org.apache.commons.lang.StringUtils.isNotBlank;
import com.google.common.base.Function;
import org.apache.commons.lang.builder.ToStringBuilder;
import javax.persistence.metamodel.Attribute;
import javax.persistence.metamodel.SingularAttribute;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.Set;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Lists.transform;
import static com.google.common.collect.Maps.newHashMap;
import static com.google.common.collect.Sets.newHashSet;

    }

    public <D extends Comparable<? super D>> SearchParameters range(D from, D to, Attribute<?, ?>... attributes) {
        return range(new Range<D, D>(from, to, attributes));
    }

    // -----------------------------------
    // Search by property selector support
    // -----------------------------------

    public List<PropertySelector<?, ?>> getProperties() {
        return properties;
    }

    public void addProperty(PropertySelector<?, ?> propertySelector) {
        properties.add(checkNotNull(propertySelector));
    }

    public boolean hasProperties() {
        return !properties.isEmpty();
    }

    public SearchParameters property(PropertySelector<?, ?>... propertySelectors) {
        for (PropertySelector<?, ?> propertySelector : checkNotNull(propertySelectors)) {
            addProperty(propertySelector);
        }
        return this;
    }

    public <F> SearchParameters property(Attribute<?, ?> fields, F... selected) {
        return property(newPropertySelector(fields).selected(selected));