Package org.hibernate.classic

Examples of org.hibernate.classic.Session.save()


    estado.setDescripcion(descripcionEstado);
    estado.setTipoItem(savedTipoItem);
   
    Session session = HibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();
    session.save(estado);
    session.getTransaction().commit()
  }

  public void eliminarEstadoTipoItem(Estado savedEstado, TipoItem savedTipoItem){
 
View Full Code Here


    estadoMiembro.setEstado(estadoItem);
    estadoMiembro.setMiembro(nuevoMiembro);
   
      Session session = HibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();
      session.save(estadoMiembro);
      session.getTransaction().commit();

  }
 
    public Collection<Miembro> getMiembrosDisponibles(Estado estado){
View Full Code Here

    estadoHistorico.setEstadoActual(estadoItem);
    estadoHistorico.setEstadoHistorico(estadoHistoricoSiguiente);
   
    Session session = HibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();
    session.save(estadoHistorico);
    session.getTransaction().commit();
   
  }

  public void nuevoUsuario(String nombreUsuario, String claveUsuario,
View Full Code Here

    nuevoUsuario.setClave(claveUsuario);
    nuevoUsuario.setRole(savedRole);
   
    Session session = HibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();
        session.save(nuevoUsuario);
        session.getTransaction().commit();
   
  }

  public void editarProyecto(Proyecto savedProyecto,
View Full Code Here

    estado_estadoSiguiente.setEstadoInicial(estadoI);
    estado_estadoSiguiente.setEstadoSiguiente(estadoF);

      Session session = HibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();
      session.save(estado_estadoSiguiente);
      session.getTransaction().commit();
 
   
  @SuppressWarnings("unchecked")
    public Collection<TipoItem> getTiposItems(Proyecto proyecto){
View Full Code Here

      return null;
    Session s = Databinder.getHibernateSession();
    SectionStatus stat = getSectionStatus(person, sec);
    if (stat == null) {
      stat = new SectionStatus(person, new ContentLoc(sec).getLocation(), complete);
      s.save(stat);
    } else {
      stat.setCompleted(complete);
    }
    // If there are no response groups, automatically mark as Reviewed
    if (!sec.hasResponseGroup()) {
View Full Code Here

    }
    Session s = Databinder.getHibernateSession();
    SectionStatus stat = getSectionStatus(student, sec);
    if (stat == null) {
      stat = new SectionStatus(student, new ContentLoc(sec).getLocation(), false);
      s.save(stat);
    }
    if (role.equals(Role.STUDENT))
      stat.setUnreadStudentMessages(stat.getUnreadStudentMessages() + amount);
    else
      stat.setUnreadTeacherMessages(stat.getUnreadTeacherMessages() + amount);
View Full Code Here

    ISIPrompt prompt = new ISIPrompt(PromptType.MY_QUESTIONS);
    if (mOwner != null) {
      prompt.setTargetUser(mOwner.getObject());
      eventService.saveEvent("question:create", text, pageName);
    }
    session.save(prompt)
    question.setPrompt(prompt);
    session.save(question);
    cwmService.flushChanges();
  }
   
View Full Code Here

      prompt.setTargetUser(mOwner.getObject());
      eventService.saveEvent("question:create", text, pageName);
    }
    session.save(prompt)
    question.setPrompt(prompt);
    session.save(question);
    cwmService.flushChanges();
  }
   
  /**
   * Returns the number of questions this user has created.  If the user is null, returns the number
View Full Code Here

    s.beginTransaction();

    Truck truck = new Truck();
    truck.setVin( "123t" );
    truck.setOwner( "Steve" );
    s.save( truck );

    // manually flush the session to ensure the insert happens
    s.flush();

    // now issue a bulk delete against Car which should force the temp table to be
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.