Class PropertyProjection (2.0.0)

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()

Inheritance

java.lang.Object > Projection > PropertyProjection

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 null if the type is not known or variable. If null, RawValues are returned.

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
Overrides

getName()

public String getName()

Returns the name of the property this projection populates.

Returns
Type Description
String
Overrides

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
Overrides

toString()

public String toString()
Returns
Type Description
String
Overrides