Package com.google.appengine.api.datastore

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


      bidirEntity.setProperty("childVal", "yap");
      ds.put(bidirEntity);

      Transaction txn = EasyMock.createMock(Transaction.class);
      EasyMock.expect(txn.getId()).andReturn("1").times(2);
      txn.commit();
      EasyMock.expectLastCall();
      EasyMock.replay(txn);
      EasyMock.expect(mockDatastore.beginTransaction(EasyMock.isA(TransactionOptions.class))).andReturn(txn);
      // the only get we're going to perform is for the pojo
      EasyMock.expect(mockDatastore.get(txn, pojoEntity.getKey())).andReturn(pojoEntity);
View Full Code Here


      bidirEntity.setProperty("childVal", "yap");
      ds.put(bidirEntity);

      Transaction txn = EasyMock.createMock(Transaction.class);
      EasyMock.expect(txn.getId()).andReturn("1").times(2);
      txn.commit();
      EasyMock.expectLastCall();
      EasyMock.replay(txn);
      EasyMock.expect(mockDatastore.beginTransaction(EasyMock.isA(TransactionOptions.class))).andReturn(txn);
      // the only get we're going to perform is for the pojo
      EasyMock.expect(mockDatastore.get(txn, pojoEntity.getKey())).andReturn(pojoEntity);
View Full Code Here

            status.setProperty("presence_available", true);
            status.setProperty("presence_show",
                               presenceShowStrings[PresenceShow.CHAT.ordinal()]);
            datastore.put(txn, status);
        }
        txn.commit();
        return status;
    }


    // Get or create a user entity for a JID.  This truncates the
View Full Code Here

            userEntity.setProperty("presence_show", "chat");
            userEntity.setProperty("status_message", "");
            userEntity.setProperty("last_chat_message", "");
            datastore.put(txn, userEntity);
        }
        txn.commit();
        return userEntity;
    }


View Full Code Here

                ds.put(messageBoard);

                log.info("Posting msg, updating count to " + count +
                         "; " + retries + " retries remaining");

                txn.commit();

                // Break out of retry loop.
                success = true;

            } catch (DatastoreFailureException e) {
View Full Code Here

            String phone, String zipcode, String address) {
        User result = null;
        Transaction tx = Datastore.beginTransaction();
        result = put(tx, uid, name, mail, phone, zipcode, address);

        tx.commit();

        return result;
    }

    /**
 
View Full Code Here

     */
    public Editor put(String uid, String name, String mail, Manager manager) {
        Transaction tx = Datastore.beginTransaction();
        Editor result = put(tx, uid, name, mail, manager);

        tx.commit();

        return result;
    }

    /**
 
View Full Code Here

    public User put(String uid, String name, String mail) {
        User result = null;
        Transaction tx = Datastore.beginTransaction();
        result = put(tx, uid, name, mail);

        tx.commit();

        return result;
    }

    /**
 
View Full Code Here

     * @return ユーザ情報
     */
    public User get(String uid) {
        Transaction tx = Datastore.beginTransaction();
        User result = this.get(tx, uid);
        tx.commit();
        return result;
    }
    /**
     * ユーザ情報の取得
     * @param tx トランザクション
View Full Code Here

        Transaction tx = Datastore.beginTransaction();
        User user = Datastore.getOrNull(tx, UserMeta.get(), UserService.createKey(uid));
        user.setInitialKey("");
        user.setPassword(password);
        Datastore.put(tx, user);
        tx.commit();
    }

    /**
     * ユーザIDが重複していないかチェックする。
     * @param uid ユーザID
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.