/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE @UMPLE_VERSION@ modeling language!*/

package ecommerceRMI1;
import java.util.*;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.rmi.RemoteException;
import java.io.Serializable;
import ecommerceRMI1.UmpleRuntime;
public class Agent implements java.io.Serializable
{  public void setRealObject(IAgentImpl aObject)
  {
    realObject=aObject;
  }

  IAgentImpl realObject;
  public Agent(String aName, UmpleRuntime.UmpleComponent component)
  {
    if(this.getClass()== Agent.class)    setRealObject(UmpleRuntime.getInstance().newAgent(aName, component, this));
  }
  public Agent(String aName)
  {
    if(this.getClass()== Agent.class)    setRealObject(UmpleRuntime.getInstance().newAgent(aName, this));
  }
  public void setSelf(Agent proxy)
  {
    while(true)
      try{
        realObject.setSelf(proxy);
        break;
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public int getHashCode()
  {
    while(true)
      try{
        return realObject.getHashCode();
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public boolean setName(String aName)
  {
    while(true)
      try{
        return realObject.setName(aName);
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public String getName()
  {
    while(true)
      try{
        return realObject.getName();
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public Warehouse getWarehous(int index)
  {
    while(true)
      try{
        return realObject.getWarehous(index);
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public List<Warehouse> getWarehouses()
  {
    while(true)
      try{
        return realObject.getWarehouses();
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public int numberOfWarehouses()
  {
    while(true)
      try{
        return realObject.numberOfWarehouses();
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public boolean hasWarehouses()
  {
    while(true)
      try{
        return realObject.hasWarehouses();
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public int indexOfWarehous(Warehouse aWarehous)
  {
    while(true)
      try{
        return realObject.indexOfWarehous(aWarehous);
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public SystemManager getSystemManager()
  {
    while(true)
      try{
        return realObject.getSystemManager();
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public boolean hasSystemManager()
  {
    while(true)
      try{
        return realObject.hasSystemManager();
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public static int minimumNumberOfWarehouses()
  {
    while(true)
      try{
        return AgentImpl.minimumNumberOfWarehouses();
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public boolean addWarehous(Warehouse aWarehous)
  {
    while(true)
      try{
        return realObject.addWarehous(aWarehous);
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public boolean removeWarehous(Warehouse aWarehous)
  {
    while(true)
      try{
        return realObject.removeWarehous(aWarehous);
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public boolean addWarehousAt(Warehouse aWarehous, int index)
  {
    while(true)
      try{
        return realObject.addWarehousAt(aWarehous,index);
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public boolean addOrMoveWarehousAt(Warehouse aWarehous, int index)
  {
    while(true)
      try{
        return realObject.addOrMoveWarehousAt(aWarehous,index);
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public boolean setSystemManager(SystemManager aSystemManager)
  {
    while(true)
      try{
        return realObject.setSystemManager(aSystemManager);
        }
    catch(Exception e) {System.err.println(e.toString());}
  }
  public void delete()
  {
    while(true)
      try{
        realObject.delete();
        break;
        }
    catch(Exception e) {System.err.println(e.toString());}
  }

  public boolean equals(Object obj)
  {    if(obj.getClass()!=this.getClass())
      return false;
    return (getHashCode()==((Agent)obj).getHashCode());
  }
protected Agent(){}
}