public long pushBack() throws KExceptionClass { try { KBusinessObjectClass businessObject = pdcClassType.newInstance(); KMetaUtilsClass.setProgressBarValue1(25); businessObject.materializeFromDisplay( visualWidgetContainer, nonVisibleWidgets, visualMappingMode); if (EventCallback != null) EventCallback.prePushBack(businessObject); KMetaUtilsClass.setProgressBarValue1(50); businessObject = persistentObjectManager.push_back4(businessObject); businessObjectOID = businessObject.getOID(); KMetaUtilsClass.setProgressBarValue1(75); dialogMode = KDialogInterface.EDIT_MODE; if (EventCallback != null) EventCallback.postPushBack(businessObject); edit(); } catch (Exception error) { throw new KExceptionClass("Could not create new object", error); } KMetaUtilsClass.setProgressBarValue1(100); return (businessObjectOID); }
public void update() throws KExceptionClass { try { KBusinessObjectClass businessObject = pdcClassType.newInstance(); KMetaUtilsClass.setProgressBarValue1(33); businessObject.materializeFromDisplay( visualWidgetContainer, nonVisibleWidgets, visualMappingMode); if (EventCallback != null) EventCallback.preUpdate(businessObject); KMetaUtilsClass.setProgressBarValue1(75); businessObject = persistentObjectManager.update4(businessObjectOID, businessObject); if (EventCallback != null) EventCallback.postUpdate(businessObject); edit(); } catch (Exception error) { throw new KExceptionClass("Could not create new object", error); } KMetaUtilsClass.setProgressBarValue1(100); }
public void newObject() throws KExceptionClass { try { if (EventCallback != null) EventCallback.preNewObject(); KBusinessObjectClass businessObject = pdcClassType.newInstance(); KMetaUtilsClass.setProgressBarValue1(25); businessObject = persistentObjectManager.createNew4(businessObject); // map foreing keys KMetaUtilsClass.setProgressBarValue1(50); if (buisnessObjectForeingOIDS != null) { Set listOfForeingKeys = buisnessObjectForeingOIDS.keySet(); Iterator foreingKeyIterator = listOfForeingKeys.iterator(); while (foreingKeyIterator.hasNext()) { String nextForeingKeyName = (String) foreingKeyIterator.next(); businessObject.setField( nextForeingKeyName, buisnessObjectForeingOIDS.get(nextForeingKeyName)); } } KMetaUtilsClass.setProgressBarValue1(75); businessObject.displayVisualize(visualWidgetContainer, nonVisibleWidgets, visualMappingMode); if (EventCallback != null) EventCallback.postNewObject(businessObject); } catch (Exception error) { throw new KExceptionClass("Could not create new object", error); } KMetaUtilsClass.setProgressBarValue1(100); }
public KBusinessObjectClass getCurrentObjectDisplayed() throws KExceptionClass { KBusinessObjectClass businessObject = null; try { businessObject = pdcClassType.newInstance(); businessObject.materializeFromDisplay( visualWidgetContainer, nonVisibleWidgets, visualMappingMode); } catch (Exception error) { throw new KExceptionClass("Could not create new object", error); } return businessObject; }
public void setCurrentObjectDisplayed(KBusinessObjectClass businessObject) throws KExceptionClass { try { if (businessObject.getClass() != pdcClassType) { throw new KExceptionClass( "Invalid object type to display by dialog controller." + " Controller created for " + pdcClassType.getName(), null); } businessObject.displayVisualize(visualWidgetContainer, nonVisibleWidgets, visualMappingMode); } catch (Exception error) { throw new KExceptionClass("Could not create new object", error); } }