class ColumnUtil {

  public static Column getDataColumn(Column lockOrWriteColumn) {
    if (isCommitToSameFamily()) {
      if (isLockColumn(lockOrWriteColumn)) {
        return getDataColumnFromConstructedQualifier(lockOrWriteColumn);
      } else {
        byte[] qualifier = lockOrWriteColumn.getQualifier();
        if (isPutColumn(lockOrWriteColumn)) {
          return new Column(lockOrWriteColumn.getFamily(), Bytes.head(qualifier, qualifier.length
              - PUT_QUALIFIER_SUFFIX_BYTES.length));
        } else if (isDeleteColumn(lockOrWriteColumn)) {
          return new Column(lockOrWriteColumn.getFamily(), Bytes.head(qualifier, qualifier.length
              - DELETE_QUALIFIER_SUFFIX_BYTES.length));
        } else {
          return lockOrWriteColumn;
        }
      }
    } else {
      return getDataColumnFromConstructedQualifier(lockOrWriteColumn);
    }
  }

}