@Audited public class DetailSubclass2 extends DetailSubclass { private String str3; public DetailSubclass2() { } public String getStr3() { return str3; } public void setStr3(String str3) { this.str3 = str3; } }
protected boolean checkUsingModifiedFlag(Audited aud) { // HHH-10468 if ( globalCfg.hasSettingForUsingModifiedFlag() ) { // HHH-10468 // Modify behavior so that if the global setting has been set by user properties, then // the audit behavior should be a disjunction between the global setting and the field // annotation. This allows the annotation to take precedence when the global value is // false and for the global setting to take precedence when true. return globalCfg.isGlobalWithModifiedFlag() || aud.withModifiedFlag(); } // no global setting enabled, use the annotation's value only. return aud.withModifiedFlag(); }
@Override protected boolean checkAudited( XProperty property, PropertyAuditingData propertyData, String propertyName, Audited allClassAudited, String modifiedFlagSuffix) { // Checking if this property is explicitly audited or if all properties are. final Audited aud = property.getAnnotation( Audited.class ); if ( aud != null ) { propertyData.setStore( aud.modStore() ); propertyData.setRelationTargetAuditMode( aud.targetAuditMode() ); propertyData.setUsingModifiedFlag( checkUsingModifiedFlag( aud ) ); if( aud.modifiedColumnName() != null && !"".equals( aud.modifiedColumnName() ) ) { propertyData.setModifiedFlagName( aud.modifiedColumnName() ); } else { propertyData.setModifiedFlagName( MetadataTools.getModifiedFlagPropertyName( propertyName, modifiedFlagSuffix ) ); } } else { propertyData.setStore( ModificationStore.FULL ); } return true; }
propertyData.setRelationTargetAuditMode( aud.targetAuditMode() ); propertyData.setRelationTargetNotFoundAction( getRelationNotFoundAction( property, allClassAudited ) ); propertyData.setUsingModifiedFlag( checkUsingModifiedFlag( aud ) ); if( aud.modifiedColumnName() != null && !"".equals( aud.modifiedColumnName() ) ) { propertyData.setModifiedFlagName( aud.modifiedColumnName() );
propertyData.setStore( aud.modStore() ); propertyData.setRelationTargetAuditMode( aud.targetAuditMode() ); propertyData.setUsingModifiedFlag( checkUsingModifiedFlag( aud ) ); if( aud.modifiedColumnName() != null && !"".equals( aud.modifiedColumnName() ) ) { propertyData.setModifiedFlagName( aud.modifiedColumnName() );
propertyData.setRelationTargetAuditMode( aud.targetAuditMode() ); propertyData.setUsingModifiedFlag( checkUsingModifiedFlag( aud ) ); if ( aud.modifiedColumnName() != null && !"".equals( aud.modifiedColumnName() ) ) { propertyData.setModifiedFlagName( aud.modifiedColumnName() );
@Audited public class DetailSubclass extends DetailSuperclass { private String str2; public DetailSubclass() { } public String getStr2() { return str2; } public void setStr2(String str2) { this.str2 = str2; } }
protected boolean checkUsingModifiedFlag(Audited aud) { // HHH-10468 if ( options.hasGlobalWithModifiedFlag() ) { // HHH-10468 // Modify behavior so that if the global setting has been set by user properties, then // the audit behavior should be a disjunction between the global setting and the field // annotation. This allows the annotation to take precedence when the global value is // false and for the global setting to take precedence when true. return options.isGlobalWithModifiedFlagEnabled() || aud.withModifiedFlag(); } // no global setting enabled, use the annotation's value only. return aud.withModifiedFlag(); }
@Audited public class DetailSubclass2 extends DetailSubclass { private String str3; public DetailSubclass2() { } public String getStr3() { return str3; } public void setStr3(String str3) { this.str3 = str3; } }
@Audited public class DetailSubclass extends DetailSuperclass { private String str2; public DetailSubclass() { } public String getStr2() { return str2; } public void setStr2(String str2) { this.str2 = str2; } }
/** * @author Hern�n Chanfreau */ @Audited public interface SimpleInterface { long getId(); void setId(long id); String getData(); void setData(String data); }
@Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED) public List<Person> getOwners() { return owners; }
@Audited public String getData() { return data; }
@Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED) public Person getOwner() { return owner; }
@Audited public String getData() { return data; }
@Audited public int getNumber() { return number; }
@Audited public int getNumber() { return number; }
@Audited int getNumerito();
@Audited String getData();
@Audited int getNumerito();