Use @NotAudited instead of //@Audited(targetAuditMode = NOT_AUDITED).

This commit is contained in:
Luke deGruchy 2023-02-28 15:38:48 -05:00
parent 3464e88be7
commit c0d6e6d3cb
15 changed files with 19 additions and 14 deletions

View File

@ -28,6 +28,7 @@ import ca.uhn.fhir.mdm.api.MdmLinkSourceEnum;
import ca.uhn.fhir.mdm.api.MdmMatchResultEnum;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.envers.Audited;
import org.hibernate.envers.NotAudited;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -73,6 +74,7 @@ public class MdmLink extends BasePartitionable implements IMdmLink<JpaPid> {
@ManyToOne(optional = false, fetch = FetchType.LAZY, cascade = {})
@JoinColumn(name = "GOLDEN_RESOURCE_PID", referencedColumnName = "RES_ID", foreignKey = @ForeignKey(name = "FK_EMPI_LINK_GOLDEN_RESOURCE"), insertable=false, updatable=false, nullable=false)
@NotAudited
private ResourceTable myGoldenResource;
@Column(name = "GOLDEN_RESOURCE_PID", nullable=false)
@ -81,6 +83,7 @@ public class MdmLink extends BasePartitionable implements IMdmLink<JpaPid> {
@Deprecated
@ManyToOne(optional = false, fetch = FetchType.LAZY, cascade = {})
@JoinColumn(name = "PERSON_PID", referencedColumnName = "RES_ID", foreignKey = @ForeignKey(name = "FK_EMPI_LINK_PERSON"), insertable=false, updatable=false, nullable=false)
@NotAudited
private ResourceTable myPerson;
@Deprecated
@ -89,6 +92,7 @@ public class MdmLink extends BasePartitionable implements IMdmLink<JpaPid> {
@ManyToOne(optional = false, fetch = FetchType.LAZY, cascade = {})
@JoinColumn(name = "TARGET_PID", referencedColumnName = "RES_ID", foreignKey = @ForeignKey(name = "FK_EMPI_LINK_TARGET"), insertable=false, updatable=false, nullable=false)
@NotAudited
private ResourceTable mySource;
@Column(name = "TARGET_PID", updatable=false, nullable=false)

View File

@ -38,7 +38,7 @@ import static org.hibernate.envers.RelationTargetAuditMode.NOT_AUDITED;
@Index(name = ResourceIndexedComboStringUnique.IDX_IDXCMPSTRUNIQ_STRING, columnList = "IDX_STRING", unique = true),
@Index(name = ResourceIndexedComboStringUnique.IDX_IDXCMPSTRUNIQ_RESOURCE, columnList = "RES_ID", unique = false)
})
@Audited(targetAuditMode = NOT_AUDITED)
//@Audited(targetAuditMode = NOT_AUDITED)
public class ResourceIndexedComboStringUnique extends BasePartitionable implements Comparable<ResourceIndexedComboStringUnique>, IResourceIndexComboSearchParameter {
public static final int MAX_STRING_LENGTH = 500;

View File

@ -51,7 +51,7 @@ import static org.hibernate.envers.RelationTargetAuditMode.NOT_AUDITED;
@Index(name = "IDX_IDXCMBTOKNU_STR", columnList = "IDX_STRING", unique = false),
@Index(name = "IDX_IDXCMBTOKNU_RES", columnList = "RES_ID", unique = false)
})
@Audited(targetAuditMode = NOT_AUDITED)
//@Audited(targetAuditMode = NOT_AUDITED)
public class ResourceIndexedComboTokenNonUnique extends BaseResourceIndex implements Comparable<ResourceIndexedComboTokenNonUnique>, IResourceIndexComboSearchParameter {
@SequenceGenerator(name = "SEQ_IDXCMBTOKNU_ID", sequenceName = "SEQ_IDXCMBTOKNU_ID")

View File

@ -51,7 +51,7 @@ import static org.hibernate.envers.RelationTargetAuditMode.NOT_AUDITED;
@Index(name = "IDX_SP_COORDS_UPDATED", columnList = "SP_UPDATED"),
@Index(name = "IDX_SP_COORDS_RESID", columnList = "RES_ID")
})
@Audited(targetAuditMode = NOT_AUDITED)
//@Audited(targetAuditMode = NOT_AUDITED)
public class ResourceIndexedSearchParamCoords extends BaseResourceIndexedSearchParam {
public static final int MAX_LENGTH = 100;

View File

@ -70,7 +70,7 @@ import static org.hibernate.envers.RelationTargetAuditMode.NOT_AUDITED;
@Index(name = "IDX_SP_DATE_ORD_HASH_HIGH_V2", columnList = "HASH_IDENTITY,SP_VALUE_HIGH_DATE_ORDINAL,RES_ID,PARTITION_ID"),
@Index(name = "IDX_SP_DATE_RESID_V2", columnList = "RES_ID,HASH_IDENTITY,SP_VALUE_LOW,SP_VALUE_HIGH,SP_VALUE_LOW_DATE_ORDINAL,SP_VALUE_HIGH_DATE_ORDINAL,PARTITION_ID"),
})
@Audited(targetAuditMode = NOT_AUDITED)
//@Audited(targetAuditMode = NOT_AUDITED)
public class ResourceIndexedSearchParamDate extends BaseResourceIndexedSearchParam {
private static final long serialVersionUID = 1L;

View File

@ -55,7 +55,7 @@ import static org.hibernate.envers.RelationTargetAuditMode.NOT_AUDITED;
@Index(name = "IDX_SP_NUMBER_HASH_VAL_V2", columnList = "HASH_IDENTITY,SP_VALUE,RES_ID,PARTITION_ID"),
@Index(name = "IDX_SP_NUMBER_RESID_V2", columnList = "RES_ID, HASH_IDENTITY, SP_VALUE, PARTITION_ID")
})
@Audited(targetAuditMode = NOT_AUDITED)
//@Audited(targetAuditMode = NOT_AUDITED)
public class ResourceIndexedSearchParamNumber extends BaseResourceIndexedSearchParam {
private static final long serialVersionUID = 1L;

View File

@ -59,7 +59,7 @@ import static org.hibernate.envers.RelationTargetAuditMode.NOT_AUDITED;
@Index(name = "IDX_SP_QUANTITY_HASH_SYSUN_V2", columnList = "HASH_IDENTITY_SYS_UNITS,SP_VALUE,RES_ID,PARTITION_ID"),
@Index(name = "IDX_SP_QUANTITY_RESID_V2", columnList = "RES_ID,HASH_IDENTITY,HASH_IDENTITY_SYS_UNITS,HASH_IDENTITY_AND_UNITS,SP_VALUE,PARTITION_ID")
})
@Audited(targetAuditMode = NOT_AUDITED)
//@Audited(targetAuditMode = NOT_AUDITED)
public class ResourceIndexedSearchParamQuantity extends BaseResourceIndexedSearchParamQuantity {
private static final long serialVersionUID = 1L;

View File

@ -65,7 +65,7 @@ import static org.hibernate.envers.RelationTargetAuditMode.NOT_AUDITED;
* @since 5.3.0
*
*/
@Audited(targetAuditMode = NOT_AUDITED)
//@Audited(targetAuditMode = NOT_AUDITED)
public class ResourceIndexedSearchParamQuantityNormalized extends BaseResourceIndexedSearchParamQuantity {
private static final long serialVersionUID = 1L;

View File

@ -66,7 +66,7 @@ import static org.hibernate.envers.RelationTargetAuditMode.NOT_AUDITED;
@Index(name = "IDX_SP_STRING_RESID", columnList = "RES_ID")
})
@Audited(targetAuditMode = NOT_AUDITED)
//@Audited(targetAuditMode = NOT_AUDITED)
public class ResourceIndexedSearchParamString extends BaseResourceIndexedSearchParam {
/*

View File

@ -68,7 +68,7 @@ import static org.hibernate.envers.RelationTargetAuditMode.NOT_AUDITED;
@Index(name = "IDX_SP_TOKEN_RESID_V2", columnList = "RES_ID,HASH_SYS_AND_VALUE,HASH_VALUE,HASH_SYS,HASH_IDENTITY,PARTITION_ID")
})
@Audited(targetAuditMode = NOT_AUDITED)
//@Audited(targetAuditMode = NOT_AUDITED)
public class ResourceIndexedSearchParamToken extends BaseResourceIndexedSearchParam {
public static final int MAX_LENGTH = 200;

View File

@ -58,7 +58,7 @@ import static org.hibernate.envers.RelationTargetAuditMode.NOT_AUDITED;
@Index(name = "IDX_SP_URI_UPDATED", columnList = "SP_UPDATED"),
@Index(name = "IDX_SP_URI_COORDS", columnList = "RES_ID")
})
@Audited(targetAuditMode = NOT_AUDITED)
//@Audited(targetAuditMode = NOT_AUDITED)
public class ResourceIndexedSearchParamUri extends BaseResourceIndexedSearchParam {
/*

View File

@ -53,7 +53,7 @@ import static org.hibernate.envers.RelationTargetAuditMode.NOT_AUDITED;
@Index(name = "IDX_RL_SRC", columnList = "SRC_RESOURCE_ID"),
@Index(name = "IDX_RL_DEST", columnList = "TARGET_RESOURCE_ID")
})
@Audited(targetAuditMode = NOT_AUDITED)
//@Audited(targetAuditMode = NOT_AUDITED)
public class ResourceLink extends BaseResourceIndex {
public static final int SRC_PATH_LENGTH = 500;

View File

@ -38,6 +38,7 @@ import org.hibernate.annotations.GenerationTime;
import org.hibernate.annotations.GeneratorType;
import org.hibernate.annotations.OptimisticLock;
import org.hibernate.envers.Audited;
import org.hibernate.envers.NotAudited;
import org.hibernate.search.engine.backend.types.Projectable;
import org.hibernate.search.engine.backend.types.Searchable;
import org.hibernate.search.mapper.pojo.bridge.mapping.annotation.PropertyBinderRef;
@ -87,7 +88,7 @@ import static org.hibernate.envers.RelationTargetAuditMode.NOT_AUDITED;
@Index(name = "IDX_RES_TYPE_DEL_UPDATED", columnList = "RES_TYPE,RES_DELETED_AT,RES_UPDATED,PARTITION_ID,RES_ID"),
})
@NamedEntityGraph(name = "Resource.noJoins")
@Audited(targetAuditMode = NOT_AUDITED)
//@Audited(targetAuditMode = NOT_AUDITED)
public class ResourceTable extends BaseHasResource implements Serializable, IBasePersistedResource<JpaPid> {
public static final int RESTYPE_LEN = 40;
private static final int MAX_LANGUAGE_LENGTH = 20;

View File

@ -51,7 +51,7 @@ import static org.hibernate.envers.RelationTargetAuditMode.NOT_AUDITED;
},
uniqueConstraints = { @UniqueConstraint(name = "IDX_RESTAG_TAGID", columnNames = {"RES_ID", "TAG_ID"})
})
@Audited(targetAuditMode = NOT_AUDITED)
//@Audited(targetAuditMode = NOT_AUDITED)
public class ResourceTag extends BaseTag {
private static final long serialVersionUID = 1L;

View File

@ -37,7 +37,7 @@ import static org.hibernate.envers.RelationTargetAuditMode.NOT_AUDITED;
@Index(name = "IDX_RESPARMPRESENT_RESID", columnList = "RES_ID"),
@Index(name = "IDX_RESPARMPRESENT_HASHPRES", columnList = "HASH_PRESENCE")
})
@Audited(targetAuditMode = NOT_AUDITED)
//@Audited(targetAuditMode = NOT_AUDITED)
public class SearchParamPresentEntity extends BasePartitionable implements Serializable {
private static final long serialVersionUID = 1L;