#405 - ENH: Add @ReadAudit and associated functionality for auditing reads including queries and L2 cache access

This commit is contained in:
Robin Bygrave committed 2015-09-03 13:54:52 +12:00
1 parent c292da736b
commit 54172aec6c
54 files changed
+2020 -200

No files matched your search

@@ -120,6 +120,8 @@ public class DeployBeanDescriptor<T> {
private boolean historySupport;
private boolean readAuditing;
private TableName baseTableFull;
private String[] properties;
@@ -185,6 +187,20 @@ public class DeployBeanDescriptor<T> {
return historySupport;
}
/**
* Set read auditing on for this entity bean.
*/
public void setReadAuditing() {
readAuditing = true;
}
/**
* Return true if read auditing is on for this entity bean.
*/
public boolean isReadAuditing() {
return readAuditing;
}
public boolean isScalaObject() {
Class<?>[] interfaces = beanType.getInterfaces();
for (int i = 0; i < interfaces.length; i++) {
@@ -741,7 +757,7 @@ public class DeployBeanDescriptor<T> {
}
DeployBeanProperty p = ids.get(0);
if (p instanceof DeployBeanPropertyAssocOne<?>) {
return ((DeployBeanPropertyAssocOne<?>)p).isCompound();
return ((DeployBeanPropertyAssocOne<?>) p).isCompound();
} else {
return !p.isDbNumberType();
}
@@ -859,17 +875,17 @@ public class DeployBeanDescriptor<T> {
}
/**
* Check valid mapping annotations on the class hierarchy.
* Check valid mapping annotations on the class hierarchy.
*/
private void checkInheritance(Class<?> beanType) {
Class<?> parent = beanType.getSuperclass();
if (parent == null || Object.class.equals(parent)) {
// all good
return;
}
if (parent.isAnnotationPresent(Entity.class)) {
String msg = "Checking "+getBeanType()+" and found "+parent+" that has @Entity annotation rather than MappedSuperclass?";
String msg = "Checking " + getBeanType() + " and found " + parent + " that has @Entity annotation rather than MappedSuperclass?";
throw new IllegalStateException(msg);
}
if (parent.isAnnotationPresent(MappedSuperclass.class)) {