All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.rosetta.testconditional.model.W29 Maven / Gradle / Ivy
package com.rosetta.testconditional.model;
import com.rosetta.model.lib.RosettaModelObject;
import com.rosetta.model.lib.RosettaModelObjectBuilder;
import com.rosetta.model.lib.annotations.RosettaAttribute;
import com.rosetta.model.lib.annotations.RosettaDataType;
import com.rosetta.model.lib.meta.RosettaMetaData;
import com.rosetta.model.lib.path.RosettaPath;
import com.rosetta.model.lib.process.BuilderMerger;
import com.rosetta.model.lib.process.BuilderProcessor;
import com.rosetta.model.lib.process.Processor;
import com.rosetta.testconditional.model.W29;
import com.rosetta.testconditional.model.W29.W29Builder;
import com.rosetta.testconditional.model.W29.W29BuilderImpl;
import com.rosetta.testconditional.model.W29.W29Impl;
import com.rosetta.testconditional.model.meta.W29Meta;
import java.util.Objects;
import static java.util.Optional.ofNullable;
/**
* @version test
*/
@RosettaDataType(value="W29", builder=W29.W29BuilderImpl.class, version="test")
public interface W29 extends RosettaModelObject {
W29Meta metaData = new W29Meta();
/*********************** Getter Methods ***********************/
String getStrField1();
String getStrField2();
String getStrField3();
String getStrField4();
/*********************** Build Methods ***********************/
W29 build();
W29.W29Builder toBuilder();
static W29.W29Builder builder() {
return new W29.W29BuilderImpl();
}
/*********************** Utility Methods ***********************/
@Override
default RosettaMetaData extends W29> metaData() {
return metaData;
}
@Override
default Class extends W29> getType() {
return W29.class;
}
@Override
default void process(RosettaPath path, Processor processor) {
processor.processBasic(path.newSubPath("strField1"), String.class, getStrField1(), this);
processor.processBasic(path.newSubPath("strField2"), String.class, getStrField2(), this);
processor.processBasic(path.newSubPath("strField3"), String.class, getStrField3(), this);
processor.processBasic(path.newSubPath("strField4"), String.class, getStrField4(), this);
}
/*********************** Builder Interface ***********************/
interface W29Builder extends W29, RosettaModelObjectBuilder {
W29.W29Builder setStrField1(String strField1);
W29.W29Builder setStrField2(String strField2);
W29.W29Builder setStrField3(String strField3);
W29.W29Builder setStrField4(String strField4);
@Override
default void process(RosettaPath path, BuilderProcessor processor) {
processor.processBasic(path.newSubPath("strField1"), String.class, getStrField1(), this);
processor.processBasic(path.newSubPath("strField2"), String.class, getStrField2(), this);
processor.processBasic(path.newSubPath("strField3"), String.class, getStrField3(), this);
processor.processBasic(path.newSubPath("strField4"), String.class, getStrField4(), this);
}
W29.W29Builder prune();
}
/*********************** Immutable Implementation of W29 ***********************/
class W29Impl implements W29 {
private final String strField1;
private final String strField2;
private final String strField3;
private final String strField4;
protected W29Impl(W29.W29Builder builder) {
this.strField1 = builder.getStrField1();
this.strField2 = builder.getStrField2();
this.strField3 = builder.getStrField3();
this.strField4 = builder.getStrField4();
}
@Override
@RosettaAttribute("strField1")
public String getStrField1() {
return strField1;
}
@Override
@RosettaAttribute("strField2")
public String getStrField2() {
return strField2;
}
@Override
@RosettaAttribute("strField3")
public String getStrField3() {
return strField3;
}
@Override
@RosettaAttribute("strField4")
public String getStrField4() {
return strField4;
}
@Override
public W29 build() {
return this;
}
@Override
public W29.W29Builder toBuilder() {
W29.W29Builder builder = builder();
setBuilderFields(builder);
return builder;
}
protected void setBuilderFields(W29.W29Builder builder) {
ofNullable(getStrField1()).ifPresent(builder::setStrField1);
ofNullable(getStrField2()).ifPresent(builder::setStrField2);
ofNullable(getStrField3()).ifPresent(builder::setStrField3);
ofNullable(getStrField4()).ifPresent(builder::setStrField4);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || !(o instanceof RosettaModelObject) || !getType().equals(((RosettaModelObject)o).getType())) return false;
W29 _that = getType().cast(o);
if (!Objects.equals(strField1, _that.getStrField1())) return false;
if (!Objects.equals(strField2, _that.getStrField2())) return false;
if (!Objects.equals(strField3, _that.getStrField3())) return false;
if (!Objects.equals(strField4, _that.getStrField4())) return false;
return true;
}
@Override
public int hashCode() {
int _result = 0;
_result = 31 * _result + (strField1 != null ? strField1.hashCode() : 0);
_result = 31 * _result + (strField2 != null ? strField2.hashCode() : 0);
_result = 31 * _result + (strField3 != null ? strField3.hashCode() : 0);
_result = 31 * _result + (strField4 != null ? strField4.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "W29 {" +
"strField1=" + this.strField1 + ", " +
"strField2=" + this.strField2 + ", " +
"strField3=" + this.strField3 + ", " +
"strField4=" + this.strField4 +
'}';
}
}
/*********************** Builder Implementation of W29 ***********************/
class W29BuilderImpl implements W29.W29Builder {
protected String strField1;
protected String strField2;
protected String strField3;
protected String strField4;
public W29BuilderImpl() {
}
@Override
@RosettaAttribute("strField1")
public String getStrField1() {
return strField1;
}
@Override
@RosettaAttribute("strField2")
public String getStrField2() {
return strField2;
}
@Override
@RosettaAttribute("strField3")
public String getStrField3() {
return strField3;
}
@Override
@RosettaAttribute("strField4")
public String getStrField4() {
return strField4;
}
@Override
@RosettaAttribute("strField1")
public W29.W29Builder setStrField1(String strField1) {
this.strField1 = strField1==null?null:strField1;
return this;
}
@Override
@RosettaAttribute("strField2")
public W29.W29Builder setStrField2(String strField2) {
this.strField2 = strField2==null?null:strField2;
return this;
}
@Override
@RosettaAttribute("strField3")
public W29.W29Builder setStrField3(String strField3) {
this.strField3 = strField3==null?null:strField3;
return this;
}
@Override
@RosettaAttribute("strField4")
public W29.W29Builder setStrField4(String strField4) {
this.strField4 = strField4==null?null:strField4;
return this;
}
@Override
public W29 build() {
return new W29.W29Impl(this);
}
@Override
public W29.W29Builder toBuilder() {
return this;
}
@SuppressWarnings("unchecked")
@Override
public W29.W29Builder prune() {
return this;
}
@Override
public boolean hasData() {
if (getStrField1()!=null) return true;
if (getStrField2()!=null) return true;
if (getStrField3()!=null) return true;
if (getStrField4()!=null) return true;
return false;
}
@SuppressWarnings("unchecked")
@Override
public W29.W29Builder merge(RosettaModelObjectBuilder other, BuilderMerger merger) {
W29.W29Builder o = (W29.W29Builder) other;
merger.mergeBasic(getStrField1(), o.getStrField1(), this::setStrField1);
merger.mergeBasic(getStrField2(), o.getStrField2(), this::setStrField2);
merger.mergeBasic(getStrField3(), o.getStrField3(), this::setStrField3);
merger.mergeBasic(getStrField4(), o.getStrField4(), this::setStrField4);
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || !(o instanceof RosettaModelObject) || !getType().equals(((RosettaModelObject)o).getType())) return false;
W29 _that = getType().cast(o);
if (!Objects.equals(strField1, _that.getStrField1())) return false;
if (!Objects.equals(strField2, _that.getStrField2())) return false;
if (!Objects.equals(strField3, _that.getStrField3())) return false;
if (!Objects.equals(strField4, _that.getStrField4())) return false;
return true;
}
@Override
public int hashCode() {
int _result = 0;
_result = 31 * _result + (strField1 != null ? strField1.hashCode() : 0);
_result = 31 * _result + (strField2 != null ? strField2.hashCode() : 0);
_result = 31 * _result + (strField3 != null ? strField3.hashCode() : 0);
_result = 31 * _result + (strField4 != null ? strField4.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "W29Builder {" +
"strField1=" + this.strField1 + ", " +
"strField2=" + this.strField2 + ", " +
"strField3=" + this.strField3 + ", " +
"strField4=" + this.strField4 +
'}';
}
}
}