Package au.edu.qut.yawl.exceptions

Examples of au.edu.qut.yawl.exceptions.YPersistenceException


            }
            session.flush();
            tx.commit();
            session.close();
        } catch (Exception e) {
            throw new YPersistenceException("Hibernate problem: " + e.getMessage(), e);
        }
    }
View Full Code Here


            session.flush();
            session.evict(obj);
            tx.commit();
            session.close();
        } catch (HibernateException e) {
            throw new YPersistenceException("Hibernate problem: " + e.getMessage(), e);
        }
    }
View Full Code Here

        Query query = null;

        try {
            query = _factory.openSession().createQuery(queryString);
        } catch (HibernateException e) {
            throw new YPersistenceException("Failure to create Hibernate query object", e);
        }
        return query;
    }
View Full Code Here

                }
                return human;
            }
        } catch (HibernateException e) {
            throw new YPersistenceException("Unexpected hibernate problem.", e);
        }
    }
View Full Code Here

            if (roleLst.size() < 1) {
                return null;
            }
            return (HumanResourceRole) roleQuery.iterate().next();
        } catch (HibernateException e) {
            throw new YPersistenceException("Unexpected hibernate problem.", e);
        }
    }
View Full Code Here

                HumanResourceRole resourceinrole = (HumanResourceRole) resourcesinrole.get(i);
                resources.add(resourceinrole.getHumanResource());
            }
            return (Resource[]) resources.toArray(new Resource[resources.size()]);
        } catch (HibernateException e) {
            throw new YPersistenceException("Failure to get user id");
        }
    }
View Full Code Here

                HumanResourceRole humanResourceRole = (HumanResourceRole) humanResourceRoleList.get(i);
                roles.add(humanResourceRole.getRole());
            }
            return (Role[]) roles.toArray(new Role[roles.size()]);
        } catch (HibernateException e) {
            throw new YPersistenceException("Unexpected hibernate problem.", e);
        }
    }
View Full Code Here

    }

    public void addHresPerformsRole(String resourceID, String selectrole) throws YPersistenceException {
        Resource resource = getResource(resourceID);
        if (resource == null) {
            throw new YPersistenceException(
                    binaryRelationFKMissingMsg.format(new String[]{"resource", resourceID, "role"}));
        }
        Role role = getRole(selectrole);
        if (role == null) {
            throw new YPersistenceException(
                    binaryRelationFKMissingMsg.format(new String[]{"role", selectrole, "resource"}));
        }
        HumanResourceRole hResRole = new HumanResourceRole();
        hResRole.setHumanResource(resource);
        hResRole.setRole(role);
View Full Code Here

            if (roleLst.size() < 1) {
                return null;
            }
            return (Role) roleQuery.iterate().next();
        } catch (HibernateException e) {
            throw new YPersistenceException("Unexpected hibernate problem.", e);
        }
    }
View Full Code Here

                return query.list();
            } else {
                return null;
            }
        } catch (HibernateException e) {
            throw new YPersistenceException("Unexpected hibernate problem.", e);
        }
    }
View Full Code Here

TOP

Related Classes of au.edu.qut.yawl.exceptions.YPersistenceException

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.