Package com.google.storage.onestore
Enum PropertyType
- java.lang.Object
-
- java.lang.Enum<PropertyType>
-
- com.google.storage.onestore.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 Summary
Fields Modifier and Type Field Description com.google.storage.onestore.v3.OnestoreEntity.PropertyValueminValueTwoPropertyValuerepresentations of this property type, one for the minimum possible value and one human-readable placeholder.com.google.storage.onestore.v3.OnestoreEntity.PropertyValueplaceholderValueinttagThe tag number of thePropertyValuefield for this property type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PropertyTypegetType(com.google.storage.onestore.v3.OnestoreEntity.PropertyValue value)PropertyTypenext()static PropertyTypevalueOf(String name)Returns the enum constant of this type with the specified name.static PropertyType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NULL
public static final PropertyType NULL
-
INT64
public static final PropertyType INT64
-
BOOLEAN
public static final PropertyType BOOLEAN
-
STRING
public static final PropertyType STRING
-
DOUBLE
public static final PropertyType DOUBLE
-
POINT
public static final PropertyType POINT
-
USER
public static final PropertyType USER
-
REFERENCE
public static final PropertyType REFERENCE
-
-
Field Detail
-
minValue
public final com.google.storage.onestore.v3.OnestoreEntity.PropertyValue minValue
TwoPropertyValuerepresentations of this property type, one for the minimum possible value and one human-readable placeholder. Note thatMegastoreDatastoreImpl.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 thePropertyValuefield 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 nameNullPointerException- 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.
-
-