Annotation Interface BelongsToPolymorphic


@Retention(RUNTIME) @Target(TYPE) public @interface BelongsToPolymorphic
Author:
Igor Polevoy
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends Model>[]
    List of parent classes.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    List of type labels corresponding to parent classes.
  • Element Details

    • parents

      Class<? extends Model>[] parents
      List of parent classes.
      Returns:
      list of parent classes.
    • typeLabels

      String[] typeLabels
      List of type labels corresponding to parent classes. This is a value to be stored in the "parent_type" column of the child record. Use this to override default behavior (parent full class name).
      Returns:
      list of type labels corresponding to parent classes.
      Default:
      {}