code: public PutAction serialize(byte[] keyBytes, FieldMapping fieldMapping,
        Object fieldValue) {
      Put put = new Put(keyBytes);
      PutAction putAction = new PutAction(put);
      String fieldName = fieldMapping.getFieldName();
      if (fieldMapping.getMappingType() == MappingType.COLUMN
          || fieldMapping.getMappingType() == MappingType.COUNTER) {
        serializeColumn(fieldName, fieldMapping.getFamily(),
            fieldMapping.getQualifier(), fieldValue, put);
      } else if (fieldMapping.getMappingType() == MappingType.KEY_AS_COLUMN) {
        serializeKeyAsColumn(fieldName, fieldMapping.getFamily(),
            fieldMapping.getPrefix(), fieldValue, put);
      } else if (fieldMapping.getMappingType() == MappingType.OCC_VERSION) {
        serializeOCCColumn(fieldValue, putAction);
      } else {
        throw new ValidationException(
            "Invalid field mapping for field with name: "
                + fieldMapping.getFieldName());
      }
      return putAction;
    }
docs: Serialize an entity's field value to a PutAction.
  
  @param keyBytes
  The bytes of the serialized key (needed to construct a PutAction).
  @param fieldMapping
  The FieldMapping that specifies this field's mapping type and
  field name.
  @param fieldValue
  The value of the field to serialize.
  @return The PutAction with column's populated with the field's serialized
  values.