Gestito AtbList in AtbForn ed EntityChild ArlFogm in GtbAnag

(cherry picked from commit 2180f860cc)
This commit is contained in:
2025-02-03 12:12:04 +01:00
parent fd00c41d99
commit 72edab6f08
2 changed files with 42 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import it.integry.ems_model.annotation.*;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.base.EquatableEntityInterface;
import it.integry.ems_model.utility.UtilityString;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.kie.api.definition.type.PropertyReactive;
@@ -114,6 +115,9 @@ public class AtbForn extends EntityBase implements EquatableEntityInterface<AtbF
@Priority(1)
private GtbAnag gtbAnag;
@Priority(1)
private AtbList atbList;
@EntityChild
private List<VtbDest> vtbDest = new ArrayList<>();
@EntityChild
@@ -393,6 +397,15 @@ public class AtbForn extends EntityBase implements EquatableEntityInterface<AtbF
return this;
}
public AtbList getAtbList() {
return atbList;
}
public AtbForn setAtbList(AtbList atbList) {
this.atbList = atbList;
return this;
}
public List<VtbDest> getVtbDest() {
return vtbDest;
}
@@ -402,7 +415,9 @@ public class AtbForn extends EntityBase implements EquatableEntityInterface<AtbF
return this;
}
public List<ArlFogm> getArlFogm() { return arlFogm; }
public List<ArlFogm> getArlFogm() {
return arlFogm;
}
public AtbForn setArlFogm(List<ArlFogm> arlFogm) {
this.arlFogm = arlFogm;
@@ -418,7 +433,7 @@ public class AtbForn extends EntityBase implements EquatableEntityInterface<AtbF
public boolean equalsKey(AtbForn other) {
if (this == other) return true;
if(hashCodeKey() != other.hashCodeKey())
if (hashCodeKey() != other.hashCodeKey())
return false;
return Objects.equals(getCodAnag(), other.getCodAnag());
@@ -436,4 +451,13 @@ public class AtbForn extends EntityBase implements EquatableEntityInterface<AtbF
public int hashCode() {
return Objects.hash(codAnag, codAtip, codBanc, codPaga, porto, mezzo, codAliq, codAlis, codCconCosti, codCconRicavi, codAbi, codCab, agenziaBanca, rifBancaForn, flagStato, causale, codCausRit, codDivi, mmDecor, codClie, iban, codBancAzi, noteOrdine, ggChiudiStralci, codBic, mesiEsclusi, codVvet, flagForfettario, flagAutofattura, gtbAnag);
}
@Override
public void checkPreSave() throws Exception {
super.checkPreSave();
if (this.getAtbList() != null && UtilityString.isNullOrEmpty(this.getCodAlis())) {
this.setCodAlis(this.getAtbList().getCodAlis());
}
}
}

View File

@@ -190,6 +190,9 @@ public class GtbAnag extends EntityBase implements EquatableEntityInterface<GtbA
@EntityChild
private List<GtbAnagInfo> gtbAnagInfo = new ArrayList<>();
@EntityChild
private List<ArlFogm> arlFogm = new ArrayList<>();
@Priority(101)
CtbAnag ctbAnag;
@@ -656,6 +659,15 @@ public class GtbAnag extends EntityBase implements EquatableEntityInterface<GtbA
return this;
}
public List<ArlFogm> getArlFogm() {
return arlFogm;
}
public GtbAnag setArlFogm(List<ArlFogm> arlFogm) {
this.arlFogm = arlFogm;
return this;
}
public VtbClie getVtbClie() {
return vtbClie;
}
@@ -736,6 +748,9 @@ public class GtbAnag extends EntityBase implements EquatableEntityInterface<GtbA
for (GrlAnagJrept grlAnagJrept : getGrlAnagJrepts()) {
grlAnagJrept.manageWithParentConnection(connection, grlAnagJrept.getOperation(), dataCompleting, entityHolder);
}
for (ArlFogm arlFogm : this.getArlFogm()) {
arlFogm.manageWithParentConnection(connection, arlFogm.getOperation(), dataCompleting, entityHolder);
}
}
@Override
@@ -784,7 +799,7 @@ public class GtbAnag extends EntityBase implements EquatableEntityInterface<GtbA
public boolean equalsKey(GtbAnag other) {
if (this == other) return true;
if(hashCodeKey() != other.hashCodeKey())
if (hashCodeKey() != other.hashCodeKey())
return false;
return Objects.equals(getCodAnag(), other.getCodAnag());