Package org.damap.base.rest.gdpr.service
Class GdprQueryUtil
java.lang.Object
org.damap.base.rest.gdpr.service.GdprQueryUtil
GdprQueryUtil class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildQueryObject(Class<?> gdprClass) Extracts all GDPR relevant information from the given class and stores them in aGdprQueryobject (which will later be used to build the HQL query).getContextJoinQuery(Field field, List<String> properties) getContextJoinQuery.
-
Constructor Details
-
GdprQueryUtil
public GdprQueryUtil()
-
-
Method Details
-
buildQueryObject
public GdprQuery buildQueryObject(Class<?> gdprClass) throws MissingGdprKeyException, NoSuchContextPropertyException Extracts all GDPR relevant information from the given class and stores them in aGdprQueryobject (which will later be used to build the HQL query).- Parameters:
gdprClass- class to extract information from.- Returns:
GdprQueryobject containing all information necessary to build HQL query.- Throws:
MissingGdprKeyException- if the given class is missing aGdprKeyannotation.NoSuchContextPropertyException- if a property, tried to be accessed viaGdprContext, does not exist.
-
getContextJoinQuery
public GdprQuery getContextJoinQuery(Field field, List<String> properties) throws NoSuchContextPropertyException getContextJoinQuery.- Parameters:
field- aFieldobjectproperties- aListobject- Returns:
- a
GdprQueryobject - Throws:
NoSuchContextPropertyException- if any.
-