Class PropertyProjection
- java.lang.Object
-
- com.google.appengine.api.datastore.Projection
-
- com.google.appengine.api.datastore.PropertyProjection
-
- All Implemented Interfaces:
Serializable
public final class PropertyProjection extends Projection
A property projection.If specified on a query, this will cause the query return the specified property.
- See Also:
Query.getProjections(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PropertyProjection(String propertyName, @Nullable Class<?> type)Constructs a property projection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(@Nullable Object obj)StringgetName()Returns the name of the property this projection populates.@Nullable Class<?>getType()Returns the type specified for this projection.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
PropertyProjection
public PropertyProjection(String propertyName, @Nullable Class<?> type)
Constructs a property projection.If type is specified,
RawValue.asType(Class)will be used to restore the original value of the property. Otherwise instances ofRawValuewill be returned.- Parameters:
propertyName- The name of the property to projecttype- The type of values stored in the projected properties ornullif the type is not known or variable. Ifnull,RawValuesare returned.
-
-
Method Detail
-
getName
public String getName()
Description copied from class:ProjectionReturns the name of the property this projection populates.- Specified by:
getNamein classProjection
-
getType
public @Nullable Class<?> getType()
Returns the type specified for this projection.
-
-