Package org.hibernate

Examples of org.hibernate.Session.save()


          TagBean tag = new TagBean();
          tag.setSite(topic.getSite());
          tag.setRefId(topic.getId());
          tag.setRefType(DiaryBean.TYPE_BBS);
          tag.setName(tag_name);
          ssn.save(tag);
          tag_count ++;
        }
      }     
     
      ssn.save(topic);
View Full Code Here


          ssn.save(tag);
          tag_count ++;
        }
      }     
     
      ssn.save(topic);
      if (add_bookmark) {
        BookmarkBean bmb = new BookmarkBean();
        bmb.setOwner(topic.getUser());
        bmb.setSite(topic.getSite());
        bmb.setCreateTime(new Date());
View Full Code Here

        bmb.setSite(topic.getSite());
        bmb.setCreateTime(new Date());
        bmb.setParentId(topic.getId());
        bmb.setParentType(_BeanBase.TYPE_BBS);
        bmb.setTitle(topic.getTitle());
        ssn.save(bmb);
      }
      commit();
    } catch (HibernateException e) {
      rollback();
      throw e;
View Full Code Here

        ssb.setSiteId(siteid);
        ssb.setUvCount(uvCount);
        ssb.setUpdateTime(new Date());
        ssb.setSource(source);
        ssb.setStatDate(statDate);
        ssn.save(ssb);
      }
      commit();
    }catch(Exception e){
      rollback();
      throw e;
View Full Code Here

        parent = parent.getParent();
      }while(deep < 10);//������ʮ���ಾ

      photo.getUser().getCount().incPhotoCount(1);
     
      ssn.save(photo);
     
      if (album.getType() == AlbumBean.TYPE_PUBLIC
          && photo.getStatus() != PhotoBean.STATUS_PRIVATE) {
        List tags = photo.getKeywords();
        if(tags!=null && tags.size()>0){
View Full Code Here

            TagBean tag = new TagBean();
            tag.setSite(photo.getSite());
            tag.setRefId(photo.getId());
            tag.setRefType(DiaryBean.TYPE_PHOTO);
            tag.setName(tag_name);
            ssn.save(tag);
            tag_count ++;
          }
        }
      }
     
View Full Code Here

      if(reply.getPhoto().getReplyCount()>=max_reply_count)
        reply.getPhoto().setLock(1);
      reply.getPhoto().setLastReplyTime(new Date());
      if(reply.getUser()!=null)
        reply.getUser().getCount().incPhotoReplyCount(1);
      ssn.save(reply);
      commit();
    }catch(HibernateException e){
      rollback();
      throw e;
    }
View Full Code Here

    try{
      beginTransaction();
      if(bookmark.getCreateTime()==null)
        bookmark.setCreateTime(new Date());
      bookmark.getOwner().getCount().incBookmarkCount(1);
      ssn.save(bookmark);
      commit();     
    }catch(HibernateException e){
      rollback();
      throw e;
    }
View Full Code Here

    if (parameters.length == 0)
      return null;
    Session session = getContext().getSession();
    if (parameters[0].getClass().isArray()) {
      for (Object obj : (Object[]) parameters[0]) {
        session.save(obj);
      }
    } else {
      session.save(parameters[0]);
    }
    return null;
View Full Code Here

    if (parameters[0].getClass().isArray()) {
      for (Object obj : (Object[]) parameters[0]) {
        session.save(obj);
      }
    } else {
      session.save(parameters[0]);
    }
    return null;
  }

  @Override
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.