FINERACT-2326: CodeValue serialization enhancement (#5007)
This commit is contained in:
+7
-15
@@ -39,19 +39,11 @@ public class CodeValueData implements Serializable {
|
|||||||
private String name;
|
private String name;
|
||||||
private Integer position;
|
private Integer position;
|
||||||
private String description;
|
private String description;
|
||||||
private boolean active;
|
private Boolean active;
|
||||||
private boolean mandatory;
|
private Boolean mandatory;
|
||||||
|
|
||||||
public static CodeValueData instance(final Long id, final String name, final Integer position, final boolean isActive,
|
public static CodeValueData instance(final Long id, final String name, final String description, final Integer position,
|
||||||
final boolean mandatory) {
|
final boolean isActive, final boolean mandatory) {
|
||||||
String description = null;
|
|
||||||
return new CodeValueData().setId(id).setName(name).setPosition(position).setDescription(description).setActive(isActive)
|
|
||||||
.setMandatory(mandatory);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static CodeValueData instance(final Long id, final String name, final String description, final boolean isActive,
|
|
||||||
final boolean mandatory) {
|
|
||||||
Integer position = null;
|
|
||||||
return new CodeValueData().setId(id).setName(name).setPosition(position).setDescription(description).setActive(isActive)
|
return new CodeValueData().setId(id).setName(name).setPosition(position).setDescription(description).setActive(isActive)
|
||||||
.setMandatory(mandatory);
|
.setMandatory(mandatory);
|
||||||
}
|
}
|
||||||
@@ -67,10 +59,10 @@ public class CodeValueData implements Serializable {
|
|||||||
public static CodeValueData instance(final Long id, final String name) {
|
public static CodeValueData instance(final Long id, final String name) {
|
||||||
String description = null;
|
String description = null;
|
||||||
Integer position = null;
|
Integer position = null;
|
||||||
boolean isActive = false;
|
Boolean active = null;
|
||||||
boolean mandatory = false;
|
Boolean mandatory = null;
|
||||||
|
|
||||||
return new CodeValueData().setId(id).setName(name).setPosition(position).setDescription(description).setActive(isActive)
|
return new CodeValueData().setId(id).setName(name).setPosition(position).setDescription(description).setActive(active)
|
||||||
.setMandatory(mandatory);
|
.setMandatory(mandatory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -126,6 +126,6 @@ public class CodeValue extends AbstractPersistableCustom<Long> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public CodeValueData toData() {
|
public CodeValueData toData() {
|
||||||
return CodeValueData.instance(getId(), this.label, this.position, this.isActive, this.mandatory);
|
return CodeValueData.instance(getId(), this.label, this.description, this.position, this.isActive, this.mandatory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-3
@@ -1674,7 +1674,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService, Loa
|
|||||||
+ " fromtran.description as fromTransferDescription, "
|
+ " fromtran.description as fromTransferDescription, "
|
||||||
+ " totran.id as toTransferId, totran.is_reversed as toTransferReversed, "
|
+ " totran.id as toTransferId, totran.is_reversed as toTransferReversed, "
|
||||||
+ " totran.transaction_date as toTransferDate, totran.amount as toTransferAmount, "
|
+ " totran.transaction_date as toTransferDate, totran.amount as toTransferAmount, "
|
||||||
+ " clcv.id as classCodeId, clcv.code_value as classCodeValue, "
|
+ " clcv.id as classificationCodeId, clcv.code_value as classificationCodeValue, "
|
||||||
+ " totran.description as toTransferDescription from m_loan l join m_loan_transaction tr on tr.loan_id = l.id "
|
+ " totran.description as toTransferDescription from m_loan l join m_loan_transaction tr on tr.loan_id = l.id "
|
||||||
+ " join m_currency rc on rc." + sqlGenerator.escape("code") + " = l.currency_code "
|
+ " join m_currency rc on rc." + sqlGenerator.escape("code") + " = l.currency_code "
|
||||||
+ " left JOIN m_payment_detail pd ON tr.payment_detail_id = pd.id"
|
+ " left JOIN m_payment_detail pd ON tr.payment_detail_id = pd.id"
|
||||||
@@ -1707,8 +1707,11 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService, Loa
|
|||||||
final boolean manuallyReversed = rs.getBoolean("manuallyReversed");
|
final boolean manuallyReversed = rs.getBoolean("manuallyReversed");
|
||||||
|
|
||||||
PaymentDetailData paymentDetailData = null;
|
PaymentDetailData paymentDetailData = null;
|
||||||
|
CodeValueData classificationData = null;
|
||||||
final CodeValueData classificationData = CodeValueData.instance(rs.getLong("classCodeId"), rs.getString("classCodeValue"));
|
Long classificationCodeValueId = JdbcSupport.getLong(rs, "classificationCodeId");
|
||||||
|
if (classificationCodeValueId != null) {
|
||||||
|
classificationData = CodeValueData.instance(classificationCodeValueId, rs.getString("classificationCodeValue"));
|
||||||
|
}
|
||||||
|
|
||||||
final Long paymentTypeId = JdbcSupport.getLong(rs, "paymentType");
|
final Long paymentTypeId = JdbcSupport.getLong(rs, "paymentType");
|
||||||
if (paymentTypeId != null) {
|
if (paymentTypeId != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user