blob: 066221c738ea9ac34b80aabb1c4c305ce692a8b4 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009, 2014 Xored Software Inc and others.
* 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:
* Xored Software Inc - initial API and implementation and/or initial documentation
*******************************************************************************/
package org.eclipse.rcptt.sherlock.core.model.sherlock.report.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.rcptt.sherlock.core.model.sherlock.report.ReportContainer;
import org.eclipse.rcptt.sherlock.core.model.sherlock.report.ReportPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Container</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.rcptt.sherlock.core.model.sherlock.report.impl.ReportContainerImpl#getContent <em>Content</em>}</li>
* </ul>
*
* @generated
*/
public class ReportContainerImpl extends EObjectImpl implements ReportContainer {
/**
* The default value of the '{@link #getContent() <em>Content</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getContent()
* @generated
* @ordered
*/
protected static final byte[] CONTENT_EDEFAULT = null;
/**
* The cached value of the '{@link #getContent() <em>Content</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getContent()
* @generated
* @ordered
*/
protected byte[] content = CONTENT_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ReportContainerImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return ReportPackage.Literals.REPORT_CONTAINER;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public byte[] getContent() {
return content;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setContent(byte[] newContent) {
byte[] oldContent = content;
content = newContent;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ReportPackage.REPORT_CONTAINER__CONTENT, oldContent, content));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ReportPackage.REPORT_CONTAINER__CONTENT:
return getContent();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case ReportPackage.REPORT_CONTAINER__CONTENT:
setContent((byte[])newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case ReportPackage.REPORT_CONTAINER__CONTENT:
setContent(CONTENT_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case ReportPackage.REPORT_CONTAINER__CONTENT:
return CONTENT_EDEFAULT == null ? content != null : !CONTENT_EDEFAULT.equals(content);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (content: ");
result.append(content);
result.append(')');
return result.toString();
}
} //ReportContainerImpl