private BoundType deserializeBoundType(DeserializationContext context, JsonParser p) throws IOException { expect(context, JsonToken.VALUE_STRING, p.getCurrentToken()); String name = p.getText(); try { return BoundType.valueOf(name); } catch (IllegalArgumentException e) { return (BoundType) context.handleWeirdStringValue(BoundType.class, name, "not a valid BoundType name (should be one oF: %s)", Arrays.asList(BoundType.values())); } }
private BoundType deserializeBoundType(JsonParser parser) throws IOException { expect(parser, JsonToken.VALUE_STRING, parser.getCurrentToken()); String name = parser.getText(); try { return BoundType.valueOf(name); } catch (IllegalArgumentException e) { throw new IllegalStateException("[" + name + "] is not a valid BoundType name."); } }
BoundType startBound = BoundType.valueOf(cubeQueryContext.getConf().get(CubeQueryConfUtil.START_DATE_BOUND_TYPE, CubeQueryConfUtil.DEFAULT_START_BOUND_TYPE)); BoundType endBound = BoundType.valueOf(cubeQueryContext.getConf().get(CubeQueryConfUtil.END_DATE_BOUND_TYPE, CubeQueryConfUtil.DEFAULT_END_BOUND_TYPE));
BoundType startBound = BoundType.valueOf(cubeQueryContext.getConf().get(CubeQueryConfUtil.START_DATE_BOUND_TYPE, CubeQueryConfUtil.DEFAULT_START_BOUND_TYPE)); BoundType endBound = BoundType.valueOf(cubeQueryContext.getConf().get(CubeQueryConfUtil.END_DATE_BOUND_TYPE, CubeQueryConfUtil.DEFAULT_END_BOUND_TYPE));