Package org.springframework.orm.hibernate3

Examples of org.springframework.orm.hibernate3.HibernateTemplateTests


        super(ProductAreaGroup.class);
    }

    public final ProductAreaGroup findByName(final String name) {
        return (ProductAreaGroup) getHibernateTemplate().execute(
                new HibernateCallback() {

                    @SuppressWarnings("unchecked")
                    public Object doInHibernate(final Session session) {
                        List<ProductAreaGroup> list = session.createCriteria(
                                ProductAreaGroup.class).add(
View Full Code Here


    public CuttingDAOHibernate() {
        super(Cutting.class);
    }

    public Cutting findByOrder(final Order order) {
        return (Cutting)getHibernateTemplate().execute(new HibernateCallback() {
       
            @SuppressWarnings("unchecked")
      public Object doInHibernate(final Session session){
                List<Cutting> list = session.createCriteria(Cutting.class).add(Restrictions.eq("order", order)).list();
                if(list!=null&&list.size()==1){
View Full Code Here

    public ImportOrderVDAOHibernate() {
        super(ImportOrderV.class);
    }

    public ImportOrderV findByNumber1(final String number1) {
        return (ImportOrderV)getHibernateTemplate().execute(new HibernateCallback() {
       
            @SuppressWarnings("unchecked")
      public Object doInHibernate(final Session session) {
                List<ImportOrderV> list = session.createCriteria(ImportOrderV.class).add(Restrictions.eq("number1", number1)).list();
                if(list!=null&&list.size()==1){
View Full Code Here

     * @see no.ugland.utransprod.dao.DAO#getObjects(java.lang.String)
     */
    @SuppressWarnings("unchecked")
    public List<E> getObjects(final String orderBy) {
        return (List<E>) getHibernateTemplate().execute(
                new HibernateCallback() {

                    public Object doInHibernate(Session session)
                            throws HibernateException {
                        return session.createCriteria(clazz).addOrder(
                                Order.asc(orderBy)).list();
View Full Code Here

    }
   
    public void lazyLoad(final Object object,final Serializable id,final LazyLoadEnum[][] enums){
        if (object != null && id != null) {
            getHibernateTemplate().execute(new HibernateCallback() {

                public Object doInHibernate(Session session)
                        throws HibernateException {
                    if(!session.contains(object)){
                        session.load(object, id);
View Full Code Here

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

      public Object doInHibernate(Session session)
          throws HibernateException {
        Criteria criteria = session
            .createCriteria(OwnProductionV.class)
View Full Code Here

   * @see no.ugland.utransprod.dao.OwnProductionVDAO#findPacklistReady(java.lang.String)
   */
  @SuppressWarnings("unchecked")
  public List<OwnProductionV> findPacklistReady(
      final String productAreaGroupName) {
    return (List) getHibernateTemplate().execute(new HibernateCallback() {

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

   * @see no.ugland.utransprod.dao.OwnProductionVDAO#findPacklistNotReady(java.lang.String)
   */
  @SuppressWarnings("unchecked")
  public List<OwnProductionV> findPacklistNotReady(
      final String productAreaName, final String productAreaGroupName) {
    return (List) getHibernateTemplate().execute(new HibernateCallback() {

      public Object doInHibernate(Session session)
          throws HibernateException {
        Criteria criteria = session
            .createCriteria(OwnProductionV.class)
View Full Code Here

    /**
     * @see no.ugland.utransprod.dao.CustomerDAO#findByCustomerNr(java.lang.Integer)
     */
    public final Customer findByCustomerNr(final Integer customerNr) {
        return (Customer) getHibernateTemplate().execute(
                new HibernateCallback() {

                    @SuppressWarnings("unchecked")
                    public Object doInHibernate(final Session session) {
                        List<Customer> list = session.createCriteria(
                                Customer.class).add(
View Full Code Here

   */
  @SuppressWarnings("unchecked")
  public List<OrderPacklistReadyV> findByParams(
      final ExcelReportSetting params) {
    return (List<OrderPacklistReadyV>) getHibernateTemplate().execute(
        new HibernateCallback() {

          public Object doInHibernate(Session session)
              throws HibernateException {

            return session
View Full Code Here

TOP

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

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.