summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-03-01 15:43:54 (EST)
committerEike Stepper2008-03-01 15:43:54 (EST)
commit91c64a12c32ffe5746ba57b1f008386e13852f44 (patch)
tree22c0146affd47553231f39af167740464f4dfc43
parent733acc1f691fe450ba10b9a6b29e0aa19cafcc4b (diff)
downloadcdo-91c64a12c32ffe5746ba57b1f008386e13852f44.zip
cdo-91c64a12c32ffe5746ba57b1f008386e13852f44.tar.gz
cdo-91c64a12c32ffe5746ba57b1f008386e13852f44.tar.bz2
[217117] Develop a HibernateStore
https://bugs.eclipse.org/bugs/show_bug.cgi?id=217117
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/.classpath2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/.settings/org.eclipse.jdt.core.prefs60
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateTest.java20
4 files changed, 76 insertions, 10 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/.classpath b/plugins/org.eclipse.emf.cdo.tests.hibernate/.classpath
index 304e861..64c5e31 100644
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/.classpath
+++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.cdo.tests.hibernate/.settings/org.eclipse.jdt.core.prefs
index 9e7e93d..b03245e 100644
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Sat Mar 01 20:32:23 CET 2008
+#Sat Mar 01 21:41:30 CET 2008
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
@@ -10,8 +10,66 @@ org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeUncheckedExceptions=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests.hibernate/META-INF/MANIFEST.MF
index 15bb94a..a977a20 100644
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/META-INF/MANIFEST.MF
@@ -4,13 +4,13 @@ Bundle-SymbolicName: org.eclipse.emf.cdo.tests.hibernate;singleton:=true
Bundle-Version: 0.8.0.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
+Bundle-Localization: plugin
Bundle-Activator: org.eclipse.emf.cdo.tests.hibernate.Activator
Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
org.eclipse.emf.cdo.tests;bundle-version="[0.8.0,0.9.0)";visibility:=reexport,
org.eclipse.emf.cdo.server.hibernate;bundle-version="[0.8.0,0.9.0)";visibility:=reexport,
org.eclipse.emf.cdo.server.hibernate.libraries;bundle-version="[0.8.0,0.9.0)";visibility:=reexport
Export-Package: org.eclipse.emf.cdo.tests.hibernate
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateTest.java b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateTest.java
index 112a66b..ec9305c 100644
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateTest.java
@@ -96,16 +96,18 @@ public class HibernateTest extends AbstractOMTest
customers.add(customer);
for (int i = 0; i < NO_OF_ORDERS; i++)
{
- customer.getSalesOrders().add(createSalesOrder((j * 1000) + i, customer, productCategory.getProducts()));
+ customer.getSalesOrders().add(createSalesOrder(j * 1000 + i, customer, productCategory.getProducts()));
}
+
orders.addAll(customer.getSalesOrders());
final Supplier supplier = createSupplier(j);
suppliers.add(supplier);
for (int i = 0; i < NO_OF_ORDERS; i++)
{
- supplier.getPurchaseOrders().add(createPurchaseOrder((j * 1000) + i, supplier, productCategory.getProducts()));
+ supplier.getPurchaseOrders().add(createPurchaseOrder(j * 1000 + i, supplier, productCategory.getProducts()));
}
+
orders.addAll(supplier.getPurchaseOrders());
}
@@ -218,7 +220,7 @@ public class HibernateTest extends AbstractOMTest
int customerIndex = 0;
int numOfBPs = 0;
int numOfOrders = 0;
- for (int i = startIndex; i < (startIndex + NO_OF_BUSINESS_PARTNERS); i++)
+ for (int i = startIndex; i < startIndex + NO_OF_BUSINESS_PARTNERS; i++)
{
final Customer c = (Customer)res.getContents().get(i);
assertEquals(NO_OF_ORDERS, c.getSalesOrders().size());
@@ -229,7 +231,7 @@ public class HibernateTest extends AbstractOMTest
for (SalesOrder so : c.getSalesOrders())
{
assertEquals(NO_OF_PRODUCTS, so.getOrderDetails().size());
- assertEquals((customerIndex * 1000) + orderIndex, so.getId());
+ assertEquals(customerIndex * 1000 + orderIndex, so.getId());
float price = 1.0f;
int detailIndex = 0;
for (OrderDetail od : so.getOrderDetails())
@@ -243,17 +245,19 @@ public class HibernateTest extends AbstractOMTest
price += 1.0f;
detailIndex++;
}
+
assertTrue(res.getContents().contains(so));
orderIndex++;
numOfOrders++;
}
+
customerIndex++;
numOfBPs++;
}
startIndex = 2 + NO_OF_BUSINESS_PARTNERS;
int supplierIndex = 0;
- for (int i = startIndex; i < (startIndex + NO_OF_BUSINESS_PARTNERS); i++)
+ for (int i = startIndex; i < startIndex + NO_OF_BUSINESS_PARTNERS; i++)
{
Supplier s = (Supplier)res.getContents().get(i);
assertEquals("Berlin" + supplierIndex, s.getCity());
@@ -263,7 +267,7 @@ public class HibernateTest extends AbstractOMTest
int orderIndex = 0;
for (PurchaseOrder po : s.getPurchaseOrders())
{
- assertEquals(BASE_MILLIS + (supplierIndex * 1000) + orderIndex, po.getDate().getTime());
+ assertEquals(BASE_MILLIS + supplierIndex * 1000 + orderIndex, po.getDate().getTime());
float price = 1000.0f;
int detailIndex = 0;
@@ -278,6 +282,7 @@ public class HibernateTest extends AbstractOMTest
price += 1.0f;
detailIndex++;
}
+
orderIndex++;
numOfOrders++;
}
@@ -285,6 +290,7 @@ public class HibernateTest extends AbstractOMTest
numOfBPs++;
supplierIndex++;
}
+
// 2 is for the categories
assertEquals(2 + numOfBPs + numOfOrders, res.getContents().size());
}
@@ -299,6 +305,7 @@ public class HibernateTest extends AbstractOMTest
p.setName(prefix + "Product" + i);
catalog.getProducts().add(p);
}
+
return catalog;
}
@@ -345,6 +352,7 @@ public class HibernateTest extends AbstractOMTest
ods.add(createOrderDetail(p, price));
price += 1f;
}
+
return ods;
}