Class Account.Id

  • All Implemented Interfaces:
    com.google.gwtorm.client.Key<com.google.gwtorm.client.Key<?>>, Serializable
    Enclosing class:
    Account

    public static class Account.Id
    extends com.google.gwtorm.client.IntKey<com.google.gwtorm.client.Key<?>>
    Key local to Gerrit to identify a user.
    See Also:
    Serialized Form
    • Field Detail

      • id

        protected int id
    • Constructor Detail

      • Id

        protected Id()
      • Id

        public Id​(int id)
    • Method Detail

      • get

        public int get()
        Specified by:
        get in class com.google.gwtorm.client.IntKey<com.google.gwtorm.client.Key<?>>
      • set

        protected void set​(int newValue)
        Specified by:
        set in class com.google.gwtorm.client.IntKey<com.google.gwtorm.client.Key<?>>
      • tryParse

        public static Optional<Account.Id> tryParse​(String str)
        Parse an Account.Id out of a string representation.
      • fromRefPart

        public static Account.Id fromRefPart​(String name)
        Parse an Account.Id out of a part of a ref-name.
        Parameters:
        name - a ref name with the following syntax: "34/1234...". We assume that the caller has trimmed any prefix.
      • parseAfterShardedRefPart

        public static Account.Id parseAfterShardedRefPart​(String name)
      • fromRefSuffix

        public static Account.Id fromRefSuffix​(String name)
        Parse an Account.Id out of the last part of a ref name.

        The input is a ref name of the form ".../1234", where the suffix is a non-sharded account ID. Ref names using a sharded ID should use fromRefPart(String) instead for greater safety.

        Parameters:
        name - ref name
        Returns:
        account ID, or null if not numeric.