/*This code was generated using the UMPLE modeling language! Date of generation: 2008/07/30 12:30:07*/ /*This class drives: */ package BankingSystem.core.humanResources; import BankingSystem.*; import BankingSystem.core.intangableResources.*; import BankingSystem.core.tangableResources.*; import BankingSystem.json.*; public class PersonRole { //Class datatypes //Class association variables private Person person; //Registry of our system. BankingSystemRegistry registry = BankingSystemRegistry.getInstance(); //Constructor public PersonRole(Person aPerson) { 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; } }