View Javadoc

1   /*
2    * sbxb library, part of ULMgen product
3    * Copyright (C) 2003,2005 Thierry Beigbeder
4    *
5    * This program is free software; you can redistribute it and/or modify
6    * it under the terms of the GNU General Public License as published by
7    * the Free Software Foundation; either version 2 of the License, or
8    * (at your option) any later version.
9    *
10   * This program is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   * GNU General Public License for more details.
14   *
15   * You should have received a copy of the GNU General Public License
16   * along with this program; if not, write to the Free Software
17   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18   */
19  /*
20   * $Header: $
21   * $Revision: $
22   * $Date: $
23   *
24   * ====================================================================
25   *
26   * History :
27   * Who       yyyy/mm/dd   Action
28   * --------  ----------   ------
29   */
30  
31  
32  package org.otvl.sbxbsamp.simple;
33  
34  import java.util.Date;
35  
36  // Insert here additional imports
37  
38  /***
39   * 
40   * @author
41   * @version
42   */
43  
44  
45  public class TheSet
46  {
47  	/*-------------------------------------------------------------------------
48  	 * Attributes declaration
49  	 *-------------------------------------------------------------------------*/
50  	/***
51  	 * 
52  	 */
53  	private String id;
54  
55  
56  	/*-------------------------------------------------------------------------
57  	 * Associations declaration
58  	 *-------------------------------------------------------------------------*/
59  	/***
60  	 * 
61  	 */
62  	private java.util.Set elements = new java.util.HashSet() ;
63  	/***
64  	 * 
65  	 */
66  	private java.util.Set dates = new java.util.HashSet() ;
67  
68  
69  	/*-------------------------------------------------------------------------
70  	 * Operations
71  	 *-------------------------------------------------------------------------*/
72  
73  
74  	/*-------------------------------------------------------------------------
75  	 * Attribute accessors
76  	 *-------------------------------------------------------------------------*/
77  	//------------------------
78  	// Accessors for attribute id
79  	//------------------------
80  	/***
81  	 * Returns the id.<br/>
82  	 * 
83  	 * @return String
84  	 */
85  	public String getId() {
86  		String vId = id;
87  		return vId;
88  	}
89  
90  	/***
91  	 * Sets the id.<br/>
92  	 * 
93  	 * @param id The id to set
94  	 */
95  	public void setId(String id) {
96  		this.id = id;
97  	}
98  
99  
100 
101 	/*-------------------------------------------------------------------------
102 	 * Association accessors
103 	 *-------------------------------------------------------------------------*/
104 	//--------------------------
105 	// Accessors for association elements
106 	//--------------------------
107 	/***
108 	 * Checks presence of a target in link elements.<br/>
109 	 * 
110 	 * @param elements target to check
111 	 * @return boolean
112 	 */
113 	public  boolean containsElements(TheElement elements) {
114 		boolean containsElements = this.elements.contains(elements);
115 		return containsElements;
116 	}
117 	/***
118 	 * Returns an iterator for targets in links elements
119 	 * @return java.util.Iterator
120 	 */
121 	public  java.util.Iterator iteratorElements() {
122 		java.util.Iterator vIterator = elements.iterator();
123 		return vIterator;
124 	}
125 	/***
126 	 * Returns the size of the collection elements
127 	 * @return int
128 	 */
129 	public  int sizeElements() {
130 		int vSize = elements.size();
131 		return vSize;
132 	}
133 
134 	/***
135 	 * Inserts a target in link elements.<br/>
136 	 * 
137 	 * @param aTheElement The TheElement to insert
138 	 */
139 	public void addElements(TheElement aTheElement) {
140 		this.elements.add(aTheElement);
141 	}
142 	
143 	/***
144 	 * Removes a target in link elements
145 	 * @param aTheElement The TheElement to remove
146 	 */
147 	public void removeElements(TheElement aTheElement) {
148 		this.elements.remove(aTheElement);
149 	}
150 	
151 	/***
152 	 * Clears all targets in link elements
153 	 */
154 	public void clearElements() {
155 		this.elements.clear();
156 	}
157 
158 
159 
160 	//--------------------------
161 	// Accessors for association dates
162 	//--------------------------
163 	/***
164 	 * Checks presence of a target in link dates.<br/>
165 	 * 
166 	 * @param dates target to check
167 	 * @return boolean
168 	 */
169 	public  boolean containsDates(Date dates) {
170 		boolean containsDates = this.dates.contains(dates);
171 		return containsDates;
172 	}
173 	/***
174 	 * Returns an iterator for targets in links dates
175 	 * @return java.util.Iterator
176 	 */
177 	public  java.util.Iterator iteratorDates() {
178 		java.util.Iterator vIterator = dates.iterator();
179 		return vIterator;
180 	}
181 	/***
182 	 * Returns the size of the collection dates
183 	 * @return int
184 	 */
185 	public  int sizeDates() {
186 		int vSize = dates.size();
187 		return vSize;
188 	}
189 
190 	/***
191 	 * Inserts a target in link dates.<br/>
192 	 * 
193 	 * @param aDate The Date to insert
194 	 */
195 	public void addDates(Date aDate) {
196 		this.dates.add(aDate);
197 	}
198 	
199 	/***
200 	 * Removes a target in link dates
201 	 * @param aDate The Date to remove
202 	 */
203 	public void removeDates(Date aDate) {
204 		this.dates.remove(aDate);
205 	}
206 	
207 	/***
208 	 * Clears all targets in link dates
209 	 */
210 	public void clearDates() {
211 		this.dates.clear();
212 	}
213 
214 
215 
216 
217 }