com.google.inject.persist.finder
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 JPAQL query. Provides result auto-boxing and automatic parameter binding.

Author:
Dhanji R. Prasanna (dhanji@gmail.com)

Optional Element Summary
 String namedQuery
          Returns the configured named query's name.
 String query
          Returns the configured query string.
 Class<? extends Collection> returnAs
          Returns the configured autoboxing collection class.
 

namedQuery

public abstract String namedQuery
Returns the configured named query's name. Specify a named query's name here. This name is typically specified in your JPA configuration.

Default:
""

query

public abstract String query
Returns the configured query string. Directly specify a JPAQL query here.

Default:
""

returnAs

public abstract Class<? extends Collection> returnAs
Returns the configured autoboxing collection class. 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.

Default:
java.util.Collection.class


Copyright © 2006-2011 Google, Inc.. All Rights Reserved.