Annotation Interface DataSource


@Target(TYPE) @Retention(RUNTIME) public @interface DataSource

Indicates that a class will be used as a data source, and the value specifies the ID for this data source. Classes annotated with this annotation can be used to specify the source of data for a component, service, or application.

Every class use this annotation must implement the Persistence interface.

Example usage:


  @DataSource("dtSrcYourType")
  public class MyDataSource implements Persistence<YourType> {
      // ...
  }
 
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The ID of the data source.
  • Element Details

    • value

      String value
      The ID of the data source.
      Returns:
      the ID of the data source
      Default:
      ""