Package Entities

Examples of Entities.Account


    public void persist(Integer id, Travelerprofile profile, Traveldocument passport) {
        //Create Refrence OBJ of Travelers Profile for use in persistReward()
        profileRef = profile;
        //Create Dummy Account ID
        //alex.setIdaccount(4);
        Account acc = accountRef.find(id);
        profile.setAccountid(acc);
        //Create Travellers Profile       
        dao.create(profile);
        //Create TravelDocument
        passport.setTravlerprofileIdtravlerprofile(profile);//Establish Correct FK Reference to Travellers Profile
View Full Code Here


         reward3.setProvider(airType3);
         reward3.setDescription(status3);
         reward3.setMembershipnumber(cardNum3);
         handler.persistReward(reward3);
         }*/
        Account user = accHandler.getAccount(accountID);
        ((HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false)).setAttribute("isFirst", false);
        //FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("isFirst", false);
        user.setDatelogin(new Date());
        logHandler.modifyAccount(user);
        FacesContext.getCurrentInstance().addMessage("userTop", new FacesMessage(FacesMessage.SEVERITY_INFO, "Success", "Travel Profile active"));
        return "userHome";
    }
View Full Code Here

    public String createAccount(){
        if(handler.checkUsername(getUsername())){
            FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,"Input Error","Username already exists"));
            return null;
        }else{
            Account newAccount = new Account();
            newAccount.setUsername(getUsername());
            newAccount.setPassword(getPassword());           

            handler.registerNewAccount(newAccount,getRole(),departmentRole,accountID);
           
            return "accountAll";
        }       
View Full Code Here

        hops.add(tempItin);

        appRef = appHandler.persistApplication(newApplication, newQuote, accQuotes, carQuotes, flightQuotes, hops, newTravel, profileRef);

        //ALEX CODE FOR ADVANCED APPROVAL SYSTEM
        Account accRef = accHandler.getAccount(accountID);
        Approval appr1 = new Approval();
        Approval appr2 = new Approval();
        Approval appr3 = new Approval();
        Approval appr4 = new Approval();
        Approval appr5 = new Approval();
View Full Code Here

    public String createAdmin() {
        if (handler.checkUsername(getAdminName())) {
            FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Input Error", "Username already exists"));
            return null;
        } else {
            Account newAccount = new Account();
            newAccount.setUsername(getAdminName());
            newAccount.setPassword(getAdminPassword());

            handler.registerNewAccountDiv(newAccount, 21, getDepartment());
            FacesContext.getCurrentInstance().addMessage("superHomeTop", new FacesMessage(FacesMessage.SEVERITY_INFO, "Success.", "Administrator Account Created"));
            return "./superHome.xhtml";
        }
View Full Code Here

    public String createAccount(){
        if(handler.checkUsername(getUsername())){
            FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,"Input Error","Username already exists"));
            return "./createAccount.xhtml";
        }else{
            Account newAccount = new Account();
            newAccount.setUsername(getUsername());
            newAccount.setPassword(getPassword());

            handler.registerNewAccount(newAccount,getRole());
           
            return "./adminHome.xhtml";
        }       
View Full Code Here

        return forexform;
    }

    @Override
    public Travelerprofile find(Integer id) {
        Account acc = afl.find(id);
        List<Travelerprofile> all = tpf.findAll();
        for (Travelerprofile each : all) {
            if (each.getAccountid().getIdaccount().equals(id)) {
                return each;
View Full Code Here

         reward3.setProvider(airType3);
         reward3.setDescription(status3);
         reward3.setMembershipnumber(cardNum3);
         handler.persistReward(reward3);
         }*/
        Account user = accHandler.getAccount(accountID);
        ((HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false)).setAttribute("isFirst", false);
        //FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("isFirst", false);
        user.setDatelogin(new Date());
        logHandler.modifyAccount(user);
        FacesContext.getCurrentInstance().addMessage("userTop", new FacesMessage(FacesMessage.SEVERITY_INFO, "Success", "Travel Profile active"));
        return "userHome";
    }
View Full Code Here

         reward3.setProvider(airType3);
         reward3.setDescription(status3);
         reward3.setMembershipnumber(cardNum3);
         handler.persistReward(reward3);
         }*/
        Account user = accHandler.getAccount(accountID);
        ((HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false)).setAttribute("isFirst", false);
        //FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("isFirst", false);
        user.setDatelogin(new Date());
        logHandler.modifyAccount(user);
        FacesContext.getCurrentInstance().addMessage("userTop", new FacesMessage(FacesMessage.SEVERITY_INFO, "Success", "Travel Profile active"));
        return "userHome";
    }
View Full Code Here

    public String createAccount(){
        if(handler.checkUsername(getUsername())){
            FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,"Input Error","Username already exists"));
            return null;
        }else{
            Account newAccount = new Account();
            newAccount.setUsername(getUsername());
            newAccount.setPassword(getPassword());

            handler.registerNewAccount(newAccount,getRole());
           
            return "accountAll";
        }       
View Full Code Here

TOP

Related Classes of Entities.Account

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.