IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.projector.annotations
Annotation Type ManyToOne


@Target(value={FIELD,METHOD})
@Retention(value=RUNTIME)
public @interface ManyToOne

Specifies a single-valued association to another entity that has many-to-one multiplicity. It is not normally necessary to specify the associated target entity explicitly since it can usually be inferred from the type of the object being referenced.

Since:
WAS XD 6.1

Optional Element Summary
 String alias
          The alternative name for this attribute.
 CascadeType[] cascade
          Specifies which operations must be cascaded to the target of the association.
 FetchType fetch
          Suggestion to the projector on how to retrieve the data for this association.
 Class targetEntity
          The target class of the association.
 

alias

public abstract String alias
The alternative name for this attribute. The alias can be used to map one entity to another or override the default property name behavior in legacy objects. It can also be used to refer to this attribute in queries.

Returns:
the alias name.
Default:
""

targetEntity

public abstract Class targetEntity
The target class of the association. Required only if the target class type cannot be inferred by the type of field or property that stores the association.

Returns:
the target class or void.class if not specified.
Default:
void.class

cascade

public abstract CascadeType[] cascade
Specifies which operations must be cascaded to the target of the association. By default, no operations are cascaded.

Returns:
the operations to cascade.
Default:
{}

fetch

public abstract FetchType fetch
Suggestion to the projector on how to retrieve the data for this association.

The EAGER strategy instructs the projector to eagerly fetch the data. The LAZY strategy is a hint to the projector to lazily fetch the data when it is first accessed.

Returns:
the FetchType hint.
Default:
com.ibm.websphere.projector.annotations.FetchType.EAGER

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.