Top Description Methods
jakarta.data.repository

public @Interface Param

extends Annotation
Annotations
@Retention:RUNTIME
@Target:PARAMETER
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

Annotates a parameter of a repository method to bind it to a named parameter of a Query.

For example,

@Repository
public interface Products extends BasicRepository<Product, String> {

    @Query("WHERE length * width * height <= :maxVolume ORDER BY price ASC, id ASC")
    Page<Product> freeShippingEligible(@Param("maxVolume") float volumeLimit,
                                       PageRequest pageRequest);

    ...
}

The Param annotation is unnecessary when the method parameter name matches the query language named parameter name and the application is compiled with the -parameters compiler option making parameter names available at runtime.

See Also
Query

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the name of the query language named parameter.
value
()

Defines the name of the query language named parameter to bind to.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String value()

Defines the name of the query language named parameter to bind to.

Returns:String

the name of the query language named parameter.