Examples of HibernateCallback


Examples of org.springframework.orm.hibernate3.HibernateCallback

  /**
   * @see no.ugland.utransprod.dao.OrderStatusNotSentVDAO#findByParams(no.ugland.utransprod.util.excel.ExcelReportSetting)
   */
  @SuppressWarnings("unchecked")
  public List<StatusOrdersNotSent> findByParams(final ExcelReportSetting params) {
    return (List) getHibernateTemplate().execute(new HibernateCallback() {

      public Object doInHibernate(Session session)
          throws HibernateException {
        List<Object[]> list = getSumPacklistNotReady(params, session);
       
View Full Code Here

Examples of org.springframework.orm.hibernate3.HibernateCallback

   * @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

Examples of org.springframework.orm.hibernate3.HibernateCallback

     * @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

Examples of org.springframework.orm.hibernate3.HibernateCallback

     * @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

Examples of org.springframework.orm.hibernate3.HibernateCallback

     *      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

Examples of org.springframework.orm.hibernate3.HibernateCallback

    /**
     * @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

Examples of org.springframework.orm.hibernate3.HibernateCallback

     * @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

Examples of org.springframework.orm.hibernate3.HibernateCallback

     * @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

Examples of org.springframework.orm.hibernate3.HibernateCallback

    /**
     * @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

Examples of org.springframework.orm.hibernate3.HibernateCallback

    @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
TOP
Copyright © 2018 www.massapi.com. 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.