inseriti metodi override nelle entity MtbAartMarchio, MtbMarchioLinea, MtbMarchioSlinea, MtbMarchioSslinea
This commit is contained in:
@@ -12,6 +12,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import static sun.rmi.registry.RegistryImpl.getID;
|
||||
|
||||
@Master
|
||||
@PropertyReactive
|
||||
@Table(MtbAartMarchio.ENTITY)
|
||||
@@ -50,6 +52,15 @@ public class MtbAartMarchio extends EntityBase implements EquatableEntityInterfa
|
||||
super(logger);
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public MtbAartMarchio setId(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMarchio() {
|
||||
return marchio;
|
||||
}
|
||||
@@ -59,6 +70,33 @@ public class MtbAartMarchio extends EntityBase implements EquatableEntityInterfa
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbMarchioLinea> getMtbMarchioLinea() {
|
||||
return mtbMarchioLinea;
|
||||
}
|
||||
|
||||
public MtbAartMarchio setMtbMarchioLinea(List<MtbMarchioLinea> mtbMarchioLinea) {
|
||||
this.mtbMarchioLinea = mtbMarchioLinea;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbMarchioSlinea> getMtbMarchioSlinea() {
|
||||
return mtbMarchioSlinea;
|
||||
}
|
||||
|
||||
public MtbAartMarchio setMtbMarchioSlinea(List<MtbMarchioSlinea> mtbMarchioSlinea) {
|
||||
this.mtbMarchioSlinea = mtbMarchioSlinea;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbMarchioSslinea> getMtbMarchioSslinea() {
|
||||
return mtbMarchioSslinea;
|
||||
}
|
||||
|
||||
public MtbAartMarchio setMtbMarchioSslinea(List<MtbMarchioSslinea> mtbMarchioSslinea) {
|
||||
this.mtbMarchioSslinea = mtbMarchioSslinea;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteChilds() throws Exception {
|
||||
MtbMarchioSslinea mtbMarchioSslinea = new MtbMarchioSslinea();
|
||||
@@ -77,23 +115,24 @@ public class MtbAartMarchio extends EntityBase implements EquatableEntityInterfa
|
||||
if(hashCodeKey() != other.hashCodeKey())
|
||||
return false;
|
||||
|
||||
return Objects.equals(getMarchio(), other.getMarchio());
|
||||
return Objects.equals(getID(), other.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCodeKey() {
|
||||
return Objects.hashCode(getMarchio());
|
||||
return Objects.hashCode(getID());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof MtbAartMarchio)) return false;
|
||||
MtbAartMarchio that = (MtbAartMarchio) o;
|
||||
return Objects.equals(id, that.id) && Objects.equals(getMarchio(), that.getMarchio());
|
||||
MtbAartMarchio mtbAartMarchio = (MtbAartMarchio) o;
|
||||
return Objects.equals(getId(), mtbAartMarchio.getId()) && Objects.equals(getMarchio(), mtbAartMarchio.getMarchio());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, getMarchio());
|
||||
return Objects.hash(getId(), getMarchio());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,6 +146,15 @@ public class MtbGrup extends EntityBase implements EquatableEntityInterface<MtbG
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbSsfam> getMtbSsfam() {
|
||||
return mtbSsfam;
|
||||
}
|
||||
|
||||
public MtbGrup setMtbSsfam(List<MtbSsfam> mtbSsfam) {
|
||||
this.mtbSsfam = mtbSsfam;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getFlagAttivo() { return flagAttivo; }
|
||||
|
||||
public MtbGrup setFlagAttivo(Boolean flagAttivo) {
|
||||
|
||||
@@ -3,18 +3,21 @@ package it.integry.ems_model.entity;
|
||||
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 org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
@PropertyReactive()
|
||||
@Table(value = MtbMarchioLinea.ENTITY)
|
||||
@JsonTypeName(value = MtbMarchioLinea.ENTITY)
|
||||
public class MtbMarchioLinea extends EntityBase {
|
||||
public class MtbMarchioLinea extends EntityBase implements EquatableEntityInterface<MtbMarchioLinea> {
|
||||
|
||||
|
||||
public final static String ENTITY = "mtb_marchio_linea";
|
||||
|
||||
@@ -89,9 +92,38 @@ public class MtbMarchioLinea extends EntityBase {
|
||||
}
|
||||
|
||||
protected void deleteChilds() throws Exception {
|
||||
MtbMarchioSlinea mtbMarchioSlinea = new MtbMarchioSlinea();
|
||||
mtbMarchioSlinea.deleteAllEntities(connection, this);
|
||||
MtbMarchioSslinea mtbMarchioSslinea = new MtbMarchioSslinea();
|
||||
mtbMarchioSslinea.deleteAllEntities(connection, this);
|
||||
MtbMarchioSlinea mtbMarchioSlinea = new MtbMarchioSlinea();
|
||||
mtbMarchioSlinea.deleteAllEntities(connection, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsKey(MtbMarchioLinea other) {
|
||||
if (this == other)
|
||||
return true;
|
||||
|
||||
if(hashCodeKey() != other.hashCodeKey())
|
||||
return false;
|
||||
|
||||
return Objects.equals(getIdMarchio(), other.getIdMarchio()) && Objects.equals(getCodLinea(), other.getCodLinea());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCodeKey() {
|
||||
return Objects.hash(getIdMarchio(), getCodLinea());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof MtbMarchioLinea)) return false;
|
||||
MtbMarchioLinea mtbMarchioLinea = (MtbMarchioLinea) o;
|
||||
return Objects.equals(getIdMarchio(), mtbMarchioLinea.getIdMarchio()) && Objects.equals(getCodLinea(), mtbMarchioLinea.getCodLinea()) && Objects.equals(getDescrizione(), mtbMarchioLinea.getDescrizione());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getIdMarchio(), getCodLinea(), getDescrizione());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
package it.integry.ems_model.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import it.integry.ems_model.annotation.FK;
|
||||
import it.integry.ems_model.annotation.PK;
|
||||
import it.integry.ems_model.annotation.SqlField;
|
||||
import it.integry.ems_model.annotation.Table;
|
||||
import it.integry.ems_model.annotation.*;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@PropertyReactive()
|
||||
@Table(value = MtbMarchioSlinea.ENTITY)
|
||||
@JsonTypeName(value = MtbMarchioSlinea.ENTITY)
|
||||
public class MtbMarchioSlinea extends EntityBase {
|
||||
public class MtbMarchioSlinea extends EntityBase implements EquatableEntityInterface<MtbMarchioSlinea> {
|
||||
|
||||
public final static String ENTITY = "mtb_marchio_slinea";
|
||||
|
||||
@@ -36,6 +38,13 @@ public class MtbMarchioSlinea extends EntityBase {
|
||||
@SqlField(value = "descrizione", maxLength = 255, nullable = false)
|
||||
private String descrizione;
|
||||
|
||||
@EntityChild
|
||||
private List<MtbMarchioSslinea> mtbMarchioSslinea;
|
||||
|
||||
{
|
||||
mtbMarchioSslinea = new ArrayList<>();
|
||||
}
|
||||
|
||||
public String getCodLinea() {
|
||||
return codLinea;
|
||||
}
|
||||
@@ -62,4 +71,47 @@ public class MtbMarchioSlinea extends EntityBase {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbMarchioSslinea> getMtbMarchioSslinea() {
|
||||
return mtbMarchioSslinea;
|
||||
}
|
||||
|
||||
public MtbMarchioSlinea setMtbMarchioSslinea(List<MtbMarchioSslinea> mtbMarchioSslinea) {
|
||||
this.mtbMarchioSslinea = mtbMarchioSslinea;
|
||||
return this;
|
||||
}
|
||||
|
||||
protected void deleteChilds() throws Exception {
|
||||
MtbMarchioSslinea mtbMarchioSslinea = new MtbMarchioSslinea();
|
||||
mtbMarchioSslinea.deleteAllEntities(connection, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsKey(MtbMarchioSlinea other) {
|
||||
if (this == other)
|
||||
return true;
|
||||
|
||||
if(hashCodeKey() != other.hashCodeKey())
|
||||
return false;
|
||||
|
||||
return Objects.equals(getCodLinea(), other.getCodLinea()) && Objects.equals(getCodSlinea(), other.getCodSlinea());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCodeKey() {
|
||||
return Objects.hash(getCodLinea(), getCodSlinea());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof MtbMarchioSlinea)) return false;
|
||||
MtbMarchioSlinea mtbMarchioSlinea = (MtbMarchioSlinea) o;
|
||||
return Objects.equals(getCodLinea(), mtbMarchioSlinea.getCodLinea()) && Objects.equals(getCodSlinea(), mtbMarchioSlinea.getCodSlinea()) && Objects.equals(getDescrizione(), mtbMarchioSlinea.getDescrizione());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getCodLinea(), getCodSlinea(), getDescrizione());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,14 +6,17 @@ import it.integry.ems_model.annotation.PK;
|
||||
import it.integry.ems_model.annotation.SqlField;
|
||||
import it.integry.ems_model.annotation.Table;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@PropertyReactive()
|
||||
@Table(value = MtbMarchioSslinea.ENTITY)
|
||||
@JsonTypeName(value = MtbMarchioSslinea.ENTITY)
|
||||
public class MtbMarchioSslinea extends EntityBase {
|
||||
public class MtbMarchioSslinea extends EntityBase implements EquatableEntityInterface<MtbMarchioSslinea> {
|
||||
|
||||
public final static String ENTITY = "mtb_marchio_sslinea";
|
||||
|
||||
@@ -62,4 +65,33 @@ public class MtbMarchioSslinea extends EntityBase {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsKey(MtbMarchioSslinea other) {
|
||||
if (this == other)
|
||||
return true;
|
||||
|
||||
if(hashCodeKey() != other.hashCodeKey())
|
||||
return false;
|
||||
|
||||
return Objects.equals(getCodSlinea(), other.getCodSlinea()) && Objects.equals(getCodSslinea(), other.getCodSslinea());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCodeKey() {
|
||||
return Objects.hash(getCodSlinea(), getCodSslinea());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof MtbMarchioSslinea)) return false;
|
||||
MtbMarchioSslinea mtbMarchioSslinea = (MtbMarchioSslinea) o;
|
||||
return Objects.equals(getCodSlinea(), mtbMarchioSslinea.getCodSlinea()) && Objects.equals(getCodSslinea(), mtbMarchioSslinea.getCodSslinea()) && Objects.equals(getDescrizione(), mtbMarchioSslinea.getDescrizione());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getCodSlinea(), getCodSslinea(), getDescrizione());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user