Package org.springframework.orm.hibernate3

Examples of org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException


   * @see no.ugland.utransprod.dao.UserTypeDAO#getNumberOfUsers(no.ugland.utransprod.model.UserType)
   */
  public int getNumberOfUsers(final UserType userType) {

    return (Integer) getHibernateTemplate().execute(
        new HibernateCallback() {

          public Object doInHibernate(Session session)
              throws HibernateException {
            Query query = session
                .createQuery("select count(*) from ApplicationUser applicationUser where exists(select 1 from UserRole userRole  where userRole.applicationUser=applicationUser and userRole.userType=:userType)");
View Full Code Here


     * @see no.ugland.utransprod.dao.PostShipmentDAO#findAllWithoutTransport()
     */
    @SuppressWarnings("unchecked")
    public List<PostShipment> findAllWithoutTransport() {
        return (List<PostShipment>) getHibernateTemplate().execute(
                new HibernateCallback() {

                    public Object doInHibernate(Session session)
                            throws HibernateException {
                        // Query query = session.createQuery("select new
                        // PostShipment(postShipment.postShipmentId,postShipment.order,postShipment.postShipmentReady)
View Full Code Here

     * @see no.ugland.utransprod.dao.PostShipmentDAO#findAllNotSent()
     */
    @SuppressWarnings("unchecked")
    public List<PostShipment> findAllNotSent() {
        return (List<PostShipment>) getHibernateTemplate().execute(
                new HibernateCallback() {

                    public Object doInHibernate(Session session)
                            throws HibernateException {

                        String sql = "select new PostShipment(postShipment.postShipmentId,postShipment.postShipmentComplete,postShipment.order,postShipment.transport,postShipment.deviation,postShipment.sent,postShipment.postShipmentReady,postShipment.status) "
View Full Code Here

     *      no.ugland.utransprod.service.enums.LazyLoadPostShipmentEnum[])
     */
    public void lazyLoad(final PostShipment postShipment,
            final LazyLoadPostShipmentEnum[] enums) {
        if (postShipment != null && postShipment.getPostShipmentId() != null) {
            getHibernateTemplate().execute(new HibernateCallback() {

                @SuppressWarnings("incomplete-switch")
                public Object doInHibernate(Session session)
                        throws HibernateException {
                    session
View Full Code Here

    /**
     * @see no.ugland.utransprod.dao.PostShipmentDAO#lazyLoadTree(no.ugland.utransprod.model.PostShipment)
     */
    public void lazyLoadTree(final PostShipment postShipment) {
        if (postShipment != null && postShipment.getPostShipmentId() != null) {
            getHibernateTemplate().execute(new HibernateCallback() {

                public Object doInHibernate(Session session)
                        throws HibernateException {

                    if (!session.contains(postShipment)) {
View Full Code Here

     * @see no.ugland.utransprod.dao.PostShipmentDAO#findByOrderNr(java.lang.String)
     */
    @SuppressWarnings("unchecked")
    public List<PostShipment> findByOrderNr(final String orderNr) {
        return (List<PostShipment>) getHibernateTemplate().execute(
                new HibernateCallback() {

                    public Object doInHibernate(Session session)
                            throws HibernateException {
                        return session.createCriteria(PostShipment.class)
                                .createCriteria("order").add(
View Full Code Here

     * @see no.ugland.utransprod.dao.PostShipmentDAO#findByCustomerNr(java.lang.Integer)
     */
    @SuppressWarnings("unchecked")
    public List<PostShipment> findByCustomerNr(final Integer customerNr) {
        return (List<PostShipment>) getHibernateTemplate().execute(
                new HibernateCallback() {

                    public Object doInHibernate(Session session)
                            throws HibernateException {
                        return session.createCriteria(PostShipment.class)
                                .createCriteria("order").createCriteria(
View Full Code Here

    /**
     * @see no.ugland.utransprod.dao.PostShipmentDAO#load(no.ugland.utransprod.model.PostShipment)
     */
    public void load(final PostShipment postShipment) {
        if (postShipment != null) {
            getHibernateTemplate().execute(new HibernateCallback() {

                public Object doInHibernate(Session session)
                        throws HibernateException {
                    session
                            .load(postShipment, postShipment
View Full Code Here

    @SuppressWarnings("unchecked")
    public final List<PostShipment> findSentInPeriod(final Periode periode,
            final String productAreaGroupName) {
        return (List<PostShipment>) getHibernateTemplate().execute(
                new HibernateCallback() {

                    public Object doInHibernate(final Session session) {
                        Date fromDate = Util.getFirstDateInWeek(periode
                                .getYear(), periode.getWeek());
                        Date toDate = Util.getLastDateInWeek(periode.getYear(),
View Full Code Here

    /**
     * @see no.ugland.utransprod.dao.ArticleTypeDAO#findByName(java.lang.String)
     */
    public ArticleType findByName(final String name) {
        return (ArticleType) getHibernateTemplate().execute(new HibernateCallback() {

            @SuppressWarnings("unchecked")
            public Object doInHibernate(Session session) throws HibernateException {
                List<ArticleType> list = session.createCriteria(ArticleType.class).add(
                        Restrictions.ilike("articleTypeName", name)).list();
View Full Code Here

TOP

Related Classes of org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException

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.