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.jptlegalagreement.model.CustodyArrangementsElection Maven / Gradle / Ivy
package com.rosetta.jptlegalagreement.model;
import com.rosetta.jptlegalagreement.model.CustodyArrangementsElection;
import com.rosetta.jptlegalagreement.model.CustodyArrangementsElection.CustodyArrangementsElectionBuilder;
import com.rosetta.jptlegalagreement.model.CustodyArrangementsElection.CustodyArrangementsElectionBuilderImpl;
import com.rosetta.jptlegalagreement.model.CustodyArrangementsElection.CustodyArrangementsElectionImpl;
import com.rosetta.jptlegalagreement.model.meta.CustodyArrangementsElectionMeta;
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 java.util.Objects;
import static java.util.Optional.ofNullable;
/**
* @version test
*/
@RosettaDataType(value="CustodyArrangementsElection", builder=CustodyArrangementsElection.CustodyArrangementsElectionBuilderImpl.class, version="test")
public interface CustodyArrangementsElection extends RosettaModelObject {
CustodyArrangementsElectionMeta metaData = new CustodyArrangementsElectionMeta();
/*********************** Getter Methods ***********************/
String getName();
String getSegregatedSecurities();
String getSegregatedCash();
/*********************** Build Methods ***********************/
CustodyArrangementsElection build();
CustodyArrangementsElection.CustodyArrangementsElectionBuilder toBuilder();
static CustodyArrangementsElection.CustodyArrangementsElectionBuilder builder() {
return new CustodyArrangementsElection.CustodyArrangementsElectionBuilderImpl();
}
/*********************** Utility Methods ***********************/
@Override
default RosettaMetaData extends CustodyArrangementsElection> metaData() {
return metaData;
}
@Override
default Class extends CustodyArrangementsElection> getType() {
return CustodyArrangementsElection.class;
}
@Override
default void process(RosettaPath path, Processor processor) {
processor.processBasic(path.newSubPath("name"), String.class, getName(), this);
processor.processBasic(path.newSubPath("segregatedSecurities"), String.class, getSegregatedSecurities(), this);
processor.processBasic(path.newSubPath("segregatedCash"), String.class, getSegregatedCash(), this);
}
/*********************** Builder Interface ***********************/
interface CustodyArrangementsElectionBuilder extends CustodyArrangementsElection, RosettaModelObjectBuilder {
CustodyArrangementsElection.CustodyArrangementsElectionBuilder setName(String name);
CustodyArrangementsElection.CustodyArrangementsElectionBuilder setSegregatedSecurities(String segregatedSecurities);
CustodyArrangementsElection.CustodyArrangementsElectionBuilder setSegregatedCash(String segregatedCash);
@Override
default void process(RosettaPath path, BuilderProcessor processor) {
processor.processBasic(path.newSubPath("name"), String.class, getName(), this);
processor.processBasic(path.newSubPath("segregatedSecurities"), String.class, getSegregatedSecurities(), this);
processor.processBasic(path.newSubPath("segregatedCash"), String.class, getSegregatedCash(), this);
}
CustodyArrangementsElection.CustodyArrangementsElectionBuilder prune();
}
/*********************** Immutable Implementation of CustodyArrangementsElection ***********************/
class CustodyArrangementsElectionImpl implements CustodyArrangementsElection {
private final String name;
private final String segregatedSecurities;
private final String segregatedCash;
protected CustodyArrangementsElectionImpl(CustodyArrangementsElection.CustodyArrangementsElectionBuilder builder) {
this.name = builder.getName();
this.segregatedSecurities = builder.getSegregatedSecurities();
this.segregatedCash = builder.getSegregatedCash();
}
@Override
@RosettaAttribute("name")
public String getName() {
return name;
}
@Override
@RosettaAttribute("segregatedSecurities")
public String getSegregatedSecurities() {
return segregatedSecurities;
}
@Override
@RosettaAttribute("segregatedCash")
public String getSegregatedCash() {
return segregatedCash;
}
@Override
public CustodyArrangementsElection build() {
return this;
}
@Override
public CustodyArrangementsElection.CustodyArrangementsElectionBuilder toBuilder() {
CustodyArrangementsElection.CustodyArrangementsElectionBuilder builder = builder();
setBuilderFields(builder);
return builder;
}
protected void setBuilderFields(CustodyArrangementsElection.CustodyArrangementsElectionBuilder builder) {
ofNullable(getName()).ifPresent(builder::setName);
ofNullable(getSegregatedSecurities()).ifPresent(builder::setSegregatedSecurities);
ofNullable(getSegregatedCash()).ifPresent(builder::setSegregatedCash);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || !(o instanceof RosettaModelObject) || !getType().equals(((RosettaModelObject)o).getType())) return false;
CustodyArrangementsElection _that = getType().cast(o);
if (!Objects.equals(name, _that.getName())) return false;
if (!Objects.equals(segregatedSecurities, _that.getSegregatedSecurities())) return false;
if (!Objects.equals(segregatedCash, _that.getSegregatedCash())) return false;
return true;
}
@Override
public int hashCode() {
int _result = 0;
_result = 31 * _result + (name != null ? name.hashCode() : 0);
_result = 31 * _result + (segregatedSecurities != null ? segregatedSecurities.hashCode() : 0);
_result = 31 * _result + (segregatedCash != null ? segregatedCash.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "CustodyArrangementsElection {" +
"name=" + this.name + ", " +
"segregatedSecurities=" + this.segregatedSecurities + ", " +
"segregatedCash=" + this.segregatedCash +
'}';
}
}
/*********************** Builder Implementation of CustodyArrangementsElection ***********************/
class CustodyArrangementsElectionBuilderImpl implements CustodyArrangementsElection.CustodyArrangementsElectionBuilder {
protected String name;
protected String segregatedSecurities;
protected String segregatedCash;
public CustodyArrangementsElectionBuilderImpl() {
}
@Override
@RosettaAttribute("name")
public String getName() {
return name;
}
@Override
@RosettaAttribute("segregatedSecurities")
public String getSegregatedSecurities() {
return segregatedSecurities;
}
@Override
@RosettaAttribute("segregatedCash")
public String getSegregatedCash() {
return segregatedCash;
}
@Override
@RosettaAttribute("name")
public CustodyArrangementsElection.CustodyArrangementsElectionBuilder setName(String name) {
this.name = name==null?null:name;
return this;
}
@Override
@RosettaAttribute("segregatedSecurities")
public CustodyArrangementsElection.CustodyArrangementsElectionBuilder setSegregatedSecurities(String segregatedSecurities) {
this.segregatedSecurities = segregatedSecurities==null?null:segregatedSecurities;
return this;
}
@Override
@RosettaAttribute("segregatedCash")
public CustodyArrangementsElection.CustodyArrangementsElectionBuilder setSegregatedCash(String segregatedCash) {
this.segregatedCash = segregatedCash==null?null:segregatedCash;
return this;
}
@Override
public CustodyArrangementsElection build() {
return new CustodyArrangementsElection.CustodyArrangementsElectionImpl(this);
}
@Override
public CustodyArrangementsElection.CustodyArrangementsElectionBuilder toBuilder() {
return this;
}
@SuppressWarnings("unchecked")
@Override
public CustodyArrangementsElection.CustodyArrangementsElectionBuilder prune() {
return this;
}
@Override
public boolean hasData() {
if (getName()!=null) return true;
if (getSegregatedSecurities()!=null) return true;
if (getSegregatedCash()!=null) return true;
return false;
}
@SuppressWarnings("unchecked")
@Override
public CustodyArrangementsElection.CustodyArrangementsElectionBuilder merge(RosettaModelObjectBuilder other, BuilderMerger merger) {
CustodyArrangementsElection.CustodyArrangementsElectionBuilder o = (CustodyArrangementsElection.CustodyArrangementsElectionBuilder) other;
merger.mergeBasic(getName(), o.getName(), this::setName);
merger.mergeBasic(getSegregatedSecurities(), o.getSegregatedSecurities(), this::setSegregatedSecurities);
merger.mergeBasic(getSegregatedCash(), o.getSegregatedCash(), this::setSegregatedCash);
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;
CustodyArrangementsElection _that = getType().cast(o);
if (!Objects.equals(name, _that.getName())) return false;
if (!Objects.equals(segregatedSecurities, _that.getSegregatedSecurities())) return false;
if (!Objects.equals(segregatedCash, _that.getSegregatedCash())) return false;
return true;
}
@Override
public int hashCode() {
int _result = 0;
_result = 31 * _result + (name != null ? name.hashCode() : 0);
_result = 31 * _result + (segregatedSecurities != null ? segregatedSecurities.hashCode() : 0);
_result = 31 * _result + (segregatedCash != null ? segregatedCash.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "CustodyArrangementsElectionBuilder {" +
"name=" + this.name + ", " +
"segregatedSecurities=" + this.segregatedSecurities + ", " +
"segregatedCash=" + this.segregatedCash +
'}';
}
}
}