## org.eclipse.emf.ocl.query.impl
Class QueryFactoryImpl

    java.lang.Object
      org.eclipse.emf.common.notify.impl.BasicNotifierImpl
          org.eclipse.emf.ecore.impl.BasicEObjectImpl
              org.eclipse.emf.ecore.impl.EObjectImpl
                  org.eclipse.emf.ecore.impl.FlatEObjectImpl
                      org.eclipse.emf.ecore.impl.EModelElementImpl
                          org.eclipse.emf.ecore.impl.EFactoryImpl
                              org.eclipse.emf.ocl.query.impl.QueryFactoryImpl

All Implemented Interfaces:
  Notifier, EFactory, EModelElement, EObject, InternalEObject, QueryFactory

    public class QueryFactoryImpl

extends EFactoryImpl
implements QueryFactory

An implementation of the model Factory.

Nested Class Summary

Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
`BasicEObjectImpl.EPropertiesHolder, BasicEObjectImpl.EPropertiesHolderBaseImpl, BasicEObjectImpl.EPropertiesHolderImpl`

Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
`BasicNotifierImpl.EAdapterList<E extends Object & Adapter>`

Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
`InternalEObject.EStore`

Field Summary
`static String` `copyright`

Fields inherited from class org.eclipse.emf.ecore.impl.EFactoryImpl
`EDATE_FORMATS, ePackage`

Fields inherited from class org.eclipse.emf.ecore.impl.EModelElementImpl
`eAnnotations, EFROZEN, ELAST_EMODEL_ELEMENT_FLAG`

Fields inherited from class org.eclipse.emf.ecore.impl.FlatEObjectImpl
`eContents, eCrossReferences, eProxyURI`

Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
`eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY`

Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
`EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET`

Fields inherited from interface org.eclipse.emf.ocl.query.QueryFactory
`eINSTANCE`

Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
`EOPPOSITE_FEATURE_BASE`

Constructor Summary
`QueryFactoryImpl()` Creates an instance of the factory

Method Summary
`String` `convertToString(EDataType eDataType, Object instanceValue)`
`EObject` `create(EClass eClass)`
`Object` `createFromString(EDataType eDataType, String initialValue)`
`Query` `createQuery()`
`Query` `createQuery(OCLExpression expr)` Creates a query from an `OCLExpression` (constraint or query).
`Query` `createQuery(String expr, EClassifier context)` Creates an OCL query from the specified OCL expression string, for the given OCL classifier context.
`static QueryPackage` `getPackage()` Deprecated.
`QueryPackage` `getQueryPackage()`
`static QueryFactory` `init()` Creates the default factory implementation

Methods inherited from class org.eclipse.emf.ecore.impl.EFactoryImpl
`basicCreate, basicSetEPackage, collapseWhiteSpace, convertToString, createFromString, eGet, eInverseAdd, eInverseRemove, eIsSet, eSet, eStaticClass, eUnset, getEPackage, replaceWhiteSpace, setEPackage`

Methods inherited from class org.eclipse.emf.ecore.impl.EModelElementImpl
`eObjectForURIFragmentSegment, eURIFragmentSegment, freeze, freeze, getEAnnotation, getEAnnotations, isFrozen, setFrozen`

Methods inherited from class org.eclipse.emf.ecore.impl.FlatEObjectImpl
`eContents, eCrossReferences, eIsProxy, eProperties, eProxyURI, eSetProxyURI`

Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
`eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eSetClass, eSetDeliver`

Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl

`eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseRemove, eIsSet, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStore, eUnset, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues, toString`

Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
`eNotificationRequired, eNotify`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.eclipse.emf.ecore.EFactory
`getEPackage, setEPackage`

Methods inherited from interface org.eclipse.emf.ecore.EModelElement
`getEAnnotation, getEAnnotations`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
`eNotificationRequired`

Field Detail

### copyright

    public static final String copyright

  See Also:
    Constant Field Values

Constructor Detail

### QueryFactoryImpl

    public QueryFactoryImpl()

  Creates an instance of the factory.

Method Detail

### init

    public static QueryFactory init()

  Creates the default factory implementation.

### create

    public EObject create(EClass eClass)

  Specified by:
    `create` in interface `EFactory`
  Overrides:
    `create` in class `EFactoryImpl`

### createFromString

    public Object createFromString(EDataType eDataType,
                                   String initialValue)

  Specified by:
    `createFromString` in interface `EFactory`
  Overrides:
    `createFromString` in class `EFactoryImpl`

### convertToString

    public String convertToString(EDataType eDataType,
                                  Object instanceValue)

  Specified by:
    `convertToString` in interface `EFactory`
  Overrides:
    `convertToString` in class `EFactoryImpl`

### createQuery

    public Query createQuery()

  Specified by:
    `createQuery` in interface `QueryFactory`
  Returns:
    a new object of class 'Query'.

### createQuery

    public Query createQuery(String expr,
                             EClassifier context)

  Description copied from interface: `QueryFactory`
  Creates an OCL query from the specified OCL expression string, for the given OCL classifier context.

  This method offers the convenience of creating the package and context declaration and other boilerplate components of the query on the caller's behalf; the specified expression must be only the bare expression without even the `inv:` keyword. e.g.,

           self.color <> Color::red

  instead of:

           package com::examples::fruit
           context Pomegranate
           inv: self.color <> Color::red
           endpackage

  Specified by:
    `createQuery` in interface `QueryFactory`
  Parameters:
    `expr` - the bare OCL expression text
    `context` - the OCL classifier context
  Returns:
    the compiled OCL query object

### createQuery

    public Query createQuery(OCLExpression expr)

  Description copied from interface: `QueryFactory`
  Creates a query from an `OCLExpression` (constraint or query). The query is validated according to OCL well-formedness rules.

  Specified by:
    `createQuery` in interface `QueryFactory`
  Parameters:
    `expr` - the ocl expression
  Returns:
    the new query instance, if the OCL expression is valid

### getQueryPackage

    public QueryPackage getQueryPackage()

  Specified by:
    `getQueryPackage` in interface `QueryFactory`
  Returns:
    the package supported by this factory.

### getPackage

    @Deprecated
    public static QueryPackage getPackage()

  Deprecated.

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.