Annotation Type PropertyDesc.ExtraPersistenceDelegate


  • @Retention(RUNTIME)
    public static @interface PropertyDesc.ExtraPersistenceDelegate
    This annotation can be used to specify extra persistence delegates. Use the attribute PropertyDesc.persistenceDelegate() to specify a persistence delegate for a property value. Use extra persistence delegates for classes that are referenced by a property value. E.g. if a property value references classes MyClass1 and MyClass2:
     @PropertyDesc(
         extraPersistenceDelegates={
             @ExtraPersistenceDelegate(cls=MyClass1.class, delegate=MyClass1PersistenceDelegate.class),
             @ExtraPersistenceDelegate(cls=MyClass2.class, delegate=MyClass2PersistenceDelegate.class)
         }
     )
     public MyComplexClass getSomething() {
         return something;
     }
     
    See Also:
    PropertyDesc.extraPersistenceDelegates()
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      Class<?> cls
      The class for which the persistence delegate should be used.
      Class<? extends PersistenceDelegate> delegate
      Persistence delegate that should be used to persist an instance the class specified in cls().
    • Element Detail

      • cls

        Class<?> cls
        The class for which the persistence delegate should be used.
      • delegate

        Class<? extends PersistenceDelegate> delegate
        Persistence delegate that should be used to persist an instance the class specified in cls().