parent
7d0da57d4a
commit
30485d7104
5 changed files with 381 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ package ru.clearing.classes.statics.data.security;
|
|||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.clearing.classes.objects.BusinessObject;
|
||||
import ru.spcex.platform.classes.base.interfaces.WithInstrumentType;
|
||||
import ru.spcex.platform.classes.base.interfaces.WithWorkflowStatus;
|
||||
|
||||
/**
|
||||
|
|
@ -9,7 +10,7 @@ import ru.spcex.platform.classes.base.interfaces.WithWorkflowStatus;
|
|||
* <p>
|
||||
* DB table: SECURITY
|
||||
**/
|
||||
public class Security extends BusinessObject implements WithWorkflowStatus {
|
||||
public class Security extends BusinessObject implements WithWorkflowStatus, WithInstrumentType {
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private String instrumentType;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@ public class PresentById implements IValidationRule<ImdgValidationContext<WithId
|
|||
@Override
|
||||
public Optional<EnumMessage> validate(ImdgValidationContext<WithId> context) {
|
||||
WithId actionById = context.getValidatedObject();
|
||||
if (actionById.getId() == null) {
|
||||
return of(errorEnum, actionById.getId());
|
||||
}
|
||||
Imdg<SpcexObjectBase> targetMap = context.obtainMap(mapName, SpcexObjectBase.class);
|
||||
SpcexObjectBase obj = targetMap.getSingleObjectByID(actionById.getId());
|
||||
if (obj == null) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,14 @@ public interface Consts {
|
|||
String DESTINATION_MONEY_MARKET_SECURITY_UPDATE = "money-market-security-update";
|
||||
String DESTINATION_MONEY_MARKET_SECURITY_DELETE = "money-market-security-delete";
|
||||
|
||||
String DESTINATION_EQUITY_SECURITY_NEW = "equity-security-new";
|
||||
String DESTINATION_EQUITY_SECURITY_UPDATE = "equity-security-update";
|
||||
String DESTINATION_EQUITY_SECURITY_DELETE = "equity-security-delete";
|
||||
|
||||
String DESTINATION_FIXED_INCOME_SECURITY_NEW = "fixed-income-security-new";
|
||||
String DESTINATION_FIXED_INCOME_SECURITY_UPDATE = "fixed-income-security-update";
|
||||
String DESTINATION_FIXED_INCOME_SECURITY_DELETE = "fixed-income-security-delete";
|
||||
|
||||
String DESTINATION_KEY_RATE_NEW = "key-rate-new";
|
||||
String DESTINATION_KEY_RATE_UPDATE = "key-rate-update";
|
||||
String DESTINATION_KEY_RATE_DELETE = "key-rate-delete";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,178 @@
|
|||
package ru.spcex.clearing.platform.messaging.domain.cud.securitites;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalDateDeserializer;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalDateSerializer;
|
||||
import ru.spcex.platform.classes.base.interfaces.WithInstrumentType;
|
||||
import ru.spcex.platform.classes.base.interfaces.WithSecuritySymbol;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class FixedIncomeSecurityNewRequest implements WithSecuritySymbol, WithInstrumentType {
|
||||
@JsonProperty
|
||||
public String securitySymbol;
|
||||
@JsonProperty
|
||||
public String shortName;
|
||||
@JsonProperty
|
||||
public String fullName;
|
||||
@JsonProperty
|
||||
public String isin;
|
||||
@JsonProperty
|
||||
public String bondType;
|
||||
@JsonProperty
|
||||
public Double lotSize;
|
||||
@JsonProperty
|
||||
public Double nominalValue;
|
||||
@JsonProperty
|
||||
public String nominalCurrency;
|
||||
@JsonProperty
|
||||
@JsonSerialize(using = LocalDateSerializer.class)
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
public LocalDate maturityDate;
|
||||
@JsonProperty
|
||||
public Double coupon;
|
||||
@JsonProperty
|
||||
public Long couponFrequency;
|
||||
@JsonProperty
|
||||
public Long issuerId;
|
||||
@JsonProperty
|
||||
public String shortNameEng;
|
||||
@JsonProperty
|
||||
public String fullNameEng;
|
||||
@JsonProperty
|
||||
public String workflowStatus;
|
||||
@JsonProperty
|
||||
public String instrumentType;
|
||||
|
||||
@Override
|
||||
public String getSecuritySymbol() {
|
||||
return securitySymbol;
|
||||
}
|
||||
|
||||
public void setSecuritySymbol(String securitySymbol) {
|
||||
this.securitySymbol = securitySymbol;
|
||||
}
|
||||
|
||||
public String getShortName() {
|
||||
return shortName;
|
||||
}
|
||||
|
||||
public void setShortName(String shortName) {
|
||||
this.shortName = shortName;
|
||||
}
|
||||
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
}
|
||||
|
||||
public void setFullName(String fullName) {
|
||||
this.fullName = fullName;
|
||||
}
|
||||
|
||||
public String getIsin() {
|
||||
return isin;
|
||||
}
|
||||
|
||||
public void setIsin(String isin) {
|
||||
this.isin = isin;
|
||||
}
|
||||
|
||||
public String getBondType() {
|
||||
return bondType;
|
||||
}
|
||||
|
||||
public void setBondType(String bondType) {
|
||||
this.bondType = bondType;
|
||||
}
|
||||
|
||||
public Double getLotSize() {
|
||||
return lotSize;
|
||||
}
|
||||
|
||||
public void setLotSize(Double lotSize) {
|
||||
this.lotSize = lotSize;
|
||||
}
|
||||
|
||||
public Double getNominalValue() {
|
||||
return nominalValue;
|
||||
}
|
||||
|
||||
public void setNominalValue(Double nominalValue) {
|
||||
this.nominalValue = nominalValue;
|
||||
}
|
||||
|
||||
public String getNominalCurrency() {
|
||||
return nominalCurrency;
|
||||
}
|
||||
|
||||
public void setNominalCurrency(String nominalCurrency) {
|
||||
this.nominalCurrency = nominalCurrency;
|
||||
}
|
||||
|
||||
public LocalDate getMaturityDate() {
|
||||
return maturityDate;
|
||||
}
|
||||
|
||||
public void setMaturityDate(LocalDate maturityDate) {
|
||||
this.maturityDate = maturityDate;
|
||||
}
|
||||
|
||||
public Double getCoupon() {
|
||||
return coupon;
|
||||
}
|
||||
|
||||
public void setCoupon(Double coupon) {
|
||||
this.coupon = coupon;
|
||||
}
|
||||
|
||||
public Long getCouponFrequency() {
|
||||
return couponFrequency;
|
||||
}
|
||||
|
||||
public void setCouponFrequency(Long couponFrequency) {
|
||||
this.couponFrequency = couponFrequency;
|
||||
}
|
||||
|
||||
public Long getIssuerId() {
|
||||
return issuerId;
|
||||
}
|
||||
|
||||
public void setIssuerId(Long issuerId) {
|
||||
this.issuerId = issuerId;
|
||||
}
|
||||
|
||||
public String getShortNameEng() {
|
||||
return shortNameEng;
|
||||
}
|
||||
|
||||
public void setShortNameEng(String shortNameEng) {
|
||||
this.shortNameEng = shortNameEng;
|
||||
}
|
||||
|
||||
public String getFullNameEng() {
|
||||
return fullNameEng;
|
||||
}
|
||||
|
||||
public void setFullNameEng(String fullNameEng) {
|
||||
this.fullNameEng = fullNameEng;
|
||||
}
|
||||
|
||||
public String getWorkflowStatus() {
|
||||
return workflowStatus;
|
||||
}
|
||||
|
||||
public void setWorkflowStatus(String workflowStatus) {
|
||||
this.workflowStatus = workflowStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInstrumentType() {
|
||||
return instrumentType;
|
||||
}
|
||||
|
||||
public void setInstrumentType(String instrumentType) {
|
||||
this.instrumentType = instrumentType;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,190 @@
|
|||
package ru.spcex.clearing.platform.messaging.domain.cud.securitites;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalDateDeserializer;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalDateSerializer;
|
||||
import ru.spcex.platform.classes.base.interfaces.WithId;
|
||||
import ru.spcex.platform.classes.base.interfaces.WithInstrumentType;
|
||||
import ru.spcex.platform.classes.base.interfaces.WithWorkflowStatus;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class FixedIncomeSecurityUpdateRequest implements WithId, WithInstrumentType, WithWorkflowStatus {
|
||||
@JsonProperty
|
||||
public Long id;
|
||||
@JsonProperty
|
||||
public String securitySymbol;
|
||||
@JsonProperty
|
||||
public String shortName;
|
||||
@JsonProperty
|
||||
public String fullName;
|
||||
@JsonProperty
|
||||
public String isin;
|
||||
@JsonProperty
|
||||
public String bondType;
|
||||
@JsonProperty
|
||||
public Double lotSize;
|
||||
@JsonProperty
|
||||
public Double nominalValue;
|
||||
@JsonProperty
|
||||
public String nominalCurrency;
|
||||
@JsonProperty
|
||||
@JsonSerialize(using = LocalDateSerializer.class)
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
public LocalDate maturityDate;
|
||||
@JsonProperty
|
||||
public Double coupon;
|
||||
@JsonProperty
|
||||
public Long couponFrequency;
|
||||
@JsonProperty
|
||||
public Long issuerId;
|
||||
@JsonProperty
|
||||
public String shortNameEng;
|
||||
@JsonProperty
|
||||
public String fullNameEng;
|
||||
@JsonProperty
|
||||
public String workflowStatus;
|
||||
@JsonProperty
|
||||
public String instrumentType;
|
||||
|
||||
@Override
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getSecuritySymbol() {
|
||||
return securitySymbol;
|
||||
}
|
||||
|
||||
public void setSecuritySymbol(String securitySymbol) {
|
||||
this.securitySymbol = securitySymbol;
|
||||
}
|
||||
|
||||
public String getShortName() {
|
||||
return shortName;
|
||||
}
|
||||
|
||||
public void setShortName(String shortName) {
|
||||
this.shortName = shortName;
|
||||
}
|
||||
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
}
|
||||
|
||||
public void setFullName(String fullName) {
|
||||
this.fullName = fullName;
|
||||
}
|
||||
|
||||
public String getIsin() {
|
||||
return isin;
|
||||
}
|
||||
|
||||
public void setIsin(String isin) {
|
||||
this.isin = isin;
|
||||
}
|
||||
|
||||
public String getBondType() {
|
||||
return bondType;
|
||||
}
|
||||
|
||||
public void setBondType(String bondType) {
|
||||
this.bondType = bondType;
|
||||
}
|
||||
|
||||
public Double getLotSize() {
|
||||
return lotSize;
|
||||
}
|
||||
|
||||
public void setLotSize(Double lotSize) {
|
||||
this.lotSize = lotSize;
|
||||
}
|
||||
|
||||
public Double getNominalValue() {
|
||||
return nominalValue;
|
||||
}
|
||||
|
||||
public void setNominalValue(Double nominalValue) {
|
||||
this.nominalValue = nominalValue;
|
||||
}
|
||||
|
||||
public String getNominalCurrency() {
|
||||
return nominalCurrency;
|
||||
}
|
||||
|
||||
public void setNominalCurrency(String nominalCurrency) {
|
||||
this.nominalCurrency = nominalCurrency;
|
||||
}
|
||||
|
||||
public LocalDate getMaturityDate() {
|
||||
return maturityDate;
|
||||
}
|
||||
|
||||
public void setMaturityDate(LocalDate maturityDate) {
|
||||
this.maturityDate = maturityDate;
|
||||
}
|
||||
|
||||
public Double getCoupon() {
|
||||
return coupon;
|
||||
}
|
||||
|
||||
public void setCoupon(Double coupon) {
|
||||
this.coupon = coupon;
|
||||
}
|
||||
|
||||
public Long getCouponFrequency() {
|
||||
return couponFrequency;
|
||||
}
|
||||
|
||||
public void setCouponFrequency(Long couponFrequency) {
|
||||
this.couponFrequency = couponFrequency;
|
||||
}
|
||||
|
||||
public Long getIssuerId() {
|
||||
return issuerId;
|
||||
}
|
||||
|
||||
public void setIssuerId(Long issuerId) {
|
||||
this.issuerId = issuerId;
|
||||
}
|
||||
|
||||
public String getShortNameEng() {
|
||||
return shortNameEng;
|
||||
}
|
||||
|
||||
public void setShortNameEng(String shortNameEng) {
|
||||
this.shortNameEng = shortNameEng;
|
||||
}
|
||||
|
||||
public String getFullNameEng() {
|
||||
return fullNameEng;
|
||||
}
|
||||
|
||||
public void setFullNameEng(String fullNameEng) {
|
||||
this.fullNameEng = fullNameEng;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getWorkflowStatus() {
|
||||
return workflowStatus;
|
||||
}
|
||||
|
||||
public void setWorkflowStatus(String workflowStatus) {
|
||||
this.workflowStatus = workflowStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInstrumentType() {
|
||||
return instrumentType;
|
||||
}
|
||||
|
||||
public void setInstrumentType(String instrumentType) {
|
||||
this.instrumentType = instrumentType;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue