Details
-
Task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
View Persistence
- Save view and view instance resources to Ambari DB.
Same as any other resource (Cluster, Service, Blueprint, etc.). Will use established JPA patterns to persist resources to Ambari DB. - Allow views to store application data in Ambari DB.
- Option 1: Application data map.
Allow application code to store key / value pairs for a view instance. These are different than view instance properties in that they may change (updated during the life of the view instance). We may limit the type to String or String and Numeric (future expansion to allow Serializable types?) - Option 2 : Data Store
The view context will expose a data store object with the following interface (subject to change) …
public interface DataStore { void persist(java.lang.Object resource); void remove(java.lang.Object resource); <T> T find(java.lang.Class<T> clazz, java.lang.Object primaryKey); void refresh(java.lang.Object resource); }
This will allow a view to persist any Java Bean as application data.
Issues:
- Uses org.eclipse.persistence.dynamic classes so it further ties us to EclipseLink.
- How do we identify primary key fields? JPA annotation?
Attachments
Issue Links
- links to