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.W30 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.W30;
import com.rosetta.testconditional.model.W30.W30Builder;
import com.rosetta.testconditional.model.W30.W30BuilderImpl;
import com.rosetta.testconditional.model.W30.W30Impl;
import com.rosetta.testconditional.model.meta.W30Meta;
import java.util.Objects;
import static java.util.Optional.ofNullable;
/**
* @version test
*/
@RosettaDataType(value="W30", builder=W30.W30BuilderImpl.class, version="test")
public interface W30 extends RosettaModelObject {
W30Meta metaData = new W30Meta();
/*********************** Getter Methods ***********************/
String getStrField1();
String getStrField2();
String getStrField3();
String getStrField4();
/*********************** Build Methods ***********************/
W30 build();
W30.W30Builder toBuilder();
static W30.W30Builder builder() {
return new W30.W30BuilderImpl();
}
/*********************** Utility Methods ***********************/
@Override
default RosettaMetaData extends W30> metaData() {
return metaData;
}
@Override
default Class extends W30> getType() {
return W30.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 W30Builder extends W30, RosettaModelObjectBuilder {
W30.W30Builder setStrField1(String strField1);
W30.W30Builder setStrField2(String strField2);
W30.W30Builder setStrField3(String strField3);
W30.W30Builder 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);
}
W30.W30Builder prune();
}
/*********************** Immutable Implementation of W30 ***********************/
class W30Impl implements W30 {
private final String strField1;
private final String strField2;
private final String strField3;
private final String strField4;
protected W30Impl(W30.W30Builder 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 W30 build() {
return this;
}
@Override
public W30.W30Builder toBuilder() {
W30.W30Builder builder = builder();
setBuilderFields(builder);
return builder;
}
protected void setBuilderFields(W30.W30Builder 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;
W30 _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 "W30 {" +
"strField1=" + this.strField1 + ", " +
"strField2=" + this.strField2 + ", " +
"strField3=" + this.strField3 + ", " +
"strField4=" + this.strField4 +
'}';
}
}
/*********************** Builder Implementation of W30 ***********************/
class W30BuilderImpl implements W30.W30Builder {
protected String strField1;
protected String strField2;
protected String strField3;
protected String strField4;
public W30BuilderImpl() {
}
@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 W30.W30Builder setStrField1(String strField1) {
this.strField1 = strField1==null?null:strField1;
return this;
}
@Override
@RosettaAttribute("strField2")
public W30.W30Builder setStrField2(String strField2) {
this.strField2 = strField2==null?null:strField2;
return this;
}
@Override
@RosettaAttribute("strField3")
public W30.W30Builder setStrField3(String strField3) {
this.strField3 = strField3==null?null:strField3;
return this;
}
@Override
@RosettaAttribute("strField4")
public W30.W30Builder setStrField4(String strField4) {
this.strField4 = strField4==null?null:strField4;
return this;
}
@Override
public W30 build() {
return new W30.W30Impl(this);
}
@Override
public W30.W30Builder toBuilder() {
return this;
}
@SuppressWarnings("unchecked")
@Override
public W30.W30Builder 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 W30.W30Builder merge(RosettaModelObjectBuilder other, BuilderMerger merger) {
W30.W30Builder o = (W30.W30Builder) 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;
W30 _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 "W30Builder {" +
"strField1=" + this.strField1 + ", " +
"strField2=" + this.strField2 + ", " +
"strField3=" + this.strField3 + ", " +
"strField4=" + this.strField4 +
'}';
}
}
}