Package com.google.appengine.api.datastore

Examples of com.google.appengine.api.datastore.Transaction.commit()


        layout.setManagerRef(manager);

        Transaction tx = Datastore.beginTransaction();
        layout.setManagerRef(manager);
        Datastore.put(tx, layout);
        tx.commit();
    }

    /**
     * レイアウト情報の取得
     *
 
View Full Code Here


     * @return レイアウト情報
     */
    public Layout get(User user, long lid) {
        Transaction tx = Datastore.beginTransaction();
        Layout result = this.get(tx, user, lid);
        tx.commit();
        return result;
    }

    /**
     * レイアウト情報の取得
 
View Full Code Here

    }

    public void delete(User user, List<Long> lids) {
        Transaction tx = Datastore.beginTransaction();
        this.delete(tx, user, lids);
        tx.commit();
    }
    /**
     * レイアウト情報の削除
     * @param tx トランザクション
     * @param manager 代表者情報
View Full Code Here

        assertThat(user.getInitialKey(), not(""));

        Manager stored = Datastore.getOrNull(Manager.class, user.getUid());
        assertThat(stored, is(nullValue()));

        tx.commit();
        stored = Datastore.getOrNull(Manager.class, user.getUid());
        assertThat(stored, instanceOf(Manager.class));
        manager = (Manager)stored;
        assertThat(manager.getName(), is(name));
        assertThat(manager.getMail().getEmail(), is(mail));
View Full Code Here

                throw new IllegalStateException(e);
            }
        }
        timeline.getManagerRef().setModel(manager);
        Datastore.put(tx, timeline);
        tx.commit();
    }

    /**
     * タイムライン情報の取得
     *
 
View Full Code Here

     * @return タイムライン情報
     */
    public TimeLine get(long tlid) {
        Transaction tx = Datastore.beginTransaction();
        TimeLine result = this.get(tx, tlid);
        tx.commit();
        return result;
    }

    /**
     * タイムライン情報の取得
 
View Full Code Here

     * @return 掲示板情報
     */
    public Board get(long bid) {
        Transaction tx = Datastore.beginTransaction();
        Board result = this.get(tx, bid);
        tx.commit();
        return result;
    }

    /**
     * 掲示板情報の取得
 
View Full Code Here

     */
    public Board put(long bid, String title) {
        Transaction tx = Datastore.beginTransaction();
        Board result = put(tx, bid, title);

        tx.commit();

        return result;
    }

    /**
 
View Full Code Here

                    return forward("/manager/regist.jsp");
                }

                Datastore.put(user);
                // エラーが無ければ登録
                tx.commit();

                // 登録終了画面(完了画面ではない)を表示
                return forward("/manager/registered.jsp");
            } else {
                return forward("/manager/regist.jsp");
View Full Code Here

            Entity entity = DatastoreUtil.getOrNull(ds, tx, key);
            if (entity != null
                && globalTransactionKey.equals(entity
                    .getProperty(GLOBAL_TRANSACTION_KEY_PROPERTY))) {
                DatastoreUtil.delete(ds, tx, key);
                tx.commit();
            }
        } finally {
            if (tx.isActive()) {
                tx.rollback();
            }
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.