package com.storlead.message.contract;

import java.io.Serializable;
import java.util.Objects;

/**
 * 快照查询主键：表名、主键列名、主键值（与站内 {@code getOldMapData} 约定一致）。
 */
public final class RowIdentity implements Serializable {

    private static final long serialVersionUID = 1L;

    private final Long id;
    private final String fieldColumn;
    private final String table;

    public RowIdentity(Long id, String fieldColumn, String table) {
        this.id = Objects.requireNonNull(id, "id");
        this.fieldColumn = Objects.requireNonNull(fieldColumn, "fieldColumn");
        this.table = Objects.requireNonNull(table, "table");
    }

    public Long getId() {
        return id;
    }

    public String getFieldColumn() {
        return fieldColumn;
    }

    public String getTable() {
        return table;
    }
}
