Package com.motomapia.entity

Examples of com.motomapia.entity.Person.loggedIn()


  Person login(final String email) {

    // Might be a simple login rather than a new account
    Person result = ofy().load().personByEmail(email);
    if (result != null) {
      result.loggedIn();
      ofy().save().entity(result);
    } else {
      result = new Person(email);
      result.loggedIn();
View Full Code Here


    if (result != null) {
      result.loggedIn();
      ofy().save().entity(result);
    } else {
      result = new Person(email);
      result.loggedIn();

      ofy().save().entity(result).now();
      ofy().save().entity(new EmailLookup(email, result));
    }
View Full Code Here

  @Transact(TxnType.REQUIRED)
  Person update(Key<Person> key, long id2) {
    ofy().transactionless().load().type(Person.class).id(id2).now();

    Person pers = ofy().load().key(key).now();
    pers.loggedIn();
    ofy().save().entity(pers);

    log.debug("Last login date is now " + pers.getLastLogin());
    return pers;
  }
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.