private PersonBean createPerson(int rating, String name, String interests, String gender) { PersonBean person = new PersonBeanImpl(); person.setGender(gender); person.setName(name); person.setInterests(interests); person.setHotOrNotRating(rating); return person; }
private void changePersonBean(PersonBean proxy, String name, int rating, String interests) { try { proxy.setHotOrNotRating(rating); } catch (Exception e) { System.out.println("Can't set Rating from owner proxy"); } try { proxy.setName(name); proxy.setInterests(interests); } catch (Exception e) { System.out.println("Can't set name/interests from non owner proxy"); } // proxy.setInterests(interests); }