@Test public void testCriteriaInTest() throws Exception { Object test = HQLUtils.criteriaInTest(null); assertTrue(test instanceof TypedParameterValue); assertTrue(((TypedParameterValue) test).getType() instanceof IntegerType); assertEquals(Integer.valueOf(0), ((TypedParameterValue) test).getValue()); test = HQLUtils.criteriaInTest(Collections.emptyList()); assertTrue(test instanceof TypedParameterValue); assertTrue(((TypedParameterValue) test).getType() instanceof IntegerType); assertEquals(Integer.valueOf(0), ((TypedParameterValue) test).getValue()); test = HQLUtils.criteriaInTest(Collections.singletonList("aBc")); assertTrue(test instanceof TypedParameterValue); assertTrue(((TypedParameterValue) test).getType() instanceof IntegerType); assertEquals(Integer.valueOf(1), ((TypedParameterValue) test).getValue()); }
public static Collection criteriaIn(final Collection value) { if (CollectionUtils.isEmpty(value)) { return Collections.singletonList("x"); } return value; }
HQLUtils { public static Collection criteriaIn(final Collection value) { if (CollectionUtils.isEmpty(value)) { return Collections.singletonList("x"); } return value; } }
HQLUtils { public static Collection criteriaIn(final Collection value) { if (CollectionUtils.isEmpty(value)) { return Collections.singletonList("x"); } return value; } private  HQLUtils(); }
HQLUtils { public static Collection criteriaIn(final Collection value) { if (CollectionUtils.isEmpty(value)) { return Collections.singletonList("x"); } return value; } private  HQLUtils(); static String criteriaIlikeAnywhere(final String value); static String criteriaLikeAnywhere(final String value); static String criteriaIeq(final String value); static String criteriaEq(final String value); static Object criteriaInTest(final Collection value); static Collection criteriaIn(final Collection value); static void appendBlacklistCriteria(final StringBuilder toAppendTo,
                                               final List<Object> params,
                                               final String selector,
                                               final List<Pair<String, List>> blacklist); static void appendFilterCriteria(final StringBuilder toAppendTo,
                                            final List<Object> params,
                                            final String selector,
                                            final Map<String, List> filter); }
HQLUtils { public static Collection criteriaIn(final Collection value) { if (CollectionUtils.isEmpty(value)) { return Collections.singletonList("x"); } return value; } private  HQLUtils(); static String criteriaIlikeAnywhere(final String value); static String criteriaLikeAnywhere(final String value); static String criteriaIeq(final String value); static String criteriaEq(final String value); static Object criteriaInTest(final Collection value); static Collection criteriaIn(final Collection value); static void appendBlacklistCriteria(final StringBuilder toAppendTo,
                                               final List<Object> params,
                                               final String selector,
                                               final List<Pair<String, List>> blacklist); static void appendFilterCriteria(final StringBuilder toAppendTo,
                                            final List<Object> params,
                                            final String selector,
                                            final Map<String, List> filter);  }