/*This code was generated using the UMPLE modeling language!
 Date of generation: 2008/07/29 14:56:52*/
/*This class drives: */

package PoliticalEntities.core;

import PoliticalEntities.*;
import PoliticalEntities.json.*;

public class PoliticalEntity {
  //Class datatypes
  private String name;

  //Class association variables

  //Registry of our system.
  PoliticalEntitiesRegistry registry = PoliticalEntitiesRegistry.getInstance();

  //Constructor
  public PoliticalEntity(String aName) {
    name = aName;
  }

  public boolean setName(String aName) {
    name = aName;
    return true;
  }

  public String getName() {
    return name;
  }

  public void delete() {
  }

  public boolean areManyEndsNull() {
    return true;
  }

  /***********************************
   * Returns the attribute list along with the  
   * class ID in JSON format.
   ***********************************/
  public JSONObject getAttributes() throws JSONException {
    JSONObject obj = new JSONObject();
    obj.put("CLASS_ID", registry.getKey(this));
    obj.put("name", getName());
    return obj;
  }

}