Package de.spotnik.persistence

Examples of de.spotnik.persistence.DatabaseException


    {
        List result = q.list();
       
        if( result.size() > 1)
        {
            throw new DatabaseException("expected a single result only!");
        }
        else if( result.size() == 0)
        {
            return null;
        }
View Full Code Here


        {
            return (T) getCurrentSession().get(getEntityClass(), id);
        }
        catch( HibernateException hex)
        {
            throw new DatabaseException("unable to find entity", hex);
        }
    }
View Full Code Here

        {
            getCurrentSession().delete(entity);
        }
        catch( HibernateException hex)
        {
            throw new DatabaseException("unable to delete message", hex);
        }
    }
View Full Code Here

        {
            getCurrentSession().merge(entity);
        }
        catch( HibernateException hex)
        {
            throw new DatabaseException("unable to merge entity", hex);
        }
    }
View Full Code Here

        {
            getCurrentSession().persist(entity);
        }
        catch( HibernateException hex)
        {
            throw new DatabaseException("unable to persist entity", hex);
        }
    }
View Full Code Here

        {
            getCurrentSession().refresh(entity);
        }
        catch( HibernateException hex)
        {
            throw new DatabaseException("unable to refresh entity", hex);
        }
    }
View Full Code Here

        {
            getCurrentSession().replicate(entity, mode);
        }
        catch( HibernateException hex)
        {
            throw new DatabaseException("unable to replicate entity", hex);
        }
    }
View Full Code Here

TOP

Related Classes of de.spotnik.persistence.DatabaseException

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.