Enum UserProfileStringURNType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<UserProfileStringURNType>

    public enum UserProfileStringURNType
    extends java.lang.Enum<UserProfileStringURNType>
    Possible query values for the {@link UserProfileStringURN}. Note that some query values can be indexed.
    Author:
    Christopher Mindus
    • Field Detail

      • detail

        public final java.lang.String detail
        The DETAIL string for the User Details without any additional suffix for a potential numbered one-based value. Numbered values are only allowed when the member {@link #multiple} is true.
        See Also:
        getDetail(int)
      • multiple

        public final boolean multiple
        Boolean flag indicating the "details" string can be appended with "-nn", where "nn" is a number between 1 and 99, used when e.g. multiple phone numbers are present. When the value "nn" is one, nothing is appended (i.e. "-1" is not appended to the detail string).
        See Also:
        getDetail(int)
    • Method Detail

      • values

        public static UserProfileStringURNType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (UserProfileStringURNType c : UserProfileStringURNType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static UserProfileStringURNType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getValue

        public java.lang.String getValue​(int nn)
        Gets the variation of a 2nd or up to 99th value. The nn value preceded by an underscore is appended to the {@link #name()} of the enum value, e.g. WorkMobile<strong>_2</strong>.
        Parameters:
        nn - The nn value requested. If zero or one is specified, the original name is returned (if "one", multiple values support will throw an IllegalStateException).
        Throws:
        java.lang.IllegalArgumentException - If the value is less than 0 or larger than 99.
        java.lang.IllegalStateException - If the query string does not support multiple values.
      • getDetail

        public java.lang.String getDetail​(int nn)
        Gets the variation of a 2nd or up to 99th details for the database DETAIL query.
        Parameters:
        nn - The nn details value requested. If zero or one is specified, the original name is returned (if "one", multiple values support will throw an IllegalStateException).
        Throws:
        java.lang.IllegalArgumentException - If the details value is less than 0 or larger than 99.
        java.lang.IllegalStateException - If the query string does not support multiple details values.
      • fromQuery

        public static UserProfileStringURNType fromQuery​(java.lang.String query)
        Gets the URN Profile User query from a string, case insensitive, without support for multiple values, the match with "enum" values in this class must match precisely.
        Parameters:
        query - The URN Profile User String query.
        Returns:
        The UserProfileStringURNQuery instance, or null if not found.
      • fromQuery

        public static UserProfileStringURNType fromQuery​(java.lang.String query,
                                                         int[] oneBasedIndex)
        Gets the URN Profile User String query from a string, case insensitive. If the URN Profile User String query supports multiple values (appended as "" or "_1" for the first value, "_2" for the second, and so on), the oneBasedIndex will return the one-based index value. The value cannot exceed 99.
        Parameters:
        query - The URN Profile User String query.
        oneBasedIndex - The one-based index of the query name is returned in this variable. If non-null, this array should be at least one in length, where the returned value is placed in index zero. Upon return, this index value zero will be set to zero if the URN Profile User query does not support multiple values, otherwise it will be set to a value between 1 and 99.
        Returns:
        The UserProfileStringURNQuery instance, or null if not found.
        Throws:
        java.lang.NullPointerException - If the URN Profile User String query results in an indexed value and oneBasedIndex is set to null.