/** Returns the ColumnModifier for the specified internal value. */
 public static ColumnModifier fromSystemValue(int value) {
   for (ColumnModifier mod : ColumnModifier.values()) {
     if (mod.getSerializationId() == value) {
       return mod;
     }
   }
   return null;
 }
 private void appendPKColumnValue(StringBuilder buf, byte[] range, Boolean isNull, int slotIndex) {
   if (Boolean.TRUE.equals(isNull)) {
     buf.append("null");
     return;
   }
   if (Boolean.FALSE.equals(isNull)) {
     buf.append("not null");
     return;
   }
   if (range.length == 0) {
     buf.append('*');
     return;
   }
   ScanRanges scanRanges = context.getScanRanges();
   PDataType type = scanRanges.getSchema().getField(slotIndex).getDataType();
   ColumnModifier modifier = tableRef.getTable().getPKColumns().get(slotIndex).getColumnModifier();
   if (modifier != null) {
     buf.append('~');
     range = modifier.apply(range, 0, new byte[range.length], 0, range.length);
   }
   Format formatter = context.getConnection().getFormatter(type);
   buf.append(type.toStringLiteral(range, formatter));
 }
 /** Returns an internal value representing the specified ColumnModifier. */
 public static int toSystemValue(ColumnModifier columnModifier) {
   if (columnModifier == null) {
     return 0;
   }
   return columnModifier.getSerializationId();
 }