本文整理汇总了Java中com.google.gwt.sample.dynatablerf.domain.Person.setClassSchedule方法的典型用法代码示例。如果您正苦于以下问题:Java Person.setClassSchedule方法的具体用法?Java Person.setClassSchedule怎么用?Java Person.setClassSchedule使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.sample.dynatablerf.domain.Person
的用法示例。
在下文中一共展示了Person.setClassSchedule方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findPerson
import com.google.gwt.sample.dynatablerf.domain.Person; //导入方法依赖的package包/类
@Override
public Person findPerson(String id) {
Person toReturn = people.get(id);
if (toReturn == null) {
toReturn = backingStore.findPerson(id);
if (toReturn != null) {
toReturn = toReturn.makeCopy();
Integer scheduleKey = toReturn.getClassSchedule().getKey();
Schedule scheduleCopy = scheduleStore.find(scheduleKey);
toReturn.setClassSchedule(scheduleCopy);
}
people.put(id, toReturn);
}
return toReturn;
}
示例2: generateRandomProfessor
import com.google.gwt.sample.dynatablerf.domain.Person; //导入方法依赖的package包/类
private static Person generateRandomProfessor(Random rnd) {
Person prof = new Person();
String firstName = pickRandomString(rnd, FIRST_NAMES);
String lastName = pickRandomString(rnd, LAST_NAMES);
prof.setName("Dr. " + firstName + " " + lastName);
String subject = pickRandomString(rnd, SUBJECTS);
prof.setDescription("Professor of " + subject);
prof.setClassSchedule(ScheduleFuzzer.generateRandomSchedule(rnd));
return prof;
}
示例3: generateRandomStudent
import com.google.gwt.sample.dynatablerf.domain.Person; //导入方法依赖的package包/类
private static Person generateRandomStudent(Random rnd) {
Person student = new Person();
String firstName = pickRandomString(rnd, FIRST_NAMES);
String lastName = pickRandomString(rnd, LAST_NAMES);
student.setName(firstName + " " + lastName);
String subject = pickRandomString(rnd, SUBJECTS);
student.setDescription("Majoring in " + subject);
student.setClassSchedule(ScheduleFuzzer.generateRandomSchedule(rnd));
return student;
}