package org.oxauth.persistence.model;

import org.gluu.persist.annotation.AttributeName;
import org.gluu.persist.annotation.DataEntry;
import org.gluu.persist.annotation.ObjectClass;
import org.gluu.persist.model.base.BaseEntry;

/**
 * @author Javier Rojas Blum
 * @version June 30, 2018
 */
@DataEntry
@ObjectClass(value = "pairwiseIdentifier")
public class PairwiseIdentifier extends BaseEntry {

    @AttributeName(ignoreDuringUpdate = true, name = "oxId")
    private String id;

    @AttributeName(name = "oxSectorIdentifier")
    private String sectorIdentifier;

    @AttributeName(name = "oxAuthClientId")
    private String clientId;

    @AttributeName(name = "oxAuthUserId")
    private String userInum;

    public PairwiseIdentifier() {
    }

    public PairwiseIdentifier(String sectorIdentifier, String clientId, String userInum) {
        this.sectorIdentifier = sectorIdentifier;
        this.clientId = clientId;
        this.userInum = userInum;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSectorIdentifier() {
        return sectorIdentifier;
    }

    public void setSectorIdentifier(String sectorIdentifierUri) {
        this.sectorIdentifier = sectorIdentifierUri;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getUserInum() {
        return userInum;
    }

    public void setUserInum(String userInum) {
        this.userInum = userInum;
    }

    @Override
    public String toString() {
        return "PairwiseIdentifier{" +
                "id='" + id + '\'' +
                ", sectorIdentifier='" + sectorIdentifier + '\'' +
                ", clientId='" + clientId + '\'' +
                ", userInum='" + userInum + '\'' +
                "} " + super.toString();
    }
}
