/* Generated by Together */

package cobalt.deployment.descriptor.dist;

import cobalt.deployment.descriptor.EjbDescriptor;
import cobalt.deployment.descriptor.EntityEjbDescriptor;

/**
 * Title:        J2EE ejb descriptor
 * Description:  Represents J2EE-specific ejb component description for standard ejb descriptor
 * Copyright:    Copyright (c) 2001
 * Company:      ETRI
 * @author Yeon Jun Choi
 * @version 1.0
 */

public class J2eeEjbDescriptor {
    public J2eeEjbDescriptor(EjbDescriptor ejbDesc) {
        descriptor = ejbDesc;
        if ( descriptor instanceof EntityEjbDescriptor)
            cmp = new J2eeContainerManaged();
    }

    public EjbDescriptor getDescriptor(){ return descriptor; }

    public void setDescriptor(EjbDescriptor descriptor){ this.descriptor = descriptor; }

    public String getJndiName() {
        return descriptor.getJndiName();
    }

    public void setJndiName(String name) {
        descriptor.setJndiName(name);
    }

    public String getEjbName() {
        return descriptor.getEjbName();
    }

    public J2eeContainerManaged getCmp(){
            return cmp;
        }

    public void setCmp(J2eeContainerManaged cmp){
            this.cmp = cmp;
        }

    public String getEjbType() {
        return descriptor.getEjbType();
    }

    private EjbDescriptor descriptor;
    private J2eeContainerManaged cmp;
}
