Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: cfc82d16056cbe9b6a4ca7156bee94ec9fc1c39a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
/*******************************************************************************
 * Copyright (c) 2013 Dennis Wagelaar.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * Contributors:
 *     Dennis Wagelaar - initial API and
 *         implementation and/or initial documentation
 *******************************************************************************/
package org.eclipse.m2m.atl.emftvm.tests.pojo;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.EObjectImpl;

/**
 * POJO test class A.
 * 
 * @author <a href="dwagelaar@gmail.com">Dennis Wagelaar</a>
 */
public class PojoA extends EObjectImpl {

	private Set<PojoB> bSet;
	private List<PojoB> bList;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PojoA() {
		super();
	}

	/**
	 * @return the bSet
	 */
	public Set<PojoB> getBSet() {
		if (bSet == null) {
			bSet = new HashSet<PojoB>();
		}
		return bSet;
	}

	/**
	 * @param bSet
	 *            the bSet to set
	 */
	public void setBSet(Set<PojoB> bSet) {
		this.bSet = bSet;
	}

	/**
	 * @return the bList
	 */
	public List<PojoB> getBList() {
		if (bList == null) {
			bList = new ArrayList<PojoB>();
		}
		return bList;
	}

	/**
	 * @param bList
	 *            the bList to set
	 */
	public void setBList(List<PojoB> bList) {
		this.bList = bList;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return PojoPackage.Literals.POJO_A;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case PojoPackage.POJO_A__BSET:
				return getBSet();
			case PojoPackage.POJO_A__BLIST:
				return getBList();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case PojoPackage.POJO_A__BSET:
				getBSet().clear();
				getBSet().addAll((Collection<? extends PojoB>)newValue);
				return;
			case PojoPackage.POJO_A__BLIST:
				getBList().clear();
				getBList().addAll((Collection<? extends PojoB>)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case PojoPackage.POJO_A__BSET:
				getBSet().clear();
				return;
			case PojoPackage.POJO_A__BLIST:
				getBList().clear();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case PojoPackage.POJO_A__BSET:
				return bSet != null && !bSet.isEmpty();
			case PojoPackage.POJO_A__BLIST:
				return bList != null && !bList.isEmpty();
		}
		return super.eIsSet(featureID);
	}

}

Back to the top