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
NameDescription
propertyNameString

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
NameDescription
obj@org.checkerframework.checker.nullness.qual.Nullable java.lang.Object
Returns
TypeDescription
boolean
Overrides

getName()

public String getName()

Returns the name of the property this projection populates.

Returns
TypeDescription
String
Overrides

getType()

public @Nullable Class<?> getType()

Returns the type specified for this projection.

Returns
TypeDescription
@org.checkerframework.checker.nullness.qual.Nullable java.lang.Class<?>

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

toString()

public String toString()
Returns
TypeDescription
String
Overrides