Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-08-12 02:49:35 -0400
committerEike Stepper2012-08-12 02:49:35 -0400
commit1fca32dbdea4baa67f3a9fb385ecdbb904495664 (patch)
treeea6455585d8567e857067aff20b9238f81065de0
parent23eac09d7ccd72be5070d7c676e0e8520d4c1a44 (diff)
downloadcdo-1fca32dbdea4baa67f3a9fb385ecdbb904495664.tar.gz
cdo-1fca32dbdea4baa67f3a9fb385ecdbb904495664.tar.xz
cdo-1fca32dbdea4baa67f3a9fb385ecdbb904495664.zip
[384535] Develop Lucene-based IStore
https://bugs.eclipse.org/bugs/show_bug.cgi?id=384535
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/.classpath7
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/.gitignore2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/.options6
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/.project39
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/.settings/.api_filters17
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.jdt.core.prefs395
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.jdt.launching.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.jdt.ui.prefs119
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.pde.api.tools.prefs94
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.pde.prefs31
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/META-INF/MANIFEST.MF22
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/about.html28
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/about.ini15
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/about.mappings6
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/about.properties31
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/build.properties30
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/copyright.txt8
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/docs/.gitignore1
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/docs/Design.pptxbin0 -> 51588 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/docs/Performance.xlsxbin0 -> 10142 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/modeling32.pngbin0 -> 2414 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/plugin.properties12
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/plugin.xml34
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeBrowserPage.java75
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFile.java73
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFileHandle.java688
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFileOperation.java21
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeQueryHandler.java41
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStore.java562
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreChunkReader.java87
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreFactory.java46
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreReader.java505
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreWriter.java151
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/bundle/OM.java51
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/BranchesTable.java96
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/CommitInfosTable.java109
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/DBBrowserPage.java207
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/Index.java231
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/IndexReader.java600
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/IndexWriter.java331
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/ObjectsTable.java310
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/Table.java81
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/file/Journal.java592
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/file/Vob.java72
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/CommitTransactionTask.java230
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/CreateBranchTask.java65
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/Optimizer.java328
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/OptimizerTask.java21
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/ILissomeStore.java44
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/ILissomeStoreAccessor.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/ILissomeStoreChunkReader.java28
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/LissomeStoreUtil.java44
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/package-info.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/.classpath7
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/.options3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/.project33
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.jdt.core.prefs382
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.jdt.ui.prefs119
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.pde.api.tools.prefs94
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.pde.prefs31
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/META-INF/MANIFEST.MF16
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/about.html28
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/build.properties24
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/copyright.txt8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/launches/CDO AllTests (Lissome).launch20
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/plugin.properties11
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/plugin.xml38
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/src/org/eclipse/emf/cdo/tests/lissome/AllTestsLissome.java33
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/src/org/eclipse/emf/cdo/tests/lissome/LissomeConfig.java98
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.lissome/src/org/eclipse/emf/cdo/tests/lissome/bundle/OM.java44
78 files changed, 7644 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/.classpath b/plugins/org.eclipse.emf.cdo.server.lissome/.classpath
new file mode 100644
index 0000000000..64c5e31b7a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <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.server.lissome/.gitignore b/plugins/org.eclipse.emf.cdo.server.lissome/.gitignore
new file mode 100644
index 0000000000..4475704dcc
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/.gitignore
@@ -0,0 +1,2 @@
+/lib/
+/database/
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/.options b/plugins/org.eclipse.emf.cdo.server.lissome/.options
new file mode 100644
index 0000000000..264f79e983
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/.options
@@ -0,0 +1,6 @@
+# Debugging and tracing options
+
+org.eclipse.emf.cdo.server.lissome/debug = true
+org.eclipse.emf.cdo.server.lissome/debug.journal = true
+org.eclipse.emf.cdo.server.lissome/debug.index = true
+org.eclipse.emf.cdo.server.lissome/debug.vob = true
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/.project b/plugins/org.eclipse.emf.cdo.server.lissome/.project
new file mode 100644
index 0000000000..4451a97b1f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/.project
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.cdo.server.lissome</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.emf.cdo.releng.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.emf.cdo.releng/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ <nature>org.eclipse.emf.cdo.releng.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/.settings/.api_filters b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/.api_filters
new file mode 100644
index 0000000000..07dd12beb5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/.api_filters
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.emf.cdo.server.lissome" version="2">
+ <resource path="src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFileHandle.java" type="org.eclipse.emf.cdo.server.internal.lissome.LissomeFileHandle">
+ <filter id="574619656">
+ <message_arguments>
+ <message_argument value="CDODataInput"/>
+ <message_argument value="LissomeFileHandle"/>
+ </message_arguments>
+ </filter>
+ <filter id="574619656">
+ <message_arguments>
+ <message_argument value="CDODataOutput"/>
+ <message_argument value="LissomeFileHandle"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000000..5e4338c52d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Jul 04 13:01:28 CEST 2011
+eclipse.preferences.version=1
+encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..805cd8fbdd
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,395 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch,*.ucls,doc-files/,package.html,package-info.java
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+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.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+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=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+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.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=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=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+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=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+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.unusedObjectAllocation=ignore
+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.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,PERF,MEM,POLISH,@generated NOT,@ADDED
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=2
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=2
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.jdt.launching.prefs b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.jdt.launching.prefs
new file mode 100644
index 0000000000..556ed07a3c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.jdt.launching.prefs
@@ -0,0 +1,3 @@
+#Fri Sep 02 05:38:34 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..4343e2f963
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,119 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=false
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=true
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=true
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_EMFT
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_EMFT
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=ex
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=org.eclipse.emf.cdo;org.eclipse.emf.internal.cdo;org.eclipse.net4j;org.eclipse.internal.net4j;org.eclipse.emf;org.eclipse;com;org;javax;java;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * Eike Stepper - initial API and implementation\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Eike Stepper\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=true
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=true
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.ltk.core.refactoring.prefs b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000000..864e30fe5d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.mylyn.tasks.ui.prefs b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000000..b050639a54
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.mylyn.team.ui.prefs b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000000..2f50f36c0c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+commit.comment.template=[${task.id}] ${task.description} \r\n${task.url}
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.pde.api.tools.prefs b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000000..f8d0a0660e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Thu Feb 04 09:44:24 CET 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Ignore
+automatically_removed_unused_problem_filters=Disabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..c6b96bb45e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,31 @@
+#Thu Feb 04 09:44:24 CET 2010
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=1
+compilers.p.missing-version-import-package=1
+compilers.p.missing-version-require-bundle=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server.lissome/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..fdbb118fb8
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.emf.cdo.server.lissome;singleton:=true
+Bundle-Version: 4.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-ActivationPolicy: lazy
+Bundle-Activator: org.eclipse.emf.cdo.server.internal.lissome.bundle.OM$Activator
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ClassPath: .
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.emf.cdo.server;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.eclipse.net4j.db.h2;bundle-version="[4.0.0,5.0.0)"
+Import-Package: org.h2;version="[1.0.0,2.0.0)",
+ org.h2.jdbcx;version="[1.0.0,2.0.0)"
+Export-Package: org.eclipse.emf.cdo.server.internal.lissome;version="4.2.0",
+ org.eclipse.emf.cdo.server.internal.lissome.bundle;version="4.2.0",
+ org.eclipse.emf.cdo.server.internal.lissome.db;version="4.2.0",
+ org.eclipse.emf.cdo.server.internal.lissome.file;version="4.2.0",
+ org.eclipse.emf.cdo.server.internal.lissome.optimizer;version="4.2.0",
+ org.eclipse.emf.cdo.server.lissome;version="4.2.0"
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/about.html b/plugins/org.eclipse.emf.cdo.server.lissome/about.html
new file mode 100644
index 0000000000..d35d5aed64
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/about.ini b/plugins/org.eclipse.emf.cdo.server.lissome/about.ini
new file mode 100644
index 0000000000..32006ae5d6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/about.ini
@@ -0,0 +1,15 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%featureText
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=modeling32.png
+
+# Property "appName" contains name of the application (translated)
+appName=%featureName
+
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/about.mappings b/plugins/org.eclipse.emf.cdo.server.lissome/about.mappings
new file mode 100644
index 0000000000..bddaab4310
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@ \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/about.properties b/plugins/org.eclipse.emf.cdo.server.lissome/about.properties
new file mode 100644
index 0000000000..6fb805f15c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/about.properties
@@ -0,0 +1,31 @@
+# Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+# 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:
+# Eike Stepper - initial API and implementation
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ==============================================================================
+# Do not change the properties between this line and the last line containing:
+# %%% END OF TRANSLATED PROPERTIES %%%
+# Instead, either redefine an existing property, or create a new property,
+# append it to the end of the file, and change the code to use the new name.
+# ==============================================================================
+
+featureName = CDO Model Repository Server Lissome Support
+featureText = CDO Model Repository Server Lissome Support\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/cdo
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/build.properties b/plugins/org.eclipse.emf.cdo.server.lissome/build.properties
new file mode 100644
index 0000000000..ed4458d452
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/build.properties
@@ -0,0 +1,30 @@
+# Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+# 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:
+# Eike Stepper - initial API and implementation
+
+# NLS_MESSAGEFORMAT_VAR
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ .options,\
+ about.html,\
+ copyright.txt,\
+ plugin.xml,\
+ plugin.properties,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ modeling32.png
+src.includes = about.html,\
+ copyright.txt
+
+doc.project = org.eclipse.emf.cdo.doc
+
+generateSourceReferences = true
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/copyright.txt b/plugins/org.eclipse.emf.cdo.server.lissome/copyright.txt
new file mode 100644
index 0000000000..0a0f67e6d7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/copyright.txt
@@ -0,0 +1,8 @@
+Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+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:
+ Eike Stepper - initial API and implementation \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/docs/.gitignore b/plugins/org.eclipse.emf.cdo.server.lissome/docs/.gitignore
new file mode 100644
index 0000000000..ba7d4a4d36
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/docs/.gitignore
@@ -0,0 +1 @@
+/~*
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/docs/Design.pptx b/plugins/org.eclipse.emf.cdo.server.lissome/docs/Design.pptx
new file mode 100644
index 0000000000..eaa3d1f964
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/docs/Design.pptx
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/docs/Performance.xlsx b/plugins/org.eclipse.emf.cdo.server.lissome/docs/Performance.xlsx
new file mode 100644
index 0000000000..b79d71c6a7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/docs/Performance.xlsx
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/modeling32.png b/plugins/org.eclipse.emf.cdo.server.lissome/modeling32.png
new file mode 100644
index 0000000000..6b08de2ada
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/modeling32.png
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/plugin.properties b/plugins/org.eclipse.emf.cdo.server.lissome/plugin.properties
new file mode 100644
index 0000000000..980cf4ecc8
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/plugin.properties
@@ -0,0 +1,12 @@
+# Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+# 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:
+# Eike Stepper - initial API and implementation
+
+pluginName = CDO Model Repository Server Lissome Support
+providerName = Eclipse Modeling Project
+
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/plugin.xml b/plugins/org.eclipse.emf.cdo.server.lissome/plugin.xml
new file mode 100644
index 0000000000..e8b2bafc64
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/plugin.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ 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:
+ Eike Stepper - initial API and implementation
+-->
+
+<plugin>
+
+ <extension
+ point="org.eclipse.net4j.util.factories">
+ <factory
+ class="org.eclipse.emf.cdo.server.internal.lissome.LissomeBrowserPage$Factory"
+ productGroup="org.eclipse.emf.cdo.server.browserPages"
+ type="db">
+ </factory>
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.cdo.server.storeFactories">
+ <storeFactory
+ class="org.eclipse.emf.cdo.server.internal.lissome.LissomeStoreFactory"
+ storeType="db">
+ </storeFactory>
+ </extension>
+
+
+</plugin>
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeBrowserPage.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeBrowserPage.java
new file mode 100644
index 0000000000..5ddadf39dc
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeBrowserPage.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome;
+
+import org.eclipse.emf.cdo.server.CDOServerBrowser;
+import org.eclipse.emf.cdo.server.CDOServerBrowser.AbstractPage;
+import org.eclipse.emf.cdo.server.lissome.ILissomeStore;
+import org.eclipse.emf.cdo.spi.server.InternalRepository;
+
+import org.eclipse.net4j.util.factory.ProductCreationException;
+
+import java.io.PrintStream;
+
+/**
+ * @author Eike Stepper
+ * @since 4.0
+ */
+public class LissomeBrowserPage extends AbstractPage
+{
+ public LissomeBrowserPage()
+ {
+ super("tables", "Database Tables");
+ }
+
+ public boolean canDisplay(InternalRepository repository)
+ {
+ return repository.getStore() instanceof ILissomeStore;
+ }
+
+ public void display(CDOServerBrowser browser, InternalRepository repository, PrintStream out)
+ {
+ out.print("<table border=\"0\">\r\n");
+ out.print("<tr>\r\n");
+
+ out.print("<td valign=\"top\">\r\n");
+ // String table = showTables(browser, out, connection, repository.getName());
+ out.print("</td>\r\n");
+
+ // if (table != null)
+ {
+ out.print("<td valign=\"top\">\r\n");
+ // showTable(browser, out, connection, table);
+ out.print("</td>\r\n");
+ }
+
+ out.print("</tr>\r\n");
+ out.print("</table>\r\n");
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static class Factory extends org.eclipse.net4j.util.factory.Factory
+ {
+ public static final String TYPE = "lissome";
+
+ public Factory()
+ {
+ super(PRODUCT_GROUP, TYPE);
+ }
+
+ public LissomeBrowserPage create(String description) throws ProductCreationException
+ {
+ return new LissomeBrowserPage();
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFile.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFile.java
new file mode 100644
index 0000000000..6f01a11990
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFile.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome;
+
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+
+import org.eclipse.net4j.util.io.IORuntimeException;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+
+/**
+ * @author Eike Stepper
+ */
+public class LissomeFile extends File
+{
+ public static final String READ_MODE = "r";
+
+ public static final String WRITE_MODE = "rws";
+
+ private static final long serialVersionUID = 1L;
+
+ protected final LissomeStore store;
+
+ public LissomeFile(LissomeStore store, String path) throws FileNotFoundException
+ {
+ super(store.getFolder(), path);
+ this.store = store;
+ }
+
+ public LissomeStore getStore()
+ {
+ return store;
+ }
+
+ public LissomeFileHandle openReader()
+ {
+ return openHandle(READ_MODE);
+ }
+
+ public LissomeFileHandle openWriter()
+ {
+ return openHandle(WRITE_MODE);
+ }
+
+ protected LissomeFileHandle openHandle(String mode)
+ {
+ try
+ {
+ return new LissomeFileHandle(this, mode);
+ }
+ catch (FileNotFoundException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public interface RevisionProvider
+ {
+ public CDORevision getRevision(long pointer);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFileHandle.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFileHandle.java
new file mode 100644
index 0000000000..52b5491c35
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFileHandle.java
@@ -0,0 +1,688 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchManager;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.branch.CDOBranchVersion;
+import org.eclipse.emf.cdo.common.commit.CDOChangeSetData;
+import org.eclipse.emf.cdo.common.commit.CDOCommitData;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfoManager;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.id.CDOIDProvider;
+import org.eclipse.emf.cdo.common.id.CDOIDReference;
+import org.eclipse.emf.cdo.common.lob.CDOLobStore;
+import org.eclipse.emf.cdo.common.lock.CDOLockChangeInfo;
+import org.eclipse.emf.cdo.common.lock.CDOLockOwner;
+import org.eclipse.emf.cdo.common.lock.CDOLockState;
+import org.eclipse.emf.cdo.common.lock.IDurableLockingManager.LockArea;
+import org.eclipse.emf.cdo.common.model.CDOClassifierRef;
+import org.eclipse.emf.cdo.common.model.CDOPackageInfo;
+import org.eclipse.emf.cdo.common.model.CDOPackageRegistry;
+import org.eclipse.emf.cdo.common.model.CDOPackageUnit;
+import org.eclipse.emf.cdo.common.model.CDOPackageUnit.Type;
+import org.eclipse.emf.cdo.common.model.CDOType;
+import org.eclipse.emf.cdo.common.protocol.CDODataInput;
+import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
+import org.eclipse.emf.cdo.common.revision.CDOIDAndBranch;
+import org.eclipse.emf.cdo.common.revision.CDOIDAndVersion;
+import org.eclipse.emf.cdo.common.revision.CDOList;
+import org.eclipse.emf.cdo.common.revision.CDOListFactory;
+import org.eclipse.emf.cdo.common.revision.CDORevisable;
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.common.revision.CDORevisionFactory;
+import org.eclipse.emf.cdo.common.revision.CDORevisionKey;
+import org.eclipse.emf.cdo.common.revision.delta.CDOFeatureDelta;
+import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta;
+import org.eclipse.emf.cdo.common.security.CDOPermissionProvider;
+import org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl;
+import org.eclipse.emf.cdo.spi.common.protocol.CDODataOutputImpl;
+import org.eclipse.emf.cdo.spi.common.revision.DetachedCDORevision;
+
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
+import org.eclipse.net4j.util.io.DataInputExtender;
+import org.eclipse.net4j.util.io.DataInputOutputFile;
+import org.eclipse.net4j.util.io.DataOutputExtender;
+import org.eclipse.net4j.util.io.ExtendedDataInput;
+import org.eclipse.net4j.util.io.ExtendedDataOutput;
+import org.eclipse.net4j.util.io.ExtendedIOUtil.ClassResolver;
+import org.eclipse.net4j.util.io.IORuntimeException;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class LissomeFileHandle extends DataInputOutputFile implements CDODataInput, CDODataOutput,
+ LissomeFile.RevisionProvider
+{
+ private LissomeFile file;
+
+ private CDODataInput in;
+
+ private CDODataOutput out;
+
+ public LissomeFileHandle(LissomeFile file, String mode) throws FileNotFoundException
+ {
+ super(file, mode);
+ this.file = file;
+ }
+
+ public LissomeFile getFile()
+ {
+ return file;
+ }
+
+ public LissomeStore getStore()
+ {
+ return file.getStore();
+ }
+
+ public CDOPackageRegistry getPackageRegistry()
+ {
+ return getStore().getRepository().getPackageRegistry();
+ }
+
+ public CDOBranchManager getBranchManager()
+ {
+ return getStore().getRepository().getBranchManager();
+ }
+
+ public CDOCommitInfoManager getCommitInfoManager()
+ {
+ return getStore().getRepository().getCommitInfoManager();
+ }
+
+ public CDORevisionFactory getRevisionFactory()
+ {
+ return CDORevisionFactory.DEFAULT;
+ }
+
+ public CDOListFactory getListFactory()
+ {
+ return CDOListFactory.DEFAULT;
+ }
+
+ public CDOLobStore getLobStore()
+ {
+ return null;
+ }
+
+ public CDOIDProvider getIDProvider()
+ {
+ return CDOIDProvider.NOOP;
+ }
+
+ public CDOPermissionProvider getPermissionProvider()
+ {
+ return out().getPermissionProvider();
+ }
+
+ public CDORevision getRevision(long pointer)
+ {
+ try
+ {
+ seek(pointer);
+ return readCDORevision();
+ }
+ catch (IOException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ }
+
+ private CDODataInput in()
+ {
+ if (in == null)
+ {
+ in = createDataInput();
+ }
+
+ return in;
+ }
+
+ protected CDODataInput createDataInput()
+ {
+ ExtendedDataInput extendedDataInput = new DataInputExtender(this);
+ return new CDODataInputImpl(extendedDataInput)
+ {
+ @Override
+ public CDORevision readCDORevision(boolean freeze) throws IOException
+ {
+ boolean detached = readBoolean();
+ if (detached)
+ {
+ int cid = readInt();
+ EClass eClass = (EClass)file.getStore().getMetaObject(cid);
+
+ CDOID id = readCDOID();
+ CDOBranch branch = readCDOBranch();
+ int version = readInt();
+ long timeStamp = readLong();
+ long revised = readLong();
+
+ return new DetachedCDORevision(eClass, id, branch, version, timeStamp, revised);
+ }
+
+ return super.readCDORevision(freeze);
+ }
+
+ @Override
+ protected CDOPackageRegistry getPackageRegistry()
+ {
+ return LissomeFileHandle.this.getPackageRegistry();
+ }
+
+ @Override
+ protected CDOBranchManager getBranchManager()
+ {
+ return LissomeFileHandle.this.getBranchManager();
+ }
+
+ @Override
+ protected CDOCommitInfoManager getCommitInfoManager()
+ {
+ return LissomeFileHandle.this.getCommitInfoManager();
+ }
+
+ @Override
+ protected CDORevisionFactory getRevisionFactory()
+ {
+ return LissomeFileHandle.this.getRevisionFactory();
+ }
+
+ @Override
+ protected CDOListFactory getListFactory()
+ {
+ return LissomeFileHandle.this.getListFactory();
+ }
+
+ @Override
+ protected CDOLobStore getLobStore()
+ {
+ return LissomeFileHandle.this.getLobStore();
+ }
+ };
+ }
+
+ public byte[] readByteArray() throws IOException
+ {
+ return in().readByteArray();
+ }
+
+ public Object readObject() throws IOException
+ {
+ return in().readObject();
+ }
+
+ public Object readObject(ClassLoader classLoader) throws IOException
+ {
+ return in().readObject(classLoader);
+ }
+
+ public Object readObject(ClassResolver classResolver) throws IOException
+ {
+ return in().readObject(classResolver);
+ }
+
+ public String readString() throws IOException
+ {
+ return in().readString();
+ }
+
+ public <T extends Enum<?>> T readEnum(Class<T> type) throws IOException
+ {
+ return in().readEnum(type);
+ }
+
+ public CDOPackageUnit readCDOPackageUnit(ResourceSet resourceSet) throws IOException
+ {
+ return in().readCDOPackageUnit(resourceSet);
+ }
+
+ public CDOPackageUnit[] readCDOPackageUnits(ResourceSet resourceSet) throws IOException
+ {
+ return in().readCDOPackageUnits(resourceSet);
+ }
+
+ public Type readCDOPackageUnitType() throws IOException
+ {
+ return in().readCDOPackageUnitType();
+ }
+
+ public CDOPackageInfo readCDOPackageInfo() throws IOException
+ {
+ return in().readCDOPackageInfo();
+ }
+
+ public CDOClassifierRef readCDOClassifierRef() throws IOException
+ {
+ return in().readCDOClassifierRef();
+ }
+
+ public EClassifier readCDOClassifierRefAndResolve() throws IOException
+ {
+ return in().readCDOClassifierRefAndResolve();
+ }
+
+ public String readCDOPackageURI() throws IOException
+ {
+ return in().readCDOPackageURI();
+ }
+
+ public CDOType readCDOType() throws IOException
+ {
+ return in().readCDOType();
+ }
+
+ public CDOBranch readCDOBranch() throws IOException
+ {
+ return in().readCDOBranch();
+ }
+
+ public CDOBranchPoint readCDOBranchPoint() throws IOException
+ {
+ return in().readCDOBranchPoint();
+ }
+
+ public CDOBranchVersion readCDOBranchVersion() throws IOException
+ {
+ return in().readCDOBranchVersion();
+ }
+
+ public CDOChangeSetData readCDOChangeSetData() throws IOException
+ {
+ return in().readCDOChangeSetData();
+ }
+
+ public CDOCommitData readCDOCommitData() throws IOException
+ {
+ return in().readCDOCommitData();
+ }
+
+ public CDOCommitInfo readCDOCommitInfo() throws IOException
+ {
+ return in().readCDOCommitInfo();
+ }
+
+ public CDOID readCDOID() throws IOException
+ {
+ return in().readCDOID();
+ }
+
+ public CDOIDReference readCDOIDReference() throws IOException
+ {
+ return in().readCDOIDReference();
+ }
+
+ public CDOIDAndVersion readCDOIDAndVersion() throws IOException
+ {
+ return in().readCDOIDAndVersion();
+ }
+
+ public CDOIDAndBranch readCDOIDAndBranch() throws IOException
+ {
+ return in().readCDOIDAndBranch();
+ }
+
+ public CDORevisionKey readCDORevisionKey() throws IOException
+ {
+ return in().readCDORevisionKey();
+ }
+
+ public CDORevision readCDORevision() throws IOException
+ {
+ return in().readCDORevision();
+ }
+
+ public CDORevision readCDORevision(boolean freeze) throws IOException
+ {
+ return in().readCDORevision(freeze);
+ }
+
+ public CDORevisable readCDORevisable() throws IOException
+ {
+ return in().readCDORevisable();
+ }
+
+ public CDOList readCDOList(EClass owner, EStructuralFeature feature) throws IOException
+ {
+ return in().readCDOList(owner, feature);
+ }
+
+ public Object readCDOFeatureValue(EStructuralFeature feature) throws IOException
+ {
+ return in().readCDOFeatureValue(feature);
+ }
+
+ public CDORevisionDelta readCDORevisionDelta() throws IOException
+ {
+ return in().readCDORevisionDelta();
+ }
+
+ public CDOFeatureDelta readCDOFeatureDelta(EClass owner) throws IOException
+ {
+ return in().readCDOFeatureDelta(owner);
+ }
+
+ public Object readCDORevisionOrPrimitive() throws IOException
+ {
+ return in().readCDORevisionOrPrimitive();
+ }
+
+ public Object readCDORevisionOrPrimitiveOrClassifier() throws IOException
+ {
+ return in().readCDORevisionOrPrimitiveOrClassifier();
+ }
+
+ public LockType readCDOLockType() throws IOException
+ {
+ return in().readCDOLockType();
+ }
+
+ public CDOLockChangeInfo readCDOLockChangeInfo() throws IOException
+ {
+ return in().readCDOLockChangeInfo();
+ }
+
+ public CDOLockOwner readCDOLockOwner() throws IOException
+ {
+ return in().readCDOLockOwner();
+ }
+
+ public CDOLockState readCDOLockState() throws IOException
+ {
+ return in().readCDOLockState();
+ }
+
+ public LockArea readCDOLockArea() throws IOException
+ {
+ return in().readCDOLockArea();
+ }
+
+ private CDODataOutput out()
+ {
+ if (out == null)
+ {
+ out = createDataOutput();
+ }
+
+ return out;
+ }
+
+ protected CDODataOutput createDataOutput()
+ {
+ ExtendedDataOutput extendedDataOutput = new DataOutputExtender(this);
+ return new CDODataOutputImpl(extendedDataOutput)
+ {
+ @Override
+ public void writeCDORevision(CDORevision revision, int referenceChunk, CDOBranchPoint securityContext)
+ throws IOException
+ {
+ boolean detached = revision instanceof DetachedCDORevision;
+ writeBoolean(detached);
+ if (detached)
+ {
+ int cid = file.getStore().getMetaID(revision.getEClass());
+ writeInt(cid);
+
+ writeCDOID(revision.getID());
+ writeCDOBranch(revision.getBranch());
+ writeInt(revision.getVersion());
+ writeLong(revision.getTimeStamp());
+ writeLong(revision.getRevised());
+ }
+ else
+ {
+ super.writeCDORevision(revision, referenceChunk, securityContext);
+ }
+ }
+
+ @Override
+ public CDOPackageRegistry getPackageRegistry()
+ {
+ return LissomeFileHandle.this.getPackageRegistry();
+ }
+
+ @Override
+ public CDOIDProvider getIDProvider()
+ {
+ return LissomeFileHandle.this.getIDProvider();
+ }
+ };
+ }
+
+ public void writeByteArray(byte[] b) throws IOException
+ {
+ out().writeByteArray(b);
+ }
+
+ public void writeObject(Object object) throws IOException
+ {
+ out().writeObject(object);
+ }
+
+ public void writeString(String str) throws IOException
+ {
+ out().writeString(str);
+ }
+
+ public void writeEnum(Enum<?> literal) throws IOException
+ {
+ out().writeEnum(literal);
+ }
+
+ public void writeCDOPackageUnit(CDOPackageUnit packageUnit, boolean withPackages) throws IOException
+ {
+ out().writeCDOPackageUnit(packageUnit, withPackages);
+ }
+
+ public void writeCDOPackageUnits(CDOPackageUnit... packageUnit) throws IOException
+ {
+ out().writeCDOPackageUnits(packageUnit);
+ }
+
+ public void writeCDOPackageUnitType(Type type) throws IOException
+ {
+ out().writeCDOPackageUnitType(type);
+ }
+
+ public void writeCDOPackageInfo(CDOPackageInfo packageInfo) throws IOException
+ {
+ out().writeCDOPackageInfo(packageInfo);
+ }
+
+ public void writeCDOClassifierRef(CDOClassifierRef eClassifierRef) throws IOException
+ {
+ out().writeCDOClassifierRef(eClassifierRef);
+ }
+
+ public void writeCDOClassifierRef(EClassifier eClassifier) throws IOException
+ {
+ out().writeCDOClassifierRef(eClassifier);
+ }
+
+ public void writeCDOPackageURI(String uri) throws IOException
+ {
+ out().writeCDOPackageURI(uri);
+ }
+
+ public void writeCDOType(CDOType cdoType) throws IOException
+ {
+ out().writeCDOType(cdoType);
+ }
+
+ public void writeCDOBranch(CDOBranch branch) throws IOException
+ {
+ out().writeCDOBranch(branch);
+ }
+
+ public void writeCDOBranchPoint(CDOBranchPoint branchPoint) throws IOException
+ {
+ out().writeCDOBranchPoint(branchPoint);
+ }
+
+ public void writeCDOBranchVersion(CDOBranchVersion branchVersion) throws IOException
+ {
+ out().writeCDOBranchVersion(branchVersion);
+ }
+
+ public void writeCDOChangeSetData(CDOChangeSetData changeSetData) throws IOException
+ {
+ out().writeCDOChangeSetData(changeSetData);
+ }
+
+ public void writeCDOCommitData(CDOCommitData commitData) throws IOException
+ {
+ out().writeCDOCommitData(commitData);
+ }
+
+ public void writeCDOCommitInfo(CDOCommitInfo commitInfo) throws IOException
+ {
+ out().writeCDOCommitInfo(commitInfo);
+ }
+
+ public void writeCDOID(CDOID id) throws IOException
+ {
+ out().writeCDOID(id);
+ }
+
+ public void writeCDOIDReference(CDOIDReference idReference) throws IOException
+ {
+ out().writeCDOIDReference(idReference);
+ }
+
+ public void writeCDOIDAndVersion(CDOIDAndVersion idAndVersion) throws IOException
+ {
+ out().writeCDOIDAndVersion(idAndVersion);
+ }
+
+ public void writeCDOIDAndBranch(CDOIDAndBranch idAndBranch) throws IOException
+ {
+ out().writeCDOIDAndBranch(idAndBranch);
+ }
+
+ public void writeCDORevisionKey(CDORevisionKey revisionKey) throws IOException
+ {
+ out().writeCDORevisionKey(revisionKey);
+ }
+
+ public void writeCDORevision(CDORevision revision, int referenceChunk) throws IOException
+ {
+ out().writeCDORevision(revision, referenceChunk);
+ }
+
+ public void writeCDORevision(CDORevision revision, int referenceChunk, CDOBranchPoint securityContext)
+ throws IOException
+ {
+ out().writeCDORevision(revision, referenceChunk, securityContext);
+ }
+
+ public void writeCDORevisable(CDORevisable revisable) throws IOException
+ {
+ out().writeCDORevisable(revisable);
+ }
+
+ public void writeCDOList(EClass owner, EStructuralFeature feature, CDOList list, int referenceChunk)
+ throws IOException
+ {
+ out().writeCDOList(owner, feature, list, referenceChunk);
+ }
+
+ public void writeCDOFeatureValue(EStructuralFeature feature, Object value) throws IOException
+ {
+ out().writeCDOFeatureValue(feature, value);
+ }
+
+ public void writeCDORevisionDelta(CDORevisionDelta revisionDelta) throws IOException
+ {
+ out().writeCDORevisionDelta(revisionDelta);
+ }
+
+ public void writeCDOFeatureDelta(EClass owner, CDOFeatureDelta featureDelta) throws IOException
+ {
+ out().writeCDOFeatureDelta(owner, featureDelta);
+ }
+
+ public void writeCDORevisionOrPrimitive(Object value) throws IOException
+ {
+ out().writeCDORevisionOrPrimitive(value);
+ }
+
+ public void writeCDORevisionOrPrimitiveOrClassifier(Object value) throws IOException
+ {
+ out().writeCDORevisionOrPrimitiveOrClassifier(value);
+ }
+
+ public void writeCDOLockType(LockType lockType) throws IOException
+ {
+ out().writeCDOLockType(lockType);
+ }
+
+ public void writeCDOLockChangeInfo(CDOLockChangeInfo lockChangeInfo) throws IOException
+ {
+ out().writeCDOLockChangeInfo(lockChangeInfo);
+ }
+
+ public void writeCDOLockState(CDOLockState lockState) throws IOException
+ {
+ out().writeCDOLockState(lockState);
+ }
+
+ public void writeCDOLockOwner(CDOLockOwner lockOwner) throws IOException
+ {
+ out().writeCDOLockOwner(lockOwner);
+ }
+
+ public void writeCDOLockArea(LockArea lockArea) throws IOException
+ {
+ out().writeCDOLockArea(lockArea);
+ }
+
+ public int write(long startPointer, LissomeFileOperation operation)
+ {
+ try
+ {
+ seek(startPointer);
+ operation.execute(this);
+ flush();
+
+ long endPointer = getFilePointer();
+ return (int)(endPointer - startPointer);
+ }
+ catch (IOException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ }
+
+ public long append(LissomeFileOperation operation)
+ {
+ try
+ {
+ long startPointer = length();
+ write(startPointer, operation);
+ return startPointer;
+ }
+ catch (IOException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFileOperation.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFileOperation.java
new file mode 100644
index 0000000000..671d4aa43b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFileOperation.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public interface LissomeFileOperation
+{
+ public void execute(LissomeFileHandle handle) throws IOException;
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeQueryHandler.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeQueryHandler.java
new file mode 100644
index 0000000000..3c572eee2c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeQueryHandler.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome;
+
+import org.eclipse.emf.cdo.common.util.CDOQueryInfo;
+import org.eclipse.emf.cdo.server.IQueryContext;
+import org.eclipse.emf.cdo.server.IQueryHandler;
+
+/**
+ * @author Eike Stepper
+ */
+public class LissomeQueryHandler implements IQueryHandler
+{
+ public static final String QUERY_LANGUAGE = "lissome";
+
+ private LissomeStoreReader reader;
+
+ public LissomeQueryHandler(LissomeStoreReader reader)
+ {
+ this.reader = reader;
+ }
+
+ public LissomeStoreReader getReader()
+ {
+ return reader;
+ }
+
+ public void executeQuery(CDOQueryInfo info, IQueryContext context)
+ {
+ // TODO: implement LissomeQueryHandler.executeQuery(info, context)
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStore.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStore.java
new file mode 100644
index 0000000000..e3f37da214
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStore.java
@@ -0,0 +1,562 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome;
+
+import org.eclipse.emf.cdo.common.CDOCommonRepository.IDGenerationLocation;
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.id.CDOID.ObjectType;
+import org.eclipse.emf.cdo.common.id.CDOIDUtil;
+import org.eclipse.emf.cdo.common.revision.CDOAllRevisionsProvider;
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
+import org.eclipse.emf.cdo.server.ISession;
+import org.eclipse.emf.cdo.server.ITransaction;
+import org.eclipse.emf.cdo.server.IView;
+import org.eclipse.emf.cdo.server.StoreThreadLocal;
+import org.eclipse.emf.cdo.server.internal.lissome.db.Index;
+import org.eclipse.emf.cdo.server.internal.lissome.file.Journal;
+import org.eclipse.emf.cdo.server.internal.lissome.file.Vob;
+import org.eclipse.emf.cdo.server.internal.lissome.optimizer.Optimizer;
+import org.eclipse.emf.cdo.server.lissome.ILissomeStore;
+import org.eclipse.emf.cdo.server.lissome.ILissomeStoreAccessor;
+import org.eclipse.emf.cdo.spi.server.InternalStore.NoChangeSets;
+import org.eclipse.emf.cdo.spi.server.InternalStore.NoDurableLocking;
+import org.eclipse.emf.cdo.spi.server.InternalStore.NoLargeObjects;
+import org.eclipse.emf.cdo.spi.server.InternalStore.NoQueryXRefs;
+import org.eclipse.emf.cdo.spi.server.InternalStore.NoRawAccess;
+import org.eclipse.emf.cdo.spi.server.LongIDStore;
+import org.eclipse.emf.cdo.spi.server.Store;
+import org.eclipse.emf.cdo.spi.server.StoreAccessorPool;
+
+import org.eclipse.net4j.db.DBException;
+import org.eclipse.net4j.db.IDBConnectionProvider;
+import org.eclipse.net4j.util.ReflectUtil.ExcludeFromDump;
+import org.eclipse.net4j.util.io.IORuntimeException;
+import org.eclipse.net4j.util.io.IOUtil;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.sql.Connection;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+/**
+ * @author Eike Stepper
+ */
+public class LissomeStore extends Store implements ILissomeStore, CDOAllRevisionsProvider, IDBConnectionProvider,
+ NoRawAccess, NoLargeObjects, NoQueryXRefs, NoChangeSets, NoDurableLocking
+{
+ public static final String TYPE = "lissome"; //$NON-NLS-1$
+
+ public static final String PERSISTENT_PROPERTIES_EXTENSION = "properties";
+
+ private static final String PROP_REPOSITORY_CREATED = "org.eclipse.emf.cdo.server.lissome.repositoryCreated"; //$NON-NLS-1$
+
+ private static final String PROP_REPOSITORY_STOPPED = "org.eclipse.emf.cdo.server.lissome.repositoryStopped"; //$NON-NLS-1$
+
+ private static final String PROP_LAST_CDOID = "org.eclipse.emf.cdo.server.lissome.lastCDOID"; //$NON-NLS-1$
+
+ private static final String PROP_LAST_BRANCHID = "org.eclipse.emf.cdo.server.lissome.lastBranchID"; //$NON-NLS-1$
+
+ private static final String PROP_LAST_METAID = "org.eclipse.emf.cdo.server.lissome.lastMetaID"; //$NON-NLS-1$
+
+ private static final String PROP_LAST_COMMITTIME = "org.eclipse.emf.cdo.server.lissome.lastCommitTime"; //$NON-NLS-1$
+
+ private static final String PROP_GRACEFULLY_SHUT_DOWN = "org.eclipse.emf.cdo.server.lissome.gracefullyShutDown"; //$NON-NLS-1$
+
+ @ExcludeFromDump
+ private transient StoreAccessorPool readerPool = new StoreAccessorPool(this, null);
+
+ @ExcludeFromDump
+ private transient StoreAccessorPool writerPool = new StoreAccessorPool(this, null);
+
+ private Optimizer optimizer = createOptimizer();
+
+ private Vob vob;
+
+ private Index index;
+
+ private Map<String, String> properties;
+
+ private Properties persistentProperties = new Properties();
+
+ private File folder;
+
+ private Journal journal;
+
+ private boolean firstStart;
+
+ private long creationTime;
+
+ private long lastCDOID;
+
+ private int lastMetaID;
+
+ private Map<Integer, Object> metaObjects = new HashMap<Integer, Object>();
+
+ private Map<Object, Integer> metaIDs = new HashMap<Object, Integer>();
+
+ public LissomeStore()
+ {
+ super(TYPE, null, set(ChangeFormat.DELTA), set(RevisionTemporality.AUDITING), set(RevisionParallelism.BRANCHING));
+ }
+
+ public void setProperties(Map<String, String> properties)
+ {
+ this.properties = properties;
+ }
+
+ public Map<String, String> getProperties()
+ {
+ return properties;
+ }
+
+ @Override
+ public Set<ChangeFormat> getSupportedChangeFormats()
+ {
+ return set(ChangeFormat.DELTA);
+ }
+
+ public File getFolder()
+ {
+ return folder;
+ }
+
+ public void setFolder(File folder)
+ {
+ this.folder = folder;
+ }
+
+ public File getLogFile()
+ {
+ return journal;
+ }
+
+ public Map<String, String> getPersistentProperties(Set<String> names)
+ {
+ Map<String, String> properties = new HashMap<String, String>();
+
+ synchronized (persistentProperties)
+ {
+ for (String name : names)
+ {
+ String value = persistentProperties.getProperty(name);
+ if (value != null)
+ {
+ properties.put(name, value);
+ }
+ }
+ }
+
+ return properties;
+ }
+
+ public void setPersistentProperties(Map<String, String> properties)
+ {
+ synchronized (persistentProperties)
+ {
+ persistentProperties.putAll(properties);
+ savePersistentProperties();
+ }
+ }
+
+ public void removePersistentProperties(Set<String> names)
+ {
+ synchronized (persistentProperties)
+ {
+ for (String name : names)
+ {
+ persistentProperties.remove(name);
+ }
+
+ savePersistentProperties();
+ }
+ }
+
+ protected void loadPersistentProperties(File file)
+ {
+ InputStream fis = null;
+
+ try
+ {
+ fis = new FileInputStream(file);
+ persistentProperties.load(fis);
+ }
+ catch (IOException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ finally
+ {
+ IOUtil.close(fis);
+ }
+ }
+
+ protected void savePersistentProperties()
+ {
+ OutputStream stream = null;
+
+ try
+ {
+ stream = new FileOutputStream(getPersistentPropertiesFile());
+ persistentProperties.store(stream, "Lissome Persistent Properties");
+ }
+ catch (IOException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ finally
+ {
+ IOUtil.close(stream);
+ }
+ }
+
+ protected File getPersistentPropertiesFile()
+ {
+ return new File(folder, getRepository().getName() + "." + PERSISTENT_PROPERTIES_EXTENSION);
+ }
+
+ public CDOID createObjectID(String val)
+ {
+ // TODO: implement LissomeStore.createObjectID(val)
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
+ public boolean isLocal(CDOID id)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public LissomeStoreReader getReader(ISession session)
+ {
+ return (LissomeStoreReader)super.getReader(session);
+ }
+
+ @Override
+ public LissomeStoreWriter getWriter(ITransaction transaction)
+ {
+ return (LissomeStoreWriter)super.getWriter(transaction);
+ }
+
+ @Override
+ protected StoreAccessorPool getReaderPool(ISession session, boolean forReleasing)
+ {
+ return readerPool;
+ }
+
+ @Override
+ protected StoreAccessorPool getWriterPool(IView view, boolean forReleasing)
+ {
+ return writerPool;
+ }
+
+ @Override
+ protected LissomeStoreReader createReader(ISession session)
+ {
+ return new LissomeStoreReader(this, session);
+ }
+
+ @Override
+ protected LissomeStoreWriter createWriter(ITransaction transaction)
+ {
+ return new LissomeStoreWriter(this, transaction);
+ }
+
+ public Map<CDOBranch, List<CDORevision>> getAllRevisions()
+ {
+ final Map<CDOBranch, List<CDORevision>> result = new HashMap<CDOBranch, List<CDORevision>>();
+ ILissomeStoreAccessor accessor = getReader(null);
+ StoreThreadLocal.setAccessor(accessor);
+
+ try
+ {
+ accessor.handleRevisions(null, null, CDOBranchPoint.UNSPECIFIED_DATE, true,
+ new CDORevisionHandler.Filtered.Undetached(new CDORevisionHandler()
+ {
+ public boolean handleRevision(CDORevision revision)
+ {
+ CDOBranch branch = revision.getBranch();
+ List<CDORevision> list = result.get(branch);
+ if (list == null)
+ {
+ list = new ArrayList<CDORevision>();
+ result.put(branch, list);
+ }
+
+ list.add(revision);
+ return true;
+ }
+ }));
+ }
+ finally
+ {
+ StoreThreadLocal.release();
+ }
+
+ return result;
+ }
+
+ public long getCreationTime()
+ {
+ return creationTime;
+ }
+
+ public void setCreationTime(long creationTime)
+ {
+ this.creationTime = creationTime;
+
+ Map<String, String> map = new HashMap<String, String>();
+ map.put(PROP_REPOSITORY_CREATED, Long.toString(creationTime));
+ setPersistentProperties(map);
+ }
+
+ public boolean isFirstStart()
+ {
+ return firstStart;
+ }
+
+ @Override
+ protected void doBeforeActivate() throws Exception
+ {
+ super.doBeforeActivate();
+ checkNull(folder, "folder");
+ }
+
+ @Override
+ protected void doActivate() throws Exception
+ {
+ super.doActivate();
+
+ IDGenerationLocation idGenerationLocation = getRepository().getIDGenerationLocation();
+ if (idGenerationLocation == IDGenerationLocation.CLIENT)
+ {
+ setObjectIDTypes(Collections.singleton(ObjectType.UUID));
+ }
+ else
+ {
+ setObjectIDTypes(LongIDStore.OBJECT_ID_TYPES);
+ }
+
+ vob = createVob();
+ index = createIndex();
+ journal = createJournal();
+ optimizer.activate();
+
+ File persistentPropertiesFile = getPersistentPropertiesFile();
+ firstStart = !persistentPropertiesFile.exists() || persistentPropertiesFile.length() == 0;
+ if (firstStart)
+ {
+ firstStart();
+ }
+ else
+ {
+ loadPersistentProperties(persistentPropertiesFile);
+ reStart();
+ }
+ }
+
+ @Override
+ protected void doDeactivate() throws Exception
+ {
+ Map<String, String> map = new HashMap<String, String>();
+ map.put(PROP_GRACEFULLY_SHUT_DOWN, Boolean.TRUE.toString());
+ map.put(PROP_REPOSITORY_STOPPED, Long.toString(getRepository().getTimeStamp()));
+
+ if (getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE)
+ {
+ map.put(PROP_LAST_CDOID, Long.toString(getLastCDOID()));
+ }
+
+ map.put(PROP_LAST_BRANCHID, Integer.toString(getLastBranchID()));
+ map.put(PROP_LAST_METAID, Integer.toString(getLastMetaID()));
+ map.put(PROP_LAST_COMMITTIME, Long.toString(getLastCommitTime()));
+ setPersistentProperties(map);
+
+ if (readerPool != null)
+ {
+ readerPool.dispose();
+ }
+
+ if (writerPool != null)
+ {
+ writerPool.dispose();
+ }
+
+ optimizer.deactivate();
+ super.doDeactivate();
+ }
+
+ protected void firstStart()
+ {
+ long timeStamp = getRepository().getTimeStamp();
+ setCreationTime(timeStamp);
+
+ journal.firstStart();
+ index.createTables();
+ }
+
+ protected void reStart() throws IOException
+ {
+ Set<String> names = new HashSet<String>();
+ names.add(PROP_REPOSITORY_CREATED);
+ names.add(PROP_GRACEFULLY_SHUT_DOWN);
+
+ Map<String, String> map = getPersistentProperties(names);
+ creationTime = Long.valueOf(map.get(PROP_REPOSITORY_CREATED));
+
+ if (map.containsKey(PROP_GRACEFULLY_SHUT_DOWN))
+ {
+ names.clear();
+
+ boolean generatingIDs = getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE;
+ if (generatingIDs)
+ {
+ names.add(PROP_LAST_CDOID);
+ }
+
+ names.add(PROP_LAST_BRANCHID);
+ names.add(PROP_LAST_METAID);
+ names.add(PROP_LAST_COMMITTIME);
+ map = getPersistentProperties(names);
+
+ if (generatingIDs)
+ {
+ setLastCDOID(Long.valueOf(map.get(PROP_LAST_CDOID)));
+ }
+
+ setLastBranchID(Integer.valueOf(map.get(PROP_LAST_BRANCHID)));
+ setLastMetaID(Integer.valueOf(map.get(PROP_LAST_METAID)));
+ setLastCommitTime(Long.valueOf(map.get(PROP_LAST_COMMITTIME)));
+ }
+ else
+ {
+ repairAfterCrash();
+ }
+
+ removePersistentProperties(Collections.singleton(PROP_GRACEFULLY_SHUT_DOWN));
+
+ journal.reStart();
+ }
+
+ protected void repairAfterCrash()
+ {
+ // TODO: implement LissomeStore.repairAfterCrash()
+ throw new UnsupportedOperationException();
+ }
+
+ public Journal getJournal()
+ {
+ return journal;
+ }
+
+ protected Journal createJournal() throws FileNotFoundException
+ {
+ return new Journal(this);
+ }
+
+ public Optimizer getOptimizer()
+ {
+ return optimizer;
+ }
+
+ protected Optimizer createOptimizer()
+ {
+ return new Optimizer(this, true);
+ }
+
+ public Vob getVob()
+ {
+ return vob;
+ }
+
+ protected Vob createVob() throws IOException
+ {
+ return new Vob(this);
+ }
+
+ public Index getIndex()
+ {
+ return index;
+ }
+
+ protected Index createIndex()
+ {
+ return new Index(this);
+ }
+
+ public long getLastCDOID()
+ {
+ return lastCDOID;
+ }
+
+ public void setLastCDOID(long lastCDOID)
+ {
+ this.lastCDOID = lastCDOID;
+ }
+
+ public CDOID getNextCDOID()
+ {
+ return CDOIDUtil.createLong(++lastCDOID);
+ }
+
+ public int getLastMetaID()
+ {
+ return lastMetaID;
+ }
+
+ public void setLastMetaID(int lastMetaID)
+ {
+ this.lastMetaID = lastMetaID;
+ }
+
+ public int mapMetaObject(Object metaObject)
+ {
+ int id = ++lastMetaID;
+ mapMetaObject(metaObject, id);
+ return id;
+ }
+
+ public void mapMetaObject(Object metaObject, int id)
+ {
+ metaObjects.put(id, metaObject);
+ metaIDs.put(metaObject, id);
+ }
+
+ public int getMetaID(Object metaObject)
+ {
+ return metaIDs.get(metaObject);
+ }
+
+ public Object getMetaObject(int metaID)
+ {
+ return metaObjects.get(metaID);
+ }
+
+ public Connection getConnection() throws DBException
+ {
+ return index.getConnection();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreChunkReader.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreChunkReader.java
new file mode 100644
index 0000000000..339c32b71e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreChunkReader.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ * Stefan Winkler - Bug 283998: [DB] Chunk reading for multiple chunks fails
+ * Victor Roldan Betancort - Bug 283998: [DB] Chunk reading for multiple chunks fails
+ */
+package org.eclipse.emf.cdo.server.internal.lissome;
+
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.server.lissome.ILissomeStoreChunkReader;
+import org.eclipse.emf.cdo.spi.server.StoreChunkReader;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import java.util.List;
+
+/**
+ * @author Eike Stepper
+ */
+@Deprecated
+public class LissomeStoreChunkReader extends StoreChunkReader implements ILissomeStoreChunkReader
+{
+ public LissomeStoreChunkReader(LissomeStoreReader accessor, CDORevision revision, EStructuralFeature feature)
+ {
+ super(accessor, revision, feature);
+ }
+
+ @Override
+ public LissomeStoreReader getAccessor()
+ {
+ return (LissomeStoreReader)super.getAccessor();
+ }
+
+ @Override
+ public void addSimpleChunk(int index)
+ {
+ super.addSimpleChunk(index);
+ // if (referenceMapping instanceof IListMapping2)
+ // {
+ // ((IListMapping2)referenceMapping).addSimpleChunkWhere(getAccessor(), getRevision().getID(), builder, index);
+ // }
+ // else
+ // {
+ // builder.append(CDODBSchema.LIST_IDX);
+ // builder.append('=');
+ // builder.append(index);
+ // }
+ }
+
+ @Override
+ public void addRangedChunk(int fromIndex, int toIndex)
+ {
+ super.addRangedChunk(fromIndex, toIndex);
+ // if (referenceMapping instanceof IListMapping2)
+ // {
+ // ((IListMapping2)referenceMapping).addRangedChunkWhere(getAccessor(), getRevision().getID(), builder, fromIndex,
+ // toIndex);
+ // }
+ // else
+ // {
+ // builder.append(CDODBSchema.LIST_IDX);
+ // builder.append(" BETWEEN "); //$NON-NLS-1$
+ // builder.append(fromIndex);
+ // builder.append(" AND "); //$NON-NLS-1$
+ // builder.append(toIndex - 1);
+ // }
+ }
+
+ public List<Chunk> executeRead()
+ {
+ List<Chunk> chunks = getChunks();
+ // if (chunks.size() > 1)
+ // {
+ // builder.insert(0, '(');
+ // builder.append(')');
+ // }
+ //
+ // referenceMapping.readChunks(this, chunks, builder.toString());
+ return chunks;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreFactory.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreFactory.java
new file mode 100644
index 0000000000..2f43ad7011
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreFactory.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ * Stefan Winkler - 271444: [DB] Multiple refactorings bug 271444
+ * Caspar De Groot - maintenance
+ */
+package org.eclipse.emf.cdo.server.internal.lissome;
+
+import org.eclipse.emf.cdo.server.IStore;
+import org.eclipse.emf.cdo.server.IStoreFactory;
+import org.eclipse.emf.cdo.spi.server.RepositoryConfigurator;
+
+import org.w3c.dom.Element;
+
+import java.util.Map;
+
+/**
+ * @author Eike Stepper
+ */
+public class LissomeStoreFactory implements IStoreFactory
+{
+ public LissomeStoreFactory()
+ {
+ }
+
+ public String getStoreType()
+ {
+ return LissomeStore.TYPE;
+ }
+
+ public IStore createStore(String repositoryName, Map<String, String> repositoryProperties, Element storeConfig)
+ {
+ LissomeStore store = new LissomeStore();
+
+ Map<String, String> storeProperties = RepositoryConfigurator.getProperties(storeConfig, 1);
+ store.setProperties(storeProperties);
+
+ return store;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreReader.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreReader.java
new file mode 100644
index 0000000000..f341021a8a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreReader.java
@@ -0,0 +1,505 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchHandler;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.branch.CDOBranchVersion;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfoHandler;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.lob.CDOLobHandler;
+import org.eclipse.emf.cdo.common.lock.IDurableLockingManager.LockArea.Handler;
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.common.revision.CDORevisionCacheAdder;
+import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
+import org.eclipse.emf.cdo.common.util.CDOQueryInfo;
+import org.eclipse.emf.cdo.server.IQueryHandler;
+import org.eclipse.emf.cdo.server.ISession;
+import org.eclipse.emf.cdo.server.IStoreChunkReader;
+import org.eclipse.emf.cdo.server.ITransaction;
+import org.eclipse.emf.cdo.server.internal.lissome.db.Index;
+import org.eclipse.emf.cdo.server.internal.lissome.db.IndexReader;
+import org.eclipse.emf.cdo.server.internal.lissome.db.IndexReader.RevisionInfo;
+import org.eclipse.emf.cdo.server.internal.lissome.file.Journal;
+import org.eclipse.emf.cdo.server.internal.lissome.optimizer.CommitTransactionTask;
+import org.eclipse.emf.cdo.server.internal.lissome.optimizer.CreateBranchTask;
+import org.eclipse.emf.cdo.server.internal.lissome.optimizer.Optimizer;
+import org.eclipse.emf.cdo.server.internal.lissome.optimizer.OptimizerTask;
+import org.eclipse.emf.cdo.server.lissome.ILissomeStoreAccessor;
+import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranch;
+import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager;
+import org.eclipse.emf.cdo.spi.common.commit.CDOChangeSetSegment;
+import org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager;
+import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
+import org.eclipse.emf.cdo.spi.common.revision.DetachedCDORevision;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
+import org.eclipse.emf.cdo.spi.server.DelegatingQueryResourcesContext;
+import org.eclipse.emf.cdo.spi.server.InternalCommitContext;
+import org.eclipse.emf.cdo.spi.server.StoreAccessorBase;
+
+import org.eclipse.net4j.util.StringUtil;
+import org.eclipse.net4j.util.collection.Pair;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
+import org.eclipse.net4j.util.io.IORuntimeException;
+import org.eclipse.net4j.util.om.monitor.OMMonitor;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Eike Stepper
+ */
+public class LissomeStoreReader extends StoreAccessorBase implements ILissomeStoreAccessor
+{
+ protected Journal journal;
+
+ private LissomeFileHandle journalReader;
+
+ private LissomeFileHandle vobReader;
+
+ private IndexReader indexReader;
+
+ public LissomeStoreReader(LissomeStore store, ISession session)
+ {
+ super(store, session);
+ init(store);
+ }
+
+ protected LissomeStoreReader(LissomeStore store, ITransaction transaction)
+ {
+ super(store, transaction);
+ init(store);
+ }
+
+ protected void init(LissomeStore store)
+ {
+ journal = getStore().getJournal();
+ indexReader = store.getIndex().createReader();
+ }
+
+ protected LissomeFileHandle getJournalReader()
+ {
+ if (journalReader == null)
+ {
+ journalReader = getStore().getJournal().openReader();
+ }
+
+ return journalReader;
+ }
+
+ protected LissomeFileHandle getVobReader()
+ {
+ if (vobReader == null)
+ {
+ vobReader = getStore().getVob().openReader();
+ }
+
+ return vobReader;
+ }
+
+ @Override
+ public LissomeStore getStore()
+ {
+ return (LissomeStore)super.getStore();
+ }
+
+ public IStoreChunkReader createChunkReader(InternalCDORevision revision, EStructuralFeature feature)
+ {
+ // return new LissomeStoreChunkReader(this, revision, feature);
+ return null;
+ }
+
+ public Collection<InternalCDOPackageUnit> readPackageUnits()
+ {
+ Journal journal = getStore().getJournal();
+ return journal.readPackageUnits();
+ }
+
+ public EPackage[] loadPackageUnit(InternalCDOPackageUnit packageUnit)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public InternalCDORevision readRevision(CDOID id, CDOBranchPoint branchPoint, int listChunk,
+ CDORevisionCacheAdder cache)
+ {
+ Optimizer optimizer = getStore().getOptimizer();
+ InternalCDORevision revision = optimizer.readRevision(id, branchPoint);
+ if (revision != null)
+ {
+ if (getStore().getRepository().isSupportingAudits())
+ {
+ return revision;
+ }
+
+ if (revision instanceof DetachedCDORevision || revision.getRevised() != CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ return null;
+ }
+
+ return revision;
+ }
+
+ RevisionInfo info = indexReader.readRevision(id, branchPoint);
+ return readRevision(info);
+ }
+
+ public InternalCDORevision readRevisionByVersion(CDOID id, CDOBranchVersion branchVersion, int listChunk,
+ CDORevisionCacheAdder cache)
+ {
+ RevisionInfo info = indexReader.readRevisionByVersion(id, branchVersion);
+ return readRevision(info);
+ }
+
+ protected InternalCDORevision readRevision(RevisionInfo info)
+ {
+ if (info == null)
+ {
+ return null;
+ }
+
+ long pointer = info.getPointer();
+ if (pointer == Index.NULL_POINTER)
+ {
+ return null;
+ }
+
+ LissomeFileHandle reader;
+ if (pointer < 0)
+ {
+ reader = getJournalReader();
+ pointer = -pointer;
+ }
+ else
+ {
+ reader = getVobReader();
+ }
+
+ try
+ {
+ reader.seek(pointer);
+
+ InternalCDORevision revision = (InternalCDORevision)reader.readCDORevision();
+ if (revision != null)
+ {
+ long revised = info.getRevised();
+ if (revised != CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ revision.setRevised(revised);
+ }
+ }
+
+ return revision;
+ }
+ catch (IOException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ }
+
+ public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime,
+ final CDORevisionHandler handler)
+ {
+ indexReader.handleRevisions(eClass, branch, timeStamp, exactTime, new RevisionInfo.Handler()
+ {
+ public void handleRevisionInfo(CDOID id, RevisionInfo info)
+ {
+ // TODO Check if optimizer isn't about to delete the id
+
+ InternalCDORevision revision = readRevision(info);
+ if (revision != null)
+ {
+ handler.handleRevision(revision);
+ }
+ }
+ });
+
+ // TODO Check if optimizer is about to add applicable revisions
+ Optimizer optimizer = getStore().getOptimizer();
+ optimizer.handleRevisions(eClass, branch, timeStamp, exactTime, handler);
+ }
+
+ @Deprecated
+ public Set<CDOID> readChangeSet(OMMonitor monitor, CDOChangeSetSegment... segments)
+ {
+ // TODO: implement LissomeStoreReader.readChangeSet(monitor, segments)
+ throw new UnsupportedOperationException();
+ }
+
+ public void queryResources(final QueryResourcesContext delegate)
+ {
+ QueryResourcesContext context = new DelegatingQueryResourcesContext()
+ {
+ private Set<CDOID> queried = new HashSet<CDOID>();
+
+ @Override
+ protected QueryResourcesContext getDelegate()
+ {
+ return delegate;
+ }
+
+ @Override
+ public boolean addResource(CDOID resourceID)
+ {
+ if (queried.add(resourceID))
+ {
+ return super.addResource(resourceID);
+ }
+
+ return true;
+ }
+ };
+
+ Optimizer optimizer = getStore().getOptimizer();
+ boolean moreResults = optimizer.queryResources(context);
+
+ if (moreResults)
+ {
+ indexReader.queryResources(context);
+ }
+ }
+
+ @Deprecated
+ public void queryXRefs(QueryXRefsContext context)
+ {
+ // TODO: implement LissomeStoreReader.queryXRefs(context)
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
+ public void queryLobs(List<byte[]> ids)
+ {
+ // TODO: implement LissomeStoreReader.queryLobs(ids)
+ }
+
+ @Deprecated
+ public void loadLob(byte[] id, OutputStream out) throws IOException
+ {
+ // TODO: implement LissomeStoreReader.loadLob(id, out)
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
+ public void handleLobs(long fromTime, long toTime, CDOLobHandler handler) throws IOException
+ {
+ // TODO: implement LissomeStoreReader.handleLobs(fromTime, toTime, handler)
+ }
+
+ public IQueryHandler getQueryHandler(CDOQueryInfo info)
+ {
+ String queryLanguage = info.getQueryLanguage();
+ if (StringUtil.equalsUpperOrLowerCase(queryLanguage, LissomeQueryHandler.QUERY_LANGUAGE))
+ {
+ return new LissomeQueryHandler(this);
+ }
+
+ return null;
+ }
+
+ public BranchInfo loadBranch(int branchID)
+ {
+ return indexReader.loadBranch(branchID);
+ }
+
+ public SubBranchInfo[] loadSubBranches(int branchID)
+ {
+ return indexReader.loadSubBranches(branchID);
+ }
+
+ public int loadBranches(int startID, int endID, CDOBranchHandler branchHandler)
+ {
+ return indexReader.loadBranches(startID, endID, branchHandler);
+ }
+
+ public void loadCommitInfos(CDOBranch branch, long startTime, long endTime, final CDOCommitInfoHandler handler)
+ {
+ InternalCDOCommitInfoManager commitInfoManager = getStore().getRepository().getCommitInfoManager();
+ Optimizer optimizer = getStore().getOptimizer();
+ OptimizerTask[] tasks = optimizer.getTasks();
+
+ final Journal journal = getStore().getJournal();
+ final LissomeFileHandle journalReader = getJournalReader();
+ final long[] latestIndexTime = { CDOBranchPoint.UNSPECIFIED_DATE };
+
+ indexReader.loadCommitInfos(branch, startTime, endTime, new IndexReader.PointerHandler()
+ {
+ public void handlePointer(long pointer)
+ {
+ CDOCommitInfo commitInfo = journal.readCommitInfo(journalReader, pointer);
+ handler.handleCommitInfo(commitInfo);
+ latestIndexTime[0] = commitInfo.getTimeStamp();
+ }
+ });
+
+ for (OptimizerTask task : tasks)
+ {
+ if (task instanceof CommitTransactionTask)
+ {
+ CommitTransactionTask commitTask = (CommitTransactionTask)task;
+
+ CDOBranchPoint commitBranchPoint = commitTask.getBranchPoint();
+ long commitTime = commitBranchPoint.getTimeStamp();
+ if (commitTime <= latestIndexTime[0])
+ {
+ // Commit has already been handled through indexReader
+ continue;
+ }
+
+ if (branch != null && commitBranchPoint.getBranch() != branch)
+ {
+ // Not in branch
+ continue;
+ }
+
+ if (startTime != CDOBranchPoint.UNSPECIFIED_DATE && commitTime < startTime)
+ {
+ // Before startTime
+ continue;
+ }
+
+ if (endTime != CDOBranchPoint.UNSPECIFIED_DATE && commitTime > endTime)
+ {
+ // After endTime
+ break;
+ }
+
+ CDOCommitInfo commitInfo = commitTask.createCommitInfo(commitInfoManager);
+ handler.handleCommitInfo(commitInfo);
+ }
+ }
+ }
+
+ @Deprecated
+ public LockArea getLockArea(String durableLockingID) throws LockAreaNotFoundException
+ {
+ // TODO: implement LissomeStoreReader.getLockArea(durableLockingID)
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
+ public void getLockAreas(String userIDPrefix, Handler handler)
+ {
+ // TODO: implement LissomeStoreReader.getLockAreas(userIDPrefix, handler)
+ }
+
+ public Pair<Integer, Long> createBranch(int branchID, BranchInfo branchInfo)
+ {
+ if (branchID == NEW_BRANCH)
+ {
+ branchID = getStore().getNextBranchID();
+ }
+ else if (branchID == NEW_LOCAL_BRANCH)
+ {
+ branchID = getStore().getNextLocalBranchID();
+ }
+
+ long pointer = journal.createBranch(branchID, branchInfo);
+
+ InternalCDOBranchManager branchManager = getStore().getRepository().getBranchManager();
+ InternalCDOBranch baseBranch = branchManager.getBranch(branchInfo.getBaseBranchID());
+ CDOBranchPoint base = baseBranch.getPoint(branchInfo.getBaseTimeStamp());
+
+ CreateBranchTask task = new CreateBranchTask(branchID, branchInfo.getName(), base, pointer);
+ Optimizer optimizer = getStore().getOptimizer();
+ optimizer.addTask(task);
+
+ return new Pair<Integer, Long>(branchID, branchInfo.getBaseTimeStamp());
+ }
+
+ public LockArea createLockArea(String userID, CDOBranchPoint branchPoint, boolean readOnly,
+ Map<CDOID, LockGrade> locks) throws LockAreaAlreadyExistsException
+ {
+ // Implemented in LissomeStoreWriter
+ throw new UnsupportedOperationException();
+ }
+
+ public LockArea createLockArea(String durableLockingID, String userID, CDOBranchPoint branchPoint, boolean readOnly,
+ Map<CDOID, LockGrade> locks)
+ {
+ // Implemented in LissomeStoreWriter
+ throw new UnsupportedOperationException();
+ }
+
+ public void updateLockArea(LockArea lockArea)
+ {
+ // Implemented in LissomeStoreWriter
+ throw new UnsupportedOperationException();
+ }
+
+ public void deleteLockArea(String durableLockingID)
+ {
+ // Implemented in LissomeStoreWriter
+ throw new UnsupportedOperationException();
+ }
+
+ public void lock(String durableLockingID, LockType type, Collection<? extends Object> objectsToLock)
+ {
+ // Implemented in LissomeStoreWriter
+ throw new UnsupportedOperationException();
+ }
+
+ public void unlock(String durableLockingID, LockType type, Collection<? extends Object> objectsToUnlock)
+ {
+ // Implemented in LissomeStoreWriter
+ throw new UnsupportedOperationException();
+ }
+
+ public void unlock(String durableLockingID)
+ {
+ // Implemented in LissomeStoreWriter
+ throw new UnsupportedOperationException();
+ }
+
+ public void writePackageUnits(InternalCDOPackageUnit[] packageUnits, OMMonitor monitor)
+ {
+ // Implemented in LissomeStoreWriter
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ protected void doWrite(InternalCommitContext context, OMMonitor monitor)
+ {
+ // Implemented in LissomeStoreWriter
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ protected void doCommit(OMMonitor monitor)
+ {
+ // Implemented in LissomeStoreWriter
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ protected void doRollback(CommitContext commitContext)
+ {
+ // Implemented in LissomeStoreWriter
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ protected CDOID getNextCDOID(CDORevision revision)
+ {
+ // Implemented in LissomeStoreWriter
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreWriter.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreWriter.java
new file mode 100644
index 0000000000..8082cc4c16
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreWriter.java
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome;
+
+import org.eclipse.emf.cdo.common.CDOCommonRepository.IDGenerationLocation;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.server.ITransaction;
+import org.eclipse.emf.cdo.server.internal.lissome.optimizer.CommitTransactionTask;
+import org.eclipse.emf.cdo.server.internal.lissome.optimizer.Optimizer;
+import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
+import org.eclipse.emf.cdo.spi.server.InternalCommitContext;
+
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
+import org.eclipse.net4j.util.om.monitor.OMMonitor;
+
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ * @author Eike Stepper
+ */
+public class LissomeStoreWriter extends LissomeStoreReader
+{
+ public LissomeStoreWriter(LissomeStore store, ITransaction transaction)
+ {
+ super(store, transaction);
+ }
+
+ @Deprecated
+ @Override
+ public LockArea createLockArea(String durableLockingID, String userID, CDOBranchPoint branchPoint, boolean readOnly,
+ Map<CDOID, LockGrade> locks)
+ {
+ // TODO: implement LissomeStoreWriter.createLockArea(durableLockingID, userID, branchPoint, readOnly, locks)
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
+ @Override
+ public void updateLockArea(LockArea lockArea)
+ {
+ // TODO: implement LissomeStoreWriter.updateLockArea(lockArea)
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
+ @Override
+ public void lock(String durableLockingID, LockType type, Collection<? extends Object> objectsToLock)
+ {
+ // TODO: implement LissomeStoreWriter.lock(durableLockingID, type, objectsToLock)
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
+ @Override
+ public void unlock(String durableLockingID, LockType type, Collection<? extends Object> objectsToUnlock)
+ {
+ // TODO: implement LissomeStoreWriter.unlock(durableLockingID, type, objectsToUnlock)
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
+ @Override
+ public void unlock(String durableLockingID)
+ {
+ // TODO: implement LissomeStoreWriter.unlock(durableLockingID)
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
+ @Override
+ public LockArea createLockArea(String userID, CDOBranchPoint branchPoint, boolean readOnly,
+ Map<CDOID, LockGrade> locks) throws LockAreaAlreadyExistsException
+ {
+ // TODO: implement LissomeStoreWriter.createLockArea(userID, branchPoint, readOnly, locks)
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
+ @Override
+ public void deleteLockArea(String durableLockingID)
+ {
+ // TODO: implement LissomeStoreWriter.deleteLockArea(durableLockingID)
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void writePackageUnits(InternalCDOPackageUnit[] packageUnits, OMMonitor monitor)
+ {
+ journal.writePackageUnits(packageUnits, monitor);
+ }
+
+ @Override
+ protected void doWrite(InternalCommitContext context, OMMonitor monitor)
+ {
+ monitor.begin(100002);
+
+ try
+ {
+ IDGenerationLocation idGenerationLocation = getStore().getRepository().getIDGenerationLocation();
+ if (idGenerationLocation == IDGenerationLocation.STORE)
+ {
+ addIDMappings(context, monitor.fork());
+ }
+ else
+ {
+ monitor.worked();
+ }
+
+ context.applyIDMappings(monitor.fork());
+ journal.write(context, monitor.fork(monitor.getTotalWork() - 2));
+ }
+ finally
+ {
+ monitor.done();
+ }
+ }
+
+ @Override
+ protected void doCommit(OMMonitor monitor)
+ {
+ CommitTransactionTask task = journal.commit(monitor);
+ if (task != null)
+ {
+ Optimizer optimizer = getStore().getOptimizer();
+ optimizer.addTask(task);
+ }
+ }
+
+ @Override
+ protected void doRollback(CommitContext commitContext)
+ {
+ journal.rollback(commitContext);
+ }
+
+ @Override
+ protected CDOID getNextCDOID(CDORevision revision)
+ {
+ return getStore().getNextCDOID();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/bundle/OM.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/bundle/OM.java
new file mode 100644
index 0000000000..95d50af70b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/bundle/OM.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ * Stefan Winkler - Bug 285426: [DB] Implement user-defined typeMapping support
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.bundle;
+
+import org.eclipse.net4j.util.om.OMBundle;
+import org.eclipse.net4j.util.om.OMPlatform;
+import org.eclipse.net4j.util.om.OSGiActivator;
+import org.eclipse.net4j.util.om.log.OMLogger;
+import org.eclipse.net4j.util.om.trace.OMTracer;
+
+/**
+ * The <em>Operations & Maintenance</em> class of this bundle.
+ *
+ * @author Eike Stepper
+ */
+public abstract class OM
+{
+ public static final String BUNDLE_ID = "org.eclipse.emf.cdo.server.lissome"; //$NON-NLS-1$
+
+ public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
+
+ public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
+
+ public static final OMTracer JOURNAL = DEBUG.tracer("journal"); //$NON-NLS-1$
+
+ public static final OMTracer INDEX = DEBUG.tracer("index"); //$NON-NLS-1$
+
+ public static final OMTracer VOB = DEBUG.tracer("vob"); //$NON-NLS-1$
+
+ public static final OMLogger LOG = BUNDLE.logger();
+
+ /**
+ * @author Eike Stepper
+ */
+ public static final class Activator extends OSGiActivator
+ {
+ public Activator()
+ {
+ super(BUNDLE);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/BranchesTable.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/BranchesTable.java
new file mode 100644
index 0000000000..b82555b12a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/BranchesTable.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.db;
+
+import org.eclipse.net4j.db.DBType;
+import org.eclipse.net4j.db.ddl.IDBField;
+import org.eclipse.net4j.db.ddl.IDBIndex;
+
+/**
+ * @author Eike Stepper
+ */
+public class BranchesTable extends Table
+{
+ protected IDBField id;
+
+ protected IDBField name;
+
+ protected IDBField baseBranch;
+
+ protected IDBField baseTime;
+
+ public BranchesTable(Index index)
+ {
+ super(index, "cdo_branches");
+
+ id = table.addField("i", DBType.INTEGER);
+ name = table.addField("n", DBType.VARCHAR, 255);
+ baseBranch = table.addField("b", DBType.INTEGER);
+ baseTime = table.addField("t", DBType.BIGINT);
+
+ table.addIndex(IDBIndex.Type.PRIMARY_KEY, id);
+ // TODO Additional indexes to speed up queries
+ }
+
+ protected String sqlLoadSubBranches()
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("SELECT ");
+ builder.append(id);
+ builder.append(", ");
+ builder.append(name);
+ builder.append(", ");
+ builder.append(baseTime);
+ builder.append(" FROM ");
+ builder.append(this);
+ builder.append(" WHERE ");
+ builder.append(baseBranch);
+ builder.append("=?");
+ return builder.toString();
+ }
+
+ protected String sqlLoadBranches()
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("SELECT ");
+ builder.append(id);
+ builder.append(", ");
+ builder.append(name);
+ builder.append(", ");
+ builder.append(baseBranch);
+ builder.append(", ");
+ builder.append(baseTime);
+ builder.append(" FROM ");
+ builder.append(this);
+ builder.append(" WHERE ");
+ builder.append(baseBranch);
+ builder.append(" BETWEEN ? AND ? ORDER BY ");
+ builder.append(baseBranch);
+ return builder.toString();
+ }
+
+ protected String sqlCreateBranch()
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("INSERT INTO ");
+ builder.append(this);
+ builder.append(" (");
+ builder.append(id);
+ builder.append(", ");
+ builder.append(name);
+ builder.append(", ");
+ builder.append(baseBranch);
+ builder.append(", ");
+ builder.append(baseTime);
+ builder.append(") VALUES (?, ?, ?, ?)");
+ return builder.toString();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/CommitInfosTable.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/CommitInfosTable.java
new file mode 100644
index 0000000000..1e45149565
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/CommitInfosTable.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.db;
+
+import org.eclipse.net4j.db.DBType;
+import org.eclipse.net4j.db.ddl.IDBField;
+import org.eclipse.net4j.db.ddl.IDBIndex;
+
+/**
+ * @author Eike Stepper
+ */
+public class CommitInfosTable extends Table
+{
+ protected IDBField time;
+
+ protected IDBField branch;
+
+ protected IDBField pointer;
+
+ public CommitInfosTable(Index index)
+ {
+ super(index, "cdo_commits");
+
+ time = table.addField("cdo_time", DBType.BIGINT);
+ if (isSupportingBranches())
+ {
+ branch = table.addField("cdo_branch", DBType.INTEGER);
+ }
+
+ pointer = table.addField("cdo_pointer", DBType.BIGINT);
+
+ table.addIndex(IDBIndex.Type.PRIMARY_KEY, time);
+ if (isSupportingBranches())
+ {
+ table.addIndex(IDBIndex.Type.NON_UNIQUE, branch);
+ }
+ }
+
+ protected String sqlAddCommitInfo()
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("INSERT INTO ");
+ builder.append(this);
+ builder.append(" (");
+ builder.append(time);
+ if (isSupportingBranches())
+ {
+ builder.append(", ");
+ builder.append(branch);
+ }
+
+ builder.append(", ");
+ builder.append(pointer);
+ builder.append(") VALUES (?, ?");
+ if (isSupportingBranches())
+ {
+ builder.append(", ?");
+ }
+
+ builder.append(")");
+ return builder.toString();
+ }
+
+ protected String sqlLoadCommitInfos(boolean withBranch, boolean withStartTime, boolean withEndTime)
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("SELECT ");
+ builder.append(pointer);
+ builder.append(" FROM ");
+ builder.append(this);
+ boolean where = false;
+
+ if (withBranch)
+ {
+ builder.append(where ? " AND " : " WHERE ");
+ builder.append(branch);
+ builder.append("=?");
+ where = true;
+ }
+
+ if (withStartTime)
+ {
+ builder.append(where ? " AND " : " WHERE ");
+ builder.append(time);
+ builder.append(">=?");
+ where = true;
+ }
+
+ if (withEndTime)
+ {
+ builder.append(where ? " AND " : " WHERE ");
+ builder.append(time);
+ builder.append("<=?");
+ where = true;
+ }
+
+ builder.append(" ORDER BY ");
+ builder.append(time);
+ return builder.toString();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/DBBrowserPage.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/DBBrowserPage.java
new file mode 100644
index 0000000000..5a10f1fcc5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/DBBrowserPage.java
@@ -0,0 +1,207 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.db;
+
+import org.eclipse.emf.cdo.server.CDOServerBrowser;
+import org.eclipse.emf.cdo.server.CDOServerBrowser.AbstractPage;
+import org.eclipse.emf.cdo.spi.server.InternalRepository;
+
+import org.eclipse.net4j.db.DBException;
+import org.eclipse.net4j.db.DBUtil;
+import org.eclipse.net4j.db.IDBConnectionProvider;
+import org.eclipse.net4j.util.factory.ProductCreationException;
+
+import java.io.PrintStream;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.List;
+
+/**
+ * @author Eike Stepper
+ */
+public class DBBrowserPage extends AbstractPage
+{
+ public DBBrowserPage()
+ {
+ super("tables", "Database Tables");
+ }
+
+ public boolean canDisplay(InternalRepository repository)
+ {
+ return repository.getStore() instanceof IDBConnectionProvider;
+ }
+
+ public void display(CDOServerBrowser browser, InternalRepository repository, PrintStream out)
+ {
+ IDBConnectionProvider connectionProvider = (IDBConnectionProvider)repository.getStore();
+ Connection connection = null;
+
+ try
+ {
+ connection = connectionProvider.getConnection();
+
+ out.print("<table border=\"0\">\r\n");
+ out.print("<tr>\r\n");
+
+ out.print("<td valign=\"top\">\r\n");
+ String table = showTables(browser, out, connection, repository.getName());
+ out.print("</td>\r\n");
+
+ if (table != null)
+ {
+ out.print("<td valign=\"top\">\r\n");
+ showTable(browser, out, connection, table);
+ out.print("</td>\r\n");
+ }
+
+ out.print("</tr>\r\n");
+ out.print("</table>\r\n");
+ }
+ catch (DBException ex)
+ {
+ ex.printStackTrace();
+ }
+ finally
+ {
+ DBUtil.close(connection);
+ }
+ }
+
+ /**
+ * @since 4.0
+ */
+ protected String showTables(CDOServerBrowser browser, PrintStream pout, Connection connection, String repo)
+ {
+ String table = browser.getParam("table");
+
+ List<String> allTableNames = DBUtil.getAllTableNames(connection, repo);
+ for (String tableName : allTableNames)
+ {
+ if (table == null)
+ {
+ table = tableName;
+ }
+
+ String label = browser.escape(tableName)/* .toLowerCase() */;
+ if (tableName.equals(table))
+ {
+ pout.print("<b>" + label + "</b><br>\r\n");
+ }
+ else
+ {
+ pout.print(browser.href(label, getName(), "table", tableName, "order", null, "direction", null) + "<br>\r\n");
+ }
+ }
+
+ return table;
+ }
+
+ /**
+ * @since 4.0
+ */
+ protected void showTable(CDOServerBrowser browser, PrintStream pout, Connection connection, String table)
+ {
+ try
+ {
+ String order = browser.getParam("order");
+ executeQuery(browser, pout, connection, "SELECT * FROM " + table
+ + (order == null ? "" : " ORDER BY " + order + " " + browser.getParam("direction")));
+ }
+ catch (Exception ex)
+ {
+ browser.removeParam("order");
+ browser.removeParam("direction");
+ executeQuery(browser, pout, connection, "SELECT * FROM " + table);
+ }
+ }
+
+ protected void executeQuery(CDOServerBrowser browser, PrintStream pout, Connection connection, String sql)
+ {
+ String order = browser.getParam("order");
+ String direction = browser.getParam("direction");
+ String highlight = browser.getParam("highlight");
+
+ Statement stmt = null;
+ ResultSet resultSet = null;
+
+ try
+ {
+ stmt = connection.createStatement();
+ resultSet = stmt.executeQuery(sql);
+
+ ResultSetMetaData metaData = resultSet.getMetaData();
+ int columns = metaData.getColumnCount();
+
+ pout.print("<table border=\"1\" cellpadding=\"2\">\r\n");
+ pout.print("<tr>\r\n");
+ pout.print("<td>&nbsp;</td>\r\n");
+ for (int i = 0; i < columns; i++)
+ {
+ String column = metaData.getColumnLabel(1 + i);
+ String type = metaData.getColumnTypeName(1 + i).toLowerCase();
+
+ String dir = column.equals(order) && "ASC".equals(direction) ? "DESC" : "ASC";
+ pout.print("<td align=\"center\"><b>" + browser.href(column, getName(), "order", column, "direction", dir));
+ pout.print("</b><br>" + type + "</td>\r\n");
+ }
+
+ pout.print("</tr>\r\n");
+
+ int row = 0;
+ while (resultSet.next())
+ {
+ ++row;
+ pout.print("<tr>\r\n");
+ pout.print("<td><b>" + row + "</b></td>\r\n");
+ for (int i = 0; i < columns; i++)
+ {
+ String value = resultSet.getString(1 + i);
+ String bgcolor = highlight != null && highlight.equals(value) ? " bgcolor=\"#fffca6\"" : "";
+ pout.print("<td" + bgcolor + ">" + browser.href(value, getName(), "highlight", value) + "</td>\r\n");
+ }
+
+ pout.print("</tr>\r\n");
+ }
+
+ pout.print("</table>\r\n");
+ }
+ catch (SQLException ex)
+ {
+ ex.printStackTrace();
+ }
+ finally
+ {
+ DBUtil.close(resultSet);
+ DBUtil.close(stmt);
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static class Factory extends org.eclipse.net4j.util.factory.Factory
+ {
+ public static final String TYPE = "default";
+
+ public Factory()
+ {
+ super(PRODUCT_GROUP, TYPE);
+ }
+
+ public DBBrowserPage create(String description) throws ProductCreationException
+ {
+ return new DBBrowserPage();
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/Index.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/Index.java
new file mode 100644
index 0000000000..8b32e6d2fd
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/Index.java
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.db;
+
+import org.eclipse.emf.cdo.common.CDOCommonRepository.IDGenerationLocation;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.id.CDOIDUtil;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeStore;
+import org.eclipse.emf.cdo.spi.common.id.AbstractCDOIDByteArray;
+import org.eclipse.emf.cdo.spi.server.InternalRepository;
+
+import org.eclipse.net4j.db.DBException;
+import org.eclipse.net4j.db.IDBAdapter;
+import org.eclipse.net4j.db.IDBConnectionProvider;
+import org.eclipse.net4j.db.h2.H2Adapter;
+import org.eclipse.net4j.spi.db.DBAdapter;
+import org.eclipse.net4j.spi.db.DBSchema;
+import org.eclipse.net4j.util.io.IOUtil;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
+
+import org.h2.jdbcx.JdbcDataSource;
+
+import javax.sql.DataSource;
+
+import java.io.File;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+/**
+ * @author Eike Stepper
+ */
+public class Index extends DBSchema implements IDBConnectionProvider
+{
+ public static final long NULL_POINTER = 0; // A pointer value that has no meaning in the vob.
+
+ private static final boolean DEBUG = false;
+
+ private static final String INDENT = " ";
+
+ private LissomeStore store;
+
+ private IDBAdapter adapter;
+
+ private DataSource dataSource;
+
+ private IndexWriter writer;
+
+ protected CommitInfosTable commitInfos;
+
+ protected ObjectsTable objects;
+
+ protected BranchesTable branches;
+
+ public Index(LissomeStore store)
+ {
+ super(LissomeStore.TYPE);
+ this.store = store;
+
+ adapter = createAdapter();
+ dataSource = createDataSource();
+ writer = createWriter();
+
+ commitInfos = new CommitInfosTable(this);
+ objects = new ObjectsTable(this);
+ if (isSupportingBranches())
+ {
+ branches = new BranchesTable(this);
+ }
+
+ lock();
+ }
+
+ public LissomeStore getStore()
+ {
+ return store;
+ }
+
+ public InternalRepository getRepository()
+ {
+ return store.getRepository();
+ }
+
+ public IDGenerationLocation getIDGenerationLocation()
+ {
+ return getRepository().getIDGenerationLocation();
+ }
+
+ public boolean isSupportingAudits()
+ {
+ return getRepository().isSupportingAudits();
+ }
+
+ public boolean isSupportingBranches()
+ {
+ return getRepository().isSupportingBranches();
+ }
+
+ public IndexWriter getWriter()
+ {
+ return writer;
+ }
+
+ public CDOID getCDOID(ResultSet resultSet, int column) throws SQLException
+ {
+ if (getIDGenerationLocation() == IDGenerationLocation.CLIENT)
+ {
+ byte[] value = resultSet.getBytes(column);
+ return CDOIDUtil.createUUID(value);
+ }
+
+ long value = resultSet.getLong(column);
+ return CDOIDUtil.createLong(value);
+ }
+
+ public void setCDOID(PreparedStatement statement, int column, CDOID id) throws SQLException
+ {
+ if (getIDGenerationLocation() == IDGenerationLocation.CLIENT)
+ {
+ byte[] value = ((AbstractCDOIDByteArray)id).getByteArrayValue();
+ statement.setBytes(column, value);
+ }
+ else
+ {
+ long value = CDOIDUtil.getLong(id);
+ statement.setLong(column, value);
+ }
+ }
+
+ protected IDBAdapter createAdapter()
+ {
+ return new H2Adapter();
+ }
+
+ protected DataSource createDataSource()
+ {
+ String repoName = getRepository().getName();
+ return createDataSource(store.getFolder(), repoName, repoName);
+ }
+
+ protected IndexWriter createWriter()
+ {
+ return new IndexWriter(this);
+ }
+
+ public IndexReader createReader()
+ {
+ return new IndexReader(this);
+ }
+
+ public void createTables()
+ {
+ Connection connection = writer.getConnection();
+ create(adapter, connection);
+ }
+
+ public Connection getConnection()
+ {
+ try
+ {
+ return dataSource.getConnection();
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ }
+
+ public void trace(ContextTracer tracer, PreparedStatement stmt)
+ {
+ if (DEBUG)
+ {
+ IOUtil.OUT().println(format(stmt));
+ }
+ else if (tracer.isEnabled())
+ {
+ tracer.trace(format(stmt));
+ }
+ }
+
+ private String format(PreparedStatement stmt)
+ {
+ if (adapter instanceof DBAdapter)
+ {
+ return ((DBAdapter)adapter).format(stmt);
+ }
+
+ return stmt.toString();
+ }
+
+ public void trace(ContextTracer tracer, ResultSet resultSet)
+ {
+ if (DEBUG)
+ {
+ IOUtil.OUT().println(format(resultSet));
+ }
+ else if (tracer.isEnabled())
+ {
+ tracer.trace(format(resultSet));
+ }
+ }
+
+ private String format(ResultSet resultSet)
+ {
+ if (adapter instanceof DBAdapter)
+ {
+ return INDENT + ((DBAdapter)adapter).format(resultSet);
+ }
+
+ return INDENT + resultSet;
+ }
+
+ public static DataSource createDataSource(File folder, String dbName, String schemaName)
+ {
+ File database = new File(new File(folder, "db"), dbName);
+ String schema = schemaName != null ? ";SCHEMA=" + schemaName : "";
+
+ JdbcDataSource dataSource = new JdbcDataSource();
+ dataSource.setURL("jdbc:h2:" + database.getAbsolutePath() + schema);
+ return dataSource;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/IndexReader.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/IndexReader.java
new file mode 100644
index 0000000000..4254b48cbd
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/IndexReader.java
@@ -0,0 +1,600 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.db;
+
+import org.eclipse.emf.cdo.common.CDOCommonRepository.IDGenerationLocation;
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchHandler;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.branch.CDOBranchVersion;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.server.IStoreAccessor;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeStore;
+import org.eclipse.emf.cdo.server.internal.lissome.bundle.OM;
+import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranch;
+import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager;
+import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoader.BranchInfo;
+import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoader.SubBranchInfo;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+
+import org.eclipse.net4j.db.DBException;
+import org.eclipse.net4j.db.DBUtil;
+import org.eclipse.net4j.db.IDBConnectionProvider;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
+
+import org.eclipse.emf.ecore.EClass;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Eike Stepper
+ */
+public class IndexReader implements IDBConnectionProvider
+{
+ private static final ContextTracer TRACER = new ContextTracer(OM.INDEX, IndexReader.class);
+
+ protected Index index;
+
+ protected IDGenerationLocation idGenerationLocation;
+
+ protected boolean supportingAudits;
+
+ protected boolean supportingBranches;
+
+ protected Connection connection;
+
+ protected PreparedStatement[] queryResourcesStatements = new PreparedStatement[4];
+
+ protected PreparedStatement[] readRevisionStatements = new PreparedStatement[2];
+
+ protected PreparedStatement readRevisionByVersionStatement;
+
+ protected PreparedStatement[] handleRevisionsStatements = new PreparedStatement[32];
+
+ protected PreparedStatement loadSubBranchesStatement;
+
+ protected PreparedStatement loadBranchesStatement;
+
+ protected PreparedStatement[] loadCommitInfosStatements = new PreparedStatement[8];
+
+ public IndexReader(Index index)
+ {
+ this.index = index;
+
+ idGenerationLocation = index.getIDGenerationLocation();
+ supportingAudits = index.isSupportingAudits();
+ supportingBranches = index.isSupportingBranches();
+
+ connection = index.getConnection();
+ }
+
+ public Index getIndex()
+ {
+ return index;
+ }
+
+ public LissomeStore getStore()
+ {
+ return index.getStore();
+ }
+
+ public Connection getConnection()
+ {
+ return connection;
+ }
+
+ protected int setParameters(PreparedStatement stmt, int column, CDOBranchPoint branchPoint) throws SQLException
+ {
+ if (supportingBranches)
+ {
+ int branchID = branchPoint.getBranch().getID();
+ stmt.setInt(++column, branchID);
+ }
+
+ if (supportingAudits)
+ {
+ long timeStamp = branchPoint.getTimeStamp();
+ if (timeStamp != CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ stmt.setLong(++column, timeStamp);
+ stmt.setLong(++column, timeStamp);
+ }
+ }
+
+ return column;
+ }
+
+ public void queryResources(IStoreAccessor.QueryResourcesContext context)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("queryResources: {0}", context); //$NON-NLS-1$
+ }
+
+ ResultSet resultSet = null;
+
+ try
+ {
+ boolean historical = context.getTimeStamp() != CDOBranchPoint.UNSPECIFIED_DATE;
+ boolean exactMatch = context.exactMatch();
+ int stmtIndex = (historical ? 0 : 1) + (exactMatch ? 0 : 2);
+
+ PreparedStatement stmt = queryResourcesStatements[stmtIndex];
+ if (stmt == null)
+ {
+ String sql = index.objects.sqlQueryResources(historical, exactMatch);
+ stmt = connection.prepareStatement(sql);
+ queryResourcesStatements[stmtIndex] = stmt;
+ }
+
+ int column = 0;
+
+ CDOID folderID = context.getFolderID();
+ index.setCDOID(stmt, ++column, folderID);
+
+ String name = context.getName();
+ if (name == null)
+ {
+ name = CDOURIUtil.SEGMENT_SEPARATOR;
+ }
+ else if (!exactMatch)
+ {
+ name += "%";
+ }
+
+ stmt.setString(++column, name);
+ setParameters(stmt, column, context);
+
+ index.trace(TRACER, stmt);
+ resultSet = stmt.executeQuery();
+ while (resultSet.next())
+ {
+ index.trace(TRACER, resultSet);
+
+ CDOID id = index.getCDOID(resultSet, 1);
+ if (!context.addResource(id))
+ {
+ // No more results allowed
+ break;
+ }
+ }
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ finally
+ {
+ DBUtil.close(resultSet);
+ }
+ }
+
+ protected RevisionInfo readRevision(PreparedStatement stmt) throws SQLException
+ {
+ ResultSet resultSet = null;
+
+ try
+ {
+ index.trace(TRACER, stmt);
+ resultSet = stmt.executeQuery();
+
+ if (resultSet.next())
+ {
+ index.trace(TRACER, resultSet);
+
+ RevisionInfo revisionInfo = new RevisionInfo();
+ revisionInfo.setPointer(resultSet.getLong(1));
+
+ if (supportingAudits)
+ {
+ revisionInfo.setRevised(resultSet.getLong(2));
+ }
+ else
+ {
+ revisionInfo.setRevised(CDOBranchPoint.UNSPECIFIED_DATE);
+ }
+
+ return revisionInfo;
+ }
+
+ return null;
+ }
+ finally
+ {
+ DBUtil.close(resultSet);
+ }
+ }
+
+ public RevisionInfo readRevision(CDOID id, CDOBranchPoint branchPoint)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("readRevision: {0}, {1}", id, branchPoint); //$NON-NLS-1$
+ }
+
+ try
+ {
+ boolean historical = branchPoint.getTimeStamp() != CDOBranchPoint.UNSPECIFIED_DATE;
+ int stmtIndex = historical ? 0 : 1;
+
+ PreparedStatement stmt = readRevisionStatements[stmtIndex];
+ if (stmt == null)
+ {
+ String sql = index.objects.sqlReadRevision(historical);
+ stmt = connection.prepareStatement(sql);
+ readRevisionStatements[stmtIndex] = stmt;
+ }
+
+ int column = 0;
+ index.setCDOID(stmt, ++column, id);
+ setParameters(stmt, column, branchPoint);
+
+ return readRevision(stmt);
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ }
+
+ public RevisionInfo readRevisionByVersion(CDOID id, CDOBranchVersion branchVersion)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("readRevisionByVersion: {0}, {1}", id, branchVersion); //$NON-NLS-1$
+ }
+
+ try
+ {
+ if (readRevisionByVersionStatement == null)
+ {
+ String sql = index.objects.sqlReadRevisionByVersion();
+ readRevisionByVersionStatement = connection.prepareStatement(sql);
+ }
+
+ index.setCDOID(readRevisionByVersionStatement, 1, id);
+ readRevisionByVersionStatement.setInt(2, branchVersion.getBranch().getID());
+ readRevisionByVersionStatement.setInt(3, Math.abs(branchVersion.getVersion()));
+
+ return readRevision(readRevisionByVersionStatement);
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ }
+
+ public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime,
+ RevisionInfo.Handler handler)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("handleRevisions: {0}, {1}, {2}, {3}", eClass, branch, timeStamp, exactTime); //$NON-NLS-1$
+ }
+
+ ResultSet resultSet = null;
+
+ try
+ {
+ boolean withClass = eClass != null;
+ boolean withBranch = branch != null && supportingBranches;
+ boolean withTime = timeStamp != CDOBranchPoint.INVALID_DATE;
+ boolean historical = timeStamp != CDOBranchPoint.UNSPECIFIED_DATE;
+
+ int stmtIndex = (withClass ? 0 : 1) + (withBranch ? 0 : 2) + (withTime ? 0 : 4) + (exactTime ? 0 : 8)
+ + (historical ? 0 : 16);
+
+ PreparedStatement stmt = handleRevisionsStatements[stmtIndex];
+ if (stmt == null)
+ {
+ String sql = index.objects.sqlHandleRevisions(withClass, withBranch, withTime, exactTime, historical);
+ stmt = connection.prepareStatement(sql);
+ handleRevisionsStatements[stmtIndex] = stmt;
+ }
+
+ int column = 0;
+ if (withClass)
+ {
+ int cid = getStore().getMetaID(eClass);
+ stmt.setInt(++column, cid);
+ }
+
+ if (withBranch)
+ {
+ int branchID = branch.getID();
+ stmt.setInt(++column, branchID);
+ }
+
+ if (withTime)
+ {
+ if (exactTime)
+ {
+ if (historical)
+ {
+ stmt.setLong(++column, timeStamp);
+ }
+ }
+ else
+ {
+ if (historical)
+ {
+ stmt.setLong(++column, timeStamp);
+ stmt.setLong(++column, timeStamp);
+ }
+ }
+ }
+
+ index.trace(TRACER, stmt);
+ resultSet = stmt.executeQuery();
+
+ RevisionInfo revisionInfo = new RevisionInfo();
+ revisionInfo.setRevised(CDOBranchPoint.UNSPECIFIED_DATE);
+
+ while (resultSet.next())
+ {
+ index.trace(TRACER, resultSet);
+
+ CDOID id = index.getCDOID(resultSet, 1);
+ revisionInfo.setPointer(resultSet.getLong(2));
+
+ if (supportingAudits)
+ {
+ revisionInfo.setRevised(resultSet.getLong(3));
+ }
+
+ handler.handleRevisionInfo(id, revisionInfo);
+ }
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ finally
+ {
+ DBUtil.close(resultSet);
+ }
+ }
+
+ public BranchInfo loadBranch(int branchID)
+ {
+ // TODO: implement IndexReader.loadBranch(branchID)
+ throw new UnsupportedOperationException();
+ // return null;
+ }
+
+ public SubBranchInfo[] loadSubBranches(int branchID)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("loadSubBranches: {0}", branchID); //$NON-NLS-1$
+ }
+
+ ResultSet resultSet = null;
+
+ try
+ {
+ if (loadSubBranchesStatement == null)
+ {
+ String sql = index.branches.sqlLoadSubBranches();
+ loadSubBranchesStatement = connection.prepareStatement(sql);
+ }
+
+ loadSubBranchesStatement.setInt(1, branchID);
+
+ index.trace(TRACER, loadSubBranchesStatement);
+ resultSet = loadSubBranchesStatement.executeQuery();
+
+ List<SubBranchInfo> result = new ArrayList<SubBranchInfo>();
+ while (resultSet.next())
+ {
+ index.trace(TRACER, resultSet);
+
+ int id = resultSet.getInt(1);
+ String name = resultSet.getString(2);
+ long baseTimeStamp = resultSet.getLong(3);
+
+ result.add(new SubBranchInfo(id, name, baseTimeStamp));
+ }
+
+ return result.toArray(new SubBranchInfo[result.size()]);
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ finally
+ {
+ DBUtil.close(resultSet);
+ }
+ }
+
+ public int loadBranches(int startID, int endID, CDOBranchHandler handler)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("loadBranches: {0}, {1}", startID, endID); //$NON-NLS-1$
+ }
+
+ InternalCDOBranchManager branchManager = getStore().getRepository().getBranchManager();
+ ResultSet resultSet = null;
+
+ try
+ {
+ if (loadBranchesStatement == null)
+ {
+ String sql = index.branches.sqlLoadBranches();
+ loadBranchesStatement = connection.prepareStatement(sql);
+ }
+
+ loadBranchesStatement.setInt(1, startID);
+ loadBranchesStatement.setInt(2, endID);
+
+ index.trace(TRACER, loadBranchesStatement);
+ resultSet = loadBranchesStatement.executeQuery();
+
+ int count = 0;
+ while (resultSet.next())
+ {
+ index.trace(TRACER, resultSet);
+
+ int branchID = resultSet.getInt(1);
+ String name = resultSet.getString(2);
+ int baseBranchID = resultSet.getInt(3);
+ long baseTimeStamp = resultSet.getLong(4);
+
+ InternalCDOBranch branch = branchManager.getBranch(branchID, new BranchInfo(name, baseBranchID, baseTimeStamp));
+ handler.handleBranch(branch);
+ ++count;
+ }
+
+ return count;
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ finally
+ {
+ DBUtil.close(resultSet);
+ }
+ }
+
+ public void loadCommitInfos(CDOBranch branch, long startTime, long endTime, PointerHandler handler)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("loadCommitInfos: {0}, {1}, {2}", branch, startTime, endTime); //$NON-NLS-1$
+ }
+
+ ResultSet resultSet = null;
+
+ try
+ {
+ boolean withBranch = branch != null;
+ boolean withStartTime = startTime != CDOBranchPoint.UNSPECIFIED_DATE;
+ boolean withEndTime = endTime != CDOBranchPoint.UNSPECIFIED_DATE;
+
+ int stmtIndex = (withBranch ? 0 : 1) + (withStartTime ? 0 : 2) + (withEndTime ? 0 : 4);
+
+ PreparedStatement stmt = loadCommitInfosStatements[stmtIndex];
+ if (stmt == null)
+ {
+ String sql = index.commitInfos.sqlLoadCommitInfos(withBranch, withStartTime, withEndTime);
+ stmt = connection.prepareStatement(sql);
+ loadCommitInfosStatements[stmtIndex] = stmt;
+ }
+
+ int column = 0;
+
+ if (withBranch)
+ {
+ int branchID = branch.getID();
+ stmt.setInt(++column, branchID);
+ }
+
+ if (withStartTime)
+ {
+ stmt.setLong(++column, startTime);
+ }
+
+ if (withEndTime)
+ {
+ stmt.setLong(++column, endTime);
+ }
+
+ index.trace(TRACER, stmt);
+ resultSet = stmt.executeQuery();
+
+ while (resultSet.next())
+ {
+ index.trace(TRACER, resultSet);
+
+ long pointer = resultSet.getLong(1);
+ handler.handlePointer(pointer);
+ }
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ finally
+ {
+ DBUtil.close(resultSet);
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public interface PointerHandler
+ {
+ public void handlePointer(long pointer);
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static final class RevisionInfo
+ {
+ private long pointer;
+
+ private long revised;
+
+ public RevisionInfo(long pointer, long revised)
+ {
+ this.pointer = pointer;
+ this.revised = revised;
+ }
+
+ public RevisionInfo()
+ {
+ }
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ public void setPointer(long pointer)
+ {
+ this.pointer = pointer;
+ }
+
+ public long getRevised()
+ {
+ return revised;
+ }
+
+ public void setRevised(long revised)
+ {
+ this.revised = revised;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "RevisionInfo[pointer=" + pointer + ", revised=" + revised + "]";
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public interface Handler
+ {
+ public void handleRevisionInfo(CDOID id, IndexReader.RevisionInfo info);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/IndexWriter.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/IndexWriter.java
new file mode 100644
index 0000000000..8f7cc4af2c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/IndexWriter.java
@@ -0,0 +1,331 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.db;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.eresource.EresourcePackage;
+import org.eclipse.emf.cdo.server.internal.lissome.bundle.OM;
+import org.eclipse.emf.cdo.spi.common.revision.DetachedCDORevision;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
+import org.eclipse.emf.cdo.util.CDOURIUtil;
+
+import org.eclipse.net4j.db.DBException;
+import org.eclipse.net4j.db.DBType;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
+
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Eike Stepper
+ */
+public class IndexWriter extends IndexReader
+{
+ private static final ContextTracer TRACER = new ContextTracer(OM.INDEX, IndexWriter.class);
+
+ protected PreparedStatement addCommitInfoStatement;
+
+ protected PreparedStatement addObjectStatement;
+
+ protected PreparedStatement reviseOldRevisionsStatement;
+
+ protected PreparedStatement createBranchStatement;
+
+ private Set<PreparedStatement> batches = new HashSet<PreparedStatement>();
+
+ public IndexWriter(Index index)
+ {
+ super(index);
+
+ try
+ {
+ connection.setAutoCommit(false);
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ }
+
+ public void commit()
+ {
+ try
+ {
+ for (PreparedStatement stmt : batches)
+ {
+ stmt.executeBatch();
+ }
+
+ connection.commit();
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ finally
+ {
+ batches.clear();
+ }
+ }
+
+ protected void execute(PreparedStatement stmt) throws SQLException
+ {
+ index.trace(TRACER, stmt);
+ stmt.addBatch();
+ batches.add(stmt);
+ }
+
+ public void addCommitInfo(CDOBranchPoint branchPoint, long pointer)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("addCommitInfo: {0}, {1}", branchPoint, pointer); //$NON-NLS-1$
+ }
+
+ try
+ {
+ if (addCommitInfoStatement == null)
+ {
+ String sql = index.commitInfos.sqlAddCommitInfo();
+ addCommitInfoStatement = connection.prepareStatement(sql);
+ }
+
+ int column = 0;
+
+ long timeStamp = branchPoint.getTimeStamp();
+ addCommitInfoStatement.setLong(++column, timeStamp);
+
+ if (supportingBranches)
+ {
+ CDOBranch branch = branchPoint.getBranch();
+ int branchID = branch.getID();
+ addCommitInfoStatement.setInt(++column, branchID);
+ }
+
+ addCommitInfoStatement.setLong(++column, pointer);
+ execute(addCommitInfoStatement);
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ }
+
+ public void addObjects(InternalCDORevision[] newRevisions, long[] pointers)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("addObjects: {0}, {1}", Arrays.asList(newRevisions), Arrays.asList(pointers)); //$NON-NLS-1$
+ }
+
+ try
+ {
+ if (addObjectStatement == null)
+ {
+ String sql = index.objects.sqlAddRevision();
+ addObjectStatement = connection.prepareStatement(sql);
+ }
+
+ for (int i = 0; i < newRevisions.length; i++)
+ {
+ InternalCDORevision revision = newRevisions[i];
+ long pointer = pointers[i];
+
+ boolean detached = revision instanceof DetachedCDORevision;
+ int column = 0;
+
+ CDOID oid = revision.getID();
+ index.setCDOID(addObjectStatement, ++column, oid);
+
+ if (supportingBranches)
+ {
+ int branchID = revision.getBranch().getID();
+ addObjectStatement.setInt(++column, branchID);
+ }
+
+ if (supportingAudits)
+ {
+ long time = revision.getTimeStamp();
+ addObjectStatement.setLong(++column, time);
+
+ long revised = revision.getRevised();
+ addObjectStatement.setLong(++column, revised);
+
+ int version = revision.getVersion();
+ if (detached)
+ {
+ version = -version;
+ }
+
+ addObjectStatement.setInt(++column, version);
+ }
+
+ int cid = getStore().getMetaID(revision.getEClass());
+ addObjectStatement.setInt(++column, cid);
+
+ CDOID containerID = detached ? CDOID.NULL : (CDOID)revision.getContainerID();
+ index.setCDOID(addObjectStatement, ++column, containerID);
+
+ if (!detached && revision.isResourceNode())
+ {
+ String name = (String)revision.data().get(EresourcePackage.Literals.CDO_RESOURCE_NODE__NAME, 0);
+ if (name == null)
+ {
+ name = CDOURIUtil.SEGMENT_SEPARATOR;
+ }
+
+ addObjectStatement.setString(++column, name);
+ }
+ else
+ {
+ addObjectStatement.setNull(++column, DBType.VARCHAR.getCode());
+ }
+
+ addObjectStatement.setLong(++column, pointer);
+
+ execute(addObjectStatement);
+ }
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ }
+
+ public void updateObjects(InternalCDORevision[] newRevisions, long[] pointers)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("updateObjects: {0}, {1}", Arrays.asList(newRevisions), Arrays.asList(pointers)); //$NON-NLS-1$
+ }
+
+ if (supportingAudits)
+ {
+ reviseOldRevisions(newRevisions);
+ addObjects(newRevisions, pointers);
+ }
+ else
+ {
+ // XXX
+ }
+ }
+
+ protected void reviseOldRevisions(InternalCDORevision[] newRevisions)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("reviseOldRevisions: {0}", Arrays.asList(newRevisions)); //$NON-NLS-1$
+ }
+
+ try
+ {
+ if (reviseOldRevisionsStatement == null)
+ {
+ String sql = index.objects.sqlReviseOldRevisions();
+ reviseOldRevisionsStatement = connection.prepareStatement(sql);
+ }
+
+ for (int i = 0; i < newRevisions.length; i++)
+ {
+ InternalCDORevision revision = newRevisions[i];
+ int column = 0;
+
+ long revised = revision.getTimeStamp() - 1;
+ reviseOldRevisionsStatement.setLong(++column, revised);
+
+ CDOID oid = revision.getID();
+ index.setCDOID(reviseOldRevisionsStatement, ++column, oid);
+
+ if (supportingBranches)
+ {
+ int branchID = revision.getBranch().getID();
+ reviseOldRevisionsStatement.setInt(++column, branchID);
+ }
+
+ int version = Math.abs(revision.getVersion()) - 1;
+ reviseOldRevisionsStatement.setInt(++column, version);
+
+ execute(reviseOldRevisionsStatement);
+ }
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ }
+
+ public void detachObjects(CDOBranchPoint branchPoint, CDOID[] ids, InternalCDORevision[] detachedRevisions,
+ long[] detachedObjectPointers)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("detachObjects: {0}, {1}", Arrays.asList(ids), branchPoint); //$NON-NLS-1$
+ }
+
+ if (supportingAudits)
+ {
+ updateObjects(detachedRevisions, detachedObjectPointers);
+ }
+ else
+ {
+ // TODO: implement IndexWriter.detachObjects(ids, types, branchPoint, pointers)
+ throw new UnsupportedOperationException();
+
+ // long[] pointers = new long[ids.length];
+ // for (int i = 0; i < ids.length; i++)
+ // {
+ // CDOID id = ids[i];
+ // pointers[i] = readPointerNonAudit(id);
+ //
+ // // XXX Delete revision
+ // }
+ }
+ }
+
+ protected long readPointerNonAudit(CDOID id)
+ {
+ // TODO: implement IndexWriter.readPointerNonAudit(id)
+ throw new UnsupportedOperationException();
+ }
+
+ public void createBranch(int branchID, String name, CDOBranchPoint base, long pointer)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("createBranch: {0}, {1}, {2}", branchID, name, base); //$NON-NLS-1$
+ }
+
+ try
+ {
+ if (createBranchStatement == null)
+ {
+ String sql = index.branches.sqlCreateBranch();
+ createBranchStatement = connection.prepareStatement(sql);
+ }
+
+ createBranchStatement.setInt(1, branchID);
+ createBranchStatement.setString(2, name);
+ createBranchStatement.setInt(3, base.getBranch().getID());
+ createBranchStatement.setLong(4, base.getTimeStamp());
+
+ execute(createBranchStatement);
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/ObjectsTable.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/ObjectsTable.java
new file mode 100644
index 0000000000..6a09a30769
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/ObjectsTable.java
@@ -0,0 +1,310 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.db;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.branch.CDOBranchVersion;
+
+import org.eclipse.net4j.db.DBType;
+import org.eclipse.net4j.db.ddl.IDBField;
+import org.eclipse.net4j.db.ddl.IDBIndex;
+
+/**
+ * @author Eike Stepper
+ */
+public class ObjectsTable extends Table
+{
+ protected IDBField branch;
+
+ protected IDBField time;
+
+ protected IDBField revised;
+
+ protected IDBField version;
+
+ protected IDBField cid;
+
+ protected IDBField oid;
+
+ protected IDBField container;
+
+ protected IDBField name;
+
+ protected IDBField pointer;
+
+ public ObjectsTable(Index index)
+ {
+ super(index, "cdo_objects");
+
+ oid = addCDOIDField("cdo_oid");
+
+ if (isSupportingBranches())
+ {
+ branch = table.addField("cdo_branch", DBType.INTEGER);
+ }
+
+ if (isSupportingAudits())
+ {
+ time = table.addField("cdo_time", DBType.BIGINT);
+ revised = table.addField("cdo_revised", DBType.BIGINT);
+ version = table.addField("cdo_version", DBType.INTEGER);
+ }
+
+ cid = table.addField("cdo_cid", DBType.INTEGER);
+ container = addCDOIDField("cdo_container");
+ name = table.addField("cdo_name", DBType.VARCHAR, 255);
+ pointer = table.addField("cdo_pointer", DBType.BIGINT);
+
+ table.addIndex(IDBIndex.Type.PRIMARY_KEY, oid, time, branch);
+ // TODO Additional indexes to speed up queries
+ }
+
+ protected boolean addCriterion(StringBuilder builder, boolean needAnd, boolean withBranch, boolean historical)
+ {
+ if (withBranch)
+ {
+ if (needAnd)
+ {
+ builder.append(" AND ");
+ }
+
+ builder.append(branch);
+ builder.append("=?");
+ needAnd = true;
+ }
+
+ if (isSupportingAudits())
+ {
+ if (needAnd)
+ {
+ builder.append(" AND ");
+ }
+
+ if (historical)
+ {
+ builder.append(time);
+ builder.append("<=? AND (?<=");
+ builder.append(revised);
+ builder.append(" OR ");
+ builder.append(revised);
+ builder.append("=");
+ builder.append(CDOBranchPoint.UNSPECIFIED_DATE);
+ builder.append(")");
+ }
+ else
+ {
+ builder.append(revised);
+ builder.append("=");
+ builder.append(CDOBranchPoint.UNSPECIFIED_DATE);
+ }
+
+ needAnd = true;
+ }
+
+ return needAnd;
+ }
+
+ protected String sqlQueryResources(boolean historical, boolean exactMatch)
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("SELECT ");
+ builder.append(oid);
+ builder.append(" FROM ");
+ builder.append(this);
+ builder.append(" WHERE ");
+ builder.append(container);
+ builder.append("=? AND ");
+ builder.append(name);
+ builder.append(exactMatch ? "=?" : " LIKE ?");
+
+ addCriterion(builder, true, isSupportingBranches(), historical);
+
+ builder.append(" AND ");
+ builder.append(version);
+ builder.append(">=");
+ builder.append(CDOBranchVersion.FIRST_VERSION);
+ return builder.toString();
+ }
+
+ protected StringBuilder sqlReadRevision()
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("SELECT ");
+ builder.append(pointer);
+
+ if (isSupportingAudits())
+ {
+ builder.append(", ");
+ builder.append(revised);
+ }
+
+ builder.append(" FROM ");
+ builder.append(this);
+ return builder;
+ }
+
+ protected String sqlReadRevision(boolean historical)
+ {
+ StringBuilder builder = sqlReadRevision();
+ builder.append(" WHERE ");
+ builder.append(oid);
+ builder.append("=?");
+ addCriterion(builder, true, isSupportingBranches(), historical);
+ return builder.toString();
+ }
+
+ protected String sqlReadRevisionByVersion()
+ {
+ StringBuilder builder = sqlReadRevision();
+ builder.append(" WHERE ");
+ builder.append(oid);
+ builder.append("=? AND ");
+ builder.append(branch);
+ builder.append("=? AND ");
+ builder.append(version);
+ builder.append("=?");
+ return builder.toString();
+ }
+
+ protected String sqlHandleRevisions(boolean withClass, boolean withBranch, boolean withTime, boolean exactTime,
+ boolean historical)
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("SELECT ");
+ builder.append(oid);
+ builder.append(", ");
+ builder.append(pointer);
+
+ if (isSupportingAudits())
+ {
+ builder.append(", ");
+ builder.append(revised);
+ }
+
+ builder.append(" FROM ");
+ builder.append(this);
+
+ int appended = 0;
+ if (withClass)
+ {
+ builder.append(appended++ == 0 ? " WHERE " : " AND ");
+ builder.append(cid);
+ builder.append("=?");
+ }
+
+ if (withBranch)
+ {
+ builder.append(appended++ == 0 ? " WHERE " : " AND ");
+ builder.append(branch);
+ builder.append("=?");
+ }
+
+ if (withTime)
+ {
+ if (exactTime)
+ {
+ if (historical)
+ {
+ builder.append(appended++ == 0 ? " WHERE " : " AND ");
+ builder.append(time);
+ builder.append("=?");
+ }
+ }
+ else
+ {
+ builder.append(appended++ == 0 ? " WHERE " : " AND ");
+ addCriterion(builder, false, false, historical);
+ }
+ }
+
+ return builder.toString();
+ }
+
+ protected String sqlAddRevision()
+ {
+ StringBuilder builder = new StringBuilder();
+ StringBuilder params = new StringBuilder();
+
+ builder.append("INSERT INTO ");
+ builder.append(this);
+ builder.append(" (");
+ builder.append(oid);
+ params.append("?");
+
+ if (isSupportingBranches())
+ {
+ builder.append(", ");
+ builder.append(branch);
+ params.append(", ?");
+ }
+
+ if (isSupportingAudits())
+ {
+ builder.append(", ");
+ builder.append(time);
+ params.append(", ?");
+
+ builder.append(", ");
+ builder.append(revised);
+ params.append(", ?");
+
+ builder.append(", ");
+ builder.append(version);
+ params.append(", ?");
+ }
+
+ builder.append(", ");
+ builder.append(cid);
+ params.append(", ?");
+
+ builder.append(", ");
+ builder.append(container);
+ params.append(", ?");
+
+ builder.append(", ");
+ builder.append(name);
+ params.append(", ?");
+
+ builder.append(", ");
+ builder.append(pointer);
+ params.append(", ?");
+
+ builder.append(") VALUES (");
+ builder.append(params);
+ builder.append(")");
+ return builder.toString();
+ }
+
+ protected String sqlReviseOldRevisions()
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("UPDATE ");
+ builder.append(this);
+ builder.append(" SET ");
+ builder.append(revised);
+ builder.append("=?");
+ builder.append(" WHERE ");
+ builder.append(oid);
+ builder.append("=?");
+
+ if (isSupportingBranches())
+ {
+ builder.append(" AND ");
+ builder.append(branch);
+ builder.append("=?");
+ }
+
+ builder.append(" AND ");
+ builder.append(version);
+ builder.append("=?");
+ return builder.toString();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/Table.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/Table.java
new file mode 100644
index 0000000000..55654dc21e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/db/Table.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.db;
+
+import org.eclipse.emf.cdo.common.CDOCommonRepository.IDGenerationLocation;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeStore;
+import org.eclipse.emf.cdo.spi.server.InternalRepository;
+
+import org.eclipse.net4j.db.DBType;
+import org.eclipse.net4j.db.ddl.IDBField;
+import org.eclipse.net4j.db.ddl.IDBTable;
+
+/**
+ * @author Eike Stepper
+ */
+public class Table
+{
+ protected Index index;
+
+ protected IDBTable table;
+
+ public Table(Index index, String name)
+ {
+ this.index = index;
+ table = index.addTable(name);
+ }
+
+ public Index getIndex()
+ {
+ return index;
+ }
+
+ public LissomeStore getStore()
+ {
+ return index.getStore();
+ }
+
+ public InternalRepository getRepository()
+ {
+ return getStore().getRepository();
+ }
+
+ public IDGenerationLocation getIDGenerationLocation()
+ {
+ return getRepository().getIDGenerationLocation();
+ }
+
+ public boolean isSupportingAudits()
+ {
+ return getRepository().isSupportingAudits();
+ }
+
+ public boolean isSupportingBranches()
+ {
+ return getRepository().isSupportingBranches();
+ }
+
+ @Override
+ public String toString()
+ {
+ return table.toString();
+ }
+
+ protected IDBField addCDOIDField(String name)
+ {
+ if (getIDGenerationLocation() == IDGenerationLocation.CLIENT)
+ {
+ return table.addField(name, DBType.BINARY, 64);
+ }
+
+ return table.addField(name, DBType.BIGINT);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/file/Journal.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/file/Journal.java
new file mode 100644
index 0000000000..44505730ed
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/file/Journal.java
@@ -0,0 +1,592 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.file;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.branch.CDOBranchVersion;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.server.IStoreAccessor;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeFile;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeFileHandle;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeFileOperation;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeStore;
+import org.eclipse.emf.cdo.server.internal.lissome.bundle.OM;
+import org.eclipse.emf.cdo.server.internal.lissome.optimizer.CommitTransactionTask;
+import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoader.BranchInfo;
+import org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager;
+import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry;
+import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
+import org.eclipse.emf.cdo.spi.common.revision.DetachedCDORevision;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionDelta;
+import org.eclipse.emf.cdo.spi.server.InternalCommitContext;
+
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.IORuntimeException;
+import org.eclipse.net4j.util.io.IOUtil;
+import org.eclipse.net4j.util.om.monitor.OMMonitor;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Eike Stepper
+ */
+public class Journal extends LissomeFile
+{
+ public static final String EXTENSION = "journal";
+
+ public static final byte PACKAGE_UNITS_BLOCK = 1;
+
+ public static final byte COMMIT_TRANSACTION_BLOCK = 2;
+
+ public static final byte CREATE_BRANCH_BLOCK = 3;
+
+ private static final ContextTracer TRACER = new ContextTracer(OM.JOURNAL, Journal.class);
+
+ private static final long serialVersionUID = 1L;
+
+ private long commitPointer;
+
+ private long newCommitPointer;
+
+ private long packageUnitPointer;
+
+ private long newPackageUnitPointer;
+
+ private CommitTransactionTask commitTransactionTask;
+
+ private final LissomeFileHandle writer;
+
+ public Journal(LissomeStore store) throws FileNotFoundException
+ {
+ super(store, store.getRepository().getName() + "." + EXTENSION);
+ writer = openWriter();
+ }
+
+ @Override
+ protected LissomeFileHandle openHandle(String mode)
+ {
+ try
+ {
+ return new LissomeFileHandle(this, mode)
+ {
+ @Override
+ public CDORevision getRevision(long pointer)
+ {
+ return super.getRevision(-pointer);
+ }
+ };
+ }
+ catch (FileNotFoundException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ }
+
+ public void firstStart()
+ {
+ try
+ {
+ writer.seek(0);
+ writer.writeLong(commitPointer);
+ writer.writeLong(packageUnitPointer);
+ }
+ catch (IOException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ finally
+ {
+ cleanUp();
+ }
+ }
+
+ public void reStart()
+ {
+ try
+ {
+ writer.seek(0);
+ commitPointer = writer.readLong();
+ packageUnitPointer = writer.readLong();
+ }
+ catch (IOException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ finally
+ {
+ cleanUp();
+ }
+ }
+
+ public Collection<InternalCDOPackageUnit> readPackageUnits()
+ {
+ LissomeFileHandle reader = openReader();
+
+ try
+ {
+ List<InternalCDOPackageUnit> result = new ArrayList<InternalCDOPackageUnit>();
+ InternalCDOPackageRegistry packageRegistry = getStore().getRepository().getPackageRegistry();
+
+ ResourceSet resourceSet = new ResourceSetImpl();
+ resourceSet.setPackageRegistry(packageRegistry);
+
+ long filePointer = packageUnitPointer;
+ while (filePointer != 0)
+ {
+ reader.seek(filePointer);
+ filePointer = reader.readLong();
+
+ while (reader.readBoolean())
+ {
+ InternalCDOPackageUnit packageUnit = (InternalCDOPackageUnit)reader.readCDOPackageUnit(resourceSet);
+ packageUnit.setPackageRegistry(packageRegistry);
+ result.add(packageUnit);
+
+ EPackage ePackage = packageUnit.getTopLevelPackageInfo().getEPackage();
+ mapPackage(ePackage, reader);
+ }
+ }
+
+ return result;
+ }
+ catch (IOException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ finally
+ {
+ IOUtil.close(reader);
+ }
+ }
+
+ protected void checkMetaObject(ENamedElement element, String name) throws IOException
+ {
+ if (!element.getName().equals(name))
+ {
+ throw new IOException("Name '" + name + "' expected: " + element);
+ }
+ }
+
+ protected void checkListSize(EList<?> list, int size) throws IOException
+ {
+ if (list.size() != size)
+ {
+ throw new IOException("Size " + size + " expected: " + list);
+ }
+ }
+
+ protected void mapPackage(EPackage ePackage, LissomeFileHandle reader) throws IOException
+ {
+ LissomeStore store = getStore();
+
+ checkMetaObject(ePackage, reader.readString());
+ store.mapMetaObject(ePackage, reader.readInt());
+
+ EList<EClassifier> eClassifiers = ePackage.getEClassifiers();
+ checkListSize(eClassifiers, reader.readInt());
+
+ for (EClassifier eClassifier : eClassifiers)
+ {
+ checkMetaObject(eClassifier, reader.readString());
+ store.mapMetaObject(eClassifier, reader.readInt());
+
+ if (eClassifier instanceof EClass)
+ {
+ EClass eClass = (EClass)eClassifier;
+
+ EList<EStructuralFeature> eStructuralFeatures = eClass.getEStructuralFeatures();
+ checkListSize(eStructuralFeatures, reader.readInt());
+
+ for (EStructuralFeature eStructuralFeature : eStructuralFeatures)
+ {
+ checkMetaObject(eStructuralFeature, reader.readString());
+ store.mapMetaObject(eStructuralFeature, reader.readInt());
+ }
+ }
+ }
+
+ EList<EPackage> eSubpackages = ePackage.getESubpackages();
+ checkListSize(eSubpackages, reader.readInt());
+
+ for (EPackage eSubpackage : eSubpackages)
+ {
+ mapPackage(eSubpackage);
+ }
+ }
+
+ protected void mapPackage(EPackage ePackage) throws IOException
+ {
+ LissomeStore store = getStore();
+
+ writer.writeString(ePackage.getName());
+ writer.writeInt(store.mapMetaObject(ePackage));
+
+ EList<EClassifier> eClassifiers = ePackage.getEClassifiers();
+ writer.writeInt(eClassifiers.size());
+
+ for (EClassifier eClassifier : eClassifiers)
+ {
+ writer.writeString(eClassifier.getName());
+ writer.writeInt(store.mapMetaObject(eClassifier));
+
+ if (eClassifier instanceof EClass)
+ {
+ EClass eClass = (EClass)eClassifier;
+
+ EList<EStructuralFeature> eStructuralFeatures = eClass.getEStructuralFeatures();
+ writer.writeInt(eStructuralFeatures.size());
+
+ for (EStructuralFeature eStructuralFeature : eStructuralFeatures)
+ {
+ writer.writeString(eStructuralFeature.getName());
+ writer.writeInt(store.mapMetaObject(eStructuralFeature));
+ }
+ }
+ }
+
+ EList<EPackage> eSubpackages = ePackage.getESubpackages();
+ writer.writeInt(eSubpackages.size());
+
+ for (EPackage eSubpackage : eSubpackages)
+ {
+ mapPackage(eSubpackage);
+ }
+ }
+
+ public void writePackageUnits(final InternalCDOPackageUnit[] packageUnits, final OMMonitor monitor)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("writePackageUnits: {0}", Arrays.asList(packageUnits)); //$NON-NLS-1$
+ }
+
+ monitor.begin(packageUnits.length);
+
+ try
+ {
+ writer.append(new LissomeFileOperation()
+ {
+ public void execute(LissomeFileHandle writer) throws IOException
+ {
+ writer.writeByte(PACKAGE_UNITS_BLOCK);
+ writePackageUnits(writer, packageUnits, monitor);
+ }
+ });
+ }
+ finally
+ {
+ monitor.done();
+ }
+ }
+
+ protected void writePackageUnits(LissomeFileHandle writer, InternalCDOPackageUnit[] packageUnits, OMMonitor monitor)
+ throws IOException
+ {
+ newPackageUnitPointer = writer.getFilePointer();
+ writer.writeLong(packageUnitPointer);
+
+ for (InternalCDOPackageUnit packageUnit : packageUnits)
+ {
+ writer.writeBoolean(true); // Package unit follows
+
+ boolean withPackages = !packageUnit.isSystem();
+ writer.writeCDOPackageUnit(packageUnit, withPackages);
+
+ EPackage ePackage = packageUnit.getTopLevelPackageInfo().getEPackage();
+ mapPackage(ePackage);
+
+ monitor.worked(4);
+ }
+
+ writer.writeBoolean(false); // No more package units follow
+ }
+
+ public long createBranch(final int branchID, final BranchInfo branchInfo)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("createBranch: {0}, {1}", branchID, branchInfo); //$NON-NLS-1$
+ }
+
+ return writer.append(new LissomeFileOperation()
+ {
+ public void execute(LissomeFileHandle writer) throws IOException
+ {
+ writer.writeByte(CREATE_BRANCH_BLOCK);
+ writer.writeInt(branchID);
+ writer.writeString(branchInfo.getName());
+ writer.writeInt(branchInfo.getBaseBranchID());
+ writer.writeLong(branchInfo.getBaseTimeStamp());
+ }
+ });
+ }
+
+ public void write(final InternalCommitContext context, final OMMonitor monitor)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("write: {0}", context); //$NON-NLS-1$
+ }
+
+ try
+ {
+ final CDOBranchPoint branchPoint = context.getBranchPoint();
+ final long previousTimeStamp = context.getPreviousTimeStamp();
+ final String userID = context.getUserID();
+ final String commitComment = context.getCommitComment();
+
+ final InternalCDOPackageUnit[] newPackageUnits = context.getNewPackageUnits();
+ final InternalCDORevision[] newObjects = context.getNewObjects();
+ final CDOID[] detachedObjects = context.getDetachedObjects();
+ final Map<CDOID, EClass> detachedObjectTypes = context.getDetachedObjectTypes();
+ final CDOBranchVersion[] detachedObjectVersions = context.getDetachedObjectVersions();
+ final InternalCDORevisionDelta[] dirtyObjectDeltas = context.getDirtyObjectDeltas();
+
+ int revisionWork = detachedObjects.length + 3 * newObjects.length + 2 * dirtyObjectDeltas.length;
+ monitor.begin(1 + 4 * newPackageUnits.length + revisionWork);
+
+ commitTransactionTask = new CommitTransactionTask(context);
+
+ newCommitPointer = writer.append(new LissomeFileOperation()
+ {
+ public void execute(LissomeFileHandle writer) throws IOException
+ {
+ writer.writeByte(COMMIT_TRANSACTION_BLOCK);
+ writer.writeLong(commitPointer);
+ writer.writeCDOBranchPoint(branchPoint);
+ writer.writeLong(previousTimeStamp);
+ writer.writeString(userID);
+ writer.writeString(commitComment);
+ monitor.worked();
+
+ // New package units
+ if (newPackageUnits.length != 0)
+ {
+ writePackageUnits(writer, newPackageUnits, monitor);
+ }
+
+ InternalCDORevision[] detachedRevisions = null;
+ if (detachedObjects.length != 0 && detachedObjectTypes != null && detachedObjectVersions != null)
+ {
+ detachedRevisions = new InternalCDORevision[detachedObjects.length];
+ commitTransactionTask.setDetachedRevisions(detachedRevisions);
+ }
+
+ // Detached objects
+ CDOBranch transactionBranch = branchPoint.getBranch();
+ long timeStamp = branchPoint.getTimeStamp();
+
+ writer.writeBoolean(detachedObjectTypes != null);
+ writer.writeBoolean(detachedObjectVersions != null);
+ writer.writeInt(detachedObjects.length);
+
+ for (int i = 0; i < detachedObjects.length; i++)
+ {
+ CDOID id = detachedObjects[i];
+ EClass eClass = detachedObjectTypes != null ? detachedObjectTypes.get(id) : null;
+ CDOBranchVersion branchVersion = detachedObjectVersions != null ? detachedObjectVersions[i] : null;
+
+ if (detachedRevisions != null)
+ {
+ int version = branchVersion.getBranch() == transactionBranch ? branchVersion.getVersion() + 1
+ : CDOBranchVersion.FIRST_VERSION;
+
+ detachedRevisions[i] = new DetachedCDORevision(eClass, id, transactionBranch, version, timeStamp);
+ }
+
+ if (eClass != null)
+ {
+ int cid = getStore().getMetaID(eClass);
+ writer.writeInt(cid);
+ }
+
+ if (branchVersion != null)
+ {
+ int version = branchVersion.getVersion();
+ if (branchVersion.getBranch() == transactionBranch)
+ {
+ writer.writeInt(version);
+ }
+ else
+ {
+ writer.writeInt(-version);
+ writer.writeCDOBranch(branchVersion.getBranch());
+ }
+ }
+
+ monitor.worked();
+ }
+
+ // New objects
+ Map<CDORevision, Long> newObjectPointers = commitTransactionTask.getNewObjectPointers();
+ writer.writeInt(newObjects.length);
+ for (InternalCDORevision revision : newObjects)
+ {
+ long pointer = writer.getFilePointer();
+ newObjectPointers.put(revision, pointer);
+ writer.writeCDORevision(revision, CDORevision.UNCHUNKED);
+ monitor.worked();
+ }
+
+ // Dirty object deltas
+ writer.writeInt(dirtyObjectDeltas.length);
+ for (InternalCDORevisionDelta revisionDelta : dirtyObjectDeltas)
+ {
+ writer.writeCDORevisionDelta(revisionDelta);
+ monitor.worked();
+ }
+
+ // Large objects
+ ExtendedDataInputStream in = context.getLobs();
+ if (in != null)
+ {
+ int count = in.readInt();
+ for (int i = 0; i < count; i++)
+ {
+ byte[] id = in.readByteArray();
+ commitTransactionTask.getLobs().add(id);
+
+ long size = in.readLong();
+ if (size > 0)
+ {
+ writeBlob(id, size, in);
+ }
+ else
+ {
+ writeClob(id, -size, new InputStreamReader(in));
+ }
+ }
+ }
+ }
+ });
+
+ commitTransactionTask.setNewCommitPointer(newCommitPointer);
+ }
+ finally
+ {
+ monitor.done();
+ }
+ }
+
+ protected void writeBlob(byte[] id, long size, InputStream inputStream) throws IOException
+ {
+ // TODO: implement LissomeStoreAccessor.writeBlob(id, size, inputStream)
+ throw new UnsupportedOperationException();
+ }
+
+ protected void writeClob(byte[] id, long size, Reader reader) throws IOException
+ {
+ // TODO: implement LissomeStoreAccessor.writeClob(id, size, reader)
+ throw new UnsupportedOperationException();
+ }
+
+ protected void removeLob(byte[] id)
+ {
+ // TODO: implement LissomeStoreAccessor.removeLob(id)
+ throw new UnsupportedOperationException();
+ }
+
+ public CommitTransactionTask commit(OMMonitor monitor)
+ {
+ try
+ {
+ if (newCommitPointer != commitPointer || newPackageUnitPointer != packageUnitPointer)
+ {
+ commitPointer = newCommitPointer;
+ packageUnitPointer = newPackageUnitPointer;
+
+ writer.seek(0L);
+ writer.writeLong(commitPointer);
+ writer.writeLong(packageUnitPointer);
+ }
+
+ return commitTransactionTask;
+ }
+ catch (IOException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ finally
+ {
+ cleanUp();
+ }
+ }
+
+ public void rollback(IStoreAccessor.CommitContext commitContext)
+ {
+ try
+ {
+ List<byte[]> lobs = commitTransactionTask.getLobs();
+ for (byte[] id : lobs)
+ {
+ removeLob(id);
+ }
+ }
+ finally
+ {
+ cleanUp();
+ }
+ }
+
+ protected void cleanUp()
+ {
+ commitTransactionTask = null;
+ newCommitPointer = commitPointer;
+ newPackageUnitPointer = packageUnitPointer;
+ }
+
+ public CDOCommitInfo readCommitInfo(LissomeFileHandle reader, long pointer)
+ {
+ try
+ {
+ reader.seek(pointer);
+ reader.readByte(); // COMMIT_TRANSACTION_BLOCK
+ reader.readLong(); // commitPointer
+
+ CDOBranchPoint branchPoint = reader.readCDOBranchPoint();
+ CDOBranch branch = branchPoint.getBranch();
+ long timeStamp = branchPoint.getTimeStamp();
+ long previousTimeStamp = reader.readLong();
+ String userID = reader.readString();
+ String comment = reader.readString();
+
+ InternalCDOCommitInfoManager commitInfoManager = getStore().getRepository().getCommitInfoManager();
+ return commitInfoManager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, null);
+ }
+ catch (IOException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/file/Vob.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/file/Vob.java
new file mode 100644
index 0000000000..7520f29fc5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/file/Vob.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.file;
+
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeFile;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeFileHandle;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeFileOperation;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeStore;
+
+import org.eclipse.net4j.util.io.IORuntimeException;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class Vob extends LissomeFile
+{
+ private static final long serialVersionUID = 1L;
+
+ public static final String EXTENSION = "vob";
+
+ private final LissomeFileHandle writer;
+
+ public Vob(LissomeStore store) throws IOException
+ {
+ super(store, store.getRepository().getName() + "." + EXTENSION);
+ writer = openWriter();
+ writer.seek(0);
+ writer.writeLong(System.currentTimeMillis());
+ }
+
+ @Override
+ protected LissomeFileHandle openHandle(String mode)
+ {
+ try
+ {
+ return new LissomeFileHandle(this, mode);
+ }
+ catch (FileNotFoundException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ }
+
+ public long addRevision(final CDORevision revision)
+ {
+ return writer.append(new LissomeFileOperation()
+ {
+ public void execute(LissomeFileHandle writer) throws IOException
+ {
+ writer.writeCDORevision(revision, CDORevision.UNCHUNKED);
+ }
+ });
+ }
+
+ public void delete(long[] pointers)
+ {
+ // TODO: implement Vob.enclosing_method(enclosing_method_arguments)
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/CommitTransactionTask.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/CommitTransactionTask.java
new file mode 100644
index 0000000000..f5d56b1418
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/CommitTransactionTask.java
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.optimizer;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.branch.CDOBranchVersion;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.common.revision.CDORevisionCacheAdder;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeStore;
+import org.eclipse.emf.cdo.server.internal.lissome.db.IndexWriter;
+import org.eclipse.emf.cdo.server.internal.lissome.file.Vob;
+import org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager;
+import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
+import org.eclipse.emf.cdo.spi.common.revision.DetachedCDORevision;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionDelta;
+import org.eclipse.emf.cdo.spi.server.InternalCommitContext;
+
+import org.eclipse.emf.ecore.EClass;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Eike Stepper
+ */
+public class CommitTransactionTask implements OptimizerTask
+{
+ protected final CDOBranchPoint branchPoint;
+
+ protected final long previousTimeStamp;
+
+ protected final String userID;
+
+ protected final String commitComment;
+
+ protected final InternalCDOPackageUnit[] newPackageUnits;
+
+ protected final InternalCDORevision[] newObjects;
+
+ protected final InternalCDORevisionDelta[] dirtyObjectDeltas;
+
+ protected final InternalCDORevision[] dirtyObjects;
+
+ protected final CDOID[] detachedObjects;
+
+ protected final Map<CDOID, EClass> detachedObjectTypes;
+
+ protected final CDOBranchVersion[] detachedObjectVersions;
+
+ protected final List<byte[]> lobs = new ArrayList<byte[]>();
+
+ private long newCommitPointer;
+
+ private long newPackageUnitPointer;
+
+ private Map<CDORevision, Long> newObjectPointers = new HashMap<CDORevision, Long>();
+
+ private InternalCDORevision[] detachedRevisions;
+
+ public CommitTransactionTask(InternalCommitContext context)
+ {
+ branchPoint = context.getBranchPoint();
+ previousTimeStamp = context.getPreviousTimeStamp();
+ userID = context.getUserID();
+ commitComment = context.getCommitComment();
+ newPackageUnits = context.getNewPackageUnits();
+ newObjects = context.getNewObjects();
+ dirtyObjectDeltas = context.getDirtyObjectDeltas();
+ dirtyObjects = context.getDirtyObjects();
+ detachedObjects = context.getDetachedObjects();
+ detachedObjectTypes = context.getDetachedObjectTypes();
+ detachedObjectVersions = context.getDetachedObjectVersions();
+ }
+
+ public CDOBranchPoint getBranchPoint()
+ {
+ return branchPoint;
+ }
+
+ public boolean isValid(CDOBranchPoint branchPoint)
+ {
+ long timeStamp = branchPoint.getTimeStamp();
+ if (timeStamp != CDOBranchPoint.UNSPECIFIED_DATE && timeStamp < this.branchPoint.getTimeStamp())
+ {
+ return false;
+ }
+
+ return branchPoint.getBranch() == this.branchPoint.getBranch();
+ }
+
+ public void setDetachedRevisions(InternalCDORevision[] detachedRevisions)
+ {
+ this.detachedRevisions = detachedRevisions;
+ }
+
+ public long getNewCommitPointer()
+ {
+ return newCommitPointer;
+ }
+
+ public void setNewCommitPointer(long newCommitPointer)
+ {
+ this.newCommitPointer = newCommitPointer;
+ }
+
+ public long getNewPackageUnitPointer()
+ {
+ return newPackageUnitPointer;
+ }
+
+ public Map<CDORevision, Long> getNewObjectPointers()
+ {
+ return newObjectPointers;
+ }
+
+ public List<byte[]> getLobs()
+ {
+ return lobs;
+ }
+
+ public CDOCommitInfo createCommitInfo(InternalCDOCommitInfoManager commitInfoManager)
+ {
+ CDOBranch branch = branchPoint.getBranch();
+ long timeStamp = branchPoint.getTimeStamp();
+ return commitInfoManager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, commitComment, null);
+ }
+
+ public void execute(Optimizer optimizer) throws IOException
+ {
+ LissomeStore store = optimizer.getStore();
+ IndexWriter indexWriter = store.getIndex().getWriter();
+ Vob vob = store.getVob();
+
+ indexWriter.addCommitInfo(branchPoint, newCommitPointer);
+
+ addObjects(indexWriter);
+ updateObjects(indexWriter, vob);
+ detachObjects(indexWriter, vob);
+
+ indexWriter.commit();
+ }
+
+ protected void addObjects(IndexWriter indexWriter)
+ {
+ if (newObjects.length != 0)
+ {
+ long[] pointers = new long[newObjects.length];
+ for (int i = 0; i < newObjects.length; i++)
+ {
+ InternalCDORevision revision = newObjects[i];
+ pointers[i] = -newObjectPointers.get(revision);
+ }
+
+ indexWriter.addObjects(newObjects, pointers);
+ }
+ }
+
+ protected void updateObjects(IndexWriter indexWriter, Vob vob)
+ {
+ if (dirtyObjects.length != 0)
+ {
+ long[] pointers = new long[dirtyObjects.length];
+ for (int i = 0; i < dirtyObjects.length; i++)
+ {
+ InternalCDORevision revision = dirtyObjects[i];
+ pointers[i] = vob.addRevision(revision);
+ }
+
+ indexWriter.updateObjects(dirtyObjects, pointers);
+ }
+ }
+
+ protected void detachObjects(IndexWriter indexWriter, Vob vob)
+ {
+ if (detachedObjects.length != 0)
+ {
+ long[] pointers = new long[detachedRevisions.length];
+ for (int i = 0; i < detachedRevisions.length; i++)
+ {
+ InternalCDORevision revision = detachedRevisions[i];
+ pointers[i] = vob.addRevision(revision);
+ }
+
+ indexWriter.detachObjects(branchPoint, detachedObjects, detachedRevisions, pointers);
+ }
+ }
+
+ public void cacheRevisions(CDORevisionCacheAdder cache)
+ {
+ for (int i = 0; i < newObjects.length; i++)
+ {
+ InternalCDORevision revision = newObjects[i];
+ cache.addRevision(revision);
+ }
+
+ for (int i = 0; i < dirtyObjects.length; i++)
+ {
+ InternalCDORevision revision = dirtyObjects[i];
+ cache.addRevision(revision);
+ }
+
+ for (int i = 0; i < detachedObjects.length; i++)
+ {
+ CDOID id = detachedObjects[i];
+ EClass eClass = detachedObjectTypes.get(id);
+ CDOBranchVersion branchVersion = detachedObjectVersions[i];
+ CDOBranch branch = branchVersion.getBranch();
+ int version = branchVersion.getVersion();
+ long timeStamp = branchPoint.getTimeStamp();
+
+ DetachedCDORevision revision = new DetachedCDORevision(eClass, id, branch, version, timeStamp);
+ cache.addRevision(revision);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/CreateBranchTask.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/CreateBranchTask.java
new file mode 100644
index 0000000000..1671a54f75
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/CreateBranchTask.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.optimizer;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.server.internal.lissome.db.IndexWriter;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class CreateBranchTask implements OptimizerTask
+{
+ private int branchID;
+
+ private String name;
+
+ private CDOBranchPoint base;
+
+ private long pointer;
+
+ public CreateBranchTask(int branchID, String name, CDOBranchPoint base, long pointer)
+ {
+ this.branchID = branchID;
+ this.name = name;
+ this.base = base;
+ this.pointer = pointer;
+ }
+
+ public int getBranchID()
+ {
+ return branchID;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public CDOBranchPoint getBase()
+ {
+ return base;
+ }
+
+ public long getPointer()
+ {
+ return pointer;
+ }
+
+ public void execute(Optimizer optimizer) throws IOException
+ {
+ IndexWriter indexWriter = optimizer.getStore().getIndex().getWriter();
+ indexWriter.createBranch(branchID, name, base, pointer);
+ indexWriter.commit();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/Optimizer.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/Optimizer.java
new file mode 100644
index 0000000000..4b41d96793
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/Optimizer.java
@@ -0,0 +1,328 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.optimizer;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.branch.CDOBranchVersion;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.common.revision.CDORevisionCache;
+import org.eclipse.emf.cdo.common.revision.CDORevisionCacheAdder;
+import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
+import org.eclipse.emf.cdo.common.revision.CDORevisionUtil;
+import org.eclipse.emf.cdo.eresource.EresourcePackage;
+import org.eclipse.emf.cdo.server.IStoreAccessor;
+import org.eclipse.emf.cdo.server.IStoreAccessor.QueryResourcesContext;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeStore;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionCache;
+
+import org.eclipse.net4j.util.ObjectUtil;
+import org.eclipse.net4j.util.concurrent.Worker;
+import org.eclipse.net4j.util.io.IORuntimeException;
+import org.eclipse.net4j.util.lifecycle.Lifecycle;
+
+import org.eclipse.emf.ecore.EClass;
+
+import java.io.IOException;
+import java.util.LinkedList;
+
+/**
+ * @author Eike Stepper
+ */
+public class Optimizer extends Lifecycle
+{
+ private final LissomeStore store;
+
+ private final boolean async;
+
+ private final LinkedList<OptimizerTask> queue = new LinkedList<OptimizerTask>();
+
+ private Worker worker;
+
+ private Cache cache;
+
+ public Optimizer(LissomeStore store, boolean async)
+ {
+ this.store = store;
+ this.async = async;
+ }
+
+ public LissomeStore getStore()
+ {
+ return store;
+ }
+
+ public boolean isAsync()
+ {
+ return async;
+ }
+
+ public OptimizerTask[] getTasks()
+ {
+ return getCache().getTasks();
+ }
+
+ public void addTask(OptimizerTask task)
+ {
+ synchronized (queue)
+ {
+ cache = null;
+ queue.addLast(task);
+ queue.notifyAll();
+ }
+
+ if (!async)
+ {
+ try
+ {
+ executeFirstTask();
+ }
+ catch (InterruptedException ignore)
+ {
+ // Can not happen
+ }
+ }
+ }
+
+ protected void executeFirstTask() throws InterruptedException
+ {
+ try
+ {
+ OptimizerTask task = getFirstTask();
+ task.execute(this);
+ removeFirstTask();
+ }
+ catch (InterruptedException ex)
+ {
+ throw ex;
+ }
+ catch (IOException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
+ }
+
+ protected OptimizerTask getFirstTask() throws InterruptedException
+ {
+ OptimizerTask task;
+ synchronized (queue)
+ {
+ while (queue.isEmpty())
+ {
+ queue.wait(100);
+ }
+
+ task = queue.getFirst();
+ }
+
+ return task;
+ }
+
+ protected void removeFirstTask()
+ {
+ synchronized (queue)
+ {
+ cache = null;
+ queue.removeFirst();
+ queue.notifyAll();
+ }
+ }
+
+ @Override
+ protected void doActivate() throws Exception
+ {
+ super.doActivate();
+ if (async)
+ {
+ worker = new TaskWorker();
+ worker.activate();
+ }
+ }
+
+ @Override
+ protected void doDeactivate() throws Exception
+ {
+ synchronized (queue)
+ {
+ while (!queue.isEmpty())
+ {
+ queue.wait(100);
+ }
+ }
+
+ if (async)
+ {
+ worker.deactivate();
+ worker = null;
+ }
+
+ super.doDeactivate();
+ }
+
+ protected Cache getCache()
+ {
+ synchronized (queue)
+ {
+ if (cache == null)
+ {
+ boolean supportingBranches = store.getRepository().isSupportingBranches();
+ cache = new Cache(queue, supportingBranches);
+ }
+
+ return cache;
+ }
+ }
+
+ public boolean queryResources(IStoreAccessor.QueryResourcesContext context)
+ {
+ Cache cache = getCache();
+ return cache.queryResources(context);
+ }
+
+ public InternalCDORevision readRevision(CDOID id, CDOBranchPoint branchPoint)
+ {
+ Cache cache = getCache();
+ return cache.readRevision(id, branchPoint);
+ }
+
+ public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime,
+ CDORevisionHandler handler)
+ {
+ // TODO: implement Optimizer.handleRevisions(eClass, branch, timeStamp, exactTime, handler)
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ private final class TaskWorker extends Worker
+ {
+ @Override
+ protected String getThreadName()
+ {
+ return "OptimizerTaskWorker";
+ }
+
+ @Override
+ protected void work(WorkContext context) throws Exception
+ {
+ executeFirstTask();
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ private static final class Cache
+ {
+ private final OptimizerTask[] tasks;
+
+ private final boolean supportingBranches;
+
+ private CDORevisionCache revisionCache;
+
+ public Cache(LinkedList<OptimizerTask> queue, boolean supportingBranches)
+ {
+ this.supportingBranches = supportingBranches;
+ tasks = queue.toArray(new OptimizerTask[queue.size()]);
+ }
+
+ public OptimizerTask[] getTasks()
+ {
+ return tasks;
+ }
+
+ public synchronized CDORevisionCache getRevisionCache()
+ {
+ if (revisionCache == null)
+ {
+ revisionCache = CDORevisionUtil.createRevisionCache(true, supportingBranches);
+
+ CDORevisionCacheAdder adder = new CDORevisionCacheAdder()
+ {
+ public void addRevision(CDORevision revision)
+ {
+ reviseOldRevision(revision);
+ revisionCache.addRevision(revision);
+ }
+
+ private void reviseOldRevision(CDORevision revision)
+ {
+ int version = revision.getVersion();
+ if (version > CDOBranchVersion.FIRST_VERSION)
+ {
+ CDOID id = revision.getID();
+ CDOBranchVersion oldVersion = revision.getBranch().getVersion(version - 1);
+ InternalCDORevision oldRevision = (InternalCDORevision)revisionCache.getRevisionByVersion(id, oldVersion);
+ if (oldRevision != null)
+ {
+ oldRevision.setRevised(revision.getTimeStamp() - 1);
+ }
+ }
+ }
+ };
+
+ for (OptimizerTask task : tasks)
+ {
+ if (task instanceof CommitTransactionTask)
+ {
+ CommitTransactionTask commitTask = (CommitTransactionTask)task;
+ commitTask.cacheRevisions(adder);
+ }
+ }
+ }
+
+ return revisionCache;
+ }
+
+ public boolean queryResources(QueryResourcesContext context)
+ {
+ InternalCDORevisionCache revisionCache = (InternalCDORevisionCache)getRevisionCache();
+ for (CDORevision revision : revisionCache.getRevisions(context))
+ {
+ if (!revision.isResourceNode())
+ {
+ continue;
+ }
+
+ CDOID folderID = (CDOID)revision.data().getContainerID();
+ if (!ObjectUtil.equals(folderID, context.getFolderID()))
+ {
+ continue;
+ }
+
+ String name = context.getName();
+ String revisionName = (String)revision.data().get(EresourcePackage.Literals.CDO_RESOURCE_NODE__NAME, 0);
+ boolean useEquals = context.exactMatch() || revisionName == null || name == null;
+ boolean match = useEquals ? ObjectUtil.equals(revisionName, name) : revisionName.startsWith(name);
+ if (!match)
+ {
+ continue;
+ }
+
+ if (!context.addResource(revision.getID()))
+ {
+ // No more results allowed
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public InternalCDORevision readRevision(CDOID id, CDOBranchPoint branchPoint)
+ {
+ CDORevisionCache revisionCache = getRevisionCache();
+ return (InternalCDORevision)revisionCache.getRevision(id, branchPoint);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/OptimizerTask.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/OptimizerTask.java
new file mode 100644
index 0000000000..861139772a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/OptimizerTask.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.lissome.optimizer;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public interface OptimizerTask
+{
+ public void execute(Optimizer optimizer) throws IOException;
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/ILissomeStore.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/ILissomeStore.java
new file mode 100644
index 0000000000..b5d1c716e5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/ILissomeStore.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ * Stefan Winkler - 271444: [DB] Multiple refactorings
+ * Stefan Winkler - 249610: [DB] Support external references (Implementation)
+ */
+package org.eclipse.emf.cdo.server.lissome;
+
+import org.eclipse.emf.cdo.server.IRepository;
+import org.eclipse.emf.cdo.server.ISession;
+import org.eclipse.emf.cdo.server.IStore;
+import org.eclipse.emf.cdo.server.IStore.CanHandleClientAssignedIDs;
+import org.eclipse.emf.cdo.server.ITransaction;
+
+/**
+ * The main entry point to the API of CDO's proprietary Lissome store.
+ *
+ * @author Eike Stepper
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ILissomeStore extends IStore, CanHandleClientAssignedIDs
+{
+ public ILissomeStoreAccessor getReader(ISession session);
+
+ public ILissomeStoreAccessor getWriter(ITransaction transaction);
+
+ /**
+ * Contains symbolic constants that specifiy valid keys of {@link IRepository#getProperties() Lissome store properties}.
+ *
+ * @author Eike Stepper
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+ public interface Props
+ {
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/ILissomeStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/ILissomeStoreAccessor.java
new file mode 100644
index 0000000000..efd71dd80d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/ILissomeStoreAccessor.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.lissome;
+
+import org.eclipse.emf.cdo.server.IStoreAccessor;
+
+/**
+ * A {@link IStoreAccessor store accessor} for CDO's proprietary Lissome store.
+ *
+ * @author Eike Stepper
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ILissomeStoreAccessor extends IStoreAccessor, IStoreAccessor.DurableLocking2
+{
+ public ILissomeStore getStore();
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/ILissomeStoreChunkReader.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/ILissomeStoreChunkReader.java
new file mode 100644
index 0000000000..3bcb7957d1
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/ILissomeStoreChunkReader.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.lissome;
+
+import org.eclipse.emf.cdo.server.IStoreChunkReader;
+
+/**
+ * A {@link IStoreChunkReader chunk reader} for CDO's proprietary object/relational mapper.
+ *
+ * @author Eike Stepper
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ILissomeStoreChunkReader extends IStoreChunkReader
+{
+ /**
+ * @since 2.0
+ */
+ public ILissomeStoreAccessor getAccessor();
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/LissomeStoreUtil.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/LissomeStoreUtil.java
new file mode 100644
index 0000000000..daacc2d5f0
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/LissomeStoreUtil.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ * Stefan Winkler - 271444: [DB] Multiple refactorings
+ * Stefan Winkler - 249610: [DB] Support external references (Implementation)
+ */
+package org.eclipse.emf.cdo.server.lissome;
+
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeBrowserPage;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeStore;
+
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import java.io.File;
+
+/**
+ * Various static methods that may help in setting up and dealing with {@link ILissomeStore Lissome stores}.
+ *
+ * @author Eike Stepper
+ */
+public final class LissomeStoreUtil
+{
+ private LissomeStoreUtil()
+ {
+ }
+
+ public static void prepareContainer(IManagedContainer container)
+ {
+ container.registerFactory(new LissomeBrowserPage.Factory());
+ }
+
+ public static ILissomeStore createStore(File folder)
+ {
+ LissomeStore store = new LissomeStore();
+ store.setFolder(folder);
+ return store;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/package-info.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/package-info.java
new file mode 100644
index 0000000000..2869c2a2c9
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/lissome/package-info.java
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+
+/**
+ * Server concepts for dealing with DB stores and accessors.
+ */
+package org.eclipse.emf.cdo.server.lissome;
+
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/.classpath b/plugins/org.eclipse.emf.cdo.tests.lissome/.classpath
new file mode 100644
index 0000000000..64c5e31b7a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <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.lissome/.options b/plugins/org.eclipse.emf.cdo.tests.lissome/.options
new file mode 100644
index 0000000000..405e22dac5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/.options
@@ -0,0 +1,3 @@
+# Debugging and tracing options
+
+org.eclipse.emf.cdo.tests.lissome/debug = true
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/.project b/plugins/org.eclipse.emf.cdo.tests.lissome/.project
new file mode 100644
index 0000000000..7d4a11a1a6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.cdo.tests.lissome</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.emf.cdo.releng.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.emf.cdo.releng/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.emf.cdo.releng.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000000..86eb2cd556
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..0d634b9519
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,382 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+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.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+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=error
+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.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=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=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+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=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+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.unusedObjectAllocation=ignore
+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.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,PERF,MEM,POLISH,@generated NOT,@ADDED
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=2
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=2
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..4343e2f963
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,119 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=false
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=true
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=true
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_EMFT
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_EMFT
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=ex
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=org.eclipse.emf.cdo;org.eclipse.emf.internal.cdo;org.eclipse.net4j;org.eclipse.internal.net4j;org.eclipse.emf;org.eclipse;com;org;javax;java;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * Eike Stepper - initial API and implementation\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Eike Stepper\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=true
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=true
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.ltk.core.refactoring.prefs b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000000..864e30fe5d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.mylyn.tasks.ui.prefs b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000000..b050639a54
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.mylyn.team.ui.prefs b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000000..2f50f36c0c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+commit.comment.template=[${task.id}] ${task.description} \r\n${task.url}
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.pde.api.tools.prefs b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000000..f8d0a0660e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Thu Feb 04 09:44:24 CET 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Ignore
+automatically_removed_unused_problem_filters=Disabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..c6b96bb45e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,31 @@
+#Thu Feb 04 09:44:24 CET 2010
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=1
+compilers.p.missing-version-import-package=1
+compilers.p.missing-version-require-bundle=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests.lissome/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..82798d2520
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.emf.cdo.tests.lissome;singleton:=true
+Bundle-Version: 4.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-ActivationPolicy: lazy
+Bundle-Activator: org.eclipse.emf.cdo.tests.lissome.bundle.OM$Activator
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ClassPath: .
+Require-Bundle: org.eclipse.emf.cdo.tests;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.emf.cdo.server.lissome;bundle-version="[4.2.0,5.0.0)"
+Export-Package: org.eclipse.emf.cdo.tests.lissome;version="4.2.0",
+ org.eclipse.emf.cdo.tests.lissome.bundle;version="4.2.0";x-internal:=true
+Import-Package: org.h2.jdbcx;version="[1.0.0,2.0.0)"
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/about.html b/plugins/org.eclipse.emf.cdo.tests.lissome/about.html
new file mode 100644
index 0000000000..d35d5aed64
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/build.properties b/plugins/org.eclipse.emf.cdo.tests.lissome/build.properties
new file mode 100644
index 0000000000..d5220f60b6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/build.properties
@@ -0,0 +1,24 @@
+# Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+# 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:
+# Eike Stepper - initial API and implementation
+
+bin.includes = .,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ copyright.txt,\
+ about.html,\
+ .options
+jars.compile.order = .
+source.. = src/
+output.. = bin/
+src.includes = about.html,\
+ copyright.txt,\
+ launches/
+
+generateSourceReferences = true
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/copyright.txt b/plugins/org.eclipse.emf.cdo.tests.lissome/copyright.txt
new file mode 100644
index 0000000000..0a0f67e6d7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/copyright.txt
@@ -0,0 +1,8 @@
+Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+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:
+ Eike Stepper - initial API and implementation \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/launches/CDO AllTests (Lissome).launch b/plugins/org.eclipse.emf.cdo.tests.lissome/launches/CDO AllTests (Lissome).launch
new file mode 100644
index 0000000000..6378f4c659
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/launches/CDO AllTests (Lissome).launch
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.emf.cdo.tests.lissome/src/org/eclipse/emf/cdo/tests/lissome/AllTestsLissome.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.lissome.AllTestsLissome"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.cdo.tests.lissome"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx4g&#13;&#10;-Dorg.eclipse.net4j.util.om.trace.disable=true&#13;&#10;-Dorg.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.enableServerBrowser=false"/>
+</launchConfiguration>
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/plugin.properties b/plugins/org.eclipse.emf.cdo.tests.lissome/plugin.properties
new file mode 100644
index 0000000000..66c1c1ecf9
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/plugin.properties
@@ -0,0 +1,11 @@
+# Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+# 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:
+# Eike Stepper - initial API and implementation
+
+pluginName = CDO Model Repository Tests
+providerName = Eclipse Modeling Project
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/plugin.xml b/plugins/org.eclipse.emf.cdo.tests.lissome/plugin.xml
new file mode 100644
index 0000000000..6541a5c5bf
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/plugin.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ 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:
+ Eike Stepper - initial API and implementation
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.fernuni-hagen.de/ST/dummy/base.ecore"
+ class = "base.BasePackage"
+ genModel = "model/base.genmodel" />
+ <package
+ class="derived.DerivedPackage"
+ genModel="model/derived.genmodel"
+ uri="http://www.fernuni-hagen.de/ST/dummy/derived.ecore">
+ </package>
+ <package
+ class="reference.ReferencePackage"
+ genModel="model/reference.genmodel"
+ uri="uuid://reference">
+ </package>
+ <package
+ class="interface_.InterfacePackage"
+ genModel="model/interface.genmodel"
+ uri="uuid://interface">
+ </package>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/src/org/eclipse/emf/cdo/tests/lissome/AllTestsLissome.java b/plugins/org.eclipse.emf.cdo.tests.lissome/src/org/eclipse/emf/cdo/tests/lissome/AllTestsLissome.java
new file mode 100644
index 0000000000..937d2c389e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/src/org/eclipse/emf/cdo/tests/lissome/AllTestsLissome.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.lissome;
+
+import org.eclipse.emf.cdo.tests.AllConfigs;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Eike Stepper
+ */
+public class AllTestsLissome extends AllConfigs
+{
+ public static Test suite()
+ {
+ return new AllTestsLissome().getTestSuite(AllConfigs.class.getName());
+ }
+
+ @Override
+ protected void initConfigSuites(TestSuite parent)
+ {
+ addScenario(parent, COMBINED, LissomeConfig.INSTANCE, JVM, NATIVE);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/src/org/eclipse/emf/cdo/tests/lissome/LissomeConfig.java b/plugins/org.eclipse.emf.cdo.tests.lissome/src/org/eclipse/emf/cdo/tests/lissome/LissomeConfig.java
new file mode 100644
index 0000000000..ef52d8ad70
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/src/org/eclipse/emf/cdo/tests/lissome/LissomeConfig.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.lissome;
+
+import org.eclipse.emf.cdo.common.CDOCommonRepository.IDGenerationLocation;
+import org.eclipse.emf.cdo.server.IStore;
+import org.eclipse.emf.cdo.server.internal.lissome.LissomeStore;
+import org.eclipse.emf.cdo.server.internal.lissome.db.DBBrowserPage;
+import org.eclipse.emf.cdo.server.internal.lissome.db.Index;
+import org.eclipse.emf.cdo.server.internal.lissome.file.Journal;
+import org.eclipse.emf.cdo.server.internal.lissome.file.Vob;
+import org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig;
+
+import org.eclipse.net4j.db.DBUtil;
+import org.eclipse.net4j.util.container.IPluginContainer;
+import org.eclipse.net4j.util.io.IOUtil;
+
+import javax.sql.DataSource;
+
+import java.io.File;
+
+/**
+ * @author Eike Stepper
+ */
+public class LissomeConfig extends RepositoryConfig
+{
+ public static final RepositoryConfig INSTANCE = new LissomeConfig(IDGenerationLocation.STORE);
+
+ public static final String STORE_NAME = "Lissome";
+
+ private static final long serialVersionUID = 1L;
+
+ private static File reusableFolder;
+
+ public LissomeConfig(IDGenerationLocation idGenerationLocation)
+ {
+ super(STORE_NAME, true, true, idGenerationLocation);
+ }
+
+ @Override
+ protected String getStoreName()
+ {
+ return STORE_NAME;
+ }
+
+ @Override
+ protected boolean isOptimizing()
+ {
+ return true;
+ }
+
+ @Override
+ public boolean isRestartable()
+ {
+ return true;
+ }
+
+ public IStore createStore(String repoName)
+ {
+ if (reusableFolder == null)
+ {
+ reusableFolder = getCurrentTest().createTempFolder("lissome_", "_test");
+ IOUtil.delete(reusableFolder);
+ }
+
+ IOUtil.ERR().println("Lissome folder: " + reusableFolder);
+
+ boolean dropIfExists = !isRestarting();
+ DataSource dataSource = Index.createDataSource(reusableFolder, repoName, null);
+ DBUtil.createSchema(dataSource, repoName, dropIfExists);
+
+ if (dropIfExists)
+ {
+ new File(reusableFolder, repoName + "." + LissomeStore.PERSISTENT_PROPERTIES_EXTENSION).delete();
+ new File(reusableFolder, repoName + "." + Journal.EXTENSION).delete();
+ new File(reusableFolder, repoName + "." + Vob.EXTENSION).delete();
+ }
+
+ LissomeStore store = new LissomeStore();
+ store.setFolder(reusableFolder);
+ return store;
+ }
+
+ @Override
+ public void setUp() throws Exception
+ {
+ IPluginContainer.INSTANCE.registerFactory(new DBBrowserPage.Factory());
+ super.setUp();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests.lissome/src/org/eclipse/emf/cdo/tests/lissome/bundle/OM.java b/plugins/org.eclipse.emf.cdo.tests.lissome/src/org/eclipse/emf/cdo/tests/lissome/bundle/OM.java
new file mode 100644
index 0000000000..93ebb6bbdd
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.lissome/src/org/eclipse/emf/cdo/tests/lissome/bundle/OM.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.lissome.bundle;
+
+import org.eclipse.net4j.util.om.OMBundle;
+import org.eclipse.net4j.util.om.OMPlatform;
+import org.eclipse.net4j.util.om.OSGiActivator;
+import org.eclipse.net4j.util.om.log.OMLogger;
+import org.eclipse.net4j.util.om.trace.OMTracer;
+
+/**
+ * The <em>Operations & Maintenance</em> class of this bundle.
+ *
+ * @author Eike Stepper
+ */
+public abstract class OM
+{
+ public static final String BUNDLE_ID = "org.eclipse.emf.cdo.tests"; //$NON-NLS-1$
+
+ public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
+
+ public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
+
+ public static final OMLogger LOG = BUNDLE.logger();
+
+ /**
+ * @author Eike Stepper
+ */
+ public static final class Activator extends OSGiActivator
+ {
+ public Activator()
+ {
+ super(BUNDLE);
+ }
+ }
+}

Back to the top