@Override public String toString() { return "GtRestriction [attribute=" + getAttribute() + ", value=" + getValue() + "]"; } }
@Override public String toString() { return "GtRestriction [attribute=" + getAttribute() + ", value=" + getValue() + "]"; } }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void visitGt(final GtRestriction 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 visitGtComplete(final GtRestriction restriction) {}
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void visitGt(final GtRestriction 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 visitGtComplete(final GtRestriction restriction) {}
@Override public void visitGt(final GtRestriction restriction) { m_criterions.add(org.hibernate.criterion.Restrictions.gt(restriction.getAttribute(), restriction.getValue())); }