@Retention(value=RUNTIME) public static @interface PropertyDesc.ExtraPersistenceDelegate
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;
}
PropertyDesc.extraPersistenceDelegates()| Modifier and Type | Required Element and 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(). |
public abstract Class<?> cls
public abstract Class<? extends PersistenceDelegate> delegate
cls().Copyright (C) 2004-2017 FormDev Software GmbH. All rights reserved.