1 7 package Olj.impl; 8 9 import Olj.OljPackage; 10 import Olj.VariableColumnsType; 11 12 import java.util.Collection ; 13 14 import org.eclipse.emf.common.notify.NotificationChain; 15 16 import org.eclipse.emf.common.util.EList; 17 18 import org.eclipse.emf.ecore.EClass; 19 import org.eclipse.emf.ecore.EStructuralFeature; 20 import org.eclipse.emf.ecore.InternalEObject; 21 22 import org.eclipse.emf.ecore.impl.EObjectImpl; 23 24 import org.eclipse.emf.ecore.util.BasicFeatureMap; 25 import org.eclipse.emf.ecore.util.FeatureMap; 26 import org.eclipse.emf.ecore.util.InternalEList; 27 28 44 public class VariableColumnsTypeImpl extends EObjectImpl implements VariableColumnsType { 45 53 protected FeatureMap group = null; 54 55 60 protected VariableColumnsTypeImpl() { 61 super(); 62 } 63 64 69 protected EClass eStaticClass() { 70 return OljPackage.eINSTANCE.getVariableColumnsType(); 71 } 72 73 78 public FeatureMap getGroup() { 79 if (group == null) { 80 group = new BasicFeatureMap(this, OljPackage.VARIABLE_COLUMNS_TYPE__GROUP); 81 } 82 return group; 83 } 84 85 90 public EList getVariableColumn() { 91 return ((FeatureMap)getGroup()).list(OljPackage.eINSTANCE.getVariableColumnsType_VariableColumn()); 92 } 93 94 99 public EList getUserIDColumn() { 100 return ((FeatureMap)getGroup()).list(OljPackage.eINSTANCE.getVariableColumnsType_UserIDColumn()); 101 } 102 103 108 public EList getTimeStampColumn() { 109 return ((FeatureMap)getGroup()).list(OljPackage.eINSTANCE.getVariableColumnsType_TimeStampColumn()); 110 } 111 112 117 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { 118 if (featureID >= 0) { 119 switch (eDerivedStructuralFeatureID(featureID, baseClass)) { 120 case OljPackage.VARIABLE_COLUMNS_TYPE__GROUP: 121 return ((InternalEList)getGroup()).basicRemove(otherEnd, msgs); 122 case OljPackage.VARIABLE_COLUMNS_TYPE__VARIABLE_COLUMN: 123 return ((InternalEList)getVariableColumn()).basicRemove(otherEnd, msgs); 124 case OljPackage.VARIABLE_COLUMNS_TYPE__USER_ID_COLUMN: 125 return ((InternalEList)getUserIDColumn()).basicRemove(otherEnd, msgs); 126 case OljPackage.VARIABLE_COLUMNS_TYPE__TIME_STAMP_COLUMN: 127 return ((InternalEList)getTimeStampColumn()).basicRemove(otherEnd, msgs); 128 default: 129 return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); 130 } 131 } 132 return eBasicSetContainer(null, featureID, msgs); 133 } 134 135 140 public Object eGet(EStructuralFeature eFeature, boolean resolve) { 141 switch (eDerivedStructuralFeatureID(eFeature)) { 142 case OljPackage.VARIABLE_COLUMNS_TYPE__GROUP: 143 return getGroup(); 144 case OljPackage.VARIABLE_COLUMNS_TYPE__VARIABLE_COLUMN: 145 return getVariableColumn(); 146 case OljPackage.VARIABLE_COLUMNS_TYPE__USER_ID_COLUMN: 147 return getUserIDColumn(); 148 case OljPackage.VARIABLE_COLUMNS_TYPE__TIME_STAMP_COLUMN: 149 return getTimeStampColumn(); 150 } 151 return eDynamicGet(eFeature, resolve); 152 } 153 154 159 public void eSet(EStructuralFeature eFeature, Object newValue) { 160 switch (eDerivedStructuralFeatureID(eFeature)) { 161 case OljPackage.VARIABLE_COLUMNS_TYPE__GROUP: 162 getGroup().clear(); 163 getGroup().addAll((Collection )newValue); 164 return; 165 case OljPackage.VARIABLE_COLUMNS_TYPE__VARIABLE_COLUMN: 166 getVariableColumn().clear(); 167 getVariableColumn().addAll((Collection )newValue); 168 return; 169 case OljPackage.VARIABLE_COLUMNS_TYPE__USER_ID_COLUMN: 170 getUserIDColumn().clear(); 171 getUserIDColumn().addAll((Collection )newValue); 172 return; 173 case OljPackage.VARIABLE_COLUMNS_TYPE__TIME_STAMP_COLUMN: 174 getTimeStampColumn().clear(); 175 getTimeStampColumn().addAll((Collection )newValue); 176 return; 177 } 178 eDynamicSet(eFeature, newValue); 179 } 180 181 186 public void eUnset(EStructuralFeature eFeature) { 187 switch (eDerivedStructuralFeatureID(eFeature)) { 188 case OljPackage.VARIABLE_COLUMNS_TYPE__GROUP: 189 getGroup().clear(); 190 return; 191 case OljPackage.VARIABLE_COLUMNS_TYPE__VARIABLE_COLUMN: 192 getVariableColumn().clear(); 193 return; 194 case OljPackage.VARIABLE_COLUMNS_TYPE__USER_ID_COLUMN: 195 getUserIDColumn().clear(); 196 return; 197 case OljPackage.VARIABLE_COLUMNS_TYPE__TIME_STAMP_COLUMN: 198 getTimeStampColumn().clear(); 199 return; 200 } 201 eDynamicUnset(eFeature); 202 } 203 204 209 public boolean eIsSet(EStructuralFeature eFeature) { 210 switch (eDerivedStructuralFeatureID(eFeature)) { 211 case OljPackage.VARIABLE_COLUMNS_TYPE__GROUP: 212 return group != null && !group.isEmpty(); 213 case OljPackage.VARIABLE_COLUMNS_TYPE__VARIABLE_COLUMN: 214 return !getVariableColumn().isEmpty(); 215 case OljPackage.VARIABLE_COLUMNS_TYPE__USER_ID_COLUMN: 216 return !getUserIDColumn().isEmpty(); 217 case OljPackage.VARIABLE_COLUMNS_TYPE__TIME_STAMP_COLUMN: 218 return !getTimeStampColumn().isEmpty(); 219 } 220 return eDynamicIsSet(eFeature); 221 } 222 223 228 public String toString() { 229 if (eIsProxy()) return super.toString(); 230 231 StringBuffer result = new StringBuffer (super.toString()); 232 result.append(" (group: "); 233 result.append(group); 234 result.append(')'); 235 return result.toString(); 236 } 237 238 } | Popular Tags |