Package com.motomapia.entity

Examples of com.motomapia.entity.Person


  @Produces(MediaType.APPLICATION_JSON)
  public Person loginPersona(@FormParam("assertion") String assertion) throws IOException {

    String email = verify(assertion);

    Person who = login(email);

    doorman.login(who);

    return who;
  }
View Full Code Here


   */
  @Transact(TxnType.REQUIRED)
  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();

      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

Related Classes of com.motomapia.entity.Person

Copyright © 2018 www.massapicom. 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.