@Test public void testOnCascadeAllChangedFalse() { when(view.getCascadeAll()).thenReturn(false); dialog.onCascadeAllChanged(); verifyCascadeTypesEnabled(1, true, true, true, true, true, true); verify(view, never()).setCascadePersist(anyBoolean()); verify(view, never()).setCascadeMerge(anyBoolean()); verify(view, never()).setCascadeRemove(anyBoolean()); verify(view, never()).setCascadeRefresh(anyBoolean()); verify(view, never()).setCascadeDetach(anyBoolean()); }
void onCascadeAllChanged() { if (view.getCascadeAll()) { enableCascadeTypes(true, false); view.setCascadePersist(true); view.setCascadeMerge(true); view.setCascadeRemove(true); view.setCascadeRefresh(true); view.setCascadeDetach(true); } else { enableCascadeTypes(true, true); if (cascadeAllWasClicked) { view.setCascadePersist(false); view.setCascadeMerge(false); view.setCascadeRemove(false); view.setCascadeRefresh(false); view.setCascadeDetach(false); } } cascadeAllWasClicked = true; }
RelationshipEditionDialog implements PropertyEditionPopup { void onCascadeAllChanged() { if (view.getCascadeAll()) { enableCascadeTypes(true, false); view.setCascadePersist(true); view.setCascadeMerge(true); view.setCascadeRemove(true); view.setCascadeRefresh(true); view.setCascadeDetach(true); } else { enableCascadeTypes(true, true); if (cascadeAllWasClicked) { view.setCascadePersist(false); view.setCascadeMerge(false); view.setCascadeRemove(false); view.setCascadeRefresh(false); view.setCascadeDetach(false); } } cascadeAllWasClicked = true; } }
RelationshipEditionDialog implements PropertyEditionPopup { void onCascadeAllChanged() { if (view.getCascadeAll()) { enableCascadeTypes(true, false); view.setCascadePersist(true); view.setCascadeMerge(true); view.setCascadeRemove(true); view.setCascadeRefresh(true); view.setCascadeDetach(true); } else { enableCascadeTypes(true, true); if (cascadeAllWasClicked) { view.setCascadePersist(false); view.setCascadeMerge(false); view.setCascadeRemove(false); view.setCascadeRefresh(false); view.setCascadeDetach(false); } } cascadeAllWasClicked = true; } @Inject  RelationshipEditionDialog(View view); }
RelationshipEditionDialog implements PropertyEditionPopup { void onCascadeAllChanged() { if (view.getCascadeAll()) { enableCascadeTypes(true, false); view.setCascadePersist(true); view.setCascadeMerge(true); view.setCascadeRemove(true); view.setCascadeRefresh(true); view.setCascadeDetach(true); } else { enableCascadeTypes(true, true); if (cascadeAllWasClicked) { view.setCascadePersist(false); view.setCascadeMerge(false); view.setCascadeRemove(false); view.setCascadeRefresh(false); view.setCascadeDetach(false); } } cascadeAllWasClicked = true; } @Inject  RelationshipEditionDialog(View view); @Override Widget asWidget(); @Override @SuppressWarnings("unchecked") void show(); @Override void setOkCommand(Command okCommand); @Override void setProperty(PropertyEditorFieldInfo property); @Override String getStringValue(); @Override void setStringValue(String value); }
RelationshipEditionDialog implements PropertyEditionPopup { void onCascadeAllChanged() { if (view.getCascadeAll()) { enableCascadeTypes(true, false); view.setCascadePersist(true); view.setCascadeMerge(true); view.setCascadeRemove(true); view.setCascadeRefresh(true); view.setCascadeDetach(true); } else { enableCascadeTypes(true, true); if (cascadeAllWasClicked) { view.setCascadePersist(false); view.setCascadeMerge(false); view.setCascadeRemove(false); view.setCascadeRefresh(false); view.setCascadeDetach(false); } } cascadeAllWasClicked = true; } @Inject  RelationshipEditionDialog(View view); @Override Widget asWidget(); @Override @SuppressWarnings("unchecked") void show(); @Override void setOkCommand(Command okCommand); @Override void setProperty(PropertyEditorFieldInfo property); @Override String getStringValue(); @Override void setStringValue(String value);  }