@Documented
@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface PersistCollection
Used on the accessor of a set of accessors and mutators to identify collection properties of model interfaces (PortalEntity
s) that need to be persisted. Note that the only collection type supported is java.util.Map<String, String>
Examples
If the property is called "customAttributes" then the getter should be annotated as follows:
@PersistCollection
Map<String, String> getCustomAttributes();
Mutators for the "customAttributes" property could also be added:
void setCustomAttributes(Map<String, String> map);
void clearCustomAttributes();
void putIntoCustomAttributes(String name, String value);
void removeFromCustomAttributes(String name);
If an accessor for getting individual entries in the Map is required then an additional accessor could be added (note that only one accesor should be annotated with @PersistCollection):
String getFromCustomAttributes(String name);