com.wideplay.warp.persist.dao
Annotation Type Finder


@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface Finder

Marks a method stub as a dynamic finder. The method is intercepted and replaced with the specified HQL or JPAQL query. Provides result auto-boxing and automatic parameter binding.

Since:
1.0

Optional Element Summary
 String namedQuery
          Specify a named query's name here, typically using the @NamedQuery annotation.
 String query
          Directly specify a query here, hql or jpaql.
 Class<? extends Collection> returnAs
          Use this clause to specify a collection impl to autobox result lists into.
 Class<? extends Annotation> unit
           
 

unit

public abstract Class<? extends Annotation> unit
Default:
com.wideplay.warp.persist.Defaults.DefaultUnit.class

namedQuery

public abstract String namedQuery
Specify a named query's name here, typically using the @NamedQuery annotation.

Returns:
Returns the configured named query's name.
Default:
""

query

public abstract String query
Directly specify a query here, hql or jpaql.

Returns:
Returns the configured query string.
Default:
""

returnAs

public abstract Class<? extends Collection> returnAs
Use this clause to specify a collection impl to autobox result lists into. The impl *must* have a default no-arg constructor and be a subclass of java.util.Collection.

Returns:
Returns the configured autoboxing collection class.
Default:
java.util.ArrayList.class