| 1 | package pl.zankowski.iextrading4j.api.stocks.v1; | |
| 2 | ||
| 3 | import com.fasterxml.jackson.annotation.JsonCreator; | |
| 4 | import com.fasterxml.jackson.annotation.JsonProperty; | |
| 5 | ||
| 6 | import java.math.BigDecimal; | |
| 7 | import java.time.LocalDate; | |
| 8 | import java.util.Objects; | |
| 9 | import java.util.StringJoiner; | |
| 10 | ||
| 11 | public class InsiderTransaction extends BaseData { | |
| 12 | ||
| 13 | private static final long serialVersionUID = -5403038990862585492L; | |
| 14 | ||
| 15 | private final BigDecimal conversionOrExercisePrice; | |
| 16 | private final DirectIndirect directIndirect; | |
| 17 | private final Long effectiveDate; | |
| 18 | private final LocalDate filingDate; | |
| 19 | private final String fullName; | |
| 20 | private final boolean is10b51; | |
| 21 | private final BigDecimal postShares; | |
| 22 | private final String reportedTitle; | |
| 23 | private final String transactionCode; | |
| 24 | private final LocalDate transactionDate; | |
| 25 | private final BigDecimal transactionPrice; | |
| 26 | private final BigDecimal transactionShares; | |
| 27 | private final BigDecimal transactionValue; | |
| 28 | private final BigDecimal tranPrice; | |
| 29 | private final BigDecimal tranShares; | |
| 30 | private final BigDecimal tranValue; | |
| 31 | ||
| 32 | @JsonCreator | |
| 33 | public InsiderTransaction( | |
| 34 | @JsonProperty("symbol") final String symbol, | |
| 35 | @JsonProperty("id") final String id, | |
| 36 | @JsonProperty("key") final String key, | |
| 37 | @JsonProperty("subkey") final String subkey, | |
| 38 | @JsonProperty("updated") final Long updated, | |
| 39 | @JsonProperty("date") final Long date, | |
| 40 | @JsonProperty("conversionOrExercisePrice") final BigDecimal conversionOrExercisePrice, | |
| 41 | @JsonProperty("directIndirect") final DirectIndirect directIndirect, | |
| 42 | @JsonProperty("effectiveDate") final Long effectiveDate, | |
| 43 | @JsonProperty("filingDate") final LocalDate filingDate, | |
| 44 | @JsonProperty("fullName") final String fullName, | |
| 45 | @JsonProperty("is10b51") final boolean is10b51, | |
| 46 | @JsonProperty("postShares") final BigDecimal postShares, | |
| 47 | @JsonProperty("reportedTitle") final String reportedTitle, | |
| 48 | @JsonProperty("transactionCode") final String transactionCode, | |
| 49 | @JsonProperty("transactionDate") final LocalDate transactionDate, | |
| 50 | @JsonProperty("transactionPrice") final BigDecimal transactionPrice, | |
| 51 | @JsonProperty("transactionShares") final BigDecimal transactionShares, | |
| 52 | @JsonProperty("transactionValue") final BigDecimal transactionValue, | |
| 53 | @JsonProperty("tranPrice") final BigDecimal tranPrice, | |
| 54 | @JsonProperty("tranShares") final BigDecimal tranShares, | |
| 55 | @JsonProperty("tranValue") final BigDecimal tranValue) { | |
| 56 | super(symbol, id, key, subkey, updated, date); | |
| 57 | this.conversionOrExercisePrice = conversionOrExercisePrice; | |
| 58 | this.directIndirect = directIndirect; | |
| 59 | this.effectiveDate = effectiveDate; | |
| 60 | this.filingDate = filingDate; | |
| 61 | this.fullName = fullName; | |
| 62 | this.is10b51 = is10b51; | |
| 63 | this.postShares = postShares; | |
| 64 | this.reportedTitle = reportedTitle; | |
| 65 | this.transactionCode = transactionCode; | |
| 66 | this.transactionDate = transactionDate; | |
| 67 | this.transactionPrice = transactionPrice; | |
| 68 | this.transactionShares = transactionShares; | |
| 69 | this.transactionValue = transactionValue; | |
| 70 | this.tranPrice = tranPrice; | |
| 71 | this.tranShares = tranShares; | |
| 72 | this.tranValue = tranValue; | |
| 73 | } | |
| 74 | ||
| 75 | public BigDecimal getConversionOrExercisePrice() { | |
| 76 |
1
1. getConversionOrExercisePrice : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getConversionOrExercisePrice → KILLED |
return conversionOrExercisePrice; |
| 77 | } | |
| 78 | ||
| 79 | public DirectIndirect getDirectIndirect() { | |
| 80 |
1
1. getDirectIndirect : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getDirectIndirect → KILLED |
return directIndirect; |
| 81 | } | |
| 82 | ||
| 83 | public Long getEffectiveDate() { | |
| 84 |
1
1. getEffectiveDate : replaced Long return value with 0L for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getEffectiveDate → KILLED |
return effectiveDate; |
| 85 | } | |
| 86 | ||
| 87 | public LocalDate getFilingDate() { | |
| 88 |
1
1. getFilingDate : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getFilingDate → KILLED |
return filingDate; |
| 89 | } | |
| 90 | ||
| 91 | public String getFullName() { | |
| 92 |
1
1. getFullName : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getFullName → KILLED |
return fullName; |
| 93 | } | |
| 94 | ||
| 95 | public boolean isIs10b51() { | |
| 96 |
2
1. isIs10b51 : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::isIs10b51 → SURVIVED 2. isIs10b51 : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::isIs10b51 → KILLED |
return is10b51; |
| 97 | } | |
| 98 | ||
| 99 | public BigDecimal getPostShares() { | |
| 100 |
1
1. getPostShares : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getPostShares → KILLED |
return postShares; |
| 101 | } | |
| 102 | ||
| 103 | public String getReportedTitle() { | |
| 104 |
1
1. getReportedTitle : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getReportedTitle → KILLED |
return reportedTitle; |
| 105 | } | |
| 106 | ||
| 107 | public String getTransactionCode() { | |
| 108 |
1
1. getTransactionCode : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getTransactionCode → KILLED |
return transactionCode; |
| 109 | } | |
| 110 | ||
| 111 | public LocalDate getTransactionDate() { | |
| 112 |
1
1. getTransactionDate : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getTransactionDate → NO_COVERAGE |
return transactionDate; |
| 113 | } | |
| 114 | ||
| 115 | public BigDecimal getTransactionPrice() { | |
| 116 |
1
1. getTransactionPrice : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getTransactionPrice → KILLED |
return transactionPrice; |
| 117 | } | |
| 118 | ||
| 119 | public BigDecimal getTransactionShares() { | |
| 120 |
1
1. getTransactionShares : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getTransactionShares → KILLED |
return transactionShares; |
| 121 | } | |
| 122 | ||
| 123 | public BigDecimal getTransactionValue() { | |
| 124 |
1
1. getTransactionValue : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getTransactionValue → KILLED |
return transactionValue; |
| 125 | } | |
| 126 | ||
| 127 | public BigDecimal getTranPrice() { | |
| 128 |
1
1. getTranPrice : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getTranPrice → KILLED |
return tranPrice; |
| 129 | } | |
| 130 | ||
| 131 | public BigDecimal getTranShares() { | |
| 132 |
1
1. getTranShares : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getTranShares → KILLED |
return tranShares; |
| 133 | } | |
| 134 | ||
| 135 | public BigDecimal getTranValue() { | |
| 136 |
1
1. getTranValue : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getTranValue → KILLED |
return tranValue; |
| 137 | } | |
| 138 | ||
| 139 | @Deprecated | |
| 140 | public char getTranCode() { | |
| 141 |
2
1. getTranCode : negated conditional → NO_COVERAGE 2. getTranCode : replaced char return with 0 for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::getTranCode → NO_COVERAGE |
return transactionCode == null ? ' ' : transactionCode.charAt(0); |
| 142 | } | |
| 143 | ||
| 144 | @Override | |
| 145 | public boolean equals(final Object o) { | |
| 146 |
1
1. equals : negated conditional → KILLED |
if (this == o) { |
| 147 |
1
1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::equals → KILLED |
return true; |
| 148 | } | |
| 149 |
2
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED |
if (o == null || getClass() != o.getClass()) { |
| 150 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::equals → KILLED |
return false; |
| 151 | } | |
| 152 |
1
1. equals : negated conditional → KILLED |
if (!super.equals(o)) { |
| 153 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::equals → KILLED |
return false; |
| 154 | } | |
| 155 | final InsiderTransaction that = (InsiderTransaction) o; | |
| 156 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::equals → KILLED |
return is10b51 == that.is10b51 && |
| 157 |
1
1. equals : negated conditional → KILLED |
Objects.equals(conversionOrExercisePrice, that.conversionOrExercisePrice) && |
| 158 |
1
1. equals : negated conditional → KILLED |
Objects.equals(directIndirect, that.directIndirect) && |
| 159 |
2
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED |
Objects.equals(effectiveDate, that.effectiveDate) && |
| 160 | directIndirect == that.directIndirect && | |
| 161 |
1
1. equals : negated conditional → KILLED |
Objects.equals(filingDate, that.filingDate) && |
| 162 |
1
1. equals : negated conditional → KILLED |
Objects.equals(fullName, that.fullName) && |
| 163 |
1
1. equals : negated conditional → KILLED |
Objects.equals(postShares, that.postShares) && |
| 164 |
1
1. equals : negated conditional → KILLED |
Objects.equals(reportedTitle, that.reportedTitle) && |
| 165 |
1
1. equals : negated conditional → KILLED |
Objects.equals(transactionCode, that.transactionCode) && |
| 166 |
1
1. equals : negated conditional → KILLED |
Objects.equals(transactionDate, that.transactionDate) && |
| 167 |
1
1. equals : negated conditional → KILLED |
Objects.equals(transactionPrice, that.transactionPrice) && |
| 168 |
1
1. equals : negated conditional → KILLED |
Objects.equals(transactionShares, that.transactionShares) && |
| 169 |
1
1. equals : negated conditional → KILLED |
Objects.equals(transactionValue, that.transactionValue) && |
| 170 |
1
1. equals : negated conditional → KILLED |
Objects.equals(tranPrice, that.tranPrice) && |
| 171 |
1
1. equals : negated conditional → KILLED |
Objects.equals(tranShares, that.tranShares) && |
| 172 |
1
1. equals : negated conditional → KILLED |
Objects.equals(tranValue, that.tranValue); |
| 173 | } | |
| 174 | ||
| 175 | @Override | |
| 176 | public int hashCode() { | |
| 177 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::hashCode → KILLED |
return Objects.hash(super.hashCode(), conversionOrExercisePrice, directIndirect, effectiveDate, directIndirect, |
| 178 | filingDate, fullName, is10b51, postShares, reportedTitle, transactionCode, transactionDate, | |
| 179 | transactionPrice, transactionShares, transactionValue, tranPrice, tranShares, tranValue); | |
| 180 | } | |
| 181 | ||
| 182 | @Override | |
| 183 | public String toString() { | |
| 184 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/v1/InsiderTransaction::toString → KILLED |
return new StringJoiner(", ", InsiderTransaction.class.getSimpleName() + "[", "]") |
| 185 | .add("conversionOrExercisePrice=" + conversionOrExercisePrice) | |
| 186 | .add("directIndirect=" + directIndirect) | |
| 187 | .add("effectiveDate=" + effectiveDate) | |
| 188 | .add("filingDate=" + filingDate) | |
| 189 | .add("fullName='" + fullName + "'") | |
| 190 | .add("is10b51=" + is10b51) | |
| 191 | .add("postShares=" + postShares) | |
| 192 | .add("reportedTitle='" + reportedTitle + "'") | |
| 193 | .add("transactionCode='" + transactionCode + "'") | |
| 194 | .add("transactionDate=" + transactionDate) | |
| 195 | .add("transactionPrice=" + transactionPrice) | |
| 196 | .add("transactionShares=" + transactionShares) | |
| 197 | .add("transactionValue=" + transactionValue) | |
| 198 | .add("tranPrice=" + tranPrice) | |
| 199 | .add("tranShares=" + tranShares) | |
| 200 | .add("tranValue=" + tranValue) | |
| 201 | .toString(); | |
| 202 | } | |
| 203 | } | |
Mutations | ||
| 76 |
1.1 |
|
| 80 |
1.1 |
|
| 84 |
1.1 |
|
| 88 |
1.1 |
|
| 92 |
1.1 |
|
| 96 |
1.1 2.2 |
|
| 100 |
1.1 |
|
| 104 |
1.1 |
|
| 108 |
1.1 |
|
| 112 |
1.1 |
|
| 116 |
1.1 |
|
| 120 |
1.1 |
|
| 124 |
1.1 |
|
| 128 |
1.1 |
|
| 132 |
1.1 |
|
| 136 |
1.1 |
|
| 141 |
1.1 2.2 |
|
| 146 |
1.1 |
|
| 147 |
1.1 |
|
| 149 |
1.1 2.2 |
|
| 150 |
1.1 |
|
| 152 |
1.1 |
|
| 153 |
1.1 |
|
| 156 |
1.1 2.2 |
|
| 157 |
1.1 |
|
| 158 |
1.1 |
|
| 159 |
1.1 2.2 |
|
| 161 |
1.1 |
|
| 162 |
1.1 |
|
| 163 |
1.1 |
|
| 164 |
1.1 |
|
| 165 |
1.1 |
|
| 166 |
1.1 |
|
| 167 |
1.1 |
|
| 168 |
1.1 |
|
| 169 |
1.1 |
|
| 170 |
1.1 |
|
| 171 |
1.1 |
|
| 172 |
1.1 |
|
| 177 |
1.1 |
|
| 184 |
1.1 |