Package edu.asu.securebanking.hibernateexception

Examples of edu.asu.securebanking.hibernateexception.InternalException


    Session session = sessionFactory.getCurrentSession();
    Query query = session.getNamedQuery("getpiireq");
    query.setParameter("userid", piiAuth.getUserid());
    System.out.println("size of list is: "+query.list().size());
    if (!(query.list().size() == 0))
      throw new InternalException("User already in Critical Transaction Queue!");
    else{
      session.save(piiAuth);
    }
      logger.info("PiiAuth -- Created-- User Id " + piiAuth.getUserid());
  }
View Full Code Here


   
    Query query = session.getNamedQuery("findcriticaluser");
    query.setParameter("employeeId", internalCriticalTransaction.getEmployeeId());
    System.out.println("size of list is: "+query.list().size());
    if (!(query.list().size() == 0))
      throw new InternalException("User already in Critical Transaction Queue!");
    else{
      session.save(internalCriticalTransaction);
    }
    logger.info("Internal Critical Transactions -- Created -- Transaction Id " + internalCriticalTransaction.getTransId());
  }
View Full Code Here

   
    Query query = session.getNamedQuery("findcriticaluser");
    query.setParameter("employeeId", id);
    System.out.println("size of list is: "+query.list().size());
    if (query.list().size() == 0)
      throw new InternalException("User does not exist in the database!");
    List<?> list = query.list();
    logger.info("Internal Critical Transactions -- Updated by CEO -- Employee Id --"+ id);
    return (InternalCriticalTransaction)list.get(0);

  }
View Full Code Here

   
    Query query = session.getNamedQuery("findcriticaluser");
    query.setParameter("employeeId", id);
    System.out.println("size of list is: "+query.list().size());
    if (query.list().size() == 0)
      throw new InternalException("User does not exist in the database!");
    List<?> list = query.list();
    logger.info("Internal Critical Transactions -- Updated by PRESIDENT -- Employee Id --"+ id);
    return (InternalCriticalTransaction)list.get(0);
  }
View Full Code Here

   
    Query query = session.getNamedQuery("findcriticaluser");
    query.setParameter("employeeId", id);
    System.out.println("size of list is: "+query.list().size());
    if (query.list().size() == 0)
      throw new InternalException("User does not exist in the database!");
    List<?> list = query.list();
    logger.info("Internal Critical Transactions -- Updated by VICE PRESIDENT -- Employee Id --"+ id);
    return (InternalCriticalTransaction)list.get(0);
  }
View Full Code Here

   
        Query query = session.getNamedQuery("findinternaltransaction");
      query.setParameter("transId", id);
      System.out.println("size of list is: "+query.list().size());
      if (query.list().size() == 0)
        throw new InternalException("Transaction ID does not exist in the database!");
      List<InternalUserTransaction> list = query.list();
     
      InternalUserTransaction queryResult = list.get(0);
     
       logger.info("Internal User Transaction  Searched -- Employee Id" + queryResult.getEmployeeId()+" -- TransactionId --" + queryResult.getTransId());
View Full Code Here

          .add( Restrictions.eq("transId", id ) )
          .add( Restrictions.eq("deptId", deptid ) )
          .list();
     
      if (list.size() == 0)
        throw new InternalException("Transaction ID does not exist in the database!");
     
      InternalUserTransaction queryResult = list.get(0);
     
      System.out.println("transaction.getEmployeeId()"+ list.get(0).getEmployeeId() + "transaction.getDescription()" + list.get(0).getDescription()+"transaction.getTransId()" + list.get(0).getTransId()+" transaction.getStatus()" +list.get(0).getStatus());
View Full Code Here

     
        Query query = session.getNamedQuery("findinternaltransaction");
      query.setParameter("transId", id);
      System.out.println("size of list is: "+query.list().size());
      if (query.list().size() == 0)
        throw new InternalException("Transaction ID does not exist in the database!");
      List<InternalUserTransaction> list = query.list();
     
      InternalUserTransaction queryResult = list.get(0);
     
       logger.info("Internal User Transaction  Searched -- Employee Id" + queryResult.getEmployeeId()+" -- TransactionId --" + queryResult.getTransId());
View Full Code Here

    Session session = sessionFactory.getCurrentSession();
    Query query = session.getNamedQuery("findinternaluser");
    query.setParameter("employeeId", id);
    System.out.println("size of list is: "+query.list().size());
    if (query.list().size() == 0)
      throw new InternalException("User ID does not exist in the database!");
    List<?> list = query.list();
   
    logger.info("Internal Account -- Searched-- Employee Id  " + id);
   
    return (InternalAccount)list.get(0);
View Full Code Here

    query2.setParameter("employeeId", id);
   
    System.out.println("(Transfer) size of list is: "+query2.list().size());
    if (query2.list().size() == 0)
    {
      throw new InternalException("User ID does not exist in the database!");
    }
   
    else if (deptid == 0)
    {
      throw new InternalException("Please select a department!");
    }

    InternalAccount temp = (InternalAccount) query2.list().get(0);
   
    if (temp.getDeptid() == 100){
      throw new InternalException("Cannot transfer Corporate Level officials!");
    }
    else{
      Query query = session.getNamedQuery("findinternaluserbyidanddeptid");
      query.setParameter("employeeId", id);
      query.setParameter("deptid", deptid);
      System.out.println("size of list is: "+query.list().size());
      if (!(query.list().size() == 0))
      {
        throw new InternalException("User ID already exists in this Department!");
      }
      else{
        Query query1 = session.getNamedQuery("transferinternaluser");
        /*Query query1 = session.createQuery("update InternalAccount set deptid = :deptid where employeeId = :employeeId");*/
        query1.setParameter("employeeId", id);
View Full Code Here

TOP

Related Classes of edu.asu.securebanking.hibernateexception.InternalException

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.