title: Generate unique Long Id on App Engine
body: <p>I've three possible ways user can sign in into our service:</p>
  
  <ul>
  <li>login and password</li>
  <li>Google+</li>
  <li>Facebook</li>
  </ul>
  
  <p>I want to keep all those user id's in one entity. To avoid id collisions between e.g. Google and Facebook a prefix will be added to id (<code>g-</code> and <code>f-</code> respectively). Currently for users with standard login, an unique <code>Long</code> value is generated by App Engine (using Objectify <code>@Id Long</code> value set to <code>null</code> as id).</p>
  
  <p>To keep everything in one entity the key must be the same type which should be <code>String</code>. There's no option in Objectify to auto generate key for <code>String</code>. </p>
  
  <p>What I need is to generate unique <code>Long</code> value for given entity which will be prefixed with <code>c-</code> (custom login). That'd give <code>String</code> id similar to those of Google and Facebook. I've searched Objectify's code but found nothing related to generate unique <code>Long</code> id for <code>null</code> <code>Long</code> fields annotated with <code>@Id</code>.</p>