org.loom.annotation
Annotation Type RetrieveEntity


@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD,PARAMETER})
@Documented
public @interface RetrieveEntity

Retrieve the annotated property from the database if the id to retrieve is included in the current request. To use this, a RetrieveEntityInterceptor must be configured in the Dependency Injection framework.


Optional Element Summary
 java.lang.String[] except
          the list of events in which this validation does NOT place, empty for none.
 java.lang.String idPropertyName
          The property to search for.
 java.lang.String[] on
          the list of events in which this validation takes place, empty for all.
 java.lang.String propertyPath
          if provided, applies to the property path instead of the annotated property
 boolean readOnly
          setReadOnly will be invoked right after fetching the object from the database.
 

propertyPath

public abstract java.lang.String propertyPath
if provided, applies to the property path instead of the annotated property

Default:
""

on

public abstract java.lang.String[] on
the list of events in which this validation takes place, empty for all. Accepts wildcards.

Default:
{}

except

public abstract java.lang.String[] except
the list of events in which this validation does NOT place, empty for none. Accepts wildcards.

Default:
{}

idPropertyName

public abstract java.lang.String idPropertyName
The property to search for. It should identify a result uniquely. If empty, the primary key field will be used.

Default:
""

readOnly

public abstract boolean readOnly
setReadOnly will be invoked right after fetching the object from the database. Objects with readOnly = true are still linked to the dataabase, but any changes to the object state will not be commited at flush time. Equivalent to Session.setReadOnly() in Hibernate and UnitOfWork.addReadOnlyClass() in Toplink. Defaults to false. Do not change unless you know what you are doing.

Default:
false