break;
}
// we updated the value instance, now update its members
if (value instanceof PersistentBase) {
PersistentBase record = (PersistentBase) value;
for (HColumn<ByteBuffer, ByteBuffer> hColumn : this.hSuperColumn.getColumns()) {
String memberName = StringSerializer.get().fromByteBuffer(hColumn.getName());
if (memberName.indexOf(CassandraStore.UNION_COL_SUFIX) < 0) {
if (memberName == null || memberName.length() == 0) {
LOG.warn("member name is null or empty.");
continue;
}
Field memberField = fieldSchema.getField(memberName);
Schema memberSchema = memberField.schema();
Type memberType = memberSchema.getType();
CassandraSubColumn cassandraColumn = new CassandraSubColumn();
cassandraColumn.setField(memberField);
cassandraColumn.setValue(hColumn);
if (memberType.equals(Type.UNION)){
HColumn<ByteBuffer, ByteBuffer> hc = getUnionTypeColumn(memberField.name()
+ CassandraStore.UNION_COL_SUFIX, this.hSuperColumn.getColumns().toArray());
Integer unionIndex = getUnionIndex(memberField.name(),hc);
cassandraColumn.setUnionType(unionIndex);
}
record.put(record.getSchema().getField(memberName).pos(), cassandraColumn.getValue());
}
}
}
break;
case UNION: