Examples of beginTransaction()


Examples of org.hibernate.Session.beginTransaction()

    //ChannelBuilder builder = new ChannelBuilder(session);
    Transaction tx = null;

    // --- list
    try {
      tx = session.beginTransaction();
      // Query q = session.createQuery("select ch.id from Channel as ch");
      // List result = q.list();
      List result = session.createQuery("from Channel").list();
      // List chs = session.find("from Channel as ch where cat.title = ?",
      //                         "Another category title", Hibernate.STRING);
View Full Code Here

Examples of org.hibernate.Session.beginTransaction()

    throws PersistenceManagerException {

    Transaction tx = null;
    try {
      final Session session = HibernateUtil.openSession();
      tx = session.beginTransaction();

      HibernateUtil.lock(first, session);
      HibernateUtil.lock(second, session);
      mergeGroups(first, second, session);
View Full Code Here

Examples of org.hibernate.Session.beginTransaction()

    channel.hashCode();

    Transaction tx = null;
    try {
      final Session session = HibernateUtil.openSession();
      tx = session.beginTransaction();

      HibernateUtil.lock(channel, session);
      group.add(channel);
      HibernateUtil.updateObject(group, session);
View Full Code Here

Examples of org.hibernate.Session.beginTransaction()

    throws PersistenceManagerException {

    Transaction tx = null;
    try {
      final Session session = HibernateUtil.openSession();
      tx = session.beginTransaction();

      HibernateUtil.lock(channel, session);
      group.remove(channel);
      HibernateUtil.updateObject(group, session);
View Full Code Here

Examples of org.hibernate.Session.beginTransaction()

    ItemIF[] items = null;

    Transaction tx = null;
    try {
      final Session session = HibernateUtil.openSession();
      tx = session.beginTransaction();

      HibernateUtil.lock(channel, session);
      items = deleteChannel(channel, groups, session);

      tx.commit();
View Full Code Here

Examples of org.hibernate.Session.beginTransaction()

    throws PersistenceManagerException {

    Transaction tx = null;
    try {
      final Session session = HibernateUtil.openSession();
      tx = session.beginTransaction();

      // Create item object and save to database
      deleteItem(item, session);

      tx.commit();
View Full Code Here

Examples of org.hibernate.Session.beginTransaction()

    throws PersistenceManagerException {

    Transaction tx = null;
    try {
      final Session session = HibernateUtil.openSession();
      tx = session.beginTransaction();

      // Save item to database
      HibernateUtil.lock(channel, session);
      createItem(item, channel, session);
View Full Code Here

Examples of org.hibernate.Session.beginTransaction()

   *
   */
  public void fill() throws JRException
  {
    Session session = createSession();
    Transaction transaction = session.beginTransaction();

    Map params = getParameters(session);
   
    File[] files =
      new File[]{
View Full Code Here

Examples of org.hibernate.Session.beginTransaction()

    target_range_push.addSelectionListener(new SelectionListener() {
      public void widgetDefaultSelected(SelectionEvent e) {
        synchronized (synchro) {
          synchronized (sync_tree) {
            final Session session = synchro.getSessionFactory().getCurrentSession();
            session.beginTransaction();
            try  {
              addTargetAtCurrentPosition(new TargetIPv4Range("added by GUI",
                  GenericTools.stringToInet4Address(target_range_begin.getText()),
                  GenericTools.stringToInet4Address(target_range_end.getText())));
              target_range_begin.setText("000.000.000.000");
View Full Code Here

Examples of org.hibernate.Session.beginTransaction()

        final Matcher match =
          Pattern.compile("([0-9]+)").matcher(cmd_output);
        synchronized (getGUI().getSynchro()) {
          synchronized (getGUI().sync_tree) {
            final Session session = getGUI().getSynchro().getSessionFactory().getCurrentSession();
            session.beginTransaction();
            try {
              session.update(this); // pour le setDescription() => � enlever qd la description ne sera plus persistente
              if (match.find()) {
                final int value = new Integer(match.group(1)).intValue();
                getTarget().addEvent(new EventGenericProcess(true, value));
View Full Code Here
TOP
Copyright © 2015 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.