Author: vyemialyanchyk
Date: 2009-03-30 13:59:59 -0400 (Mon, 30 Mar 2009)
New Revision: 14381
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/DocumentBase.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/DocumentBase.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/DocumentBase.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/DocumentBase.java
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/Country.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Country.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Visa.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Country.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Visa.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Country.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Visa.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
Log:
JBIDE-4031
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/Country.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/Country.java 2009-03-30
17:57:43 UTC (rev 14380)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/Country.java 2009-03-30
17:59:59 UTC (rev 14381)
@@ -13,12 +13,14 @@
public class Country {
private String name;
+
+ protected Visa visa;
- public Country(String name){
+ public Country(String name) {
this.name = name;
}
- public String getName(){
+ public String getName() {
return this.name;
}
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/DocumentBase.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/DocumentBase.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/DocumentBase.java 2009-03-30
17:59:59 UTC (rev 14381)
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.fields;
+
+public abstract class DocumentBase {
+
+ protected Long globalDocumentIdentificator;
+}
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Country.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Country.java 2009-03-30
17:57:43 UTC (rev 14380)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Country.java 2009-03-30
17:59:59 UTC (rev 14381)
@@ -8,17 +8,17 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package test.annotated.fields;
+package test.annotated.getters;
public class Country {
private String name;
- public Country(String name){
+ public Country(String name) {
this.name = name;
}
- public String getName(){
+ public String getName() {
return this.name;
}
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/DocumentBase.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/DocumentBase.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/DocumentBase.java 2009-03-30
17:59:59 UTC (rev 14381)
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.getters;
+
+public abstract class DocumentBase {
+
+ protected Long globalDocumentIdentificator;
+}
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Visa.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Visa.java 2009-03-30
17:57:43 UTC (rev 14380)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Visa.java 2009-03-30
17:59:59 UTC (rev 14381)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package test.annotated.fields;
+package test.annotated.getters;
/**
* @author Dmitry Geraskov
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Country.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Country.java 2009-03-30
17:57:43 UTC (rev 14380)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Country.java 2009-03-30
17:59:59 UTC (rev 14381)
@@ -11,17 +11,24 @@
package test.annotated.fields;
import javax.persistence.Entity;
+import javax.persistence.ManyToOne;
@Entity
public class Country {
private String name;
+
+ @ManyToOne
+ protected Visa visa;
+
+ protected Country() {
+ }
- public Country(String name){
+ public Country(String name) {
this.name = name;
}
- public String getName(){
+ public String getName() {
return this.name;
}
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/DocumentBase.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/DocumentBase.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/DocumentBase.java 2009-03-30
17:59:59 UTC (rev 14381)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.fields;
+
+import javax.persistence.MappedSuperclass;
+
+@MappedSuperclass
+public abstract class DocumentBase {
+
+ protected Long globalDocumentIdentificator;
+}
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Visa.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Visa.java 2009-03-30
17:57:43 UTC (rev 14380)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Visa.java 2009-03-30
17:59:59 UTC (rev 14381)
@@ -13,12 +13,18 @@
import javax.persistence.Entity;
import javax.persistence.OneToMany;
+/**
+ * @author Dmitry Geraskov
+ */
@Entity
public class Visa {
- @OneToMany(mappedBy="country")
+ @OneToMany(mappedBy="visa")
private Country[] countries;
+
+ protected Visa() {
+ }
- public Visa(Country[] countries){
+ public Visa(Country[] countries) {
this.countries = countries;
}
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Country.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Country.java 2009-03-30
17:57:43 UTC (rev 14380)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Country.java 2009-03-30
17:59:59 UTC (rev 14381)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package test.annotated.fields;
+package test.annotated.getters;
import javax.persistence.Entity;
@@ -16,12 +16,15 @@
public class Country {
private String name;
+
+ protected Country() {
+ }
- public Country(String name){
+ public Country(String name) {
this.name = name;
}
- public String getName(){
+ public String getName() {
return this.name;
}
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/DocumentBase.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/DocumentBase.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/DocumentBase.java 2009-03-30
17:59:59 UTC (rev 14381)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package test.annotated.getters;
+
+import javax.persistence.MappedSuperclass;
+
+@MappedSuperclass
+public abstract class DocumentBase {
+
+ protected Long globalDocumentIdentificator;
+}
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Visa.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Visa.java 2009-03-30
17:57:43 UTC (rev 14380)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Visa.java 2009-03-30
17:59:59 UTC (rev 14381)
@@ -8,17 +8,23 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package test.annotated.fields;
+package test.annotated.getters;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
+/**
+ * @author Dmitry Geraskov
+ */
@Entity
public class Visa {
private Country[] countries;
private byta nonCompiledProterty1;
privata byte nonCompiledProterty2;
+
+ protected Visa() {
+ }
public Visa(Country[] countries){
this.countries = countries;
@@ -32,7 +38,7 @@
return countries;
}
- @OneToMany(mappedBy="country")
+ @OneToMany
public Country[] getCountries(){
return countries;
}
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2009-03-30
17:57:43 UTC (rev 14380)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2009-03-30
17:59:59 UTC (rev 14381)
@@ -139,6 +139,7 @@
collector.resolveRelations();
processor.modify(javaProject, collector.getMapCUs_Info(), false);
//
+ //checkItem("DocumentBase"); //$NON-NLS-1$
checkItem("Document"); //$NON-NLS-1$
checkItem("Foto"); //$NON-NLS-1$
checkItem("Passport"); //$NON-NLS-1$
@@ -146,6 +147,8 @@
checkItem("Staff"); //$NON-NLS-1$
checkItem("FotoXPerson"); //$NON-NLS-1$
checkItem("PersonXFoto"); //$NON-NLS-1$
+ checkItem("Country"); //$NON-NLS-1$
+ checkItem("Visa"); //$NON-NLS-1$
if (icu4 != null) {
checkItem("Entity"); //$NON-NLS-1$
}