Class RawValue
java.lang.Object
com.google.appengine.api.datastore.RawValue
- All Implemented Interfaces:
Serializable
A raw datastore value.
These are returned by projection queries when a PropertyProjection
does not specify a
type.
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> @Nullable T
asStrictType
(Class<T> type) Returns an object of the exact type passed in.@Nullable Object
Returns the object normally returned by the datastore if given type is passed in.boolean
@Nullable Object
getValue()
Returns the raw value.int
hashCode()
toString()
-
Method Details
-
asStrictType
Returns an object of the exact type passed in.- Parameters:
type
- the class object for the desired type- Returns:
- an object of type T or
null
- Throws:
IllegalArgumentException
- if the raw value cannot be converted into the given type
-
asType
Returns the object normally returned by the datastore if given type is passed in.All integer values are returned as
Long
. All floating point values are returned asDouble
.- Parameters:
type
- the class object for the desired type- Returns:
- an object of type T or
null
- Throws:
IllegalArgumentException
- if the raw value cannot be converted into the given type
-
getValue
Returns the raw value. -
hashCode
public int hashCode() -
equals
-
toString
-