org.eclipse.bpmn2.impl.ParticipantMultiplicityImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kie-wb-common-stunner-bpmn-emf Show documentation
Show all versions of kie-wb-common-stunner-bpmn-emf Show documentation
Kie Workbench - Common - Stunner - BPMN Definition Set - GWT Support for Eclipse EMF/XMI
/**
*
*
* Copyright (c) 2010 SAP AG.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Reiner Hille-Doering (SAP AG) - initial API and implementation and/or initial documentation
*
*
*/
package org.eclipse.bpmn2.impl;
import com.google.gwt.user.client.rpc.GwtTransient;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.ParticipantMultiplicity;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
*
* An implementation of the model object 'Participant Multiplicity'.
*
*
* The following features are implemented:
*
*
* - {@link org.eclipse.bpmn2.impl.ParticipantMultiplicityImpl#getMaximum Maximum}
* - {@link org.eclipse.bpmn2.impl.ParticipantMultiplicityImpl#getMinimum Minimum}
*
*
* @generated
*/
public class ParticipantMultiplicityImpl extends BaseElementImpl implements ParticipantMultiplicity {
/**
* The default value of the '{@link #getMaximum() Maximum}' attribute.
*
*
* @see #getMaximum()
* @generated
* @ordered
*/
protected static final int MAXIMUM_EDEFAULT = 1;
/**
* The cached value of the '{@link #getMaximum() Maximum}' attribute.
*
*
* @see #getMaximum()
* @generated
* @ordered
*/
@GwtTransient
protected int maximum = MAXIMUM_EDEFAULT;
/**
* The default value of the '{@link #getMinimum() Minimum}' attribute.
*
*
* @see #getMinimum()
* @generated
* @ordered
*/
protected static final int MINIMUM_EDEFAULT = 0;
/**
* The cached value of the '{@link #getMinimum() Minimum}' attribute.
*
*
* @see #getMinimum()
* @generated
* @ordered
*/
@GwtTransient
protected int minimum = MINIMUM_EDEFAULT;
/**
*
*
* @generated
*/
protected ParticipantMultiplicityImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Bpmn2Package.Literals.PARTICIPANT_MULTIPLICITY;
}
/**
*
*
* @generated
*/
@Override
public int getMaximum() {
return maximum;
}
/**
*
*
* @generated
*/
@Override
public void setMaximum(int newMaximum) {
int oldMaximum = maximum;
maximum = newMaximum;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.PARTICIPANT_MULTIPLICITY__MAXIMUM,
oldMaximum, maximum));
}
/**
*
*
* @generated
*/
@Override
public int getMinimum() {
return minimum;
}
/**
*
*
* @generated
*/
@Override
public void setMinimum(int newMinimum) {
int oldMinimum = minimum;
minimum = newMinimum;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.PARTICIPANT_MULTIPLICITY__MINIMUM,
oldMinimum, minimum));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MAXIMUM:
return getMaximum();
case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MINIMUM:
return getMinimum();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MAXIMUM:
setMaximum((Integer) newValue);
return;
case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MINIMUM:
setMinimum((Integer) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MAXIMUM:
setMaximum(MAXIMUM_EDEFAULT);
return;
case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MINIMUM:
setMinimum(MINIMUM_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MAXIMUM:
return maximum != MAXIMUM_EDEFAULT;
case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MINIMUM:
return minimum != MINIMUM_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (maximum: ");
result.append(maximum);
result.append(", minimum: ");
result.append(minimum);
result.append(')');
return result.toString();
}
} //ParticipantMultiplicityImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy