public <T> Set<T> getSet(String column, AbstractType<T> type) { ByteBuffer raw = data.get(column); return raw == null ? null : SetType.getInstance(type, true).compose(raw); }
public <T> Set<T> getFrozenSet(String column, AbstractType<T> type) { ByteBuffer raw = data.get(column); return raw == null ? null : SetType.getInstance(type, false).compose(raw); }
public <T> Set<T> getFrozenSet(String column, AbstractType<T> type) { ByteBuffer raw = data.get(column); return raw == null ? null : SetType.getInstance(type, false).compose(raw); }
public <T> Set<T> getSet(String column, AbstractType<T> type) { ByteBuffer raw = data.get(column); return raw == null ? null : SetType.getInstance(type, true).compose(raw); }
public <T> Set<T> getSet(String column, AbstractType<T> type) { ByteBuffer raw = data.get(column); return raw == null ? null : SetType.getInstance(type, true).compose(raw); }
public <T> Set<T> getSet(String column, AbstractType<T> type) { ByteBuffer raw = data.get(column); return raw == null ? null : SetType.getInstance(type, true).compose(raw); }
public <T> Set<T> getFrozenSet(String column, AbstractType<T> type) { ByteBuffer raw = data.get(column); return raw == null ? null : SetType.getInstance(type, false).compose(raw); }
private static Object decompose(Object value, Class clazz, Class<?> mapGenericClassses) { ByteBuffer buf = ByteBuffer.wrap((byte[]) value, 0, ((byte[]) value).length); Class<?> valueValidationClass = CassandraValidationClassMapper.getValidationClassInstance( mapGenericClassses, true); Object valueClassInstance; try { valueClassInstance = valueValidationClass.getDeclaredField("instance").get(null); SetType setType = SetType.getInstance((AbstractType) valueClassInstance); Collection outputCollection = new HashSet(); outputCollection.addAll(setType.compose(buf)); return marshalCollection(valueValidationClass, outputCollection, mapGenericClassses); } catch (Exception e) { log.error("Error while setting field{} value via CQL, Caused by: .", clazz.getSimpleName()); throw new PersistenceException(e); } } }
outputCollection.addAll(setType.compose(valueByteBuffer));
case SET: SetType<?> setType = (SetType<?>)type; return setType.compose(foundValue).contains(setType.getElementsType().compose(value)); case MAP: MapType<?,?> mapType = (MapType<?, ?>)type;
case SET: SetType<?> setType = (SetType<?>)type; return setType.compose(foundValue).contains(setType.getElementsType().compose(value)); case MAP: MapType<?,?> mapType = (MapType<?, ?>)type;
case SET: SetType<?> setType = (SetType<?>)type; return setType.compose(foundValue).contains(setType.getElementsType().compose(value)); case MAP: MapType<?,?> mapType = (MapType<?, ?>)type;