source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Common/NhincLib/src/gov/hhs/fha/nhinc/connectmgr/data/CMBusinessServices.java@ 507

Last change on this file since 507 was 507, checked in by George Lilly, 15 years ago

NHIN gateway and adaptor for use on linux with VistA EHR and RPMS

File size: 1.8 KB
Line 
1package gov.hhs.fha.nhinc.connectmgr.data;
2
3import java.util.List;
4import java.util.ArrayList;
5
6/**
7 * This class represents a set of business services for a business entity.
8 *
9 * @author Les Westberg
10 */
11public class CMBusinessServices
12{
13 private List<CMBusinessService> businessServiceList = new ArrayList<CMBusinessService>();
14
15 /**
16 * Default Constructor.
17 */
18 public CMBusinessServices()
19 {
20 clear();
21 }
22
23 /**
24 * Clear the contents of this and set it to a default state.
25 */
26 public void clear()
27 {
28 businessServiceList = new ArrayList<CMBusinessService>();
29 }
30
31 /**
32 * Returns true of the contents of the object are the same as the one
33 * passed in.
34 *
35 * @param oCompare The object to compare.
36 * @return TRUE if the contents are the same as the one passed in.
37 */
38 public boolean equals(CMBusinessServices oCompare)
39 {
40 if (oCompare.businessServiceList.size() != this.businessServiceList.size())
41 {
42 return false;
43 }
44
45 int iCnt = this.businessServiceList.size();
46 for (int i = 0; i < iCnt; i++)
47 {
48 if (! this.businessServiceList.get(i).equals(oCompare.businessServiceList.get(i)))
49 {
50 return false;
51 }
52 }
53
54 // If we got here then everything is the same...
55 //----------------------------------------------
56 return true;
57 }
58
59 /**
60 * Returns a list of business services for this business entity.
61 *
62 * @return The list of business services for this business entity.
63 */
64 public List<CMBusinessService> getBusinessService()
65 {
66 return businessServiceList;
67 }
68
69}
Note: See TracBrowser for help on using the repository browser.