public class EntityLogOptions extends 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 Set<String> |
notLoggableProperties |
private static Map<Class<?>,EntityLogOptions> |
options |
private Set<String> |
propertyPathProtectedProperties |
private int |
size |
Modifier | Constructor and Description |
---|---|
private |
EntityLogOptions(Class<?> entityClass) |
Modifier and Type | Method and Description |
---|---|
private static EntityLogOptions |
create(Class<?> entityClass) |
static EntityLogOptions |
getEntityLogOptions(Object entity)
Get the logging options for the given entity.
|
static EntityLogOptions |
getEntityLogOptionsForClass(Class<?> entityClass)
Get the logging options for the given class of entities.
|
private String |
getPropertyName(String methodName)
Convert a method name into a property name.
|
boolean |
isNotLoggable(String propertyName)
Check if the method corresponding to the given property name
has been annotated with the
NotLoggable annotation or
not. |
boolean |
isPropertyPathProtected(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 Map<Class<?>,EntityLogOptions> options
private final int size
private EntityLogOptions(Class<?> entityClass)
public static EntityLogOptions getEntityLogOptions(Object entity)
public static EntityLogOptions getEntityLogOptionsForClass(Class<?> entityClass)
private static EntityLogOptions create(Class<?> entityClass)
private void merge(EntityLogOptions other)
private String getPropertyName(String methodName)
public boolean isNotLoggable(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(String propertyName)
PropertyPathProtected
annotation or
not.propertyName
- The name of the property, not including 'get', 'set' or 'is' prefixPropertyPathProtected
annotation is present, FALSE otherwise