code: public static String generateFilterCondition(String propertyName, String operation, String value, EdmType edmType) {
          String valueOperand = null;
  
          if (edmType == EdmType.BOOLEAN || edmType == EdmType.DOUBLE || edmType == EdmType.INT32) {
              valueOperand = value;
          }
          else if (edmType == EdmType.INT64) {
              valueOperand = String.format("%sL", value);
          }
          else if (edmType == EdmType.DATE_TIME) {
              valueOperand = String.format("datetime'%s'", value);
          }
          else if (edmType == EdmType.GUID) {
              valueOperand = String.format("guid'%s'", value);
          }
          else if (edmType == EdmType.BINARY) {
              valueOperand = String.format("X'%s'", value);
          }
          else {
              valueOperand = String.format("'%s'", value.replace("'", "''"));
          }
  
          return String.format("%s %s %s", propertyName, operation, valueOperand);
      }
docs: Generates a property filter condition string. Creates a formatted string to use in a filter expression that uses
  the specified operation to compare the property with the value, formatted as the specified {@link EdmType}.
  
  @param propertyName
  A <code>String</code> which specifies the name of the property to compare.
  @param operation
  A <code>String</code> which specifies the comparison operator to use.
  @param value
  A <code>String</code> which specifies the value to compare with the property.
  @param edmType
  The {@link EdmType} to format the value as.
  @return
  A <code>String</code> which represents the formatted filter condition.