Enum PropertyType

  • All Implemented Interfaces:
    Serializable, Comparable<PropertyType>

    public enum PropertyType
    extends Enum<PropertyType>
    An enum for all of the Onestore property types. Includes their tag numbers and a couple PropertyValue representations, which are PropertyValue PBs with the field for the given type set to minimum and human-readable placeholder values.
    See Also:
    OnestoreEntity.PropertyValue
    • Field Detail

      • minValue

        public final com.google.storage.onestore.v3.OnestoreEntity.PropertyValue minValue
        Two PropertyValue representations of this property type, one for the minimum possible value and one human-readable placeholder. Note that MegastoreDatastoreImpl.getSchema() depends on the fact that minValue is the minimum possible value for this property type.
      • placeholderValue

        public final com.google.storage.onestore.v3.OnestoreEntity.PropertyValue placeholderValue
      • tag

        public final int tag
        The tag number of the PropertyValue field for this property type.
    • Method Detail

      • values

        public static PropertyType[] 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 (PropertyType c : PropertyType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PropertyType valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getType

        public static PropertyType getType​(com.google.storage.onestore.v3.OnestoreEntity.PropertyValue value)
        Returns:
        the type of the given PropertyValue
        Throws:
        IllegalArgumentException - if more than one type field is set
      • next

        public PropertyType next()
        Returns:
        the next PropertyType in tag order, or null if this is the highest.