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()
Constructors
PropertyProjection(String propertyName, @Nullable Class<?> type)
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 of RawValue will be returned.
Parameters | |
---|---|
Name | Description |
propertyName |
String The name of the property to project |
type |
@org.checkerframework.checker.nullness.qual.Nullable java.lang.Class<?> The type of values stored in the projected properties or |
Methods
equals(@Nullable Object obj)
public boolean equals(@Nullable Object obj)
Parameter | |
---|---|
Name | Description |
obj |
@org.checkerframework.checker.nullness.qual.Nullable java.lang.Object |
Returns | |
---|---|
Type | Description |
boolean |
getName()
public String getName()
Returns the name of the property this projection populates.
Returns | |
---|---|
Type | Description |
String |
getType()
public @Nullable Class<?> getType()
Returns the type specified for this projection.
Returns | |
---|---|
Type | Description |
@org.checkerframework.checker.nullness.qual.Nullable java.lang.Class<?> |
hashCode()
public int hashCode()
Returns | |
---|---|
Type | Description |
int |
toString()
public String toString()
Returns | |
---|---|
Type | Description |
String |