package com.capgemini.reports.snecmaobjects.rf;

import com.capgemini.framework.teamcenter.authent.TcSession;
import com.capgemini.reports.snecmaobjects.visitor.IComponentVisitor;
import com.capgemini.reports.snecmaobjects.visitor.IReceptorVisitor;
import com.teamcenter.soa.client.model.strong.ItemRevision;

import static com.capgemini.framework.teamcenter.object.types.SnecmaObjectTypes.RF_GENERIC_REVISION;

/**
 * Class representing a RFGenericRevision.
 */
public class RFGenericRevision extends AbstractRF {
    private static final long serialVersionUID = 7484003347817912302L;

    public RFGenericRevision(final TcSession session, final ItemRevision itemRevision) {
        super(session, itemRevision);
    }

    @Override
    public <T> T accept(final IReceptorVisitor<T> aReceptorVisitor) {
        return aReceptorVisitor.visitReceptor(this);
    }

    @Override
    public <T> T accept(final IComponentVisitor<T> aComponentVisitor) {
        return aComponentVisitor.visitComponent(this);
    }

    @Override
    public boolean isSuperModel() {
        return false;
    }

    @Override
    public boolean isRFGeneric() {
        return true;
    }

    @Override
    public String toString() {
        return RF_GENERIC_REVISION + " " + this.getItemId();
    }
}
