Please take time to read the code disclaimer.

<--Go back to Kent's Projects

<--Go back to project post

package edu.byu.isys403.katsuru.managersminer;

import org.w3c.dom.Element;

/**
 *
 * @author Kent
 */
public class Query {

  private int id;
  private String name;
  private String description;
  private String sql;

  /**
   * Constructor
   * @param queryElement 
   */
  public Query(Element queryElement) {
    this.id = Integer.parseInt(queryElement.getAttribute("id"));
    this.name = queryElement.getElementsByTagName("name").item(0).getFirstChild().getNodeValue();
    this.description = queryElement.getElementsByTagName("description").item(0).getFirstChild().getNodeValue();
    this.sql = queryElement.getElementsByTagName("sql").item(0).getFirstChild().getNodeValue();
  }

  //
  /**
   * @return the id
   */
  public int getId() {
    return id;
  }

  /**
   * @param id the id to set
   */
  public void setId(int id) {
    this.id = id;
  }

  /**
   * @return the name
   */
  public String getName() {
    return name;
  }

  /**
   * @param name the name to set
   */
  public void setName(String name) {
    this.name = name;
  }

  /**
   * @return the description
   */
  public String getDescription() {
    return description;
  }

  /**
   * @param description the description to set
   */
  public void setDescription(String description) {
    this.description = description;
  }

  /**
   * @return the sql
   */
  public String getSql() {
    return sql;
  }

  /**
   * @param sql the sql to set
   */
  public void setSql(String sql) {
    this.sql = sql;
  }
//  
}