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.CustodianEventEndDate Maven / Gradle / Ivy
package com.rosetta.jptlegalagreement.model;
import com.rosetta.jptlegalagreement.model.CustodianEventEndDate;
import com.rosetta.jptlegalagreement.model.CustodianEventEndDate.CustodianEventEndDateBuilder;
import com.rosetta.jptlegalagreement.model.CustodianEventEndDate.CustodianEventEndDateBuilderImpl;
import com.rosetta.jptlegalagreement.model.CustodianEventEndDate.CustodianEventEndDateImpl;
import com.rosetta.jptlegalagreement.model.CustomisableOffset;
import com.rosetta.jptlegalagreement.model.meta.CustodianEventEndDateMeta;
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="CustodianEventEndDate", builder=CustodianEventEndDate.CustodianEventEndDateBuilderImpl.class, version="test")
public interface CustodianEventEndDate extends RosettaModelObject {
CustodianEventEndDateMeta metaData = new CustodianEventEndDateMeta();
/*********************** Getter Methods ***********************/
CustomisableOffset getDaysAfterCustodianEvent();
CustomisableOffset getReleaseDate();
CustomisableOffset getDateOfTimelyStatement();
/*********************** Build Methods ***********************/
CustodianEventEndDate build();
CustodianEventEndDate.CustodianEventEndDateBuilder toBuilder();
static CustodianEventEndDate.CustodianEventEndDateBuilder builder() {
return new CustodianEventEndDate.CustodianEventEndDateBuilderImpl();
}
/*********************** Utility Methods ***********************/
@Override
default RosettaMetaData extends CustodianEventEndDate> metaData() {
return metaData;
}
@Override
default Class extends CustodianEventEndDate> getType() {
return CustodianEventEndDate.class;
}
@Override
default void process(RosettaPath path, Processor processor) {
processRosetta(path.newSubPath("daysAfterCustodianEvent"), processor, CustomisableOffset.class, getDaysAfterCustodianEvent());
processRosetta(path.newSubPath("releaseDate"), processor, CustomisableOffset.class, getReleaseDate());
processRosetta(path.newSubPath("dateOfTimelyStatement"), processor, CustomisableOffset.class, getDateOfTimelyStatement());
}
/*********************** Builder Interface ***********************/
interface CustodianEventEndDateBuilder extends CustodianEventEndDate, RosettaModelObjectBuilder {
CustomisableOffset.CustomisableOffsetBuilder getOrCreateDaysAfterCustodianEvent();
CustomisableOffset.CustomisableOffsetBuilder getDaysAfterCustodianEvent();
CustomisableOffset.CustomisableOffsetBuilder getOrCreateReleaseDate();
CustomisableOffset.CustomisableOffsetBuilder getReleaseDate();
CustomisableOffset.CustomisableOffsetBuilder getOrCreateDateOfTimelyStatement();
CustomisableOffset.CustomisableOffsetBuilder getDateOfTimelyStatement();
CustodianEventEndDate.CustodianEventEndDateBuilder setDaysAfterCustodianEvent(CustomisableOffset daysAfterCustodianEvent);
CustodianEventEndDate.CustodianEventEndDateBuilder setReleaseDate(CustomisableOffset releaseDate);
CustodianEventEndDate.CustodianEventEndDateBuilder setDateOfTimelyStatement(CustomisableOffset dateOfTimelyStatement);
@Override
default void process(RosettaPath path, BuilderProcessor processor) {
processRosetta(path.newSubPath("daysAfterCustodianEvent"), processor, CustomisableOffset.CustomisableOffsetBuilder.class, getDaysAfterCustodianEvent());
processRosetta(path.newSubPath("releaseDate"), processor, CustomisableOffset.CustomisableOffsetBuilder.class, getReleaseDate());
processRosetta(path.newSubPath("dateOfTimelyStatement"), processor, CustomisableOffset.CustomisableOffsetBuilder.class, getDateOfTimelyStatement());
}
CustodianEventEndDate.CustodianEventEndDateBuilder prune();
}
/*********************** Immutable Implementation of CustodianEventEndDate ***********************/
class CustodianEventEndDateImpl implements CustodianEventEndDate {
private final CustomisableOffset daysAfterCustodianEvent;
private final CustomisableOffset releaseDate;
private final CustomisableOffset dateOfTimelyStatement;
protected CustodianEventEndDateImpl(CustodianEventEndDate.CustodianEventEndDateBuilder builder) {
this.daysAfterCustodianEvent = ofNullable(builder.getDaysAfterCustodianEvent()).map(f->f.build()).orElse(null);
this.releaseDate = ofNullable(builder.getReleaseDate()).map(f->f.build()).orElse(null);
this.dateOfTimelyStatement = ofNullable(builder.getDateOfTimelyStatement()).map(f->f.build()).orElse(null);
}
@Override
@RosettaAttribute("daysAfterCustodianEvent")
public CustomisableOffset getDaysAfterCustodianEvent() {
return daysAfterCustodianEvent;
}
@Override
@RosettaAttribute("releaseDate")
public CustomisableOffset getReleaseDate() {
return releaseDate;
}
@Override
@RosettaAttribute("dateOfTimelyStatement")
public CustomisableOffset getDateOfTimelyStatement() {
return dateOfTimelyStatement;
}
@Override
public CustodianEventEndDate build() {
return this;
}
@Override
public CustodianEventEndDate.CustodianEventEndDateBuilder toBuilder() {
CustodianEventEndDate.CustodianEventEndDateBuilder builder = builder();
setBuilderFields(builder);
return builder;
}
protected void setBuilderFields(CustodianEventEndDate.CustodianEventEndDateBuilder builder) {
ofNullable(getDaysAfterCustodianEvent()).ifPresent(builder::setDaysAfterCustodianEvent);
ofNullable(getReleaseDate()).ifPresent(builder::setReleaseDate);
ofNullable(getDateOfTimelyStatement()).ifPresent(builder::setDateOfTimelyStatement);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || !(o instanceof RosettaModelObject) || !getType().equals(((RosettaModelObject)o).getType())) return false;
CustodianEventEndDate _that = getType().cast(o);
if (!Objects.equals(daysAfterCustodianEvent, _that.getDaysAfterCustodianEvent())) return false;
if (!Objects.equals(releaseDate, _that.getReleaseDate())) return false;
if (!Objects.equals(dateOfTimelyStatement, _that.getDateOfTimelyStatement())) return false;
return true;
}
@Override
public int hashCode() {
int _result = 0;
_result = 31 * _result + (daysAfterCustodianEvent != null ? daysAfterCustodianEvent.hashCode() : 0);
_result = 31 * _result + (releaseDate != null ? releaseDate.hashCode() : 0);
_result = 31 * _result + (dateOfTimelyStatement != null ? dateOfTimelyStatement.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "CustodianEventEndDate {" +
"daysAfterCustodianEvent=" + this.daysAfterCustodianEvent + ", " +
"releaseDate=" + this.releaseDate + ", " +
"dateOfTimelyStatement=" + this.dateOfTimelyStatement +
'}';
}
}
/*********************** Builder Implementation of CustodianEventEndDate ***********************/
class CustodianEventEndDateBuilderImpl implements CustodianEventEndDate.CustodianEventEndDateBuilder {
protected CustomisableOffset.CustomisableOffsetBuilder daysAfterCustodianEvent;
protected CustomisableOffset.CustomisableOffsetBuilder releaseDate;
protected CustomisableOffset.CustomisableOffsetBuilder dateOfTimelyStatement;
public CustodianEventEndDateBuilderImpl() {
}
@Override
@RosettaAttribute("daysAfterCustodianEvent")
public CustomisableOffset.CustomisableOffsetBuilder getDaysAfterCustodianEvent() {
return daysAfterCustodianEvent;
}
@Override
public CustomisableOffset.CustomisableOffsetBuilder getOrCreateDaysAfterCustodianEvent() {
CustomisableOffset.CustomisableOffsetBuilder result;
if (daysAfterCustodianEvent!=null) {
result = daysAfterCustodianEvent;
}
else {
result = daysAfterCustodianEvent = CustomisableOffset.builder();
}
return result;
}
@Override
@RosettaAttribute("releaseDate")
public CustomisableOffset.CustomisableOffsetBuilder getReleaseDate() {
return releaseDate;
}
@Override
public CustomisableOffset.CustomisableOffsetBuilder getOrCreateReleaseDate() {
CustomisableOffset.CustomisableOffsetBuilder result;
if (releaseDate!=null) {
result = releaseDate;
}
else {
result = releaseDate = CustomisableOffset.builder();
}
return result;
}
@Override
@RosettaAttribute("dateOfTimelyStatement")
public CustomisableOffset.CustomisableOffsetBuilder getDateOfTimelyStatement() {
return dateOfTimelyStatement;
}
@Override
public CustomisableOffset.CustomisableOffsetBuilder getOrCreateDateOfTimelyStatement() {
CustomisableOffset.CustomisableOffsetBuilder result;
if (dateOfTimelyStatement!=null) {
result = dateOfTimelyStatement;
}
else {
result = dateOfTimelyStatement = CustomisableOffset.builder();
}
return result;
}
@Override
@RosettaAttribute("daysAfterCustodianEvent")
public CustodianEventEndDate.CustodianEventEndDateBuilder setDaysAfterCustodianEvent(CustomisableOffset daysAfterCustodianEvent) {
this.daysAfterCustodianEvent = daysAfterCustodianEvent==null?null:daysAfterCustodianEvent.toBuilder();
return this;
}
@Override
@RosettaAttribute("releaseDate")
public CustodianEventEndDate.CustodianEventEndDateBuilder setReleaseDate(CustomisableOffset releaseDate) {
this.releaseDate = releaseDate==null?null:releaseDate.toBuilder();
return this;
}
@Override
@RosettaAttribute("dateOfTimelyStatement")
public CustodianEventEndDate.CustodianEventEndDateBuilder setDateOfTimelyStatement(CustomisableOffset dateOfTimelyStatement) {
this.dateOfTimelyStatement = dateOfTimelyStatement==null?null:dateOfTimelyStatement.toBuilder();
return this;
}
@Override
public CustodianEventEndDate build() {
return new CustodianEventEndDate.CustodianEventEndDateImpl(this);
}
@Override
public CustodianEventEndDate.CustodianEventEndDateBuilder toBuilder() {
return this;
}
@SuppressWarnings("unchecked")
@Override
public CustodianEventEndDate.CustodianEventEndDateBuilder prune() {
if (daysAfterCustodianEvent!=null && !daysAfterCustodianEvent.prune().hasData()) daysAfterCustodianEvent = null;
if (releaseDate!=null && !releaseDate.prune().hasData()) releaseDate = null;
if (dateOfTimelyStatement!=null && !dateOfTimelyStatement.prune().hasData()) dateOfTimelyStatement = null;
return this;
}
@Override
public boolean hasData() {
if (getDaysAfterCustodianEvent()!=null && getDaysAfterCustodianEvent().hasData()) return true;
if (getReleaseDate()!=null && getReleaseDate().hasData()) return true;
if (getDateOfTimelyStatement()!=null && getDateOfTimelyStatement().hasData()) return true;
return false;
}
@SuppressWarnings("unchecked")
@Override
public CustodianEventEndDate.CustodianEventEndDateBuilder merge(RosettaModelObjectBuilder other, BuilderMerger merger) {
CustodianEventEndDate.CustodianEventEndDateBuilder o = (CustodianEventEndDate.CustodianEventEndDateBuilder) other;
merger.mergeRosetta(getDaysAfterCustodianEvent(), o.getDaysAfterCustodianEvent(), this::setDaysAfterCustodianEvent);
merger.mergeRosetta(getReleaseDate(), o.getReleaseDate(), this::setReleaseDate);
merger.mergeRosetta(getDateOfTimelyStatement(), o.getDateOfTimelyStatement(), this::setDateOfTimelyStatement);
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;
CustodianEventEndDate _that = getType().cast(o);
if (!Objects.equals(daysAfterCustodianEvent, _that.getDaysAfterCustodianEvent())) return false;
if (!Objects.equals(releaseDate, _that.getReleaseDate())) return false;
if (!Objects.equals(dateOfTimelyStatement, _that.getDateOfTimelyStatement())) return false;
return true;
}
@Override
public int hashCode() {
int _result = 0;
_result = 31 * _result + (daysAfterCustodianEvent != null ? daysAfterCustodianEvent.hashCode() : 0);
_result = 31 * _result + (releaseDate != null ? releaseDate.hashCode() : 0);
_result = 31 * _result + (dateOfTimelyStatement != null ? dateOfTimelyStatement.hashCode() : 0);
return _result;
}
@Override
public String toString() {
return "CustodianEventEndDateBuilder {" +
"daysAfterCustodianEvent=" + this.daysAfterCustodianEvent + ", " +
"releaseDate=" + this.releaseDate + ", " +
"dateOfTimelyStatement=" + this.dateOfTimelyStatement +
'}';
}
}
}