Package org.springframework.orm.hibernate3

Examples of org.springframework.orm.hibernate3.HibernateCallback


   * @see no.ugland.utransprod.dao.ColliDAO#findByNameAndPostShipment(java.lang.String,
   *      no.ugland.utransprod.model.PostShipment)
   */
  public Colli findByNameAndPostShipment(final String colliName,
      final PostShipment postShipment) {
    return (Colli) getHibernateTemplate().execute(new HibernateCallback() {

      @SuppressWarnings("unchecked")
      public Object doInHibernate(Session session)
          throws HibernateException {
        List<Colli> collies = session.createCriteria(Colli.class).add(
View Full Code Here


    });
  }

  public void lazyLoadAll(final Colli colli) {
    getHibernateTemplate().execute(new HibernateCallback() {

      public Object doInHibernate(Session session)
          throws HibernateException {
        if (!session.contains(colli)&&colli.getColliId()!=null) {
          session.load(colli, colli.getColliId());
View Full Code Here

     * @see no.ugland.utransprod.dao.ConstructionTypeDAO#findAllExceptMaster()
     */
    @SuppressWarnings("unchecked")
    public final List<ConstructionType> findAllExceptMaster() {
        return (List<ConstructionType>) getHibernateTemplate().execute(
                new HibernateCallback() {

                    public Object doInHibernate(final Session session){

                        return session
                                .createCriteria(ConstructionType.class)
View Full Code Here

    public final void lazyLoad(final ConstructionType constructionType,
            final LazyLoadConstructionTypeEnum[] lazyEnums) {

        if (constructionType != null
                && constructionType.getConstructionTypeId() != null) {
            getHibernateTemplate().execute(new HibernateCallback() {

                @SuppressWarnings("incomplete-switch")
                public Object doInHibernate(final Session session){
                    session.load(constructionType, constructionType
                            .getConstructionTypeId());
View Full Code Here

     */
    public final void lazyLoadAttribute(final ConstructionTypeAttribute attribute,
            final LazyLoadConstructionTypeAttributeEnum[] lazyEnums) {
        if (attribute != null
                && attribute.getConstructionTypeAttributeId() != null) {
            getHibernateTemplate().execute(new HibernateCallback() {

                public Object doInHibernate(final Session session) {
                    session.load(attribute, attribute
                            .getConstructionTypeAttributeId());
                    Set<?> set;
View Full Code Here

     *      no.ugland.utransprod.service.enums.LazyLoadConstructionTypeArticleEnum[])
     */
    public final void lazyLoadArticle(final ConstructionTypeArticle article,
            final LazyLoadConstructionTypeArticleEnum[] lazyEnums) {
        if (article != null && article.getConstructionTypeArticleId() != null) {
            getHibernateTemplate().execute(new HibernateCallback() {

                public Object doInHibernate(final Session session){
                    if (!session.contains(article)) {
                        session.load(article, article
                                .getConstructionTypeArticleId());
View Full Code Here

     * ConstructionType)
     */
    public final void lazyLoadTree(final ConstructionType constructionType) {
        if (constructionType != null
                && constructionType.getConstructionTypeId() != null) {
            getHibernateTemplate().execute(new HibernateCallback() {

                public Object doInHibernate(final Session session) {

                    session.load(constructionType, constructionType
                            .getConstructionTypeId());
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    public final List<ConstructionType> findByProductArea(
            final ProductArea productArea) {
        return (List<ConstructionType>) getHibernateTemplate().execute(
                new HibernateCallback() {

                    public Object doInHibernate(final Session session){
                        return session
                                .createCriteria(ConstructionType.class)
                                .add(
View Full Code Here

     * @see no.ugland.utransprod.dao.ConstructionTypeDAO#findAllMasters()
     */
    @SuppressWarnings("unchecked")
    public final List<ConstructionType> findAllMasters() {
        return (List<ConstructionType>) getHibernateTemplate().execute(
                new HibernateCallback() {

                    public Object doInHibernate(final Session session) {

                        return session.createCriteria(ConstructionType.class)
                                .add(Restrictions.eq("isMaster", 1)).list();
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    public final List<ConstructionType> findMasterByProductArea(
            final ProductArea productArea) {
        return (List<ConstructionType>) getHibernateTemplate().execute(
                new HibernateCallback() {

                    public Object doInHibernate(final Session session){

                        return session.createCriteria(ConstructionType.class)
                                .add(Restrictions.eq("isMaster", 1)).add(
View Full Code Here

TOP

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

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.