/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package connectors;

import mobirentdesktop.entities.*;
import java.util.ArrayList;
import peaconnector.Pea;
import peaconnector.PeaConnector;
import peaconnector.RemoteException;
import peaconnector.SEAnnot;
import peaconnector.SEMethod;
import peaconnector.SchemaListElement;
import peaconnector.Stateful;
import peaconnector.XmlMethodSchemas;

/**
 *
 * @author Budai Attila
 */
@Stateful
public class AdministratorSF extends Pea {

    public AdministratorSF(PeaConnector pc) throws RemoteException {
        super(pc);
    }

    @XmlMethodSchemas(@SEMethod(schemaName = "desktop", name = "login",
    parameters = {@SEAnnot(schemaName = "desktop", name = "userName"),
        @SEAnnot(schemaName = "desktop", name = "passCode")}))
    public String login(String userName, String passCode) throws RemoteException {
        return this.methodCall("login", userName, passCode);
    }

    @XmlMethodSchemas(@SEMethod(schemaName = "desktop", name = "addDvd",
    parameters = @SEAnnot(schemaName = "desktop", name = "advd")))
    public void addDvd(DVD dvd) throws RemoteException {
        this.methodCall("addDvd", dvd);
    }

    @XmlMethodSchemas(@SEMethod(schemaName = "desktop", name = "addTransporter",
    parameters = @SEAnnot(schemaName = "desktop", name = "atransporter")))
    public void addTransporter(Transporter transporter) throws RemoteException {
        this.methodCall("addTransporter", transporter);
    }

    @XmlMethodSchemas(@SEMethod(schemaName = "desktop", name = "delTransporter",
    parameters = @SEAnnot(schemaName = "desktop", name = "atransporter")))
    public void delTransporter(Transporter transporter) throws RemoteException {
        this.methodCall("delTransporter", transporter);
    }


    @XmlMethodSchemas(@SEMethod(schemaName = "desktop", name = "getTransporterList",
    returnType = @SEAnnot(schemaName = "desktop", elementsName = "e",
    elementsType = Transporter.class, type = SchemaListElement.class, name = "return")))
    public ArrayList<Transporter> getTransporterList() throws RemoteException {
        return this.methodCall("getTransporterList");
    }

    @XmlMethodSchemas(@SEMethod(schemaName = "desktop", name = "getDvdList",
    returnType = @SEAnnot(schemaName = "desktop", elementsName = "e",
    elementsType = DVD.class, type = SchemaListElement.class, name = "return")))
    public ArrayList<DVD> getDvdList() throws RemoteException {
        return this.methodCall("getDvdList");
    }

    @XmlMethodSchemas(@SEMethod(schemaName = "desktop", name = "modifyDvd",
    parameters = @SEAnnot(schemaName = "desktop", name = "advd")))
    public void modifyDvd(DVD dvd) throws RemoteException {
        this.methodCall("modifyDvd", dvd);
    }

    @XmlMethodSchemas(@SEMethod(schemaName = "desktop", name = "removeDvd",
    parameters = @SEAnnot(schemaName = "desktop", name = "advd")))
    public void removeDvd(DVD dvd) throws RemoteException {
        this.methodCall("removeDvd", dvd);
    }

    @XmlMethodSchemas(@SEMethod(schemaName = "desktop", name = "getCustomerList",
    returnType = @SEAnnot(schemaName = "desktop", elementsName = "e",
    elementsType = Customer.class, type = SchemaListElement.class, name = "return")))
    public ArrayList<Customer> getCustomerList() throws RemoteException {
        return this.methodCall("getCustomerList");
    }

    @XmlMethodSchemas(@SEMethod(schemaName = "desktop", name = "removeCustomer",
    parameters = @SEAnnot(schemaName = "desktop", name = "acustomer")))
    public void removeCustomer(Customer customer) throws RemoteException {
        this.methodCall("removeCustomer", customer);
    }

    @XmlMethodSchemas(@SEMethod(schemaName = "desktop", name = "getOrderList",
    returnType = @SEAnnot(schemaName = "desktop", elementsName = "e",
    elementsType = Order.class, type = SchemaListElement.class, name = "return")))
    public ArrayList<Order> getOrderList() throws RemoteException {
        return this.methodCall("getOrderList");
    }

    @XmlMethodSchemas(@SEMethod(schemaName = "desktop", name = "removeOrder",
    parameters = @SEAnnot(schemaName = "desktop", name = "aOrder")))
    public void removeOrder(Order order) throws RemoteException {
        this.methodCall("removeOrder", order);
    }



    @XmlMethodSchemas(@SEMethod(schemaName = "desktop", name = "getDeliveredOrders",
    returnType = @SEAnnot(schemaName = "desktop", elementsName = "e",
    elementsType = Order.class, type = SchemaListElement.class, name = "return")))
    public ArrayList<Order> getDeliveredOrders() throws RemoteException {
        return this.methodCall("getDeliveredOrders");
    }


    @XmlMethodSchemas(@SEMethod(schemaName = "desktop", name = "setOrderNeed",
    parameters = @SEAnnot(schemaName = "desktop", name = "aOrder")))
    public void setOrderNeed(Order order) throws RemoteException {
        this.methodCall("setOrderNeed", order);
    }

}
