/*This code was generated using the UMPLE modeling language! Date of generation: 2008/07/29 14:29:19*/ /*This class drives: */ package Airline.humanResources; import Airline.*; import Airline.flights.*; import Airline.json.*; public class PersonRole { //Class datatypes //Class association variables private Person person; //Registry of our system. AirlineRegistry registry = AirlineRegistry.getInstance(); //Constructor public PersonRole(Person aPerson) throws Exception { person = aPerson; person.addPersonRole(this); } public Person getPerson() { return person; } /* This class does not drive Person and therefore sets the association unidirectionally.*/ public void setPerson(Person aPerson) { person = aPerson; } public void delete() { //Delete all 1 ends. person.deletePersonRole(this); } 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)); return obj; } }