package lc.esp.eo;

import lc.esp.eo.sdk.EOId;
import org.bson.types.ObjectId;

/**
 * This implementation of {@link EOId} holds a {@link ObjectId} suitable for use with Mongo or other BSON-related
 * SDKs.
 *
 * @author Alex Leigh
 * @since mk20 (TOKYO PROTOCOL)
 */
public class EOBsonId implements EOId {
    private final ObjectId id;

    public EOBsonId(ObjectId id) {
        this.id = id;
    }

    public ObjectId getObjectId() {
        return id;
    }

    public String toString() {
        return id.toString();
    }
}
