}
public static void doPrependFromPrepared(ColumnFamily cf, ColumnNameBuilder builder, ListType validator, Term values, UpdateParameters params) throws InvalidRequestException
{
if (!values.isBindMarker())
throw new InvalidRequestException("Can't apply operation on column with " + validator + " type.");
long time = REFERENCE_TIME - (System.currentTimeMillis() - REFERENCE_TIME);
try
{
List<?> l = validator.compose(params.variables.get(values.bindIndex));
for (int i = 0; i < l.size(); i++)
{
ColumnNameBuilder b = i == l.size() - 1 ? builder : builder.copy();
PrecisionTime pt = getNextTime(time);
ByteBuffer uuid = ByteBuffer.wrap(UUIDGen.getTimeUUIDBytes(pt.millis, pt.nanos));
ByteBuffer name = b.add(uuid).build();
cf.addColumn(params.makeColumn(name, validator.valueComparator().decompose(l.get(i))));
}
}
catch (MarshalException e)
{
throw new InvalidRequestException(e.getMessage());
}
}