public void setMainWarehouse(org.openxava.test.model.IWarehouse newWarehouse)
     throws RemoteException {
   if (newWarehouse != null && !(newWarehouse instanceof org.openxava.test.model.Warehouse)) {
     throw new IllegalArgumentException(XavaResources.getString("ejb_to_pojo_illegal"));
   }
   this.mainWarehouse = newWarehouse;
   this.mainWarehouse_number = newWarehouse == null ? null : new Integer(newWarehouse.getNumber());
 }
 public org.openxava.test.model.IWarehouse getMainWarehouse() {
   if (mainWarehouse != null) {
     // Because not-found='ignore' annul lazy initialization, we simulate it
     try {
       mainWarehouse.toString();
     } catch (Exception ex) {
       return null;
     }
   }
   return mainWarehouse;
 }