class IndexKeyDefinition implements Externalizable {
    /** */
    private static final long serialVersionUID = 0L;

    /** Index key type. {@link IndexKeyType}. */
    private IndexKeyType idxType;

    /** Order. */
    private Order order;

    /** Precision for variable length key types. */
    private int precision;

    /** */
    public IndexKeyDefinition() {
        // No-op.
    }

    /** */
    public IndexKeyDefinition(int idxTypeCode, Order order, long precision) {
        idxType = IndexKeyType.forCode(idxTypeCode);
        this.order = order;

        // Workaround due to wrong type conversion (int -> long).
        if (precision >= Integer.MAX_VALUE)
            this.precision = -1;
        else
            this.precision = (int)precision;
    }

    /** */
    public Order order() {
        return order;
    }

    /** */
    public IndexKeyType idxType() {
        return idxType;
    }

    /** */
    public int precision() {
        return precision;
    }

    /** {@inheritDoc} */
    @Override public void writeExternal(ObjectOutput out) throws IOException {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        idxType = IndexKeyType.forCode(in.readInt());
        order = new Order(U.readEnum(in, SortOrder.class), null);
    }
}

        // Send only required info for using in MergeSort algorithm.
        out.writeInt(idxType.code());
        U.writeEnum(out, order.sortOrder());
    
<no_super_class>