Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 104363 Details for
Bug 236109
remove native query from entity-mappings throws exception
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
proposed patch - HEAD
236109.txt (text/plain), 5.84 KB, created by
Karen Butzke
on 2008-06-10 14:30:42 EDT
(
hide
)
Description:
proposed patch - HEAD
Filename:
MIME Type:
Creator:
Karen Butzke
Created:
2008-06-10 14:30:42 EDT
Size:
5.84 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jpt.core >Index: src/org/eclipse/jpt/core/context/orm/EntityMappings.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jpa/components/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/EntityMappings.java,v >retrieving revision 1.10 >diff -u -r1.10 EntityMappings.java >--- src/org/eclipse/jpt/core/context/orm/EntityMappings.java 26 Mar 2008 23:09:08 -0000 1.10 >+++ src/org/eclipse/jpt/core/context/orm/EntityMappings.java 10 Jun 2008 17:48:57 -0000 >@@ -103,15 +103,13 @@ > OrmNamedQuery addNamedQuery(int index); > void removeNamedQuery(int index); > void moveNamedQuery(int targetIndex, int sourceIndex); >- String NAMED_QUERIES_LIST = "namedQueriesList"; > >- @SuppressWarnings("unchecked") >+ @SuppressWarnings("unchecked") > ListIterator<OrmNamedNativeQuery> namedNativeQueries(); > int namedNativeQueriesSize(); > OrmNamedNativeQuery addNamedNativeQuery(int index); > void removeNamedNativeQuery(int index); > void moveNamedNativeQuery(int targetIndex, int sourceIndex); >- String NAMED_NATIVE_QUERIES_LIST = "namedNativeQueriesList"; > > > >Index: src/org/eclipse/jpt/core/internal/context/orm/GenericEntityMappings.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jpa/components/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericEntityMappings.java,v >retrieving revision 1.27 >diff -u -r1.27 GenericEntityMappings.java >--- src/org/eclipse/jpt/core/internal/context/orm/GenericEntityMappings.java 9 May 2008 12:38:58 -0000 1.27 >+++ src/org/eclipse/jpt/core/internal/context/orm/GenericEntityMappings.java 10 Jun 2008 17:48:57 -0000 >@@ -23,6 +23,7 @@ > import org.eclipse.jpt.core.context.NamedNativeQuery; > import org.eclipse.jpt.core.context.NamedQuery; > import org.eclipse.jpt.core.context.Query; >+import org.eclipse.jpt.core.context.QueryHolder; > import org.eclipse.jpt.core.context.orm.EntityMappings; > import org.eclipse.jpt.core.context.orm.OrmGenerator; > import org.eclipse.jpt.core.context.orm.OrmNamedNativeQuery; >@@ -401,12 +402,12 @@ > OrmNamedQuery namedQuery = getJpaFactory().buildOrmNamedQuery(this); > this.namedQueries.add(index, namedQuery); > this.xmlEntityMappings.getNamedQueries().add(index, OrmFactory.eINSTANCE.createXmlNamedQuery()); >- this.fireItemAdded(EntityMappings.NAMED_QUERIES_LIST, index, namedQuery); >+ this.fireItemAdded(QueryHolder.NAMED_QUERIES_LIST, index, namedQuery); > return namedQuery; > } > > protected void addNamedQuery(int index, OrmNamedQuery namedQuery) { >- addItemToList(index, namedQuery, this.namedQueries, EntityMappings.NAMED_QUERIES_LIST); >+ addItemToList(index, namedQuery, this.namedQueries, QueryHolder.NAMED_QUERIES_LIST); > } > > public void removeNamedQuery(NamedQuery namedQuery) { >@@ -416,16 +417,16 @@ > public void removeNamedQuery(int index) { > OrmNamedQuery namedQuery = this.namedQueries.remove(index); > this.xmlEntityMappings.getNamedQueries().remove(index); >- fireItemRemoved(EntityMappings.NAMED_QUERIES_LIST, index, namedQuery); >+ fireItemRemoved(QueryHolder.NAMED_QUERIES_LIST, index, namedQuery); > } > > protected void removeNamedQuery_(OrmNamedQuery namedQuery) { >- removeItemFromList(namedQuery, this.namedQueries, EntityMappings.NAMED_QUERIES_LIST); >+ removeItemFromList(namedQuery, this.namedQueries, QueryHolder.NAMED_QUERIES_LIST); > } > > public void moveNamedQuery(int targetIndex, int sourceIndex) { > this.xmlEntityMappings.getNamedQueries().move(targetIndex, sourceIndex); >- moveItemInList(targetIndex, sourceIndex, this.namedQueries, EntityMappings.NAMED_QUERIES_LIST); >+ moveItemInList(targetIndex, sourceIndex, this.namedQueries, QueryHolder.NAMED_QUERIES_LIST); > } > > public ListIterator<OrmNamedNativeQuery> namedNativeQueries() { >@@ -440,12 +441,12 @@ > OrmNamedNativeQuery namedNativeQuery = getJpaFactory().buildOrmNamedNativeQuery(this); > this.namedNativeQueries.add(index, namedNativeQuery); > this.xmlEntityMappings.getNamedNativeQueries().add(index, OrmFactory.eINSTANCE.createXmlNamedNativeQuery()); >- this.fireItemAdded(EntityMappings.NAMED_QUERIES_LIST, index, namedNativeQuery); >+ this.fireItemAdded(QueryHolder.NAMED_NATIVE_QUERIES_LIST, index, namedNativeQuery); > return namedNativeQuery; > } > > protected void addNamedNativeQuery(int index, OrmNamedNativeQuery namedNativeQuery) { >- addItemToList(index, namedNativeQuery, this.namedNativeQueries, EntityMappings.NAMED_NATIVE_QUERIES_LIST); >+ addItemToList(index, namedNativeQuery, this.namedNativeQueries, QueryHolder.NAMED_NATIVE_QUERIES_LIST); > } > > public void removeNamedNativeQuery(NamedNativeQuery namedNativeQuery) { >@@ -455,16 +456,16 @@ > public void removeNamedNativeQuery(int index) { > OrmNamedNativeQuery namedNativeQuery = this.namedNativeQueries.remove(index); > this.xmlEntityMappings.getNamedNativeQueries().remove(index); >- fireItemRemoved(NAMED_NATIVE_QUERIES_LIST, index, namedNativeQuery); >+ fireItemRemoved(QueryHolder.NAMED_NATIVE_QUERIES_LIST, index, namedNativeQuery); > } > > protected void removeNamedNativeQuery_(OrmNamedNativeQuery namedNativeQuery) { >- removeItemFromList(namedNativeQuery, this.namedNativeQueries, EntityMappings.NAMED_NATIVE_QUERIES_LIST); >+ removeItemFromList(namedNativeQuery, this.namedNativeQueries, QueryHolder.NAMED_NATIVE_QUERIES_LIST); > } > > public void moveNamedNativeQuery(int targetIndex, int sourceIndex) { > this.xmlEntityMappings.getNamedNativeQueries().move(targetIndex, sourceIndex); >- moveItemInList(targetIndex, sourceIndex, this.namedNativeQueries, EntityMappings.NAMED_NATIVE_QUERIES_LIST); >+ moveItemInList(targetIndex, sourceIndex, this.namedNativeQueries, QueryHolder.NAMED_NATIVE_QUERIES_LIST); > } > > //TODO what about qualified name? package + class
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 236109
: 104363