public class EntityLogOptions
extends java.lang.Object
NotLoggable
so that the logging
implementation quickly can check if changes to a given property should
be ignored or not.Modifier and Type | Field and Description |
---|---|
private java.util.Set<java.lang.String> |
notLoggableProperties |
private static java.util.Map<java.lang.Class<?>,EntityLogOptions> |
options |
private java.util.Set<java.lang.String> |
propertyPathProtectedProperties |
private int |
size |
Modifier | Constructor and Description |
---|---|
private |
EntityLogOptions(java.lang.Class entityClass) |
Modifier and Type | Method and Description |
---|---|
private static EntityLogOptions |
create(java.lang.Class<?> entityClass) |
static EntityLogOptions |
getEntityLogOptions(java.lang.Object entity)
Get the logging options for the given entity.
|
static EntityLogOptions |
getEntityLogOptionsForClass(java.lang.Class<?> entityClass)
Get the logging options for the given class of entities.
|
private java.lang.String |
getPropertyName(java.lang.String methodName)
Convert a method name into a property name.
|
boolean |
isNotLoggable(java.lang.String propertyName)
Check if the method corresponding to the given property name
has been annotated with the
NotLoggable annotation or
not. |
boolean |
isPropertyPathProtected(java.lang.String propertyName)
Check if the method corresponding to the given property name
has been annotated with the
PropertyPathProtected annotation or
not. |
private void |
merge(EntityLogOptions other)
Merge log options from the other object into this
object.
|
private static final java.util.Map<java.lang.Class<?>,EntityLogOptions> options
private final java.util.Set<java.lang.String> notLoggableProperties
private final java.util.Set<java.lang.String> propertyPathProtectedProperties
private final int size
public static EntityLogOptions getEntityLogOptions(java.lang.Object entity)
public static EntityLogOptions getEntityLogOptionsForClass(java.lang.Class<?> entityClass)
private static EntityLogOptions create(java.lang.Class<?> entityClass)
private void merge(EntityLogOptions other)
private java.lang.String getPropertyName(java.lang.String methodName)
public boolean isNotLoggable(java.lang.String propertyName)
NotLoggable
annotation or
not.propertyName
- The name of the property, not including 'get', 'set' or 'is' prefixNotLoggable
annotation is present, FALSE otherwisepublic boolean isPropertyPathProtected(java.lang.String propertyName)
PropertyPathProtected
annotation or
not.propertyName
- The name of the property, not including 'get', 'set' or 'is' prefixPropertyPathProtected
annotation is present, FALSE otherwise