@Test(expected = RuntimeException.class) public void testDecodeException() throws Exception { assertEquals("Exception expected", "text", SiddhiUtils.decodeSiddhiValue("text", null)); }
protected static Object decodeSiddhiValue(String originalValue, Attribute.Type type) { switch (type) { case STRING: return originalValue; case BOOL: return Boolean.valueOf(originalValue); case DOUBLE: return Double.valueOf(originalValue); case INT: return Integer.valueOf(originalValue); case LONG: return Long.valueOf(originalValue); case FLOAT: return Float.valueOf(originalValue); default: throw new RuntimeException("Unsupported Column type: " + originalValue + "/" + type.toString()); } }
SiddhiUtils { protected static Object decodeSiddhiValue(String originalValue, Attribute.Type type) { switch (type) { case STRING: return originalValue; case BOOL: return Boolean.valueOf(originalValue); case DOUBLE: return Double.valueOf(originalValue); case INT: return Integer.valueOf(originalValue); case LONG: return Long.valueOf(originalValue); case FLOAT: return Float.valueOf(originalValue); default: throw new RuntimeException("Unsupported Column type: " + originalValue + "/" + type.toString()); } } }
SiddhiUtils { protected static Object decodeSiddhiValue(String originalValue, Attribute.Type type) { switch (type) { case STRING: return originalValue; case BOOL: return Boolean.valueOf(originalValue); case DOUBLE: return Double.valueOf(originalValue); case INT: return Integer.valueOf(originalValue); case LONG: return Long.valueOf(originalValue); case FLOAT: return Float.valueOf(originalValue); default: throw new RuntimeException("Unsupported Column type: " + originalValue + "/" + type.toString()); } } private  SiddhiUtils(); }
SiddhiUtils { protected static Object decodeSiddhiValue(String originalValue, Attribute.Type type) { switch (type) { case STRING: return originalValue; case BOOL: return Boolean.valueOf(originalValue); case DOUBLE: return Double.valueOf(originalValue); case INT: return Integer.valueOf(originalValue); case LONG: return Long.valueOf(originalValue); case FLOAT: return Float.valueOf(originalValue); default: throw new RuntimeException("Unsupported Column type: " + originalValue + "/" + type.toString()); } } private  SiddhiUtils(); static boolean columnAlreadyExistsInStream(String columnName, StreamDefinition streamMetaData); static Object[] getOrderedValues(StreamDefinition streamMetaData, List<ColumnNameTypeValue> columns); static Boolean isStreamAllowedForThisOperation(String streamName, String operation); }
SiddhiUtils { protected static Object decodeSiddhiValue(String originalValue, Attribute.Type type) { switch (type) { case STRING: return originalValue; case BOOL: return Boolean.valueOf(originalValue); case DOUBLE: return Double.valueOf(originalValue); case INT: return Integer.valueOf(originalValue); case LONG: return Long.valueOf(originalValue); case FLOAT: return Float.valueOf(originalValue); default: throw new RuntimeException("Unsupported Column type: " + originalValue + "/" + type.toString()); } } private  SiddhiUtils(); static boolean columnAlreadyExistsInStream(String columnName, StreamDefinition streamMetaData); static Object[] getOrderedValues(StreamDefinition streamMetaData, List<ColumnNameTypeValue> columns); static Boolean isStreamAllowedForThisOperation(String streamName, String operation); static final String QUERY_PLAN_IDENTIFIER; }