Beispiel #1
0
 /**
  * Deletes a LONG variable
  *
  * @param name
  * @param event
  */
 public void jsFunction_delLongVar(String name, String event) throws DatabaseException {
   controller.delLongVar(name, event);
 }
Beispiel #2
0
 /**
  * Gets a JS Variable from the MySQL database
  *
  * @param name
  * @return
  */
 public String jsFunction_getVar(String name, String event) throws DatabaseException {
   return controller.getVar(name, event);
 }
Beispiel #3
0
 /**
  * Sends a JS variable in the MySQL database
  *
  * @param name
  * @param value
  */
 public void jsFunction_setVar(String name, String event, String value) throws DatabaseException {
   controller.setVar(name, event, value);
 }
Beispiel #4
0
/** Integrates the current database into JavaScript */
public final class JSDatabase extends ScriptableObject {
  /** Instance of MySQL */
  private DatabaseModuleController controller = DatabaseModuleController.getInstance();

  /** Empty Constructor is used in implementation for Rhino */
  public JSDatabase() {}

  /** Used with Rhino's implementation Returns the class name, "MySQL" */
  public String getClassName() {
    return "Database";
  }

  /**
   * Gets a LONG JS Variable from the MySQL database
   *
   * @param name
   * @param event
   * @return
   */
  public String jsFunction_getLongVar(String name, String event) throws DatabaseException {
    return controller.getLongVar(name, event);
  }

  /**
   * Gets a JS Variable from the MySQL database
   *
   * @param name
   * @return
   */
  public String jsFunction_getVar(String name, String event) throws DatabaseException {
    return controller.getVar(name, event);
  }

  /**
   * Sets a long JS variable
   *
   * @param name
   * @param event
   * @param value
   */
  public void jsFunction_setLongVar(String name, String event, String value)
      throws DatabaseException {
    controller.setLongVar(name, event, value);
  }

  /**
   * Sends a JS variable in the MySQL database
   *
   * @param name
   * @param value
   */
  public void jsFunction_setVar(String name, String event, String value) throws DatabaseException {
    controller.setVar(name, event, value);
  }

  /**
   * Deletes a LONG variable
   *
   * @param name
   * @param event
   */
  public void jsFunction_delLongVar(String name, String event) throws DatabaseException {
    controller.delLongVar(name, event);
  }

  /**
   * Deletes a JS Variable
   *
   * @param name
   * @param event
   */
  public void jsFunction_delVar(String name, String event) throws DatabaseException {
    controller.delVar(name, event);
  }
}