private void savePage ( DataSetDesign dataSetDesign ) { // save user-defined query text String queryText = getQueryText ( ) ; dataSetDesign . setQueryText ( queryText ) ; // obtain query's current runtime metadata, and maps it to the dataSetDesign IConnection customConn = null ; try { // instantiate your custom ODA runtime driver class /* Note: You may need to manually update your ODA runtime extension's * plug-in manifest to export its package for visibility here. */ IDriver customDriver = new org . orienteer . birt . orientdb . impl . Driver ( ) ; // obtain and open a live connection customConn = customDriver . getConnection ( null ) ; java . util . Properties connProps = DesignSessionUtil . getEffectiveDataSourceProperties ( getInitializationDesign ( ) . getDataSourceDesign ( ) ) ; customConn . open ( connProps ) ; // update the data set design with the // query's current runtime metadata updateDesign ( dataSetDesign , customConn , queryText ) ; } catch ( OdaException e ) { // not able to get current metadata, reset previous derived metadata dataSetDesign . setResultSets ( null ) ; dataSetDesign . setParameters ( null ) ; e . printStackTrace ( ) ; } finally { closeConnection ( customConn ) ; } }
Saves the user - defined value in this page and updates the specified dataSetDesign with the latest design definition .