MIFOSX-1735 - sub-status of Client to be fetched during read operations

This commit is contained in:
Binny G Sreevas
2014-12-10 10:31:19 +05:30
parent 38bb259f65
commit 23af79ce1b
@@ -76,6 +76,10 @@ public final class Client extends AbstractPersistable<Long> {
@Column(name = "status_enum", nullable = false)
private Integer status;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "sub_status", nullable = true)
private CodeValue subStatus;
@Column(name = "activation_date", nullable = true)
@Temporal(TemporalType.DATE)
private Date activationDate;
@@ -740,6 +744,18 @@ public final class Client extends AbstractPersistable<Long> {
public Integer getStatus() {
return this.status;
}
public CodeValue subStatus() {
return this.subStatus;
}
public Long subStatusId() {
Long subStatusId = null;
if (this.subStatus != null) {
subStatusId = this.subStatus.getId();
}
return subStatusId;
}
public void setStatus(final Integer status) {
this.status = status;