@Test public void testGetOrganizerDisplayName() throws Exception { String displayName = "Takashi Matsuo"; Profile profile = new Profile(ORGANIZER_USER_ID, displayName, "", null); ofy().save().entity(profile).now(); Conference conference = new Conference(ID, ORGANIZER_USER_ID, conferenceForm); assertEquals(displayName, conference.getOrganizerDisplayName()); }
public String getOrganizerDisplayName() { Profile organizer = ofy().load().key(Key.create(Profile.class, organizerUserId)).now(); if (organizer == null) { return organizerUserId; } else { return organizer.getDisplayName(); } }
Conference { public String getOrganizerDisplayName() { Profile organizer = ofy().load().key(Key.create(Profile.class, organizerUserId)).now(); if (organizer == null) { return organizerUserId; } else { return organizer.getDisplayName(); } } }
Conference { public String getOrganizerDisplayName() { Profile organizer = ofy().load().key(Key.create(Profile.class, organizerUserId)).now(); if (organizer == null) { return organizerUserId; } else { return organizer.getDisplayName(); } } private  Conference();  Conference(final long id, final String organizerUserId,
                      final ConferenceForm conferenceForm); }
Conference { public String getOrganizerDisplayName() { Profile organizer = ofy().load().key(Key.create(Profile.class, organizerUserId)).now(); if (organizer == null) { return organizerUserId; } else { return organizer.getDisplayName(); } } private  Conference();  Conference(final long id, final String organizerUserId,
                      final ConferenceForm conferenceForm); long getId(); String getName(); String getDescription(); @ApiResourceProperty(ignored = AnnotationBoolean.TRUE) Key<Profile> getProfileKey(); String getWebsafeKey(); @ApiResourceProperty(ignored = AnnotationBoolean.TRUE) String getOrganizerUserId(); String getOrganizerDisplayName(); List<String> getTopics(); String getCity(); Date getStartDate(); Date getEndDate(); int getMonth(); int getMaxAttendees(); int getSeatsAvailable(); void updateWithConferenceForm(ConferenceForm conferenceForm); void bookSeats(final int number); void giveBackSeats(final int number); @Override String toString(); }
Conference { public String getOrganizerDisplayName() { Profile organizer = ofy().load().key(Key.create(Profile.class, organizerUserId)).now(); if (organizer == null) { return organizerUserId; } else { return organizer.getDisplayName(); } } private  Conference();  Conference(final long id, final String organizerUserId,
                      final ConferenceForm conferenceForm); long getId(); String getName(); String getDescription(); @ApiResourceProperty(ignored = AnnotationBoolean.TRUE) Key<Profile> getProfileKey(); String getWebsafeKey(); @ApiResourceProperty(ignored = AnnotationBoolean.TRUE) String getOrganizerUserId(); String getOrganizerDisplayName(); List<String> getTopics(); String getCity(); Date getStartDate(); Date getEndDate(); int getMonth(); int getMaxAttendees(); int getSeatsAvailable(); void updateWithConferenceForm(ConferenceForm conferenceForm); void bookSeats(final int number); void giveBackSeats(final int number); @Override String toString();  }