int n; try { n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(
int n; try { n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException( n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(
int n; try { n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(
n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(
private int skipLiteral(String value, int idx) { try { return ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException( String.format( "Cannot parse list value from \"%s\", invalid CQL value at character %d", value, idx), e); } } }
int n; try { n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse tuple value from \"%s\", invalid CQL value at character %d", value, idx), e);
int n; try { n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse tuple value from \"%s\", invalid CQL value at character %d", value, idx), e);
int n; try { n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse tuple value from \"%s\", invalid CQL value at character %d", value, idx), e);
int n; try { n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse map value from \"%s\", invalid CQL value at character %d", value, idx), e); n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse map value from \"%s\", invalid CQL value at character %d", value, idx), e);
int n; try { n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse map value from \"%s\", invalid CQL value at character %d", value, idx), e); n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse map value from \"%s\", invalid CQL value at character %d", value, idx), e);
int n; try { n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse map value from \"%s\", invalid CQL value at character %d", value, idx), e); n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse map value from \"%s\", invalid CQL value at character %d", value, idx), e);
@Override public C parse(String value) { if (value == null || value.isEmpty() || value.equalsIgnoreCase("NULL")) return null; int idx = ParseUtils.skipSpaces(value, 0); if (value.charAt(idx++) != getOpeningChar()) throw new InvalidTypeException(String.format("Cannot parse collection value from \"%s\", at character %d expecting '%s' but got '%c'", value, idx, getOpeningChar(), value.charAt(idx))); idx = ParseUtils.skipSpaces(value, idx); if (value.charAt(idx) == getClosingChar()) return newInstance(0); C l = newInstance(10); while (idx < value.length()) { int n; try { n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse collection value from \"%s\", invalid CQL value at character %d", value, idx), e); } l.add(eltCodec.parse(value.substring(idx, n))); idx = n; idx = ParseUtils.skipSpaces(value, idx); if (value.charAt(idx) == getClosingChar()) return l; if (value.charAt(idx++) != ',') throw new InvalidTypeException(String.format("Cannot parse collection value from \"%s\", at character %d expecting ',' but got '%c'", value, idx, value.charAt(idx))); idx = ParseUtils.skipSpaces(value, idx); } throw new InvalidTypeException(String.format("Malformed collection value \"%s\", missing closing '%s'", value, getClosingChar())); }
@Override public C parse(String value) { if (value == null || value.isEmpty() || value.equalsIgnoreCase("NULL")) return null; int idx = ParseUtils.skipSpaces(value, 0); if (value.charAt(idx++) != getOpeningChar()) throw new InvalidTypeException(String.format("Cannot parse collection value from \"%s\", at character %d expecting '%s' but got '%c'", value, idx, getOpeningChar(), value.charAt(idx))); idx = ParseUtils.skipSpaces(value, idx); if (value.charAt(idx) == getClosingChar()) return newInstance(0); C l = newInstance(10); while (idx < value.length()) { int n; try { n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse collection value from \"%s\", invalid CQL value at character %d", value, idx), e); } l.add(eltCodec.parse(value.substring(idx, n))); idx = n; idx = ParseUtils.skipSpaces(value, idx); if (value.charAt(idx) == getClosingChar()) return l; if (value.charAt(idx++) != ',') throw new InvalidTypeException(String.format("Cannot parse collection value from \"%s\", at character %d expecting ',' but got '%c'", value, idx, value.charAt(idx))); idx = ParseUtils.skipSpaces(value, idx); } throw new InvalidTypeException(String.format("Malformed collection value \"%s\", missing closing '%s'", value, getClosingChar())); }
@Override public C parse(String value) { if (value == null || value.isEmpty() || value.equalsIgnoreCase("NULL")) return null; int idx = ParseUtils.skipSpaces(value, 0); if (value.charAt(idx++) != getOpeningChar()) throw new InvalidTypeException(String.format("Cannot parse collection value from \"%s\", at character %d expecting '%s' but got '%c'", value, idx, getOpeningChar(), value.charAt(idx))); idx = ParseUtils.skipSpaces(value, idx); if (value.charAt(idx) == getClosingChar()) return newInstance(0); C l = newInstance(10); while (idx < value.length()) { int n; try { n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse collection value from \"%s\", invalid CQL value at character %d", value, idx), e); } l.add(eltCodec.parse(value.substring(idx, n))); idx = n; idx = ParseUtils.skipSpaces(value, idx); if (value.charAt(idx) == getClosingChar()) return l; if (value.charAt(idx++) != ',') throw new InvalidTypeException(String.format("Cannot parse collection value from \"%s\", at character %d expecting ',' but got '%c'", value, idx, value.charAt(idx))); idx = ParseUtils.skipSpaces(value, idx); } throw new InvalidTypeException(String.format("Malformed collection value \"%s\", missing closing '%s'", value, getClosingChar())); }
n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse UDT value from \"%s\", invalid CQL value at character %d", value, idx), e);
n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse UDT value from \"%s\", invalid CQL value at character %d", value, idx), e);
n = ParseUtils.skipCQLValue(value, idx); } catch (IllegalArgumentException e) { throw new InvalidTypeException(String.format("Cannot parse UDT value from \"%s\", invalid CQL value at character %d", value, idx), e);