@Test public void loadDataObjectTest() { JPADataObjectEditor objectEditor = createObjectEditor(); objectEditor.onContextChange( context ); verify( view, times( 2 ) ).loadPropertyEditorCategories( anyListOf( PropertyEditorCategory.class ) ); assertFalse( objectEditor.isReadonly() ); }
@Override protected void loadDataObject(DataObject dataObject) { clear(); setReadonly(true); this.dataObject = dataObject; if (dataObject != null) { updateEntityField(dataObject.getAnnotation(JPADomainAnnotations.JAVAX_PERSISTENCE_ENTITY_ANNOTATION)); updateTableNameField(dataObject.getAnnotation(JPADomainAnnotations.JAVAX_PERSISTENCE_TABLE_ANNOTATION)); updateAuditedField(dataObject.getAnnotation(JPADomainAnnotations.HIBERNATE_ENVERS_AUDITED)); setReadonly(getContext() == null || getContext().isReadonly()); } loadPropertyEditor(); }
JPADataObjectEditor extends ObjectEditor implements JPADataObjectEditorView.Presenter { @Override protected void loadDataObject(DataObject dataObject) { clear(); setReadonly(true); this.dataObject = dataObject; if (dataObject != null) { updateEntityField(dataObject.getAnnotation(JPADomainAnnotations.JAVAX_PERSISTENCE_ENTITY_ANNOTATION)); updateTableNameField(dataObject.getAnnotation(JPADomainAnnotations.JAVAX_PERSISTENCE_TABLE_ANNOTATION)); updateAuditedField(dataObject.getAnnotation(JPADomainAnnotations.HIBERNATE_ENVERS_AUDITED)); setReadonly(getContext() == null || getContext().isReadonly()); } loadPropertyEditor(); } }
JPADataObjectEditor extends ObjectEditor implements JPADataObjectEditorView.Presenter { @Override protected void loadDataObject(DataObject dataObject) { clear(); setReadonly(true); this.dataObject = dataObject; if (dataObject != null) { updateEntityField(dataObject.getAnnotation(JPADomainAnnotations.JAVAX_PERSISTENCE_ENTITY_ANNOTATION)); updateTableNameField(dataObject.getAnnotation(JPADomainAnnotations.JAVAX_PERSISTENCE_TABLE_ANNOTATION)); updateAuditedField(dataObject.getAnnotation(JPADomainAnnotations.HIBERNATE_ENVERS_AUDITED)); setReadonly(getContext() == null || getContext().isReadonly()); } loadPropertyEditor(); } @Inject  JPADataObjectEditor(JPADataObjectEditorView view,
                               DomainHandlerRegistry handlerRegistry,
                               Event<DataModelerEvent> dataModelerEvent,
                               DataModelCommandBuilder commandBuilder); }
JPADataObjectEditor extends ObjectEditor implements JPADataObjectEditorView.Presenter { @Override protected void loadDataObject(DataObject dataObject) { clear(); setReadonly(true); this.dataObject = dataObject; if (dataObject != null) { updateEntityField(dataObject.getAnnotation(JPADomainAnnotations.JAVAX_PERSISTENCE_ENTITY_ANNOTATION)); updateTableNameField(dataObject.getAnnotation(JPADomainAnnotations.JAVAX_PERSISTENCE_TABLE_ANNOTATION)); updateAuditedField(dataObject.getAnnotation(JPADomainAnnotations.HIBERNATE_ENVERS_AUDITED)); setReadonly(getContext() == null || getContext().isReadonly()); } loadPropertyEditor(); } @Inject  JPADataObjectEditor(JPADataObjectEditorView view,
                               DomainHandlerRegistry handlerRegistry,
                               Event<DataModelerEvent> dataModelerEvent,
                               DataModelCommandBuilder commandBuilder); @Override Widget asWidget(); @Override String getName(); @Override String getDomainName(); @Override void onEntityFieldChange(String newValue); @Override void onTableNameChange(String newValue); @Override void onAuditedFieldChange(String newValue); @Override void clear(); }
JPADataObjectEditor extends ObjectEditor implements JPADataObjectEditorView.Presenter { @Override protected void loadDataObject(DataObject dataObject) { clear(); setReadonly(true); this.dataObject = dataObject; if (dataObject != null) { updateEntityField(dataObject.getAnnotation(JPADomainAnnotations.JAVAX_PERSISTENCE_ENTITY_ANNOTATION)); updateTableNameField(dataObject.getAnnotation(JPADomainAnnotations.JAVAX_PERSISTENCE_TABLE_ANNOTATION)); updateAuditedField(dataObject.getAnnotation(JPADomainAnnotations.HIBERNATE_ENVERS_AUDITED)); setReadonly(getContext() == null || getContext().isReadonly()); } loadPropertyEditor(); } @Inject  JPADataObjectEditor(JPADataObjectEditorView view,
                               DomainHandlerRegistry handlerRegistry,
                               Event<DataModelerEvent> dataModelerEvent,
                               DataModelCommandBuilder commandBuilder); @Override Widget asWidget(); @Override String getName(); @Override String getDomainName(); @Override void onEntityFieldChange(String newValue); @Override void onTableNameChange(String newValue); @Override void onAuditedFieldChange(String newValue); @Override void clear();  }