return new Collection(ListType.getInstance(valueType, !frozen)); case SET: return new Collection(SetType.getInstance(valueType, !frozen)); case MAP: assert keys != null : "Got null keys type for a collection"; return new Collection(MapType.getInstance(keys.prepare(keyspace, udts).getType(), valueType, !frozen));
public CQL3Type prepare(String keyspace) throws InvalidRequestException { assert values != null : "Got null values type for a collection"; if (!frozen && values.supportsFreezing() && !values.frozen) throw new InvalidRequestException("Non-frozen collections are not allowed inside collections: " + this); if (values.isCounter()) throw new InvalidRequestException("Counters are not allowed inside collections: " + this); if (keys != null) { if (keys.isCounter()) throw new InvalidRequestException("Counters are not allowed inside collections: " + this); if (!frozen && keys.supportsFreezing() && !keys.frozen) throw new InvalidRequestException("Non-frozen collections are not allowed inside collections: " + this); } switch (kind) { case LIST: return new Collection(ListType.getInstance(values.prepare(keyspace).getType(), !frozen)); case SET: return new Collection(SetType.getInstance(values.prepare(keyspace).getType(), !frozen)); case MAP: assert keys != null : "Got null keys type for a collection"; return new Collection(MapType.getInstance(keys.prepare(keyspace).getType(), values.prepare(keyspace).getType(), !frozen)); } throw new AssertionError(); }
return new Collection(ListType.getInstance(valueType, !frozen)); case SET: return new Collection(SetType.getInstance(valueType, !frozen)); case MAP: assert keys != null : "Got null keys type for a collection"; return new Collection(MapType.getInstance(keys.prepare(keyspace, udts).getType(), valueType, !frozen));
return new Collection(ListType.getInstance(valueType, !frozen)); case SET: return new Collection(SetType.getInstance(valueType, !frozen)); case MAP: assert keys != null : "Got null keys type for a collection"; return new Collection(MapType.getInstance(keys.prepare(keyspace, udts).getType(), valueType, !frozen));
return new Collection(ListType.getInstance(valueType, !frozen)); case SET: return new Collection(SetType.getInstance(valueType, !frozen)); case MAP: assert keys != null : "Got null keys type for a collection"; return new Collection(MapType.getInstance(keys.prepare(ksm, udts).getType(), valueType, !frozen));
public CQL3Type asCQL3Type() { return new CQL3Type.Collection(this); }
public CQL3Type asCQL3Type() { return new CQL3Type.Collection(this); }
public CQL3Type asCQL3Type() { return new CQL3Type.Collection(this); }
public CQL3Type asCQL3Type() { return new CQL3Type.Collection(this); }
public CQL3Type asCQL3Type() { return new CQL3Type.Collection(this); }