blob: 3d30d336253617490719ae36b842b04c4a80b909 [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* 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:
* Florian Pirchner - Initial implementation
*
*/
package org.eclipse.osbp.ecview.extension.grid.renderer.impl;
import org.eclipse.osbp.ecview.extension.grid.renderer.CxGridHtmlRenderer;
import org.eclipse.osbp.ecview.extension.grid.renderer.CxGridRendererPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Cx Grid Html Renderer</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.osbp.ecview.extension.grid.renderer.impl.CxGridHtmlRendererImpl#getNullRepresentation <em>Null Representation</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class CxGridHtmlRendererImpl extends CxGridRendererImpl implements CxGridHtmlRenderer {
/**
* The default value of the '{@link #getNullRepresentation() <em>Null Representation</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getNullRepresentation()
* @generated
* @ordered
*/
protected static final String NULL_REPRESENTATION_EDEFAULT = "";
/**
* The cached value of the '{@link #getNullRepresentation() <em>Null Representation</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getNullRepresentation()
* @generated
* @ordered
*/
protected String nullRepresentation = NULL_REPRESENTATION_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @generated
*/
protected CxGridHtmlRendererImpl() {
super();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the e class
* @generated
*/
@Override
protected EClass eStaticClass() {
return CxGridRendererPackage.Literals.CX_GRID_HTML_RENDERER;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #getNullRepresentation()
* <em>Null Representation</em>}' attribute
* @generated
*/
public String getNullRepresentation() {
return nullRepresentation;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newNullRepresentation
* the new cached value of the '{@link #getNullRepresentation()
* <em>Null Representation</em>}' attribute
* @generated
*/
public void setNullRepresentation(String newNullRepresentation) {
String oldNullRepresentation = nullRepresentation;
nullRepresentation = newNullRepresentation;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, CxGridRendererPackage.CX_GRID_HTML_RENDERER__NULL_REPRESENTATION, oldNullRepresentation, nullRepresentation));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param featureID
* the feature id
* @param resolve
* the resolve
* @param coreType
* the core type
* @return the object
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case CxGridRendererPackage.CX_GRID_HTML_RENDERER__NULL_REPRESENTATION:
return getNullRepresentation();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param featureID
* the feature id
* @param newValue
* the new value
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case CxGridRendererPackage.CX_GRID_HTML_RENDERER__NULL_REPRESENTATION:
setNullRepresentation((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param featureID
* the feature id
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case CxGridRendererPackage.CX_GRID_HTML_RENDERER__NULL_REPRESENTATION:
setNullRepresentation(NULL_REPRESENTATION_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param featureID
* the feature id
* @return true, if successful
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case CxGridRendererPackage.CX_GRID_HTML_RENDERER__NULL_REPRESENTATION:
return NULL_REPRESENTATION_EDEFAULT == null ? nullRepresentation != null : !NULL_REPRESENTATION_EDEFAULT.equals(nullRepresentation);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the string
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (nullRepresentation: ");
result.append(nullRepresentation);
result.append(')');
return result.toString();
}
}