From 548d9d17a10ef343ed12012b9eafe143c622c088 Mon Sep 17 00:00:00 2001 From: GiuseppeS Date: Mon, 11 Mar 2024 19:13:41 +0100 Subject: [PATCH] Rimossi campi da non serializzare nel json --- .../it/integry/ems_model/base/EntityBase.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ems-core/src/main/java/it/integry/ems_model/base/EntityBase.java b/ems-core/src/main/java/it/integry/ems_model/base/EntityBase.java index d90a52edc8..143ccc9909 100644 --- a/ems-core/src/main/java/it/integry/ems_model/base/EntityBase.java +++ b/ems-core/src/main/java/it/integry/ems_model/base/EntityBase.java @@ -280,12 +280,14 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter return this.type; } + @JsonIgnore public String getTableName() { Table t = getClass().getAnnotation(Table.class); if (t != null) return t.value(); else return ""; } + @JsonIgnore public Boolean getLoadedFromDb() { return this.loadedFromDb; } @@ -303,6 +305,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter this.username = username; } + @JsonIgnore public String getApplicationName() { return applicationName; } @@ -321,6 +324,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter this.dbName = dbName; } + @JsonIgnore public EntityPropertyHolder getEntityHolder() { return entityHolder == null ? ContextLoader.getCurrentWebApplicationContext().getBean(EntityPropertyHolder.class) : entityHolder; } @@ -329,6 +333,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter this.entityHolder = entityHolder; } + @JsonIgnore public DroolsDataCompleting getCompletingManager() { return dataCompleting == null ? ContextLoader.getCurrentWebApplicationContext().getBean(DroolsDataCompleting.class) : dataCompleting; } @@ -337,6 +342,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter this.dataCompleting = dataCompleting; } + @JsonIgnore public Boolean getOnlyPkMaster() { return onlyPkMaster; } @@ -353,6 +359,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter this.nativeSql = nativeSql; } + @JsonIgnore public HashMap getOldPk() { return oldPk; } @@ -362,6 +369,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter return this; } + @JsonIgnore public Boolean getExecuteRecalc() { return executeRecalc; } @@ -370,6 +378,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter this.executeRecalc = executeRecalc; } + @JsonIgnore public String getWhereCond() { return whereCond; } @@ -378,6 +387,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter this.whereCond = whereCond; } + @JsonIgnore public List getExcludedColumns() { return excludedColumns; } @@ -388,6 +398,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter } } + @JsonIgnore public List getRecalcColumns() { return recalcColumns; } @@ -1086,6 +1097,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter } + @JsonIgnore public List getChkConstraintSql() { List listConstraintDTO = new ArrayList(); List fields = getEntityHolder().getFields(this.getClass()); @@ -1649,6 +1661,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter deleteAllEntities(conn, whereCondDel); } + @JsonIgnore private String getWhereCondDelete() throws Exception { Field[] fields = this.getClass().getDeclaredFields(); List where = getPkWhereCond(fields, this); @@ -1675,6 +1688,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter this.delete(); } + @JsonIgnore public String getPkWhereCond() throws IllegalAccessException { Field[] fields = this.getClass().getDeclaredFields(); List where = getPkWhereCond(fields, this); @@ -1777,6 +1791,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter } } + @JsonIgnore private String getWhereCondOldPk() throws IllegalAccessException, IOException, FieldMissingException { Field[] fields = this.getClass().getDeclaredFields(); List where = getPkWhereCond(fields, this); @@ -2047,6 +2062,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter return builder.toString(); } + @JsonIgnore public Long getTransactionGroupId() { return transactionGroupId; }