1   /*
2    * Copyright 2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16   
17  package org.apache.commons.betwixt.io;
18  
19  import java.util.ArrayList;
20  import java.util.Collection;
21  import java.util.Iterator;
22  
23  /***
24   * @author <a href='http://jakarta.apache.org/'>Jakarta Commons Team</a>
25   * @version $Revision: 155402 $
26   */
27  public class MovieBean {
28      
29      private String name;
30      private int year;
31      private PersonBean director;
32      private Collection actors = new ArrayList();
33      
34      public MovieBean() {}
35      public MovieBean(String name, int year, PersonBean director) {
36          setName(name);
37          setYear(year);
38          setDirector(director);
39      }
40  
41      public Iterator getActors() {
42          return actors.iterator();
43      }
44  
45      public PersonBean getDirector() {
46          return director;
47      }
48  
49      public String getName() {
50          return name;
51      }
52  
53  
54      public int getYear() {
55          return year;
56      }
57  
58      public void addActor(PersonBean actor) {
59          actors.add(actor);
60      }
61  
62      public void setDirector(PersonBean bean) {
63          director = bean;
64      }
65  
66      public void setName(String string) {
67          name = string;
68      }
69  
70  
71      public void setYear(int i) {
72          year = i;
73      }
74  
75  }