Exemplo n.º 1
0
  public static boolean equals(final Object iLeft, final Object iRight) {
    if (iLeft == null || iRight == null) return false;

    // RECORD & ORID
    if (iLeft instanceof ORecord<?>) return comparesValues(iRight, (ORecord<?>) iLeft, true);
    else if (iRight instanceof ORecord<?>) return comparesValues(iLeft, (ORecord<?>) iRight, true);

    // ALL OTHER CASES
    final Object right = OType.convert(iRight, iLeft.getClass());
    if (right == null) return false;
    return iLeft.equals(right);
  }
 @Override
 @SuppressWarnings("unchecked")
 protected boolean evaluateExpression(
     final OIdentifiable iRecord,
     final OSQLFilterCondition iCondition,
     final Object iLeft,
     final Object iRight,
     OCommandContext iContext) {
   final Object right = OType.convert(iRight, iLeft.getClass());
   if (right == null) return false;
   return ((Comparable<Object>) iLeft).compareTo(right) >= 0;
 }
 public static Object convertValue(final String iValue, final OType iExpectedType) {
   final Object v = getTypeValue((String) iValue);
   return OType.convert(v, iExpectedType.getDefaultJavaType());
 }