Enum MatemathicsOperator
- java.lang.Object
-
- java.lang.Enum<MatemathicsOperator>
-
- org.gcube.informationsystem.resourceregistry.queries.operators.MatemathicsOperator
-
- All Implemented Interfaces:
Serializable,Comparable<MatemathicsOperator>
public enum MatemathicsOperator extends Enum<MatemathicsOperator>
- Author:
- Luca Frosini (ISTI - CNR) OrientDB supports the eval() function to execute complex operations. Example: SELECT eval( "amount * 120 / 100 - discount" ) as finalPrice from Order See https://www.orientdb.com/docs/3.0.x/sql/SQL-Where.html#mathematics-operators https://www.orientdb.com/docs/3.0.x/sql/SQL-Syntax.html#math-operators https://www.orientdb.com/docs/3.0.x/sql/SQL-Syntax.html#math-operators-precedence https://www.orientdb.com/docs/3.0.x/sql/SQL-Syntax.html#array-concatenation
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ARRAY_CONCATENATIONBITWISE_ANDBITWISE_LEFT_SHIFTBITWISE_ORBITWISE_RIGHT_SHIFTBITWISE_XORDIVIDEMINUSMODULEMULTIPLYSUM
-
Field Summary
Fields Modifier and Type Field Description static StringAS_KEYprotected StringdbOperatorprotected Stringdescriptionprotected static org.slf4j.Loggerloggerprotected StringoperatorKeystatic StringSEPARATOR_KEYstatic StringVALUES_KEY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringBufferaddFieldPrefix(StringBuffer sb, String fieldPrefix)StringgenerateFieldToEmit(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode, String fieldPrefix)protected StringBuffergenerateFieldToEmit(org.gcube.com.fasterxml.jackson.databind.node.ArrayNode arrayNode, String fieldsSeparator, String fieldPrefix)protected StringgetDbOperator()StringgetDescription()protected StringgetError(String key, Class<?> clazz, boolean mandatory)static MatemathicsOperatorgetOperator(String key)protected StringgetOperatorKey()static Set<String>getOperators()static MatemathicsOperatorvalueOf(String name)Returns the enum constant of this type with the specified name.static MatemathicsOperator[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SUM
public static final MatemathicsOperator SUM
-
MINUS
public static final MatemathicsOperator MINUS
-
MULTIPLY
public static final MatemathicsOperator MULTIPLY
-
DIVIDE
public static final MatemathicsOperator DIVIDE
-
MODULE
public static final MatemathicsOperator MODULE
-
BITWISE_RIGHT_SHIFT
public static final MatemathicsOperator BITWISE_RIGHT_SHIFT
-
BITWISE_LEFT_SHIFT
public static final MatemathicsOperator BITWISE_LEFT_SHIFT
-
BITWISE_AND
public static final MatemathicsOperator BITWISE_AND
-
BITWISE_OR
public static final MatemathicsOperator BITWISE_OR
-
BITWISE_XOR
public static final MatemathicsOperator BITWISE_XOR
-
ARRAY_CONCATENATION
public static final MatemathicsOperator ARRAY_CONCATENATION
-
-
Field Detail
-
logger
protected static org.slf4j.Logger logger
-
VALUES_KEY
public static final String VALUES_KEY
- See Also:
- Constant Field Values
-
SEPARATOR_KEY
public static final String SEPARATOR_KEY
- See Also:
- Constant Field Values
-
AS_KEY
public static final String AS_KEY
- See Also:
- Constant Field Values
-
operatorKey
protected final String operatorKey
-
dbOperator
protected final String dbOperator
-
description
protected final String description
-
-
Method Detail
-
values
public static MatemathicsOperator[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MatemathicsOperator c : MatemathicsOperator.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MatemathicsOperator valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getOperatorKey
protected String getOperatorKey()
-
getDbOperator
protected String getDbOperator()
-
getDescription
public String getDescription()
-
getOperator
public static MatemathicsOperator getOperator(String key)
-
generateFieldToEmit
public String generateFieldToEmit(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode, String fieldPrefix)
-
addFieldPrefix
protected StringBuffer addFieldPrefix(StringBuffer sb, String fieldPrefix)
-
generateFieldToEmit
protected StringBuffer generateFieldToEmit(org.gcube.com.fasterxml.jackson.databind.node.ArrayNode arrayNode, String fieldsSeparator, String fieldPrefix)
-
-