Package edu.asu.securebanking.hibernateexception

Examples of edu.asu.securebanking.hibernateexception.InternalException


    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 does not exist in this Department!");
    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{
      Query query1 = session.getNamedQuery("updatesalary");
      query1.setParameter("employeeId", id);
      query1.setParameter("salary", salary);
      int result = query1.executeUpdate();
View Full Code Here

    // TODO Auto-generated method stub
    Session session = sessionFactory.getCurrentSession();
    List<Pki> list = session.createCriteria(Pki.class).add( Restrictions.eq("transId", transId)).list();
   
    if(list.size() == 0)
      throw new InternalException("Invalid Certificate");
    else
      return list.get(0);
  }
View Full Code Here

     
        Query query = session.getNamedQuery("findexternaltransaction");
      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<ExternalUserTransaction> list = query.list();
     
      ExternalUserTransaction queryResult = list.get(0);
      logger.info("External User Transaction -- Searched-- Transaction Id  " + id);
            return queryResult;
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.