@ScriptFunction(jsDoc = "" + "/**\n" + " * Command sql text to be applied in a database.\n" + " */") public String getCommand() { return command; }
@ScriptFunction(jsDoc = "" + "/**\n" + " * Parameters of command.\n" + " */") public List<ChangeValue> getParameters() { return parameters; }
@ScriptFunction(jsDoc = SOURCE_JS_DOC) @Override public HasPublished getSource() { return source; }
/** * Returns the field's type information * * @return The field's type information */ @ScriptFunction(jsDoc = TYPE_INFO_JS_DOC) public String getType() { return type; }
/** * Sets table name. * * @param aValue The table name to be set. */ @ScriptFunction public void setTableName(String aValue) { String oldValue = tableName; tableName = aValue; changeSupport.firePropertyChange(TABLE_NAME_PROPERTY, oldValue, aValue); }
/** * Sets indicating primary key state of this field. * * @param aValue Flag, indicating primary key state of this field. */ @ScriptFunction public void setPk(boolean aValue) { boolean oldValue = pk; pk = aValue; changeSupport.firePropertyChange(PK_PROPERTY, oldValue, aValue); }
/** * Set the description to this field. * * @param aValue A description to be set. */ @ScriptFunction public void setDescription(String aValue) { String oldValue = description; description = aValue; changeSupport.firePropertyChange(DESCRIPTION_PROPERTY, oldValue, aValue); }
@ScriptFunction public void setOnRequeried(JSObject aValue) { JSObject oldValue = onRequeried; onRequeried = aValue; changeSupport.firePropertyChange("onRequeried", oldValue, aValue); }
@ScriptFunction @Override public void setFocusable(boolean aValue) { super.setFocusable(aValue); }
@ScriptFunction(jsDoc = REQUERY_JSDOC, params = {"onSuccess", "onFailure"}) @Override public void requery(JSObject aOnSuccess, JSObject aOnFailure) throws Exception { changeLog.clear(); super.requery(aOnSuccess, aOnFailure); }
@ScriptFunction(jsDoc = REVERT_JSDOC) @Override public void revert() { changeLogs.values().stream().forEach((changeLog) -> { changeLog.clear(); }); super.revert(); }
@ScriptFunction(jsDoc = REQUERY_JSDOC, params = {"onSuccess", "onFailure"}) @Override public void requery(JSObject aOnSuccess, JSObject aOnFailure) throws Exception { changeLogs.values().stream().forEach((changeLog) -> { changeLog.clear(); }); super.requery(aOnSuccess, aOnFailure); }
@ScriptFunction(jsDoc = APPEND_JSDOC, params = {"data"}) public void append(JSObject aData) { if (snapshotConsumer != null) { snapshotConsumer.call(null, new Object[]{aData, false}); } }
@ScriptFunction(jsDoc = COMPONENT_POPUP_MENU_JSDOC) @Override public JPopupMenu getComponentPopupMenu() { return super.getComponentPopupMenu(); }
@ScriptFunction(jsDoc = TEXT_JSDOC) @Override public String getText() { return super.getText(); }
@ScriptFunction @Override public void setOnMousePressed(JSObject aValue) { eventsProxy.getHandlers().put(ControlEventsIProxy.mousePressed, aValue); }
@ScriptFunction(jsDoc = NATIVE_ELEMENT_JSDOC) @Undesignable @Override public Object getElement() { return null; }
@ScriptFunction(jsDoc = ON_COMPONENT_HIDDEN_JSDOC) @EventMethod(eventClass = ComponentEvent.class) @Undesignable @Override public JSObject getOnComponentHidden() { return eventsProxy.getHandlers().get(ControlEventsIProxy.componentHidden); }
@ScriptFunction(jsDoc = ON_KEY_PRESSED_JSDOC) @EventMethod(eventClass = KeyEvent.class) @Undesignable @Override public JSObject getOnKeyPressed() { return eventsProxy.getHandlers().get(ControlEventsIProxy.keyPressed); }
@ScriptFunction(jsDoc = REQUERY_JSDOC, params = {"onSuccess", "onFailure"}) public void requery(JSObject onSuccess, JSObject onFailure) throws Exception { inProcess(() -> { revert(); executeEntities(true, rootEntities()); return null; }, onSuccess != null ? (Void v) -> { onSuccess.call(null, new Object[]{}); } : null, onFailure != null ? (Exception ex) -> { onFailure.call(null, new Object[]{ex.getMessage()}); } : null); }