@Override public String toString() { return "LtRestriction [attribute=" + getAttribute() + ", value=" + getValue() + "]"; } }
@Override public String toString() { return "LtRestriction [attribute=" + getAttribute() + ", value=" + getValue() + "]"; } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void visitLt(final LtRestriction restriction) { final Object o = getProperty(restriction); if (o instanceof java.lang.Number && restriction.getValue() instanceof java.lang.Number) { final BigDecimal left = new BigDecimal(((Number)o).doubleValue()); final BigDecimal right = new BigDecimal(((Number)restriction.getValue()).doubleValue()); if (left.compareTo(right) == -1) return; } else if (o instanceof Comparable) { try { final Comparable oC = (Comparable)o; final Comparable oV = (Comparable)restriction.getValue(); if (oC.compareTo(oV) < 0) { return; } } catch (final ClassCastException e) {} } fail(restriction); } @Override public void visitLtComplete(final LtRestriction restriction) {}
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void visitLt(final LtRestriction restriction) { final Object o = getProperty(restriction); if (o instanceof java.lang.Number && restriction.getValue() instanceof java.lang.Number) { final BigDecimal left = new BigDecimal(((Number)o).doubleValue()); final BigDecimal right = new BigDecimal(((Number)restriction.getValue()).doubleValue()); if (left.compareTo(right) == -1) return; } else if (o instanceof Comparable) { try { final Comparable oC = (Comparable)o; final Comparable oV = (Comparable)restriction.getValue(); if (oC.compareTo(oV) < 0) { return; } } catch (final ClassCastException e) {} } fail(restriction); } @Override public void visitLtComplete(final LtRestriction restriction) {}
@Override public void visitLt(final LtRestriction restriction) { m_criterions.add(org.hibernate.criterion.Restrictions.lt(restriction.getAttribute(), restriction.getValue())); }