if (obj.getClass().equals(Short.class) || obj.getClass().equals(short.class))
return ((Number)obj).shortValue() > 0;
throw new RuntimeException(String.format("Cannot validate Number of class %s", obj.getClass().getSimpleName()));
}
public void throwInvalid(Object instance, String propertyName) {
throw new HiveRuntimeException(String.format("Property %s of class %s is zero for instance %s", propertyName, instance.getClass().getSimpleName(), instance.toString()));
}