
BusinessDomainDsl.impl.StringPropertyImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mod4j-businessdomain-mm Show documentation
Show all versions of mod4j-businessdomain-mm Show documentation
This Eclipse plug-in project contains the BusinessDomain meta model.
The newest version!
/**
*
*
*
* $Id$
*/
package BusinessDomainDsl.impl;
import BusinessDomainDsl.BusinessDomainDslPackage;
import BusinessDomainDsl.StringProperty;
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 'String Property'.
*
*
* The following features are implemented:
*
* - {@link BusinessDomainDsl.impl.StringPropertyImpl#getRegularExpression Regular Expression}
* - {@link BusinessDomainDsl.impl.StringPropertyImpl#getMinLength Min Length}
* - {@link BusinessDomainDsl.impl.StringPropertyImpl#getMaxLength Max Length}
* - {@link BusinessDomainDsl.impl.StringPropertyImpl#getDefaultValue Default Value}
*
*
*
* @generated
*/
public class StringPropertyImpl extends PropertyImpl implements StringProperty {
/**
* The default value of the '{@link #getRegularExpression() Regular Expression}' attribute.
*
*
* @see #getRegularExpression()
* @generated
* @ordered
*/
protected static final String REGULAR_EXPRESSION_EDEFAULT = null;
/**
* The cached value of the '{@link #getRegularExpression() Regular Expression}' attribute.
*
*
* @see #getRegularExpression()
* @generated
* @ordered
*/
protected String regularExpression = REGULAR_EXPRESSION_EDEFAULT;
/**
* The default value of the '{@link #getMinLength() Min Length}' attribute.
*
*
* @see #getMinLength()
* @generated
* @ordered
*/
protected static final int MIN_LENGTH_EDEFAULT = -1;
/**
* The cached value of the '{@link #getMinLength() Min Length}' attribute.
*
*
* @see #getMinLength()
* @generated
* @ordered
*/
protected int minLength = MIN_LENGTH_EDEFAULT;
/**
* The default value of the '{@link #getMaxLength() Max Length}' attribute.
*
*
* @see #getMaxLength()
* @generated
* @ordered
*/
protected static final int MAX_LENGTH_EDEFAULT = -1;
/**
* The cached value of the '{@link #getMaxLength() Max Length}' attribute.
*
*
* @see #getMaxLength()
* @generated
* @ordered
*/
protected int maxLength = MAX_LENGTH_EDEFAULT;
/**
* The default value of the '{@link #getDefaultValue() Default Value}' attribute.
*
*
* @see #getDefaultValue()
* @generated
* @ordered
*/
protected static final String DEFAULT_VALUE_EDEFAULT = null;
/**
* The cached value of the '{@link #getDefaultValue() Default Value}' attribute.
*
*
* @see #getDefaultValue()
* @generated
* @ordered
*/
protected String defaultValue = DEFAULT_VALUE_EDEFAULT;
/**
*
*
* @generated
*/
protected StringPropertyImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return BusinessDomainDslPackage.Literals.STRING_PROPERTY;
}
/**
*
*
* @generated
*/
public String getRegularExpression() {
return regularExpression;
}
/**
*
*
* @generated
*/
public void setRegularExpression(String newRegularExpression) {
String oldRegularExpression = regularExpression;
regularExpression = newRegularExpression;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.STRING_PROPERTY__REGULAR_EXPRESSION, oldRegularExpression, regularExpression));
}
/**
*
*
* @generated
*/
public int getMinLength() {
return minLength;
}
/**
*
*
* @generated
*/
public void setMinLength(int newMinLength) {
int oldMinLength = minLength;
minLength = newMinLength;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.STRING_PROPERTY__MIN_LENGTH, oldMinLength, minLength));
}
/**
*
*
* @generated
*/
public int getMaxLength() {
return maxLength;
}
/**
*
*
* @generated
*/
public void setMaxLength(int newMaxLength) {
int oldMaxLength = maxLength;
maxLength = newMaxLength;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.STRING_PROPERTY__MAX_LENGTH, oldMaxLength, maxLength));
}
/**
*
*
* @generated
*/
public String getDefaultValue() {
return defaultValue;
}
/**
*
*
* @generated
*/
public void setDefaultValue(String newDefaultValue) {
String oldDefaultValue = defaultValue;
defaultValue = newDefaultValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.STRING_PROPERTY__DEFAULT_VALUE, oldDefaultValue, defaultValue));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BusinessDomainDslPackage.STRING_PROPERTY__REGULAR_EXPRESSION:
return getRegularExpression();
case BusinessDomainDslPackage.STRING_PROPERTY__MIN_LENGTH:
return getMinLength();
case BusinessDomainDslPackage.STRING_PROPERTY__MAX_LENGTH:
return getMaxLength();
case BusinessDomainDslPackage.STRING_PROPERTY__DEFAULT_VALUE:
return getDefaultValue();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BusinessDomainDslPackage.STRING_PROPERTY__REGULAR_EXPRESSION:
setRegularExpression((String)newValue);
return;
case BusinessDomainDslPackage.STRING_PROPERTY__MIN_LENGTH:
setMinLength((Integer)newValue);
return;
case BusinessDomainDslPackage.STRING_PROPERTY__MAX_LENGTH:
setMaxLength((Integer)newValue);
return;
case BusinessDomainDslPackage.STRING_PROPERTY__DEFAULT_VALUE:
setDefaultValue((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BusinessDomainDslPackage.STRING_PROPERTY__REGULAR_EXPRESSION:
setRegularExpression(REGULAR_EXPRESSION_EDEFAULT);
return;
case BusinessDomainDslPackage.STRING_PROPERTY__MIN_LENGTH:
setMinLength(MIN_LENGTH_EDEFAULT);
return;
case BusinessDomainDslPackage.STRING_PROPERTY__MAX_LENGTH:
setMaxLength(MAX_LENGTH_EDEFAULT);
return;
case BusinessDomainDslPackage.STRING_PROPERTY__DEFAULT_VALUE:
setDefaultValue(DEFAULT_VALUE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BusinessDomainDslPackage.STRING_PROPERTY__REGULAR_EXPRESSION:
return REGULAR_EXPRESSION_EDEFAULT == null ? regularExpression != null : !REGULAR_EXPRESSION_EDEFAULT.equals(regularExpression);
case BusinessDomainDslPackage.STRING_PROPERTY__MIN_LENGTH:
return minLength != MIN_LENGTH_EDEFAULT;
case BusinessDomainDslPackage.STRING_PROPERTY__MAX_LENGTH:
return maxLength != MAX_LENGTH_EDEFAULT;
case BusinessDomainDslPackage.STRING_PROPERTY__DEFAULT_VALUE:
return DEFAULT_VALUE_EDEFAULT == null ? defaultValue != null : !DEFAULT_VALUE_EDEFAULT.equals(defaultValue);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (regularExpression: ");
result.append(regularExpression);
result.append(", minLength: ");
result.append(minLength);
result.append(", maxLength: ");
result.append(maxLength);
result.append(", defaultValue: ");
result.append(defaultValue);
result.append(')');
return result.toString();
}
} //StringPropertyImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy