fr.ird.observe.dto.data.DataDtoJavaBeanDefinition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-dto Show documentation
Show all versions of common-dto Show documentation
ObServe Toolkit Common Dto module
package fr.ird.observe.dto.data;
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 = "Tue May 12 13:43:41 UTC 2020")
public final class DataDtoJavaBeanDefinition extends AbstractJavaBeanDefinition {
@Override
protected final ImmutableSet> loadAcceptedTypes() {
return ImmutableSet.>builder()
.add(DataDto.class)
.build();
}
@Override
protected final ImmutableMap> loadTypes() {
return ImmutableMap.>builder()
.put("createDate", java.util.Date.class)
.put("homeId", java.lang.String.class)
.put("id", java.lang.String.class)
.put("lastUpdateDate", java.util.Date.class)
.put("notPersisted", boolean.class)
.put("persisted", boolean.class)
.put("topiaCreateDate", java.util.Date.class)
.put("topiaId", java.lang.String.class)
.put("topiaVersion", long.class)
.put("version", long.class)
.build();
}
@SuppressWarnings("unchecked")
@Override
protected final ImmutableMap> loadGetters() {
return (ImmutableMap) ImmutableMap.>builder()
.put("createDate", DataDto::getCreateDate)
.put("homeId", DataDto::getHomeId)
.put("id", DataDto::getId)
.put("lastUpdateDate", DataDto::getLastUpdateDate)
.put("notPersisted", DataDto::isNotPersisted)
.put("persisted", DataDto::isPersisted)
.put("topiaCreateDate", DataDto::getTopiaCreateDate)
.put("topiaId", DataDto::getTopiaId)
.put("topiaVersion", DataDto::getTopiaVersion)
.put("version", DataDto::getVersion)
.build();
}
@SuppressWarnings("unchecked")
@Override
protected final ImmutableMap> loadSetters() {
return (ImmutableMap) ImmutableMap.>builder()
.put("createDate", (e, v) -> e.setCreateDate((java.util.Date) v))
.put("homeId", (e, v) -> e.setHomeId((java.lang.String) v))
.put("id", (e, v) -> e.setId((java.lang.String) v))
.put("lastUpdateDate", (e, v) -> e.setLastUpdateDate((java.util.Date) v))
.put("version", (e, v) -> e.setVersion((long) v))
.build();
}
public static DataDtoPredicate predicate() {
return new DataDtoPredicate();
}
public static DataDtoStream stream(Collection elements) {
return new DataDtoStream(elements);
}
public static DataDtoComparatorBuilder comparator() {
return new DataDtoComparatorBuilder();
}
public static DataDtoInstanceBuilder instance() {
return new DataDtoInstanceBuilder();
}
@Override
public DataDtoPredicate predicateBuilder() {
return new DataDtoPredicate(this);
}
@Override
public DataDtoComparatorBuilder comparatorBuilder() {
return new DataDtoComparatorBuilder(this);
}
@Override
public DataDtoInstanceBuilder instanceBuilder() {
return new DataDtoInstanceBuilder(this);
}
public static final class DataDtoPredicate extends AbstractJavaBeanPredicate {
protected DataDtoPredicate() {
super(DataDtoJavaBeanDefinition.class);
}
protected DataDtoPredicate(DataDtoJavaBeanDefinition javaBeanDefinition) {
super(javaBeanDefinition);
}
public ComparableQuery whereCreateDate() {
return whereComparable("createDate");
}
public StringQuery whereHomeId() {
return whereString("homeId");
}
public StringQuery whereId() {
return whereString("id");
}
public ComparableQuery whereLastUpdateDate() {
return whereComparable("lastUpdateDate");
}
public PrimitiveBooleanQuery whereNotPersisted() {
return wherePrimitiveBoolean("notPersisted");
}
public PrimitiveBooleanQuery wherePersisted() {
return wherePrimitiveBoolean("persisted");
}
public ComparableQuery whereTopiaCreateDate() {
return whereComparable("topiaCreateDate");
}
public StringQuery whereTopiaId() {
return whereString("topiaId");
}
public PrimitiveObjectQuery whereTopiaVersion() {
return wherePrimitive("topiaVersion");
}
public PrimitiveObjectQuery whereVersion() {
return wherePrimitive("version");
}
}
public static final class DataDtoStream extends AbstractJavaBeanStream {
protected DataDtoStream(Collection elements) {
super(DataDtoJavaBeanDefinition.class, elements);
}
protected DataDtoStream(DataDtoJavaBeanDefinition javaBeanDefinition, Collection elements) {
super(javaBeanDefinition, elements);
}
public StreamComparableQuery whereCreateDate() {
return whereComparable("createDate");
}
public StreamStringQuery whereHomeId() {
return whereString("homeId");
}
public StreamStringQuery whereId() {
return whereString("id");
}
public StreamComparableQuery whereLastUpdateDate() {
return whereComparable("lastUpdateDate");
}
public StreamPrimitiveBooleanQuery whereNotPersisted() {
return wherePrimitiveBoolean("notPersisted");
}
public StreamPrimitiveBooleanQuery wherePersisted() {
return wherePrimitiveBoolean("persisted");
}
public StreamComparableQuery whereTopiaCreateDate() {
return whereComparable("topiaCreateDate");
}
public StreamStringQuery whereTopiaId() {
return whereString("topiaId");
}
public StreamPrimitiveObjectQuery whereTopiaVersion() {
return wherePrimitive("topiaVersion");
}
public StreamPrimitiveObjectQuery whereVersion() {
return wherePrimitive("version");
}
}
public static final class DataDtoComparatorBuilder extends AbstractJavaBeanComparatorBuilder {
protected DataDtoComparatorBuilder() {
super(DataDtoJavaBeanDefinition.class);
}
protected DataDtoComparatorBuilder(DataDtoJavaBeanDefinition javaBeanDefinition) {
super(javaBeanDefinition);
}
public Query whereCreateDate() {
return on("createDate");
}
public Query whereHomeId() {
return on("homeId");
}
public Query whereId() {
return on("id");
}
public Query whereLastUpdateDate() {
return on("lastUpdateDate");
}
public Query whereNotPersisted() {
return on("notPersisted");
}
public Query wherePersisted() {
return on("persisted");
}
public Query whereTopiaCreateDate() {
return on("topiaCreateDate");
}
public Query whereTopiaId() {
return on("topiaId");
}
public Query whereTopiaVersion() {
return on("topiaVersion");
}
public Query whereVersion() {
return on("version");
}
}
public static final class DataDtoInstanceBuilder extends AbstractJavaBeanInstanceBuilder {
protected DataDtoInstanceBuilder() {
super(DataDtoJavaBeanDefinition.class);
}
protected DataDtoInstanceBuilder(DataDtoJavaBeanDefinition javaBeanDefinition) {
super(javaBeanDefinition);
}
public DataDtoInstanceBuilder createDate(java.util.Date value) {
return set("createDate", value);
}
public DataDtoInstanceBuilder homeId(java.lang.String value) {
return set("homeId", value);
}
public DataDtoInstanceBuilder id(java.lang.String value) {
return set("id", value);
}
public DataDtoInstanceBuilder lastUpdateDate(java.util.Date value) {
return set("lastUpdateDate", value);
}
public DataDtoInstanceBuilder version(java.lang.Long value) {
return set("version", value);
}
}
}