@Test public void testKualiInteger() { KualiInteger kualiInteger = new KualiInteger(33) ; CriteriaValue criteriaValueKualiInteger = CriteriaSupportUtils.determineCriteriaValue(kualiInteger); assertEquals(kualiInteger, criteriaValueKualiInteger.getValue()); }
static CriteriaValue<?> determineCriteriaValue(Object object) { if (object == null) { throw new IllegalArgumentException("Given criteria value cannot be null."); } else if (object instanceof CharSequence) { return new CriteriaStringValue((CharSequence)object); } else if (object instanceof Boolean) { return new CriteriaBooleanValue((Boolean)object); } else if (object instanceof DateTime) { return new CriteriaDateTimeValue((DateTime)object); } else if (object instanceof Calendar) { return new CriteriaDateTimeValue((Calendar)object); } else if (object instanceof Date) { return new CriteriaDateTimeValue((Date)object); } else if (object instanceof BigInteger) { return new CriteriaIntegerValue((BigInteger)object); } else if (object instanceof Short) { return new CriteriaIntegerValue((Short)object); } else if (object instanceof Integer) { return new CriteriaIntegerValue((Integer)object); } else if (object instanceof AtomicInteger) { return new CriteriaIntegerValue((AtomicInteger)object); } else if (object instanceof Long) { return new CriteriaIntegerValue((Long)object); } else if (object instanceof AtomicLong) { return new CriteriaIntegerValue((AtomicLong)object); } else if (object instanceof BigDecimal) { return new CriteriaDecimalValue((BigDecimal)object); } else if (object instanceof Float) { return new CriteriaDecimalValue((Float)object); } else if (object instanceof Double) { return new CriteriaDecimalValue((Double)object); } else if (object instanceof KualiPercent) { return new CriteriaKualiPercentValue((KualiPercent)object); } else if (object instanceof KualiDecimal) { return new CriteriaKualiDecimalValue((KualiDecimal)object); } else if (object instanceof KualiInteger) { return new CriteriaKualiIntegerValue((KualiInteger)object); } else if (object instanceof PropertyPath) { return new CriteriaPropertyPathValue((PropertyPath)object); } else if (object instanceof CriteriaValue) { return (CriteriaValue<?>)object; } throw new IllegalArgumentException("Failed to translate the given object to a CriteriaValue: " + object); }
CriteriaSupportUtils { static CriteriaValue<?> determineCriteriaValue(Object object) { if (object == null) { throw new IllegalArgumentException("Given criteria value cannot be null."); } else if (object instanceof CharSequence) { return new CriteriaStringValue((CharSequence)object); } else if (object instanceof Boolean) { return new CriteriaBooleanValue((Boolean)object); } else if (object instanceof DateTime) { return new CriteriaDateTimeValue((DateTime)object); } else if (object instanceof Calendar) { return new CriteriaDateTimeValue((Calendar)object); } else if (object instanceof Date) { return new CriteriaDateTimeValue((Date)object); } else if (object instanceof BigInteger) { return new CriteriaIntegerValue((BigInteger)object); } else if (object instanceof Short) { return new CriteriaIntegerValue((Short)object); } else if (object instanceof Integer) { return new CriteriaIntegerValue((Integer)object); } else if (object instanceof AtomicInteger) { return new CriteriaIntegerValue((AtomicInteger)object); } else if (object instanceof Long) { return new CriteriaIntegerValue((Long)object); } else if (object instanceof AtomicLong) { return new CriteriaIntegerValue((AtomicLong)object); } else if (object instanceof BigDecimal) { return new CriteriaDecimalValue((BigDecimal)object); } else if (object instanceof Float) { return new CriteriaDecimalValue((Float)object); } else if (object instanceof Double) { return new CriteriaDecimalValue((Double)object); } else if (object instanceof KualiPercent) { return new CriteriaKualiPercentValue((KualiPercent)object); } else if (object instanceof KualiDecimal) { return new CriteriaKualiDecimalValue((KualiDecimal)object); } else if (object instanceof KualiInteger) { return new CriteriaKualiIntegerValue((KualiInteger)object); } else if (object instanceof PropertyPath) { return new CriteriaPropertyPathValue((PropertyPath)object); } else if (object instanceof CriteriaValue) { return (CriteriaValue<?>)object; } throw new IllegalArgumentException("Failed to translate the given object to a CriteriaValue: " + object); } }
CriteriaSupportUtils { static CriteriaValue<?> determineCriteriaValue(Object object) { if (object == null) { throw new IllegalArgumentException("Given criteria value cannot be null."); } else if (object instanceof CharSequence) { return new CriteriaStringValue((CharSequence)object); } else if (object instanceof Boolean) { return new CriteriaBooleanValue((Boolean)object); } else if (object instanceof DateTime) { return new CriteriaDateTimeValue((DateTime)object); } else if (object instanceof Calendar) { return new CriteriaDateTimeValue((Calendar)object); } else if (object instanceof Date) { return new CriteriaDateTimeValue((Date)object); } else if (object instanceof BigInteger) { return new CriteriaIntegerValue((BigInteger)object); } else if (object instanceof Short) { return new CriteriaIntegerValue((Short)object); } else if (object instanceof Integer) { return new CriteriaIntegerValue((Integer)object); } else if (object instanceof AtomicInteger) { return new CriteriaIntegerValue((AtomicInteger)object); } else if (object instanceof Long) { return new CriteriaIntegerValue((Long)object); } else if (object instanceof AtomicLong) { return new CriteriaIntegerValue((AtomicLong)object); } else if (object instanceof BigDecimal) { return new CriteriaDecimalValue((BigDecimal)object); } else if (object instanceof Float) { return new CriteriaDecimalValue((Float)object); } else if (object instanceof Double) { return new CriteriaDecimalValue((Double)object); } else if (object instanceof KualiPercent) { return new CriteriaKualiPercentValue((KualiPercent)object); } else if (object instanceof KualiDecimal) { return new CriteriaKualiDecimalValue((KualiDecimal)object); } else if (object instanceof KualiInteger) { return new CriteriaKualiIntegerValue((KualiInteger)object); } else if (object instanceof PropertyPath) { return new CriteriaPropertyPathValue((PropertyPath)object); } else if (object instanceof CriteriaValue) { return (CriteriaValue<?>)object; } throw new IllegalArgumentException("Failed to translate the given object to a CriteriaValue: " + object); } private  CriteriaSupportUtils(); }
CriteriaSupportUtils { static CriteriaValue<?> determineCriteriaValue(Object object) { if (object == null) { throw new IllegalArgumentException("Given criteria value cannot be null."); } else if (object instanceof CharSequence) { return new CriteriaStringValue((CharSequence)object); } else if (object instanceof Boolean) { return new CriteriaBooleanValue((Boolean)object); } else if (object instanceof DateTime) { return new CriteriaDateTimeValue((DateTime)object); } else if (object instanceof Calendar) { return new CriteriaDateTimeValue((Calendar)object); } else if (object instanceof Date) { return new CriteriaDateTimeValue((Date)object); } else if (object instanceof BigInteger) { return new CriteriaIntegerValue((BigInteger)object); } else if (object instanceof Short) { return new CriteriaIntegerValue((Short)object); } else if (object instanceof Integer) { return new CriteriaIntegerValue((Integer)object); } else if (object instanceof AtomicInteger) { return new CriteriaIntegerValue((AtomicInteger)object); } else if (object instanceof Long) { return new CriteriaIntegerValue((Long)object); } else if (object instanceof AtomicLong) { return new CriteriaIntegerValue((AtomicLong)object); } else if (object instanceof BigDecimal) { return new CriteriaDecimalValue((BigDecimal)object); } else if (object instanceof Float) { return new CriteriaDecimalValue((Float)object); } else if (object instanceof Double) { return new CriteriaDecimalValue((Double)object); } else if (object instanceof KualiPercent) { return new CriteriaKualiPercentValue((KualiPercent)object); } else if (object instanceof KualiDecimal) { return new CriteriaKualiDecimalValue((KualiDecimal)object); } else if (object instanceof KualiInteger) { return new CriteriaKualiIntegerValue((KualiInteger)object); } else if (object instanceof PropertyPath) { return new CriteriaPropertyPathValue((PropertyPath)object); } else if (object instanceof CriteriaValue) { return (CriteriaValue<?>)object; } throw new IllegalArgumentException("Failed to translate the given object to a CriteriaValue: " + object); } private  CriteriaSupportUtils(); static String toString(SingleValuedPredicate p); static String toString(MultiValuedPredicate p); }
CriteriaSupportUtils { static CriteriaValue<?> determineCriteriaValue(Object object) { if (object == null) { throw new IllegalArgumentException("Given criteria value cannot be null."); } else if (object instanceof CharSequence) { return new CriteriaStringValue((CharSequence)object); } else if (object instanceof Boolean) { return new CriteriaBooleanValue((Boolean)object); } else if (object instanceof DateTime) { return new CriteriaDateTimeValue((DateTime)object); } else if (object instanceof Calendar) { return new CriteriaDateTimeValue((Calendar)object); } else if (object instanceof Date) { return new CriteriaDateTimeValue((Date)object); } else if (object instanceof BigInteger) { return new CriteriaIntegerValue((BigInteger)object); } else if (object instanceof Short) { return new CriteriaIntegerValue((Short)object); } else if (object instanceof Integer) { return new CriteriaIntegerValue((Integer)object); } else if (object instanceof AtomicInteger) { return new CriteriaIntegerValue((AtomicInteger)object); } else if (object instanceof Long) { return new CriteriaIntegerValue((Long)object); } else if (object instanceof AtomicLong) { return new CriteriaIntegerValue((AtomicLong)object); } else if (object instanceof BigDecimal) { return new CriteriaDecimalValue((BigDecimal)object); } else if (object instanceof Float) { return new CriteriaDecimalValue((Float)object); } else if (object instanceof Double) { return new CriteriaDecimalValue((Double)object); } else if (object instanceof KualiPercent) { return new CriteriaKualiPercentValue((KualiPercent)object); } else if (object instanceof KualiDecimal) { return new CriteriaKualiDecimalValue((KualiDecimal)object); } else if (object instanceof KualiInteger) { return new CriteriaKualiIntegerValue((KualiInteger)object); } else if (object instanceof PropertyPath) { return new CriteriaPropertyPathValue((PropertyPath)object); } else if (object instanceof CriteriaValue) { return (CriteriaValue<?>)object; } throw new IllegalArgumentException("Failed to translate the given object to a CriteriaValue: " + object); } private  CriteriaSupportUtils(); static String toString(SingleValuedPredicate p); static String toString(MultiValuedPredicate p);  }