KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > facelets > bean > Example


1 package com.sun.facelets.bean;
2
3 public class Example {
4     
5     private static String JavaDoc[] Departments = new String JavaDoc[] { "HR", "RD" };
6
7     public Example() {
8         super();
9     }
10     
11     public static Company createCompany() {
12         Company c = new Company();
13         c.setName("Enverio");
14         c.setPresident(new Employee(1, "Hookom", "Jacob", true));
15         c.getDepartments().add(createHR());
16         c.getDepartments().add(createRD());
17         return c;
18     }
19     
20     public static Department createDepartment() {
21         return createRD();
22     }
23     
24     public static Department createHR() {
25         Department d = new Department();
26         d.setDirector(new Employee(2, "Ashenbrener", "Aubrey", true));
27         d.setName("HR");
28         d.getEmployees().add(new Employee(3, "Ellen", "Sue", false));
29         d.getEmployees().add(new Employee(4, "Scooner", "Mary", false));
30         return d;
31     }
32     
33     public static Department createRD() {
34         Department d = new Department();
35         d.setDirector(new Employee(5, "Winer", "Adam", true));
36         d.setName("RD");
37         d.getEmployees().add(new Employee(6, "Burns", "Ed", false));
38         d.getEmployees().add(new Employee(7, "Lubke", "Ryan", false));
39         d.getEmployees().add(new Employee(8, "Kitain", "Roger", false));
40         return d;
41     }
42
43 }
44
Popular Tags