/******************************************************************************* * Copyright (c) 2007, 2009 Oracle. 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: * Oracle - initial API and implementation ******************************************************************************/ package org.eclipse.jpt.core.resource.orm; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.eclipse.emf.common.notify.Notification; 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.impl.ENotificationImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject; import org.eclipse.jpt.core.resource.xml.JpaEObject; import org.eclipse.jpt.utility.internal.CollectionTools; /** * * A representation of the model object 'Entity Mappings'. * * Provisional API: This interface is part of an interim API that is still * under development and expected to change significantly before reaching * stability. It is available at this early stage to solicit feedback from * pioneering adopters on the understanding that any code that uses this API * will almost certainly be broken (repeatedly) as the API evolves. * * *
* The following features are supported: *
"1.0"
.
*
* * If the meaning of the 'Version' attribute isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Version' attribute. * @see #isSetVersion() * @see #unsetVersion() * @see #setVersion(String) * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_Version() * @model default="1.0" unsettable="true" dataType="org.eclipse.jpt.core.resource.orm.VersionType" required="true" * @generated */ public String getVersion() { return version; } /** * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getVersion Version}' attribute. * * * @param value the new value of the 'Version' attribute. * @see #isSetVersion() * @see #unsetVersion() * @see #getVersion() * @generated */ public void setVersion(String newVersion) { String oldVersion = version; version = newVersion; boolean oldVersionESet = versionESet; versionESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__VERSION, oldVersion, version, !oldVersionESet)); } /** * Unsets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getVersion Version}' attribute. * * * @see #isSetVersion() * @see #getVersion() * @see #setVersion(String) * @generated */ public void unsetVersion() { String oldVersion = version; boolean oldVersionESet = versionESet; version = VERSION_EDEFAULT; versionESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, OrmPackage.XML_ENTITY_MAPPINGS__VERSION, oldVersion, VERSION_EDEFAULT, oldVersionESet)); } /** * Returns whether the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getVersion Version}' attribute is set. * * * @return whether the value of the 'Version' attribute is set. * @see #unsetVersion() * @see #getVersion() * @see #setVersion(String) * @generated */ public boolean isSetVersion() { return versionESet; } /** * Returns the value of the 'Description' attribute. * ** If the meaning of the 'Description' attribute isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Description' attribute. * @see #setDescription(String) * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_Description() * @model dataType="org.eclipse.emf.ecore.xml.type.String" * @generated */ public String getDescription() { return description; } /** * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getDescription Description}' attribute. * * * @param value the new value of the 'Description' attribute. * @see #getDescription() * @generated */ public void setDescription(String newDescription) { String oldDescription = description; description = newDescription; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__DESCRIPTION, oldDescription, description)); } /** * Returns the value of the 'Persistence Unit Metadata' containment reference. * ** If the meaning of the 'XmlPersistence Unit Metadata' containment reference isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Persistence Unit Metadata' containment reference. * @see #setPersistenceUnitMetadata(XmlPersistenceUnitMetadata) * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_PersistenceUnitMetadata() * @model containment="true" * @generated */ public XmlPersistenceUnitMetadata getPersistenceUnitMetadata() { return persistenceUnitMetadata; } /** * * * @generated */ public NotificationChain basicSetPersistenceUnitMetadata(XmlPersistenceUnitMetadata newPersistenceUnitMetadata, NotificationChain msgs) { XmlPersistenceUnitMetadata oldPersistenceUnitMetadata = persistenceUnitMetadata; persistenceUnitMetadata = newPersistenceUnitMetadata; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA, oldPersistenceUnitMetadata, newPersistenceUnitMetadata); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getPersistenceUnitMetadata Persistence Unit Metadata}' containment reference. * * * @param value the new value of the 'Persistence Unit Metadata' containment reference. * @see #getPersistenceUnitMetadata() * @generated */ public void setPersistenceUnitMetadata(XmlPersistenceUnitMetadata newPersistenceUnitMetadata) { if (newPersistenceUnitMetadata != persistenceUnitMetadata) { NotificationChain msgs = null; if (persistenceUnitMetadata != null) msgs = ((InternalEObject)persistenceUnitMetadata).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA, null, msgs); if (newPersistenceUnitMetadata != null) msgs = ((InternalEObject)newPersistenceUnitMetadata).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA, null, msgs); msgs = basicSetPersistenceUnitMetadata(newPersistenceUnitMetadata, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA, newPersistenceUnitMetadata, newPersistenceUnitMetadata)); } /** * Returns the value of the 'Package' attribute. * ** If the meaning of the 'Package' attribute isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Package' attribute. * @see #setPackage(String) * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_Package() * @model dataType="org.eclipse.emf.ecore.xml.type.String" * @generated */ public String getPackage() { return package_; } /** * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getPackage Package}' attribute. * * * @param value the new value of the 'Package' attribute. * @see #getPackage() * @generated */ public void setPackage(String newPackage) { String oldPackage = package_; package_ = newPackage; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__PACKAGE, oldPackage, package_)); } /** * Returns the value of the 'Schema' attribute. * ** If the meaning of the 'Schema' attribute isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Schema' attribute. * @see #setSchema(String) * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_Schema() * @model dataType="org.eclipse.emf.ecore.xml.type.String" * @generated */ public String getSchema() { return schema; } /** * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getSchema Schema}' attribute. * * * @param value the new value of the 'Schema' attribute. * @see #getSchema() * @generated */ public void setSchema(String newSchema) { String oldSchema = schema; schema = newSchema; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__SCHEMA, oldSchema, schema)); } /** * Returns the value of the 'Catalog' attribute. * ** If the meaning of the 'Catalog' attribute isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Catalog' attribute. * @see #setCatalog(String) * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_Catalog() * @model dataType="org.eclipse.emf.ecore.xml.type.String" * @generated */ public String getCatalog() { return catalog; } /** * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getCatalog Catalog}' attribute. * * * @param value the new value of the 'Catalog' attribute. * @see #getCatalog() * @generated */ public void setCatalog(String newCatalog) { String oldCatalog = catalog; catalog = newCatalog; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__CATALOG, oldCatalog, catalog)); } /** * Returns the value of the 'Access' attribute. * The default value is"PROPERTY"
.
* The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.AccessType}.
*
* * If the meaning of the 'Access' attribute isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Access' attribute. * @see org.eclipse.jpt.core.resource.orm.AccessType * @see #setAccess(AccessType) * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_Access() * @model default="PROPERTY" * @generated */ public AccessType getAccess() { return access; } /** * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getAccess Access}' attribute. * * * @param value the new value of the 'Access' attribute. * @see org.eclipse.jpt.core.resource.orm.AccessType * @see #getAccess() * @generated */ public void setAccess(AccessType newAccess) { AccessType oldAccess = access; access = newAccess == null ? ACCESS_EDEFAULT : newAccess; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__ACCESS, oldAccess, access)); } /** * Returns the value of the 'Sequence Generators' containment reference list. * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator}. * ** If the meaning of the 'Sequence Generators' containment reference list isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Sequence Generators' containment reference list. * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_SequenceGenerators() * @model containment="true" * @generated */ public EList* If the meaning of the 'Table Generators' containment reference list isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Table Generators' containment reference list. * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_TableGenerators() * @model containment="true" * @generated */ public EList* If the meaning of the 'Named Queries' containment reference list isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Named Queries' containment reference list. * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_NamedQueries() * @model containment="true" * @generated */ public EList* If the meaning of the 'Named Native Queries' containment reference list isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Named Native Queries' containment reference list. * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_NamedNativeQueries() * @model containment="true" * @generated */ public EList* If the meaning of the 'Sql Result Set Mappings' containment reference list isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Sql Result Set Mappings' containment reference list. * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_SqlResultSetMappings() * @model containment="true" * @generated */ public EList* If the meaning of the 'Mapped Superclasses' containment reference list isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Mapped Superclasses' containment reference list. * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_MappedSuperclasses() * @model containment="true" * @generated */ public EList* If the meaning of the 'Entities' containment reference list isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Entities' containment reference list. * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_Entities() * @model containment="true" * @generated */ public EList* If the meaning of the 'Embeddables' containment reference list isn't clear, * there really should be more of a description here... *
* * @return the value of the 'Embeddables' containment reference list. * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_Embeddables() * @model containment="true" * @generated */ public EList