public ArrayList <Franchise> DBfranchisorRouter (Object sysObject, 
             String action){
    
        //local container 
        ArrayList <Franchise> temp;
         
        try{            
                if (sysObject instanceof String && "VIEWALL".equals(action)){   
                    temp = queryDB.GetAllFranchises();
                    return temp;
                }
                if (sysObject instanceof Franchise && "VIEWITEM".equals(action)){    
                    temp = queryDB.GetOneFranchise(((Franchise)sysObject).getFranchiseID());
                    return temp;
                }                
        }
        catch(UnauthorizedUserException e){
                Franchise error = new Franchise(e.getMessage(), 
                        "", "", "", "", "", "", "", "" );
                temp = new ArrayList();
                temp.add(error);
                return temp; 
        }
        catch(BadConnectionException e){
                Franchise error = new Franchise(e.getMessage(), "", "", "",
                        "", "", "", "", "" );
                temp = new ArrayList();
                temp.add(error);
                return temp;
        }          
        catch(DoubleEntryException e){
                Franchise error = new Franchise(e.getMessage(), "", 
                        "", "", "", "", "", "", "" );
                temp = new ArrayList();
                temp.add(error);
                return temp;             
        }
        return null;
    }//end DBfranchisorRouter method