| /** |
| ************************************************************************* |
| * Copyright (c) 2009 Actuate Corporation. |
| * 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: |
| * Actuate Corporation - initial API and implementation |
| * |
| ************************************************************************* |
| * |
| * $Id: CompositeFilterExpressionImpl.java,v 1.1 2009/01/30 00:23:56 lchan Exp $ |
| */ |
| package org.eclipse.datatools.connectivity.oda.design.impl; |
| |
| import java.util.Collection; |
| |
| import org.eclipse.datatools.connectivity.oda.design.CompositeFilterExpression; |
| import org.eclipse.datatools.connectivity.oda.design.DesignPackage; |
| import org.eclipse.datatools.connectivity.oda.design.FilterExpression; |
| |
| import org.eclipse.emf.common.notify.NotificationChain; |
| |
| import org.eclipse.emf.common.util.EList; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
| import org.eclipse.emf.ecore.util.InternalEList; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Composite Filter Expression</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.datatools.connectivity.oda.design.impl.CompositeFilterExpressionImpl#getChildren <em>Children</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| * @since 3.3 (DTP 1.8) |
| */ |
| public class CompositeFilterExpressionImpl extends FilterExpressionImpl |
| implements CompositeFilterExpression |
| { |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final String copyright = "Copyright (c) 2009 Actuate Corporation"; //$NON-NLS-1$ |
| |
| /** |
| * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getChildren() |
| * @generated |
| * @ordered |
| */ |
| protected EList<FilterExpression> m_children; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected CompositeFilterExpressionImpl() |
| { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() |
| { |
| return DesignPackage.Literals.COMPOSITE_FILTER_EXPRESSION; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<FilterExpression> getChildren() |
| { |
| if( m_children == null ) |
| { |
| m_children = new EObjectContainmentEList<FilterExpression>( |
| FilterExpression.class, this, |
| DesignPackage.COMPOSITE_FILTER_EXPRESSION__CHILDREN ); |
| } |
| return m_children; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove( InternalEObject otherEnd, |
| int featureID, NotificationChain msgs ) |
| { |
| switch( featureID ) |
| { |
| case DesignPackage.COMPOSITE_FILTER_EXPRESSION__CHILDREN: |
| return ((InternalEList<?>) getChildren()).basicRemove( otherEnd, |
| msgs ); |
| } |
| return super.eInverseRemove( otherEnd, featureID, msgs ); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet( int featureID, boolean resolve, boolean coreType ) |
| { |
| switch( featureID ) |
| { |
| case DesignPackage.COMPOSITE_FILTER_EXPRESSION__CHILDREN: |
| return getChildren(); |
| } |
| return super.eGet( featureID, resolve, coreType ); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @SuppressWarnings("unchecked") |
| @Override |
| public void eSet( int featureID, Object newValue ) |
| { |
| switch( featureID ) |
| { |
| case DesignPackage.COMPOSITE_FILTER_EXPRESSION__CHILDREN: |
| getChildren().clear(); |
| getChildren().addAll( |
| (Collection<? extends FilterExpression>) newValue ); |
| return; |
| } |
| super.eSet( featureID, newValue ); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset( int featureID ) |
| { |
| switch( featureID ) |
| { |
| case DesignPackage.COMPOSITE_FILTER_EXPRESSION__CHILDREN: |
| getChildren().clear(); |
| return; |
| } |
| super.eUnset( featureID ); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet( int featureID ) |
| { |
| switch( featureID ) |
| { |
| case DesignPackage.COMPOSITE_FILTER_EXPRESSION__CHILDREN: |
| return m_children != null && !m_children.isEmpty(); |
| } |
| return super.eIsSet( featureID ); |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.datatools.connectivity.oda.design.CompositeFilterExpression#add(org.eclipse.datatools.connectivity.oda.design.FilterExpression) |
| * @generated NOT |
| */ |
| public void add( FilterExpression childExpr ) |
| { |
| getChildren().add( childExpr ); |
| } |
| |
| } //CompositeFilterExpressionImpl |