Class SimpleEntityPathResolver
java.lang.Object
org.springframework.data.querydsl.SimpleEntityPathResolver
- All Implemented Interfaces:
EntityPathResolver
Simple implementation of
EntityPathResolver
to lookup a query class by reflection and using the static field
of the same type.- Author:
- Oliver Gierke, Jens Schauder
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSimpleEntityPathResolver
(String querySuffix) Creates a newSimpleEntityPathResolver
with the given query package suffix. -
Method Summary
Modifier and TypeMethodDescription<T> com.querydsl.core.types.EntityPath<T>
createPath
(Class<T> domainClass) Creates anEntityPath
instance for the given domain class.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
SimpleEntityPathResolver
Creates a newSimpleEntityPathResolver
with the given query package suffix.- Parameters:
querySuffix
- must not be null.
-
-
Method Details
-
createPath
Creates anEntityPath
instance for the given domain class. Tries to lookup a class matching the naming convention (prepend Q to the simple name of the class, same package) and find a static field of the same type in it.- Specified by:
createPath
in interfaceEntityPathResolver
- Parameters:
domainClass
-- Returns:
-