public class QueryUtil extends Object
Constructor and Description |
---|
QueryUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
assertValidColumnName(String name) |
static String |
buildConditionsQuery(Class<?> entityClass,
MatchingCondition[] conditions,
Map<String,Class<?>> fields,
Map<String,Object> parameters) |
static <T> String |
buildConditionsQueryWithSearchSupports(MatchingCondition[] conditions,
String elementAlias,
Map<String,SearchSupport<T>> conditionBuilders,
SearchSupport<T> defaultConditionBuilder,
Map<String,Object> parameters) |
static <T extends AttributedElement<?>,U> |
buildJoinSearchQuery(org.hibernate.Session session,
Class<T> clazz,
Class<U> joinedClass,
String joinColumn,
String joinedClassJoinColumn,
Map<String,Class<?>> fields,
MatchingCondition[] conditions,
Order[] orders) |
static String |
buildOrderByQuery(Class<?> entityClass,
Order[] orders) |
static String |
buildOrderByQuery(Class<?> entityClass,
String defaultTableAlias,
Order[] orders) |
static String |
buildOrderByQuery(Set<String> capitalIgnoreFields,
Order[] orders) |
static String |
buildOrderByQuerySub(Class<?> entityClass,
String defaultTableAlias,
Order[] orders) |
static <T> org.hibernate.Query |
buildRowCountQuery(org.hibernate.Session session,
Class<T> clazz,
Map<String,Class<?>> fields,
MatchingCondition[] conditions) |
static <T> org.hibernate.Query |
buildRowCountQueryWithSearchSupports(org.hibernate.Session session,
Class<?> clazz,
Map<String,SearchSupport<T>> searchSupports,
SearchSupport<T> defaultSearchSupport,
String serviceGridId,
boolean acrossGrids,
MatchingCondition[] conditions,
String... additionalConditions) |
static <T extends AttributedElement<?>> |
buildSearchQuery(org.hibernate.Session session,
Class<T> clazz,
Map<String,Class<?>> fields,
MatchingCondition[] conditions,
Order[] orders) |
static <T> org.hibernate.Query |
buildSearchQueryWithSearchSupports(org.hibernate.Session session,
Class<T> clazz,
Map<String,SearchSupport<T>> searchSupports,
SearchSupport<T> defaultSearchSupport,
MatchingCondition[] conditions,
Order[] orders,
String... additionalConditions) |
static org.hibernate.Query |
buildSearchQueryWithSearchSupports(org.hibernate.Session session,
Map<String,SearchSupport<Service>> searchSupports,
SearchSupport<Service> defaultSearchSupport,
String serviceGridId,
boolean acrossGrids,
MatchingCondition[] conditions,
Order[] orders,
String... additionalConditions) |
static <T> org.hibernate.Query |
buildServiceRankingSearchQueryWithSearchSupports(org.hibernate.Session session,
Map<String,SearchSupport<T>> searchSupports,
SearchSupport<T> defaultSearchSupport,
String serviceGridId,
String nodeId,
boolean acrossGrids,
MatchingCondition[] conditions,
Order[] orders,
int sinceDays,
String... additionalConditions) |
public static <T extends AttributedElement<?>,U> org.hibernate.Query buildJoinSearchQuery(org.hibernate.Session session, Class<T> clazz, Class<U> joinedClass, String joinColumn, String joinedClassJoinColumn, Map<String,Class<?>> fields, MatchingCondition[] conditions, Order[] orders)
public static <T extends AttributedElement<?>> org.hibernate.Query buildSearchQuery(org.hibernate.Session session, Class<T> clazz, Map<String,Class<?>> fields, MatchingCondition[] conditions, Order[] orders)
public static <T> org.hibernate.Query buildSearchQueryWithSearchSupports(org.hibernate.Session session, Class<T> clazz, Map<String,SearchSupport<T>> searchSupports, SearchSupport<T> defaultSearchSupport, MatchingCondition[] conditions, Order[] orders, String... additionalConditions)
public static org.hibernate.Query buildSearchQueryWithSearchSupports(org.hibernate.Session session, Map<String,SearchSupport<Service>> searchSupports, SearchSupport<Service> defaultSearchSupport, String serviceGridId, boolean acrossGrids, MatchingCondition[] conditions, Order[] orders, String... additionalConditions)
public static <T> org.hibernate.Query buildServiceRankingSearchQueryWithSearchSupports(org.hibernate.Session session, Map<String,SearchSupport<T>> searchSupports, SearchSupport<T> defaultSearchSupport, String serviceGridId, String nodeId, boolean acrossGrids, MatchingCondition[] conditions, Order[] orders, int sinceDays, String... additionalConditions)
public static <T> org.hibernate.Query buildRowCountQuery(org.hibernate.Session session, Class<T> clazz, Map<String,Class<?>> fields, MatchingCondition[] conditions)
public static <T> org.hibernate.Query buildRowCountQueryWithSearchSupports(org.hibernate.Session session, Class<?> clazz, Map<String,SearchSupport<T>> searchSupports, SearchSupport<T> defaultSearchSupport, String serviceGridId, boolean acrossGrids, MatchingCondition[] conditions, String... additionalConditions)
public static void assertValidColumnName(String name) throws IllegalArgumentException
IllegalArgumentException
public static String buildOrderByQuery(Class<?> entityClass, String defaultTableAlias, Order[] orders)
public static String buildOrderByQuerySub(Class<?> entityClass, String defaultTableAlias, Order[] orders)
public static String buildOrderByQuery(Set<String> capitalIgnoreFields, Order[] orders)
public static String buildConditionsQuery(Class<?> entityClass, MatchingCondition[] conditions, Map<String,Class<?>> fields, Map<String,Object> parameters)
public static <T> String buildConditionsQueryWithSearchSupports(MatchingCondition[] conditions, String elementAlias, Map<String,SearchSupport<T>> conditionBuilders, SearchSupport<T> defaultConditionBuilder, Map<String,Object> parameters)