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

fr.ird.observe.dto.ProgressionModelJavaBeanDefinition Maven / Gradle / Ivy

There is a newer version: 4.34
Show newest version
package fr.ird.observe.dto;

import com.google.auto.service.AutoService;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import io.ultreia.java4all.bean.AbstractJavaBeanComparatorBuilder;
import io.ultreia.java4all.bean.AbstractJavaBeanInstanceBuilder;
import io.ultreia.java4all.bean.AbstractJavaBeanPredicate;
import io.ultreia.java4all.bean.AbstractJavaBeanStream;
import io.ultreia.java4all.bean.definition.AbstractJavaBeanDefinition;
import io.ultreia.java4all.bean.definition.JavaBeanDefinition;
import java.util.Collection;
import java.util.function.BiConsumer;
import java.util.function.Function;
import javax.annotation.Generated;

@AutoService(JavaBeanDefinition.class)
@Generated(value = "io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinitionProcessor", date = "Mon Apr 13 17:22:32 UTC 2020")
public final class ProgressionModelJavaBeanDefinition extends AbstractJavaBeanDefinition {

    @Override
    protected final ImmutableSet> loadAcceptedTypes() {
        return ImmutableSet.>builder()
                .add(ProgressionModel.class)
                .build();
    }

    @Override
    protected final ImmutableMap> loadTypes() {
        return ImmutableMap.>builder()
                .put("extent", int.class)
                .put("maximum", int.class)
                .put("message", java.lang.String.class)
                .put("minimum", int.class)
                .put("value", int.class)
                .put("valueIsAdjusting", boolean.class)
                .build();
    }

    @SuppressWarnings("unchecked")
    @Override
    protected final ImmutableMap> loadGetters() {
        return (ImmutableMap) ImmutableMap.>builder()
                .put("extent", ProgressionModel::getExtent)
                .put("maximum", ProgressionModel::getMaximum)
                .put("message", ProgressionModel::getMessage)
                .put("minimum", ProgressionModel::getMinimum)
                .put("value", ProgressionModel::getValue)
                .put("valueIsAdjusting", ProgressionModel::getValueIsAdjusting)
                .build();
    }

    @SuppressWarnings("unchecked")
    @Override
    protected final ImmutableMap> loadSetters() {
        return (ImmutableMap) ImmutableMap.>builder()
                .put("extent", (e, v) -> e.setExtent((int) v))
                .put("maximum", (e, v) -> e.setMaximum((int) v))
                .put("message", (e, v) -> e.setMessage((java.lang.String) v))
                .put("minimum", (e, v) -> e.setMinimum((int) v))
                .put("value", (e, v) -> e.setValue((int) v))
                .put("valueIsAdjusting", (e, v) -> e.setValueIsAdjusting((boolean) v))
                .build();
    }

    public static ProgressionModelPredicate predicate() {
        return new ProgressionModelPredicate();
    }

    public static ProgressionModelStream stream(Collection elements) {
        return new ProgressionModelStream(elements);
    }

    public static ProgressionModelComparatorBuilder comparator() {
        return new ProgressionModelComparatorBuilder();
    }

    public static ProgressionModelInstanceBuilder instance() {
        return new ProgressionModelInstanceBuilder();
    }

    @Override
    public ProgressionModelPredicate predicateBuilder() {
        return new ProgressionModelPredicate(this);
    }

    @Override
    public ProgressionModelComparatorBuilder comparatorBuilder() {
        return new ProgressionModelComparatorBuilder(this);
    }

    @Override
    public ProgressionModelInstanceBuilder instanceBuilder() {
        return new ProgressionModelInstanceBuilder(this);
    }

    public static final class ProgressionModelPredicate extends AbstractJavaBeanPredicate {

        protected ProgressionModelPredicate() {
            super(ProgressionModelJavaBeanDefinition.class);
        }

        protected ProgressionModelPredicate(ProgressionModelJavaBeanDefinition javaBeanDefinition) {
            super(javaBeanDefinition);
        }

        public PrimitiveObjectQuery whereExtent() {
            return wherePrimitive("extent");
        }

        public PrimitiveObjectQuery whereMaximum() {
            return wherePrimitive("maximum");
        }

        public StringQuery whereMessage() {
            return whereString("message");
        }

        public PrimitiveObjectQuery whereMinimum() {
            return wherePrimitive("minimum");
        }

        public PrimitiveObjectQuery whereValue() {
            return wherePrimitive("value");
        }

        public PrimitiveBooleanQuery whereValueIsAdjusting() {
            return wherePrimitiveBoolean("valueIsAdjusting");
        }
    }

    public static final class ProgressionModelStream extends AbstractJavaBeanStream {

        protected ProgressionModelStream(Collection elements) {
            super(ProgressionModelJavaBeanDefinition.class, elements);
        }

        protected ProgressionModelStream(ProgressionModelJavaBeanDefinition javaBeanDefinition, Collection elements) {
            super(javaBeanDefinition, elements);
        }

        public StreamPrimitiveObjectQuery whereExtent() {
            return wherePrimitive("extent");
        }

        public StreamPrimitiveObjectQuery whereMaximum() {
            return wherePrimitive("maximum");
        }

        public StreamStringQuery whereMessage() {
            return whereString("message");
        }

        public StreamPrimitiveObjectQuery whereMinimum() {
            return wherePrimitive("minimum");
        }

        public StreamPrimitiveObjectQuery whereValue() {
            return wherePrimitive("value");
        }

        public StreamPrimitiveBooleanQuery whereValueIsAdjusting() {
            return wherePrimitiveBoolean("valueIsAdjusting");
        }
    }

    public static final class ProgressionModelComparatorBuilder extends AbstractJavaBeanComparatorBuilder {

        protected ProgressionModelComparatorBuilder() {
            super(ProgressionModelJavaBeanDefinition.class);
        }

        protected ProgressionModelComparatorBuilder(ProgressionModelJavaBeanDefinition javaBeanDefinition) {
            super(javaBeanDefinition);
        }

        public Query whereExtent() {
            return on("extent");
        }

        public Query whereMaximum() {
            return on("maximum");
        }

        public Query whereMessage() {
            return on("message");
        }

        public Query whereMinimum() {
            return on("minimum");
        }

        public Query whereValue() {
            return on("value");
        }

        public Query whereValueIsAdjusting() {
            return on("valueIsAdjusting");
        }
    }

    public static final class ProgressionModelInstanceBuilder extends AbstractJavaBeanInstanceBuilder {

        protected ProgressionModelInstanceBuilder() {
            super(ProgressionModelJavaBeanDefinition.class);
        }

        protected ProgressionModelInstanceBuilder(ProgressionModelJavaBeanDefinition javaBeanDefinition) {
            super(javaBeanDefinition);
        }

        public ProgressionModelInstanceBuilder extent(java.lang.Integer value) {
            return set("extent", value);
        }

        public ProgressionModelInstanceBuilder maximum(java.lang.Integer value) {
            return set("maximum", value);
        }

        public ProgressionModelInstanceBuilder message(java.lang.String value) {
            return set("message", value);
        }

        public ProgressionModelInstanceBuilder minimum(java.lang.Integer value) {
            return set("minimum", value);
        }

        public ProgressionModelInstanceBuilder value(java.lang.Integer value) {
            return set("value", value);
        }

        public ProgressionModelInstanceBuilder valueIsAdjusting(java.lang.Boolean value) {
            return set("valueIsAdjusting", value);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy