Author: vyemialyanchyk
Date: 2010-03-29 12:32:11 -0400 (Mon, 29 Mar 2010)
New Revision: 21119
Added:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/.settings/org.eclipse.pde.core.prefs
Removed:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleQueryParameter.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeDelegatingDriver.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeTransactionManagerLookup.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryInputModel.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/AbstractTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/AnyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ArrayStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/BagStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/Cfg2HbmToolStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ClassMetadataStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/CollectionMetadataStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/CollectionStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/CollectionTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ColumnStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ComponentStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStubFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStubJDBCMetaData.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConnectionProviderStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DefaultDatabaseCollectorStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DependantValueStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DialectStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EntityModeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EntityTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EnvironmentStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/FetchModeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ForeignKeyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HQLCompletionProposalStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HibernateConsoleRuntimeException.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HibernateStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HqlSqlTokenTypesStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IHQLCodeAssistStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IHQLCompletionRequestorStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IdentifierBagStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IdentifierCollectionStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ImmutableTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IndexedCollectionStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IntegerTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JDBCReaderStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JoinStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JoinedSubclassStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/KeyValueStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ListStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ManyToOneStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/MapStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/MappingStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/MappingsStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/NamingStrategyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/NullableTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/OneToManyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/OneToOneStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PersistentClassStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PersistentClassStubFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PrimaryKeyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PrimitiveArrayStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PrimitiveTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PropertyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/RootClassStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SessionStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SessionStubFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SetStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SettingsStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SimpleValueStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SingleTableSubclassStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SubclassStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TableIdentifierStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TableStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ToOneStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TypeStubFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ValueStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ValueStubFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ValueVisitorStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/mapping/
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/CurrentContext.java
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/.classpath
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/build.properties
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfigClassLoader.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleMessages.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPage.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPageModel.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/BaseNode.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/IdentifierNode.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PropertyNode.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ProxyFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TableNode.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TypeNode.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginFileAppender.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogAppender.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogListener.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6070 - update
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/.classpath
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/.classpath 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/.classpath 2010-03-29
16:32:11 UTC (rev 21119)
@@ -3,42 +3,6 @@
<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 exported="true" kind="lib"
path="lib/hibernate/asm.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/asm-attrs.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/dom4j-1.6.1.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/jboss-cache.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/jboss-common.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/jboss-jmx.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/jboss-system.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/jdbc2_0-stdext.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/jta.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/jaas.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/oscache-2.1.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/proxool-0.8.3.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/swarmcache-1.0rc2.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/bsh-core-2.0b4.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/annotations/hibernate-annotations.jar"
sourcepath="D:/Temp/_hibernate/hibernate-annotations-3.4.0.GA-sources.jar
"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/jgroups-2.2.8.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/antlr-2.7.6.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/annotations/hibernate-entitymanager.jar"
sourcepath="D:/Temp/_hibernate/hibernate-entitymanager-3.4.0.GA-sources.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/javassist.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/annotations/hibernate-validator.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/log4j-1.2.15.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/hibernate-jmx.jar"
sourcepath="D:/Temp/_hibernate/hibernate-jmx-3.3.2.GA-sources.jar "/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/commons-collections-3.1.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/slf4j-api-1.5.8.jar"
sourcepath="D:/Temp/_hibernate/slf4j-api-1.5.8-sources.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/cglib-2.2.jar"
sourcepath="D:/Temp/_hibernate/cglib-src-2.2.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/annotations/hibernate-commons-annotations.jar"
sourcepath="D:/Temp/_hibernate/hibernate-commons-annotations-3.1.0.GA-sources.jar
"/>
- <classpathentry exported="true" kind="lib"
path="lib/annotations/ejb3-persistence.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/c3p0-0.9.1.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/commons-logging-1.0.4.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/concurrent-1.3.2.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/connector.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/ehcache-1.2.3.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/slf4j-log4j12-1.5.8.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/tools/freemarker.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/tools/hibernate-tools.jar"
sourcepath="C:/RHDS/hibernate/branches/Branch_3_2/HibernateExt_without_changes"/>
- <classpathentry exported="true" kind="lib"
path="lib/tools/jtidy-r8-20060801.jar"/>
- <classpathentry kind="lib" path="lib/hibernate/hibernate3.jar"
sourcepath="D:/Temp/_hibernate/hibernate-core-3.3.2.GA-sources.jar "/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/org.hibernate.mediator"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Added:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/.settings/org.eclipse.pde.core.prefs
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/.settings/org.eclipse.pde.core.prefs
(rev 0)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/.settings/org.eclipse.pde.core.prefs 2010-03-29
16:32:11 UTC (rev 21119)
@@ -0,0 +1,3 @@
+#Mon Mar 29 16:19:25 EEST 2010
+eclipse.preferences.version=1
+resolve.requirebundle=false
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2010-03-29
16:32:11 UTC (rev 21119)
@@ -3,448 +3,24 @@
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.hibernate.eclipse
Bundle-Version: 3.3.0.qualifier
-Bundle-ClassPath: org.hibernate.eclipse.jar,
- lib/hibernate/asm.jar,
- lib/hibernate/asm-attrs.jar,
- lib/hibernate/commons-collections-2.1.1.jar,
- lib/hibernate/commons-logging-1.0.4.jar,
- lib/hibernate/concurrent-1.3.2.jar,
- lib/hibernate/connector.jar,
- lib/hibernate/dom4j-1.6.1.jar,
- lib/hibernate/hibernate3.jar,
- lib/hibernate/jboss-cache.jar,
- lib/hibernate/jboss-common.jar,
- lib/hibernate/jboss-jmx.jar,
- lib/hibernate/jboss-system.jar,
- lib/hibernate/jdbc2_0-stdext.jar,
- lib/hibernate/jta.jar,
- lib/hibernate/jaas.jar,
- lib/hibernate/oscache-2.1.jar,
- lib/hibernate/proxool-0.8.3.jar,
- lib/hibernate/swarmcache-1.0rc2.jar,
- lib/tools/hibernate-tools.jar,
- lib/tools/bsh-2.0b1.jar,
- lib/tools/freemarker.jar,
- lib/bsh-core-2.0b4.jar,
- lib/annotations/ejb3-persistence.jar,
- lib/annotations/hibernate-annotations.jar,
- lib/hibernate/cglib-2.1.3.jar,
- lib/hibernate/jgroups-2.2.8.jar,
- lib/hibernate/antlr-2.7.6.jar,
- lib/tools/jtidy-r8-20060801.jar,
- lib/annotations/hibernate-entitymanager.jar,
- lib/hibernate/javassist.jar,
- lib/hibernate/ehcache-1.2.3.jar,
- lib/hibernate/c3p0-0.9.1.jar,
- lib/annotations/hibernate-commons-annotations.jar,
- lib/annotations/hibernate-validator.jar,
- lib/annotations/hibernate-search.jar,
- lib/annotations/lucene-core-2.2.0.jar,
- lib/hibernate/log4j-1.2.15.jar,
- lib/hibernate/cglib-2.2.jar,
- lib/hibernate/commons-collections-3.1.jar,
- lib/hibernate/hibernate-jmx.jar,
- lib/hibernate/slf4j-api-1.5.8.jar,
- lib/hibernate/slf4j-log4j12-1.5.8.jar
+Bundle-ClassPath: org.hibernate.eclipse.jar
Bundle-Activator: org.hibernate.eclipse.HibernatePlugin
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
-Export-Package: EDU.oswego.cs.dl.util.concurrent,
- antlr,
- antlr.ASdebug,
- antlr.actions.cpp,
- antlr.actions.csharp,
- antlr.actions.java,
- antlr.actions.python,
- antlr.build,
- antlr.collections,
- antlr.collections.impl,
- antlr.debug,
- antlr.debug.misc,
- antlr.preprocessor,
- bsh,
- com.mchange,
- com.mchange.lang,
- com.mchange.util,
- com.mchange.v1,
- com.mchange.v1.db,
- com.mchange.v1.db.sql,
- com.mchange.v1.identicator,
- com.mchange.v1.io,
- com.mchange.v1.lang,
- com.mchange.v1.util,
- com.mchange.v1.xml,
- com.mchange.v2,
- com.mchange.v2.async,
- com.mchange.v2.beans,
- com.mchange.v2.c3p0,
- com.mchange.v2.c3p0.cfg,
- com.mchange.v2.c3p0.filter,
- com.mchange.v2.c3p0.impl,
- com.mchange.v2.c3p0.jboss,
- com.mchange.v2.c3p0.management,
- com.mchange.v2.c3p0.mbean,
- com.mchange.v2.c3p0.stmt,
- com.mchange.v2.c3p0.subst,
- com.mchange.v2.c3p0.util,
- com.mchange.v2.cfg,
- com.mchange.v2.cfg.junit,
- com.mchange.v2.coalesce,
- com.mchange.v2.codegen,
- com.mchange.v2.codegen.bean,
- com.mchange.v2.codegen.intfc,
- com.mchange.v2.debug,
- com.mchange.v2.encounter,
- com.mchange.v2.holders,
- com.mchange.v2.io,
- com.mchange.v2.lang,
- com.mchange.v2.log,
- com.mchange.v2.log.jdk14logging,
- com.mchange.v2.log.log4j,
- com.mchange.v2.management,
- com.mchange.v2.naming,
- com.mchange.v2.resourcepool,
- com.mchange.v2.ser,
- com.mchange.v2.sql,
- com.mchange.v2.sql.filter,
- com.mchange.v2.util,
- com.opensymphony.oscache.base,
- com.opensymphony.oscache.base.algorithm,
- com.opensymphony.oscache.base.events,
- com.opensymphony.oscache.base.persistence,
- com.opensymphony.oscache.extra,
- com.opensymphony.oscache.general,
- com.opensymphony.oscache.plugins.clustersupport,
- com.opensymphony.oscache.plugins.diskpersistence,
- com.opensymphony.oscache.util,
- com.opensymphony.oscache.web,
- com.opensymphony.oscache.web.filter,
- com.opensymphony.oscache.web.tag,
- com.sun.security.auth,
- com.sun.security.auth.login,
- dao,
- doc,
- doc.entities,
- doc.tables,
- dot,
- dtd,
- freemarker,
- freemarker.cache,
- freemarker.core,
- freemarker.debug,
- freemarker.debug.impl,
- freemarker.ext.ant,
- freemarker.ext.beans,
- freemarker.ext.dom,
- freemarker.ext.jdom,
- freemarker.ext.jsp,
- freemarker.ext.jython,
- freemarker.ext.rhino,
- freemarker.ext.servlet,
- freemarker.ext.util,
- freemarker.ext.xml,
- freemarker.log,
- freemarker.template,
- freemarker.template.utility,
- hbm,
- javassist,
- javassist.bytecode,
- javassist.bytecode.analysis,
- javassist.bytecode.annotation,
- javassist.bytecode.stackmap,
- javassist.compiler,
- javassist.compiler.ast,
- javassist.convert,
- javassist.expr,
- javassist.runtime,
- javassist.scopedpool,
- javassist.tools,
- javassist.tools.reflect,
- javassist.tools.rmi,
- javassist.tools.web,
- javassist.util,
- javassist.util.proxy,
- javax.management,
- javax.management.loading,
- javax.management.modelmbean,
- javax.management.monitor,
- javax.management.openmbean,
- javax.management.relation,
- javax.management.timer,
- javax.persistence,
- javax.persistence.spi,
- javax.resource,
- javax.resource.cci,
- javax.resource.spi,
- javax.resource.spi.security,
- javax.security.auth,
- javax.security.auth.callback,
- javax.security.auth.login,
- javax.security.auth.spi,
- javax.sql,
- javax.transaction,
- javax.transaction.xa,
- lint,
- net.sf.cglib.beans,
- net.sf.cglib.core,
- net.sf.cglib.proxy,
- net.sf.cglib.reflect,
- net.sf.cglib.transform,
- net.sf.cglib.transform.impl,
- net.sf.cglib.util,
- net.sf.ehcache,
- net.sf.ehcache.bootstrap,
- net.sf.ehcache.config,
- net.sf.ehcache.constructs.asynchronous,
- net.sf.ehcache.constructs.blocking,
- net.sf.ehcache.constructs.concurrent,
- net.sf.ehcache.constructs.web,
- net.sf.ehcache.constructs.web.filter,
- net.sf.ehcache.distribution,
- net.sf.ehcache.event,
- net.sf.ehcache.hibernate,
- net.sf.ehcache.store,
- net.sf.ehcache.util,
- net.sf.swarmcache,
- org.apache.commons.collections,
- org.apache.commons.collections.bag,
- org.apache.commons.collections.bidimap,
- org.apache.commons.collections.buffer,
- org.apache.commons.collections.collection,
- org.apache.commons.collections.comparators,
- org.apache.commons.collections.functors,
- org.apache.commons.collections.iterators,
- org.apache.commons.collections.keyvalue,
- org.apache.commons.collections.list,
- org.apache.commons.collections.map,
- org.apache.commons.collections.set,
- org.apache.commons.logging,
- org.apache.commons.logging.impl,
- org.apache.log4j,
- org.apache.log4j.chainsaw,
- org.apache.log4j.config,
- org.apache.log4j.helpers,
- org.apache.log4j.jdbc,
- org.apache.log4j.jmx,
- org.apache.log4j.lf5,
- org.apache.log4j.lf5.config,
- org.apache.log4j.lf5.util,
- org.apache.log4j.lf5.viewer,
- org.apache.log4j.lf5.viewer.categoryexplorer,
- org.apache.log4j.lf5.viewer.configure,
- org.apache.log4j.lf5.viewer.images,
-
org.apache.log4j.net,
- org.apache.log4j.nt,
- org.apache.log4j.or,
- org.apache.log4j.or.jms,
- org.apache.log4j.or.sax,
- org.apache.log4j.spi,
- org.apache.log4j.varia,
- org.apache.log4j.xml,
- org.apache.xerces.impl.xs,
- org.dom4j,
- org.dom4j.bean,
- org.dom4j.datatype,
- org.dom4j.dom,
- org.dom4j.dtd,
- org.dom4j.io,
- org.dom4j.jaxb,
- org.dom4j.rule,
- org.dom4j.rule.pattern,
- org.dom4j.swing,
- org.dom4j.tree,
- org.dom4j.util,
- org.dom4j.xpath,
- org.dom4j.xpp,
- org.hibernate,
- org.hibernate.annotations,
- org.hibernate.annotations.common,
- org.hibernate.annotations.common.annotationfactory,
- org.hibernate.annotations.common.reflection,
- org.hibernate.annotations.common.reflection.java,
- org.hibernate.annotations.common.reflection.java.generics,
- org.hibernate.annotations.common.util,
- org.hibernate.cfg,
- org.hibernate.cfg.annotations,
- org.hibernate.cfg.annotations.reflection,
- org.hibernate.cfg.reveng,
- org.hibernate.cfg.reveng.dialect,
- org.hibernate.cfg.search,
- org.hibernate.console,
- org.hibernate.console.execution,
+Export-Package: org.hibernate.console,
org.hibernate.console.node,
org.hibernate.console.preferences,
- org.hibernate.console.stubs,
- org.hibernate.console.stubs.util,
org.hibernate.eclipse,
org.hibernate.eclipse.launch,
org.hibernate.eclipse.logging,
- org.hibernate.eclipse.logging.xpl,
- org.hibernate.ejb,
- org.hibernate.ejb.connection,
- org.hibernate.ejb.event,
- org.hibernate.ejb.instrument,
- org.hibernate.ejb.packaging,
- org.hibernate.ejb.transaction,
- org.hibernate.ejb.util,
- org.hibernate.engine,
- org.hibernate.jmx,
- org.hibernate.mapping,
- org.hibernate.tool,
- org.hibernate.tool.ant,
- org.hibernate.tool.hbm2x,
- org.hibernate.tool.hbm2x.doc,
- org.hibernate.tool.hbm2x.pojo,
- org.hibernate.tool.hbm2x.visitor,
- org.hibernate.tool.hbmlint,
- org.hibernate.tool.hbmlint.detector,
- org.hibernate.tool.ide.completion,
- org.hibernate.tool.ide.formatting,
- org.hibernate.tool.stat,
- org.hibernate.type,
- org.hibernate.validator,
- org.hibernate.validator.event,
- org.hibernate.validator.interpolator,
- org.hibernate.validator.resources,
- org.jboss,
- org.jboss.cache,
- org.jboss.cache.aop,
- org.jboss.cache.aop.annotation,
- org.jboss.cache.aop.collection,
- org.jboss.cache.aop.eviction,
- org.jboss.cache.aop.interceptors,
- org.jboss.cache.aop.references,
- org.jboss.cache.aop.util,
- org.jboss.cache.buddyreplication,
- org.jboss.cache.config,
- org.jboss.cache.eviction,
- org.jboss.cache.factories,
- org.jboss.cache.interceptors,
- org.jboss.cache.loader,
- org.jboss.cache.loader.bdbje,
- org.jboss.cache.loader.jdbm,
- org.jboss.cache.loader.rmi,
- org.jboss.cache.loader.tcp,
- org.jboss.cache.lock,
- org.jboss.cache.marshall,
- org.jboss.cache.optimistic,
- org.jboss.cache.rpc,
- org.jboss.cache.statetransfer,
- org.jboss.cache.transaction,
- org.jboss.cache.util,
- org.jboss.cache.xml,
- org.jboss.deployment,
- org.jboss.deployment.cache,
- org.jboss.deployment.scanner,
- org.jboss.logging,
- org.jboss.logging.appender,
- org.jboss.logging.filter,
- org.jboss.logging.layout,
- org.jboss.logging.util,
- org.jboss.mx.capability,
- org.jboss.mx.interceptor,
- org.jboss.mx.loading,
- org.jboss.mx.metadata,
- org.jboss.mx.modelmbean,
- org.jboss.mx.notification,
- org.jboss.mx.persistence,
- org.jboss.mx.server,
- org.jboss.mx.server.registry,
- org.jboss.mx.service,
- org.jboss.mx.util,
- org.jboss.mx.util.propertyeditor,
- org.jboss.net.protocol,
- org.jboss.net.protocol.file,
- org.jboss.net.protocol.http,
- org.jboss.net.protocol.njar,
- org.jboss.net.protocol.resource,
- org.jboss.net.sockets,
- org.jboss.net.ssl,
- org.jboss.system,
- org.jboss.system.pm,
- org.jboss.system.server,
- org.jboss.util,
- org.jboss.util.coerce,
- org.jboss.util.collection,
- org.jboss.util.deadlock,
- org.jboss.util.file,
- org.jboss.util.id,
- org.jboss.util.loading,
- org.jboss.util.platform,
- org.jboss.util.property,
- org.jboss.util.property.jmx,
- org.jboss.util.propertyeditor,
- org.jboss.util.state,
- org.jboss.util.state.xml,
- org.jboss.util.stream,
- org.jboss.util.threadpool,
- org.jboss.util.timeout,
- org.jboss.util.xml,
- org.jboss.xml,
- org.jboss.xml.binding,
- org.jboss.xml.binding.metadata,
- org.jboss.xml.binding.metadata.marshalling,
- org.jboss.xml.binding.metadata.unmarshalling,
- org.jboss.xml.binding.metadata.unmarshalling.impl,
- org.jboss.xml.binding.parser,
- org.jboss.xml.binding.parser.sax,
- org.jboss.xml.binding.parser.xni,
- org.jgroups,
- org.jgroups.blocks,
- org.jgroups.conf,
- org.jgroups.debug,
- org.jgroups.demos,
- org.jgroups.demos.applets,
- org.jgroups.demos.wb,
- org.jgroups.persistence,
- org.jgroups.protocols,
- org.jgroups.protocols.pbcast,
- org.jgroups.protocols.ring,
- org.jgroups.service,
- org.jgroups.service.lease,
- org.jgroups.stack,
- org.jgroups.tests,
- org.jgroups.tests.adapt,
- org.jgroups.tests.adaptjms,
- org.jgroups.tests.adapttcp,
- org.jgroups.tests.adaptudp,
- org.jgroups.tests.perf,
- org.jgroups.tests.perf.transports,
- org.jgroups.tests.stack,
- org.jgroups.util,
- org.logicalcobwebs.asm,
- org.logicalcobwebs.asm.tree,
- org.logicalcobwebs.asm.util,
- org.logicalcobwebs.cglib.core,
- org.logicalcobwebs.cglib.proxy,
- org.logicalcobwebs.cglib.reflect,
- org.logicalcobwebs.cglib.util,
- org.logicalcobwebs.concurrent,
- org.logicalcobwebs.logging,
- org.logicalcobwebs.logging.impl,
- org.logicalcobwebs.proxool,
- org.logicalcobwebs.proxool.admin,
- org.logicalcobwebs.proxool.admin.jmx,
- org.logicalcobwebs.proxool.admin.servlet,
- org.logicalcobwebs.proxool.configuration,
- org.logicalcobwebs.proxool.resources,
- org.logicalcobwebs.proxool.util,
- org.objectweb.asm,
- org.objectweb.asm.attrs,
- org.objectweb.asm.signature,
- org.slf4j,
- org.slf4j.helpers,
- org.slf4j.impl,
- org.slf4j.spi,
- org.w3c.tidy,
- org.w3c.tidy.ant,
- pojo
+ org.hibernate.eclipse.logging.xpl
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui.console,
org.eclipse.ui.views,
org.eclipse.jface,
org.eclipse.jdt.apt.core,
- org.eclipse.datatools.connectivity
+ org.eclipse.datatools.connectivity,
+ org.hibernate.mediator
Bundle-ActivationPolicy: lazy
Eclipse-BuddyPolicy: registered
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/build.properties
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/build.properties 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/build.properties 2010-03-29
16:32:11 UTC (rev 21119)
@@ -4,7 +4,6 @@
META-INF/,\
hibernate-log4j.properties,\
about.html,\
- lib/tools/bsh-2.0b1.jar,\
lib/tools/jtidy-r8-20060801.jar,\
lib/annotations/hibernate-entitymanager.jar,\
lib/hibernate/javassist.jar,\
@@ -29,4 +28,3 @@
src.includes = src/,\
about.html
bin.excludes = lib/.cvsignore
-source.lib/tools/bsh-2.0b1.jar = src/
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -27,7 +27,8 @@
import java.util.Iterator;
import java.util.List;
-import org.hibernate.console.stubs.SessionStub;
+import org.hibernate.mediator.QueryInputModel;
+import org.hibernate.mediator.stubs.SessionStub;
/**
* @author MAX
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfigClassLoader.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfigClassLoader.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfigClassLoader.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -22,7 +22,7 @@
import java.util.Vector;
import java.util.jar.JarFile;
-import org.hibernate.console.stubs.util.ReflectHelper;
+import org.hibernate.mediator.stubs.util.ReflectHelper;
/**
* Workaround for jdk disgrace with open jar files & native libs,
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -35,19 +35,20 @@
import org.eclipse.datatools.connectivity.IConnectionProfile;
import org.eclipse.datatools.connectivity.ProfileManager;
-import org.hibernate.HibernateException;
-import org.hibernate.console.execution.DefaultExecutionContext;
-import org.hibernate.console.execution.ExecutionContext;
-import org.hibernate.console.execution.ExecutionContextHolder;
-import org.hibernate.console.execution.ExecutionContext.Command;
-import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
-import org.hibernate.console.stubs.ConfigurationStubFactory;
-import org.hibernate.console.stubs.ConfigurationStub;
-import org.hibernate.console.stubs.HibernateConsoleRuntimeException;
-import org.hibernate.console.stubs.IHQLCodeAssistStub;
-import org.hibernate.console.stubs.SessionStub;
-import org.hibernate.console.stubs.SessionStubFactory;
-import org.hibernate.console.stubs.SettingsStub;
+import org.hibernate.mediator.ConsoleConfigClassLoader;
+import org.hibernate.mediator.QueryInputModel;
+import org.hibernate.mediator.execution.DefaultExecutionContext;
+import org.hibernate.mediator.execution.ExecutionContext;
+import org.hibernate.mediator.execution.ExecutionContextHolder;
+import org.hibernate.mediator.execution.ExecutionContext.Command;
+import org.hibernate.mediator.preferences.ConsoleConfigurationPreferences;
+import org.hibernate.mediator.stubs.ConfigurationStub;
+import org.hibernate.mediator.stubs.ConfigurationStubFactory;
+import org.hibernate.mediator.stubs.HibernateConsoleRuntimeException;
+import org.hibernate.mediator.stubs.IHQLCodeAssistStub;
+import org.hibernate.mediator.stubs.SessionStub;
+import org.hibernate.mediator.stubs.SessionStubFactory;
+import org.hibernate.mediator.stubs.SettingsStub;
import org.xml.sax.EntityResolver;
public class ConsoleConfiguration implements ExecutionContextHolder {
@@ -448,7 +449,8 @@
try{
build();
buildMappings();
- } catch (HibernateException e){
+ } catch (RuntimeException e) {
+ // TODO: RuntimeException ? - find correct solution
// String mess =
NLS.bind(HibernateConsoleMessages.CompletionHelper_error_could_not_build_cc,
consoleConfiguration.getName());
throw e;
//HibernateConsolePlugin.getDefault().logErrorMessage(mess, e);
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleMessages.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleMessages.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleMessages.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -4,24 +4,24 @@
public class ConsoleMessages extends NLS {
private static final String BUNDLE_NAME =
"org.hibernate.console.ConsoleMessages"; //$NON-NLS-1$
- public static String ConsoleConfiguration_connection_profile_not_found;
- public static String ConsoleConfiguration_could_not_access;
- public static String ConsoleConfiguration_could_not_configure_entity_resolver;
- public static String ConsoleConfiguration_could_not_configure_naming_strategy;
- public static String ConsoleConfiguration_could_not_create_jpa_based_configuration;
- public static String ConsoleConfiguration_could_not_load_annotationconfiguration;
- public static String ConsoleConfiguration_could_not_load_jpa_configuration;
- public static String ConsoleConfiguration_could_not_parse_configuration;
+ //public static String ConsoleConfiguration_connection_profile_not_found;
+ //public static String ConsoleConfiguration_could_not_access;
+ //public static String ConsoleConfiguration_could_not_configure_entity_resolver;
+ //public static String ConsoleConfiguration_could_not_configure_naming_strategy;
+ //public static String ConsoleConfiguration_could_not_create_jpa_based_configuration;
+ //public static String ConsoleConfiguration_could_not_load_annotationconfiguration;
+ //public static String ConsoleConfiguration_could_not_load_jpa_configuration;
+ //public static String ConsoleConfiguration_could_not_parse_configuration;
public static String ConsoleConfiguration_factory_not_closed_before_build_new_factory;
- public static String ConsoleConfiguration_invalid_configuration;
- public static String ConsoleConfiguration_persistence_unit_not_found;
- public static String ConsoleConfiguration_problems_while_loading_database_driverclass;
+ //public static String ConsoleConfiguration_invalid_configuration;
+ //public static String ConsoleConfiguration_persistence_unit_not_found;
+ //public static String
ConsoleConfiguration_problems_while_loading_database_driverclass;
public static String JavaPage_no_info;
- public static String JavaPage_not_allowed;
+ //public static String JavaPage_not_allowed;
public static String KnownConfigurations_could_not_write_state;
public static String KnownConfigurations_hibernate_log;
public static String KnownConfigurations_unknown;
- public static String DefaultExecutionContext_existing_classloader;
+ //public static String DefaultExecutionContext_existing_classloader;
public static String ClassNode_uninitialized_proxy;
public static String ConfigurationNode_mapped_entities;
public static String NodeFactory_unknown;
@@ -31,12 +31,12 @@
public static String AbstractConsoleConfigurationPreferences_unknown;
public static String
StandAloneConsoleConfigurationPreferences_could_not_resolve_classpaths;
public static String StandAloneConsoleConfigurationPreferences_errors_while_parsing;
- public static String PluginFileAppender_missing_plugin_state_location;
+ //public static String PluginFileAppender_missing_plugin_state_location;
public static String PluginLogAppender_missing_layout_for_appender;
- public static String EntityPropertySource_identifier;
- public static String EntityPropertySource_properties;
- public static String DynamicSQLPreviewView_caused_by;
- public static String DynamicSQLPreviewView_manipulation_of;
+ //public static String EntityPropertySource_identifier;
+ //public static String EntityPropertySource_properties;
+ //public static String DynamicSQLPreviewView_caused_by;
+ //public static String DynamicSQLPreviewView_manipulation_of;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, ConsoleMessages.class);
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleQueryParameter.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleQueryParameter.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleQueryParameter.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,166 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.hibernate.console;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Currency;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import java.util.TimeZone;
-
-import org.hibernate.console.stubs.HibernateStub;
-import org.hibernate.console.stubs.NullableTypeStub;
-import org.hibernate.console.stubs.TableStub;
-import org.hibernate.console.stubs.TypeStub;
-
-
-public class ConsoleQueryParameter {
-
- static private final Object NULL_MARKER = null; //new Object() { public String
toString() { return "[null]"; } };
-
- static final Map<TypeStub, String> typeFormats = new HashMap<TypeStub,
String>();
- static {
- addTypeFormat(HibernateStub.BOOLEAN, Boolean.TRUE );
- addTypeFormat(HibernateStub.BYTE, Byte.valueOf((byte) 42));
- addTypeFormat(HibernateStub.BIG_INTEGER, BigInteger.valueOf(42));
- addTypeFormat(HibernateStub.SHORT, Short.valueOf((short) 42));
- addTypeFormat(HibernateStub.CALENDAR, new GregorianCalendar());
- addTypeFormat(HibernateStub.CALENDAR_DATE, new GregorianCalendar());
- addTypeFormat(HibernateStub.INTEGER, Integer.valueOf(42));
- addTypeFormat(HibernateStub.INTEGER, Integer.valueOf(42));
- addTypeFormat(HibernateStub.BIG_DECIMAL, new BigDecimal(42.0));
- addTypeFormat(HibernateStub.CHARACTER, Character.valueOf('h'));
- addTypeFormat(HibernateStub.CLASS, TableStub.class);
- addTypeFormat(HibernateStub.CURRENCY, Currency.getInstance(Locale.getDefault()));
- addTypeFormat(HibernateStub.DATE, new Date());
- addTypeFormat(HibernateStub.DOUBLE, Double.valueOf(42.42));
- addTypeFormat(HibernateStub.FLOAT, Float.valueOf((float)42.42));
- addTypeFormat(HibernateStub.LOCALE, Locale.getDefault());
- addTypeFormat(HibernateStub.LONG, Long.valueOf(42));
- addTypeFormat(HibernateStub.STRING, "a string"); //$NON-NLS-1$
- addTypeFormat(HibernateStub.TEXT, "a text"); //$NON-NLS-1$
- addTypeFormat(HibernateStub.TIME, new Date());
- addTypeFormat(HibernateStub.TIMESTAMP, new Date());
- addTypeFormat(HibernateStub.TIMEZONE, TimeZone.getDefault());
- addTypeFormat(HibernateStub.TRUE_FALSE, Boolean.TRUE);
- addTypeFormat(HibernateStub.YES_NO, Boolean.TRUE);
- }
-
-
- private static void addTypeFormat(NullableTypeStub nullableType, Object value) {
- typeFormats.put(nullableType, nullableType.toString(value));
- }
- String name;
- NullableTypeStub type;
- Object value;
-
- public ConsoleQueryParameter(ConsoleQueryParameter cqp) {
- name = cqp.name;
- type = cqp.type;
- value = cqp.value;
- }
-
- public ConsoleQueryParameter() {
-
- }
-
- public ConsoleQueryParameter(String name, NullableTypeStub type, Object value) {
- this.name = name;
- this.type = type;
- this.value = value;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public NullableTypeStub getType() {
- return type;
- }
-
- public void setType(NullableTypeStub type) {
- this.type = type;
- }
-
- public Object getValue() {
- return value;
- }
-
- public void setValue(Object value) {
- //if(value == null) { throw new IllegalArgumentException("Value must not be set to
null"); }
- this.value = value;
- }
-
- public String getValueAsString() {
- if(isNull()) return ""; //$NON-NLS-1$
- return type.toString(getValue());
- }
-
- public void setValueFromString(String value) {
- try {
- Object object = type.fromStringValue(value);
- setValue(object);
- } catch(Exception he) {
- setNull();
- }
- }
-
-
- public String getDefaultFormat() {
- if(type!=null) {
- Object object = typeFormats.get(type);
- if(object!=null) {
- return object.toString();
- }
- }
- return "<unknown>"; //$NON-NLS-1$
- }
-
- public static Set<TypeStub> getPossibleTypes() {
- return typeFormats.keySet();
- }
-
- public void setNull() {
- setValue( NULL_MARKER );
- }
-
- public boolean isNull() {
- return getValue()==NULL_MARKER;
- }
-
- public Object getValueForQuery() {
- if(isNull()) {
- return null;
- } else {
- return getValue();
- }
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeDelegatingDriver.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeDelegatingDriver.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeDelegatingDriver.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.hibernate.console;
-
-import java.sql.Connection;
-import java.sql.Driver;
-import java.sql.DriverPropertyInfo;
-import java.sql.SQLException;
-import java.util.Properties;
-
-public class FakeDelegatingDriver implements Driver {
- private Driver driver;
-
- public FakeDelegatingDriver(Driver d) {
- this.driver = d;
- }
- public boolean acceptsURL(String u) throws SQLException {
- return this.driver.acceptsURL(u);
- }
- public Connection connect(String u, Properties p) throws SQLException {
- return this.driver.connect(u, p);
- }
- public int getMajorVersion() {
- return this.driver.getMajorVersion();
- }
- public int getMinorVersion() {
- return this.driver.getMinorVersion();
- }
- public DriverPropertyInfo[] getPropertyInfo(String u, Properties p)
- throws SQLException {
- return this.driver.getPropertyInfo(u, p);
- }
- public boolean jdbcCompliant() {
- return this.driver.jdbcCompliant();
- }
-}
\ No newline at end of file
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeTransactionManagerLookup.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeTransactionManagerLookup.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeTransactionManagerLookup.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,236 +0,0 @@
-package org.hibernate.console;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.InvalidTransactionException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-import javax.transaction.xa.XAResource;
-
-import org.hibernate.HibernateException;
-import org.hibernate.connection.ConnectionProvider;
-import org.hibernate.connection.ConnectionProviderFactory;
-import org.hibernate.transaction.TransactionManagerLookup;
-
-public class FakeTransactionManagerLookup implements TransactionManagerLookup {
-
- public TransactionManager getTransactionManager(Properties props)
- throws HibernateException {
- if ( FakeTransactionManager.INSTANCE == null ) {
- FakeTransactionManager.INSTANCE = new FakeTransactionManager(props);
- }
- return FakeTransactionManager.INSTANCE;
- }
-
- public String getUserTransactionName() {
- return null; //throw new UnsupportedOperationException();
- }
-
- public Object getTransactionIdentifier(Transaction transaction) {
- return transaction;
- }
-
-}
-
-class FakeTransactionManager implements TransactionManager {
-
- public static FakeTransactionManager INSTANCE;
-
- private FakeTransaction current;
- ConnectionProvider connections;
-
- public FakeTransactionManager(Properties props) {
- connections = ConnectionProviderFactory.newConnectionProvider();
- }
-
- public void begin() throws NotSupportedException, SystemException {
- current = new FakeTransaction(this);
- current.begin();
- }
-
- public void commit() throws RollbackException, HeuristicMixedException,
- HeuristicRollbackException, SecurityException,
- IllegalStateException, SystemException {
- if(current!=null) current.commit();
- }
-
-
- public int getStatus() throws SystemException {
- if(current!=null) {
- return current.getStatus();
- } else {
- return Status.STATUS_NO_TRANSACTION;
- }
- }
-
- public Transaction getTransaction() throws SystemException {
- return current;
- }
-
- public void resume(Transaction tx) throws InvalidTransactionException,
- IllegalStateException, SystemException {
- current = (FakeTransaction) tx;
- }
-
- public void rollback() throws IllegalStateException, SecurityException,
- SystemException {
- if(current!=null) current.rollback();
- }
-
- public void setRollbackOnly() throws IllegalStateException, SystemException {
- if(current!=null) current.setRollbackOnly();
- }
-
- public void setTransactionTimeout(int t) throws SystemException {
- }
-
- public Transaction suspend() throws SystemException {
- Transaction result = current;
- current = null;
- return result;
- }
-
- public FakeTransaction getCurrent() {
- return current;
- }
-
- void endCurrent(FakeTransaction tx) {
- if (current==tx) current=null;
- }
-
-}
-
-class FakeTransaction implements Transaction {
-
- int status;
- private Connection connection;
- List<Synchronization> synchronizations = new ArrayList<Synchronization>();
- private FakeTransactionManager transactionManager;
-
- FakeTransaction(FakeTransactionManager transactionManager) {
- status = Status.STATUS_NO_TRANSACTION;
- this.transactionManager = transactionManager;
- }
-
- public void begin() throws SystemException {
- try {
- connection = transactionManager.connections.getConnection();
- }
- catch (SQLException sqle) {
-
- sqle.printStackTrace();
- throw new SystemException(sqle.toString());
- }
- status = Status.STATUS_ACTIVE;
- }
-
- public void commit() throws RollbackException, HeuristicMixedException,
- HeuristicRollbackException, SecurityException,
- IllegalStateException, SystemException {
-
- if (status == Status.STATUS_MARKED_ROLLBACK) {
- rollback();
- }
- else {
- status = Status.STATUS_PREPARING;
-
- for (Synchronization s : synchronizations) {
- s.beforeCompletion();
- }
-
- status = Status.STATUS_COMMITTING;
-
- try {
- connection.commit();
- connection.close();
- }
- catch (SQLException sqle) {
- status = Status.STATUS_UNKNOWN;
- throw new SystemException();
- }
-
- status = Status.STATUS_COMMITTED;
-
- for (Synchronization s : synchronizations) {
- s.afterCompletion(status);
- }
-
- //status = Status.STATUS_NO_TRANSACTION;
- transactionManager.endCurrent(this);
- }
-
- }
-
- public boolean delistResource(XAResource arg0, int arg1)
- throws IllegalStateException, SystemException {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean enlistResource(XAResource arg0) throws RollbackException,
- IllegalStateException, SystemException {
- // TODO Auto-generated method stub
- return false;
- }
-
- public int getStatus() throws SystemException {
- return status;
- }
-
- public void registerSynchronization(Synchronization sync)
- throws RollbackException, IllegalStateException, SystemException {
- synchronizations.add(sync);
- }
-
- public void rollback() throws IllegalStateException, SystemException {
-
- status = Status.STATUS_ROLLING_BACK;
-
-// Synch.beforeCompletion() should *not* be called for rollbacks
-// for ( int i=0; i<synchronizations.size(); i++ ) {
-// Synchronization s = (Synchronization) synchronizations.get(i);
-// s.beforeCompletion();
-// }
-
- status = Status.STATUS_ROLLEDBACK;
-
- try {
- connection.rollback();
- connection.close();
- }
- catch (SQLException sqle) {
- status = Status.STATUS_UNKNOWN;
- throw new SystemException();
- }
-
- for (Synchronization s : synchronizations) {
- s.afterCompletion(status);
- }
-
- //status = Status.STATUS_NO_TRANSACTION;
- transactionManager.endCurrent(this);
- }
-
- public void setRollbackOnly() throws IllegalStateException, SystemException {
- status = Status.STATUS_MARKED_ROLLBACK;
- }
-
- void setConnection(Connection connection) {
- this.connection = connection;
- }
-
- public Connection getConnection() {
- return connection;
- }
-}
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -25,7 +25,8 @@
import java.util.ArrayList;
import java.util.List;
-import org.hibernate.console.stubs.SessionStub;
+import org.hibernate.mediator.QueryInputModel;
+import org.hibernate.mediator.stubs.SessionStub;
public class HQLQueryPage extends AbstractQueryPage {
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -25,7 +25,8 @@
import java.util.ArrayList;
import java.util.List;
-import org.hibernate.console.stubs.SessionStub;
+import org.hibernate.mediator.QueryInputModel;
+import org.hibernate.mediator.stubs.SessionStub;
/**
* @author MAX
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -52,7 +52,8 @@
import org.eclipse.ui.console.MessageConsoleStream;
import org.hibernate.console.node.BaseNode;
import org.hibernate.console.node.ConfigurationListNode;
-import org.hibernate.console.stubs.HibernateConsoleRuntimeException;
+import org.hibernate.mediator.ConsoleQueryParameter;
+import org.hibernate.mediator.stubs.HibernateConsoleRuntimeException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryInputModel.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryInputModel.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryInputModel.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,167 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.hibernate.console;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Observable;
-import java.util.Set;
-
-import org.hibernate.console.stubs.HibernateStub;
-
-/**
- * Class for managing misc parameters and other inputs to a Query, Criteria etc.
- *
- * Currently only holds parameters.
- *
- * @author Max Rydahl Andersen
- *
- */
-public class QueryInputModel extends Observable {
-
- List<ConsoleQueryParameter> parameters;
- boolean ignoreParameters = false;
-
- private Integer maxResults;
-
- public QueryInputModel() {
- parameters = new ArrayList<ConsoleQueryParameter>();
- }
-
- public int getParameterCount() {
- return parameters.size();
- }
-
- public ConsoleQueryParameter[] getQueryParameters() {
- return parameters.toArray(new ConsoleQueryParameter[parameters.size()]);
- }
-
- /** return a copy of the parameters currently in this model */
- public ConsoleQueryParameter[] getQueryParametersForQuery() {
- //pass 0-size array to guarantee Collection.toArray(T[]) will return new Array
instance
- return ignoreParameters ? new ConsoleQueryParameter[0]
- : parameters.toArray(new ConsoleQueryParameter[0]);
- }
-
- public QueryInputModel getCopyForQuery() {
- QueryInputModel result = new QueryInputModel();
-
- ConsoleQueryParameter[] queryParametersForQuery = getQueryParametersForQuery();
- result.parameters = Arrays.asList( queryParametersForQuery );
-
- result.maxResults = getMaxResults();
- result.ignoreParameters = ignoreParameters;
-
- return result;
- }
-
- public void addParameter(ConsoleQueryParameter cqp) {
- parameters.add(cqp);
- setChanged();
- notifyObservers("addParameter"); //$NON-NLS-1$
- }
-
- public void removeParameter(ConsoleQueryParameter cqp) {
- parameters.remove(cqp);
- setChanged();
- notifyObservers("removeParameter"); //$NON-NLS-1$
- }
-
- public void moveUp(ConsoleQueryParameter cqp) {
- move(cqp, 1, parameters);
- }
-
- public void moveDown(ConsoleQueryParameter cqp) {
- move(cqp, 1, parameters);
- }
-
- protected <T> void move(T tf, int shift, List<T> list) {
- int i = list.indexOf(tf);
-
- if(i>=0) {
- if(i+shift<list.size() && i+shift>=0) {
- list.remove(i);
- list.add(i+shift, tf);
- }
- }
- setChanged();
- notifyObservers("move"); //$NON-NLS-1$
- }
-
- /** create a parameter which does not collide with any other parameter */
- public ConsoleQueryParameter createUniqueParameter(String paramName) {
- if(parameters.isEmpty()) {
- return new ConsoleQueryParameter(paramName, HibernateStub.STRING, "");
//$NON-NLS-1$
- } else {
- ConsoleQueryParameter cqp = parameters.get(parameters.size()-1);
- ConsoleQueryParameter c = new ConsoleQueryParameter(cqp);
- c.setName(makeUnique(parameters.iterator(), paramName));
- return c;
- }
- }
-
- private static String makeUnique(Iterator<ConsoleQueryParameter> items, String
originalPropertyName) {
- int cnt = 0;
- String propertyName = originalPropertyName;
- Set<String> uniqueNames = new HashSet<String>();
-
- while ( items.hasNext() ) {
- ConsoleQueryParameter element = items.next();
- uniqueNames.add( element.getName() );
- }
-
- while( uniqueNames.contains(propertyName) ) {
- cnt++;
- propertyName = originalPropertyName + "-" + cnt; //$NON-NLS-1$
- }
-
- return propertyName;
- }
-
-
- public void setIgnoreParameters(boolean ignoreParameters) {
- this.ignoreParameters = ignoreParameters;
- setChanged();
- notifyObservers();
- }
-
- public boolean ignoreParameters() {
- return ignoreParameters;
- }
-
- public void clear() {
- parameters.clear();
- setChanged();
- notifyObservers("clear"); //$NON-NLS-1$
- }
-
- public void setMaxResults(Integer maxResults) {
- this.maxResults = maxResults;
- }
-
- public Integer getMaxResults() {
- return maxResults;
- }
-}
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPage.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPage.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPage.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -24,7 +24,8 @@
import java.beans.PropertyChangeListener;
import java.util.List;
-import org.hibernate.console.stubs.SessionStub;
+import org.hibernate.mediator.QueryInputModel;
+import org.hibernate.mediator.stubs.SessionStub;
/**
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPageModel.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPageModel.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPageModel.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -36,6 +36,8 @@
*/
public class QueryPageModel extends AbstractListModel {
+ private static final long serialVersionUID = 3705805796946900733L;
+
List<QueryPage> pages = new ArrayList<QueryPage>();
public int getSize() {
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/BaseNode.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/BaseNode.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/BaseNode.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -30,8 +30,8 @@
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.ImageConstants;
-import org.hibernate.console.execution.ExecutionContext;
-import org.hibernate.console.execution.ExecutionContextHolder;
+import org.hibernate.mediator.execution.ExecutionContext;
+import org.hibernate.mediator.execution.ExecutionContextHolder;
/**
* @author MAX
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -26,11 +26,11 @@
import org.hibernate.console.ConsoleMessages;
import org.hibernate.console.ImageConstants;
-import org.hibernate.console.stubs.ClassMetadataStub;
-import org.hibernate.console.stubs.CollectionTypeStub;
-import org.hibernate.console.stubs.EntityModeStub;
-import org.hibernate.console.stubs.HibernateStub;
-import org.hibernate.console.stubs.TypeStub;
+import org.hibernate.mediator.stubs.ClassMetadataStub;
+import org.hibernate.mediator.stubs.CollectionTypeStub;
+import org.hibernate.mediator.stubs.EntityModeStub;
+import org.hibernate.mediator.stubs.HibernateStub;
+import org.hibernate.mediator.stubs.TypeStub;
/**
* @author MAX
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/IdentifierNode.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/IdentifierNode.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/IdentifierNode.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -22,7 +22,7 @@
package org.hibernate.console.node;
import org.hibernate.console.ImageConstants;
-import org.hibernate.console.stubs.ClassMetadataStub;
+import org.hibernate.mediator.stubs.ClassMetadataStub;
/**
* @author MAX
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -28,13 +28,13 @@
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.ConsoleMessages;
import org.hibernate.console.ImageConstants;
-import org.hibernate.console.stubs.ClassMetadataStub;
-import org.hibernate.console.stubs.CollectionMetadataStub;
-import org.hibernate.console.stubs.CollectionTypeStub;
-import org.hibernate.console.stubs.EntityTypeStub;
-import org.hibernate.console.stubs.SessionStub;
-import org.hibernate.console.stubs.TableStub;
-import org.hibernate.console.stubs.TypeStub;
+import org.hibernate.mediator.stubs.ClassMetadataStub;
+import org.hibernate.mediator.stubs.CollectionMetadataStub;
+import org.hibernate.mediator.stubs.CollectionTypeStub;
+import org.hibernate.mediator.stubs.EntityTypeStub;
+import org.hibernate.mediator.stubs.SessionStub;
+import org.hibernate.mediator.stubs.TableStub;
+import org.hibernate.mediator.stubs.TypeStub;
/**
* @author MAX
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -27,11 +27,11 @@
import javax.swing.tree.TreeNode;
import org.hibernate.console.ConsoleMessages;
-import org.hibernate.console.stubs.ClassMetadataStub;
-import org.hibernate.console.stubs.CollectionMetadataStub;
-import org.hibernate.console.stubs.CollectionTypeStub;
-import org.hibernate.console.stubs.EntityModeStub;
-import org.hibernate.console.stubs.TypeStub;
+import org.hibernate.mediator.stubs.ClassMetadataStub;
+import org.hibernate.mediator.stubs.CollectionMetadataStub;
+import org.hibernate.mediator.stubs.CollectionTypeStub;
+import org.hibernate.mediator.stubs.EntityModeStub;
+import org.hibernate.mediator.stubs.TypeStub;
/**
* @author MAX
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PropertyNode.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PropertyNode.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PropertyNode.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -21,8 +21,8 @@
*/
package org.hibernate.console.node;
-import org.hibernate.console.stubs.ClassMetadataStub;
-import org.hibernate.console.stubs.EntityModeStub;
+import org.hibernate.mediator.stubs.ClassMetadataStub;
+import org.hibernate.mediator.stubs.EntityModeStub;
public class PropertyNode extends TypeNode {
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ProxyFactory.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ProxyFactory.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ProxyFactory.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -30,8 +30,8 @@
import net.sf.cglib.proxy.MethodProxy;
import net.sf.cglib.proxy.NoOp;
-import org.hibernate.console.execution.ExecutionContext;
-import org.hibernate.console.execution.ExecutionContextHolder;
+import org.hibernate.mediator.execution.ExecutionContext;
+import org.hibernate.mediator.execution.ExecutionContextHolder;
public class ProxyFactory {
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TableNode.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TableNode.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TableNode.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -21,7 +21,7 @@
*/
package org.hibernate.console.node;
-import org.hibernate.console.stubs.TableStub;
+import org.hibernate.mediator.stubs.TableStub;
public class TableNode extends BaseNode {
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TypeNode.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TypeNode.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TypeNode.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -21,8 +21,8 @@
*/
package org.hibernate.console.node;
-import org.hibernate.console.stubs.ClassMetadataStub;
-import org.hibernate.console.stubs.TypeStub;
+import org.hibernate.mediator.stubs.ClassMetadataStub;
+import org.hibernate.mediator.stubs.TypeStub;
/**
* @author MAX
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -27,8 +27,9 @@
import java.util.Properties;
import org.hibernate.console.ConsoleMessages;
-import org.hibernate.console.stubs.HibernateConsoleRuntimeException;
-import org.hibernate.console.stubs.util.StringHelper;
+import org.hibernate.mediator.preferences.ConsoleConfigurationPreferences;
+import org.hibernate.mediator.stubs.HibernateConsoleRuntimeException;
+import org.hibernate.mediator.stubs.util.StringHelper;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,135 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.hibernate.console.preferences;
-
-import java.io.File;
-import java.io.Serializable;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import org.w3c.dom.Element;
-
-/**
- * @author max
- *
- */
-public interface ConsoleConfigurationPreferences {
-
- static final String PATH_TAG = "path"; //$NON-NLS-1$
- static final String CLASSPATH_TAG = "classpath"; //$NON-NLS-1$
- static final String MAPPING_TAG = "mapping"; //$NON-NLS-1$
- static final String MAPPINGS_TAG = "mappings"; //$NON-NLS-1$
- static final String HIBERNATE_PROPERTIES_TAG = "hibernate-properties";
//$NON-NLS-1$
- static final String LOCATION_ATTRIB = "location"; //$NON-NLS-1$
- static final String HIBERNATE_CONFIG_XML_TAG = "hibernate-config-xml";
//$NON-NLS-1$
- static final String NAME_ATTRIB = "name"; //$NON-NLS-1$
- static final String CONFIGURATION_TAG = "configuration"; //$NON-NLS-1$
- static final String ANNOTATIONS_ATTRIB = "annotations"; //$NON-NLS-1$
- static final String ENTITYRESOLVER_ATTRIB = "entityresolver"; //$NON-NLS-1$
- static final String CONFIGURATION_MODE_ATTRIB = "configuration-factory";
//$NON-NLS-1$
-
- // TODO: we should move this to some classhandler
- static public class ConfigurationMode implements Serializable {
-
- private static final Map<String, ConfigurationMode> INSTANCES = new
HashMap<String, ConfigurationMode>();
-
- public static final ConfigurationMode CORE = new ConfigurationMode( "CORE" );
//$NON-NLS-1$
- public static final ConfigurationMode ANNOTATIONS = new ConfigurationMode(
"ANNOTATIONS" ); //$NON-NLS-1$
- public static final ConfigurationMode JPA = new ConfigurationMode( "JPA" );
//$NON-NLS-1$
-
- static {
- INSTANCES.put( CORE.name, CORE );
- INSTANCES.put( ANNOTATIONS.name, ANNOTATIONS );
- INSTANCES.put( JPA.name, JPA );
- }
-
- private final String name;
-
- public ConfigurationMode(String name) {
- this.name = name;
- }
-
- public String toString() {
- return name;
- }
-
- private Object readResolve() {
- return INSTANCES.get( name );
- }
-
- public static ConfigurationMode parse(String name) {
- ConfigurationMode rtn = INSTANCES.get( name );
- if ( rtn == null ) {
- // default is POJO
- rtn = CORE;
- }
- return rtn;
- }
-
- public static String[] values(){
- return INSTANCES.keySet().toArray(new String[INSTANCES.size()]);
- }
- }
-
-
- public abstract ConfigurationMode getConfigurationMode();
-
- public abstract String getName();
-
- /**
- * @return return non-null array of URLs for a customclasspath
- */
- public abstract URL[] getCustomClassPathURLS();
-
- /**
- * @return return non-null array of URLs for mapping files
- */
- public abstract File[] getMappingFiles();
-
- public abstract Properties getProperties();
-
- public abstract File getConfigXMLFile();
-
- public abstract File getPropertyFile();
-
- public abstract void writeStateTo(Element node);
-
- public abstract void readStateFrom(Element element);
-
- public abstract void setName(String name);
-
- public abstract String getEntityResolverName();
-
- public abstract String getPersistenceUnitName();
-
- public abstract String getNamingStrategy();
-
- /**
- *
- * @return null if ConnectionProfile was not specified
- */
- public abstract String getConnectionProfileName();
-
- public abstract String getDialectName();
-}
\ No newline at end of file
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -31,7 +31,7 @@
import javax.xml.parsers.ParserConfigurationException;
import org.hibernate.console.ConsoleMessages;
-import org.hibernate.console.stubs.HibernateConsoleRuntimeException;
+import org.hibernate.mediator.stubs.HibernateConsoleRuntimeException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/AbstractTypeStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/AbstractTypeStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/AbstractTypeStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,12 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.type.AbstractType;
-
-public class AbstractTypeStub extends TypeStub {
- protected AbstractType abstractType;
-
- protected AbstractTypeStub(Object abstractType) {
- super(abstractType);
- this.abstractType = (AbstractType)abstractType;
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/AnyStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/AnyStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/AnyStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,13 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.Any;
-
-public class AnyStub extends SimpleValueStub {
- protected Any any;
-
- protected AnyStub(Object any) {
- super(any);
- this.any = (Any)any;
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ArrayStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ArrayStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ArrayStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,36 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.Array;
-
-public class ArrayStub extends ListStub {
- protected Array array;
-
- protected ArrayStub(Object array) {
- super(array);
- this.array = (Array)array;
- }
-
- public static ArrayStub newInstance(PersistentClassStub owner) {
- return new ArrayStub(new Array(owner.persistentClass));
- }
-
- public void setElement(ValueStub element) {
- array.setElement(element.value);
- }
-
- public void setCollectionTable(TableStub table) {
- array.setCollectionTable(table.table);
- }
-
- public void setElementClassName(String elementClassName) {
- array.setElementClassName(elementClassName);
- }
-
- public void setIndex(ValueStub index) {
- array.setIndex(index.value);
- }
-
- public String getElementClassName() {
- return array.getElementClassName();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/BagStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/BagStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/BagStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,21 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.Bag;
-
-public class BagStub extends CollectionStub {
- protected Bag bag;
-
- protected BagStub(Object bag) {
- super(bag);
- this.bag = (Bag)bag;
- }
-
- public static BagStub newInstance(PersistentClassStub owner) {
- return new BagStub(new Bag(owner.persistentClass));
- }
-
- @Override
- public Object accept(ValueVisitorStub visitor) {
- return visitor.accept(this);
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/Cfg2HbmToolStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/Cfg2HbmToolStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/Cfg2HbmToolStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,23 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.tool.hbm2x.Cfg2HbmTool;
-
-public class Cfg2HbmToolStub {
- protected Cfg2HbmTool cfg2HbmTool;
-
- protected Cfg2HbmToolStub(Object cfg2HbmTool) {
- this.cfg2HbmTool = (Cfg2HbmTool)cfg2HbmTool;
- }
-
- public static Cfg2HbmToolStub newInstance() {
- return new Cfg2HbmToolStub(new Cfg2HbmTool());
- }
-
- public String getTag(PersistentClassStub persistentClass) {
- return cfg2HbmTool.getTag(persistentClass.persistentClass);
- }
-
- public String getTag(PropertyStub property) {
- return cfg2HbmTool.getTag(property.property);
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ClassMetadataStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ClassMetadataStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ClassMetadataStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,46 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.metadata.ClassMetadata;
-import org.hibernate.type.Type;
-
-public class ClassMetadataStub {
- protected ClassMetadata classMetadata;
-
- protected ClassMetadataStub(Object classMetadata) {
- this.classMetadata = (ClassMetadata)classMetadata;
- }
-
- public String[] getPropertyNames() {
- return classMetadata.getPropertyNames();
- }
-
- public TypeStub[] getPropertyTypes() {
- Type[] types = classMetadata.getPropertyTypes();
- TypeStub[] res = new TypeStub[types.length];
- for (int i = 0; i < types.length; i++) {
- res[i] = TypeStubFactory.createTypeStub(types[i]);
- }
- return res;
- }
-
- public String getIdentifierPropertyName() {
- return classMetadata.getIdentifierPropertyName();
- }
-
- public Object getPropertyValue(Object baseObject, String name, EntityModeStub pojo) {
- return classMetadata.getPropertyValue(baseObject, name, pojo.entityMode);
- }
-
- public String getEntityName() {
- return classMetadata.getEntityName();
- }
-
- public TypeStub getIdentifierType() {
- return TypeStubFactory.createTypeStub(classMetadata.getIdentifierType());
- }
-
- public Class getMappedClass(EntityModeStub pojo) {
- return classMetadata.getMappedClass(pojo.entityMode);
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/CollectionMetadataStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/CollectionMetadataStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/CollectionMetadataStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,15 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.metadata.CollectionMetadata;
-
-public class CollectionMetadataStub {
- protected CollectionMetadata collectionMetadata;
-
- protected CollectionMetadataStub(Object collectionMetadata) {
- this.collectionMetadata = (CollectionMetadata)collectionMetadata;
- }
-
- public TypeStub getElementType() {
- return TypeStubFactory.createTypeStub(collectionMetadata.getElementType());
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/CollectionStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/CollectionStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/CollectionStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,65 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.FetchMode;
-import org.hibernate.mapping.Collection;
-
-public abstract class CollectionStub extends ValueStub {
-
- protected Collection collection;
-
- protected CollectionStub(Object collection) {
- super(collection);
- this.collection = (Collection)collection;
- }
-
- public void setCollectionTable(TableStub table) {
- collection.setCollectionTable(table.table);
- }
-
- public void setKey(KeyValueStub key) {
- collection.setKey(key.keyValue);
- }
-
- public void setLazy(boolean lazy) {
- collection.setLazy(lazy);
- }
-
- public void setRole(String role) {
- collection.setRole(role);
- }
-
- public void setElement(ValueStub element) {
- collection.setElement(element.value);
- }
-
- public void setFetchMode(FetchModeStub fetchMode) {
- if (FetchModeStub.DEFAULT.equals(fetchMode)) {
- collection.setFetchMode(FetchMode.DEFAULT);
- } else if (FetchModeStub.SELECT.equals(fetchMode)) {
- collection.setFetchMode(FetchMode.SELECT);
- } else if (FetchModeStub.JOIN.equals(fetchMode)) {
- collection.setFetchMode(FetchMode.JOIN);
- } else if (FetchModeStub.SUBSELECT.equals(fetchMode)) {
- }
- }
-
- public ValueStub getElement() {
- return ValueStubFactory.createValueStub(collection.getElement());
- }
-
- public TableStub getCollectionTable() {
- return new TableStub(collection.getCollectionTable());
- }
-
- public KeyValueStub getKey() {
- return (KeyValueStub)ValueStubFactory.createValueStub(collection.getKey());
- }
-
- public boolean isOneToMany() {
- return collection.isOneToMany();
- }
-
- public boolean isInverse() {
- return collection.isInverse();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/CollectionTypeStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/CollectionTypeStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/CollectionTypeStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,22 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.type.CollectionType;
-
-public class CollectionTypeStub extends AbstractTypeStub {
-
- protected CollectionType collectionType;
-
- protected CollectionTypeStub(Object collectionType) {
- super(collectionType);
- this.collectionType = (CollectionType)collectionType;
- }
-
- public String getRole() {
- return collectionType.getRole();
- }
-
- public boolean isArrayType() {
- return collectionType.isArrayType();
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ColumnStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ColumnStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ColumnStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,68 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.Column;
-
-public class ColumnStub {
- public static final int DEFAULT_LENGTH = 255;
- public static final int DEFAULT_PRECISION = 19;
- public static final int DEFAULT_SCALE = 2;
-
- protected Column column;
-
- protected ColumnStub(Object column) {
- this.column = (Column)column;
- }
-
- public static ColumnStub newInstance() {
- return new ColumnStub(new Column());
- }
-
- public static ColumnStub newInstance(String columnName) {
- return new ColumnStub(new Column(columnName));
- }
-
- public String getSqlType() {
- return column.getSqlType();
- }
-
- public void setSqlType(String sqlType) {
- column.setSqlType(sqlType);
- }
-
- public String getSqlType(DialectStub dialect, MappingStub mapping) {
- return column.getSqlType(dialect.dialect, mapping.mapping);
- }
-
- public ValueStub getValue() {
- return ValueStubFactory.createValueStub(column.getValue());
- }
-
- public String getName() {
- return column.getName();
- }
-
- public boolean isNullable() {
- return column.isNullable();
- }
-
- public boolean isUnique() {
- return column.isUnique();
- }
-
- public Integer getSqlTypeCode() {
- return column.getSqlTypeCode();
- }
-
- public int getLength() {
- return column.getLength();
- }
-
- public int getPrecision() {
- return column.getPrecision();
- }
-
- public int getScale() {
- return column.getScale();
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ComponentStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ComponentStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ComponentStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,42 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.hibernate.mapping.Component;
-import org.hibernate.mapping.Property;
-
-public class ComponentStub extends SimpleValueStub {
- protected Component component;
-
- protected ComponentStub(Object component) {
- super(component);
- this.component = (Component)component;
- }
-
- public String getComponentClassName() {
- return component.getComponentClassName();
- }
-
- public PersistentClassStub getOwner() {
- return PersistentClassStubFactory.createPersistentClassStub(component.getOwner());
- }
-
- public String getParentProperty() {
- return component.getParentProperty();
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<PropertyStub> getPropertyIterator() {
- Iterator<Property> it =
(Iterator<Property>)component.getPropertyIterator();
- ArrayList<PropertyStub> al = new ArrayList<PropertyStub>();
- while (it.hasNext()) {
- al.add(new PropertyStub(it.next()));
- }
- return al.iterator();
- }
-
- public boolean isEmbedded() {
- return component.isEmbedded();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,199 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.io.File;
-import java.sql.Driver;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import org.eclipse.osgi.util.NLS;
-import org.hibernate.SessionFactory;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.console.ConsoleMessages;
-import org.hibernate.console.FakeDelegatingDriver;
-import org.hibernate.console.stubs.util.ReflectHelper;
-import org.hibernate.mapping.PersistentClass;
-import org.hibernate.tool.hbm2ddl.SchemaExport;
-import org.hibernate.tool.hbm2x.Exporter;
-import org.hibernate.tool.hbm2x.HibernateMappingExporter;
-import org.hibernate.tool.hbm2x.pojo.POJOClass;
-import org.hibernate.tool.ide.completion.HQLCodeAssist;
-import org.xml.sax.EntityResolver;
-
-public class ConfigurationStub {
-
- private Map<String, FakeDelegatingDriver> fakeDrivers = new HashMap<String,
FakeDelegatingDriver>();
-
- // configuration != null - by default
- protected Configuration configuration;
-
- protected ConfigurationStub(Configuration configuration) {
- //Class.forName(className)
- //Method ReflectionUtils.findPublicMethod(Class declaringClass, "isOpen",
- // new Class[]());
- this.configuration = configuration;
- }
-
- protected Configuration getConfiguration() {
- return configuration;
- }
-
- public void cleanUp() {
- Iterator<FakeDelegatingDriver> it = fakeDrivers.values().iterator();
- while (it.hasNext()) {
- try {
- DriverManager.deregisterDriver(it.next());
- } catch (SQLException e) {
- // ignore
- }
- }
- fakeDrivers.clear();
- }
-
- public void buildMappings() {
- configuration.buildMappings();
- }
-
- // TODO: temporary should be protected and/or SettingsStub?
- public SettingsStub buildSettings() {
- return new SettingsStub(configuration.buildSettings());
- }
-
- protected SessionFactory buildSessionFactory() {
- return configuration.buildSessionFactory();
- }
-
- public EntityResolver getEntityResolver() {
- return configuration.getEntityResolver();
- }
-
- public IHQLCodeAssistStub getHQLCodeAssist() {
- return new IHQLCodeAssistStub(new HQLCodeAssist(configuration));
- }
-
- // TODO: temporary should be protected and/or NamingStrategyStub?
- public NamingStrategyStub getNamingStrategy() {
- return new NamingStrategyStub(configuration.getNamingStrategy());
- }
-
- public boolean hasNamingStrategy() {
- return (configuration.getNamingStrategy() != null);
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<PersistentClassStub> getClassMappings() {
- Iterator<PersistentClass> it =
(Iterator<PersistentClass>)configuration.getClassMappings();
- ArrayList<PersistentClassStub> arr = new ArrayList<PersistentClassStub>();
- while (it.hasNext()) {
- arr.add(PersistentClassStubFactory.createPersistentClassStub(it.next()));
- }
- return arr.iterator();
- }
-
- // TODO: temporary should be protected and/or PersistentClassStub?
- public PersistentClassStub getClassMapping(String entityName) {
- return
PersistentClassStubFactory.createPersistentClassStub(configuration.getClassMapping(entityName));
- }
-
- // TODO: temporary should be protected and/or MappingsStub?
- public MappingsStub createMappings() {
- return new MappingsStub(configuration.createMappings());
- }
-
- // TODO: temporary should be protected and/or MappingsStub?
- public MappingStub buildMapping() {
- return new MappingStub(configuration.buildMapping());
- }
-
- public static interface IExporterNewOutputDir {
- File getNewOutputDir(POJOClass element, File outputdir4FileNew);
- }
-
- public HibernateMappingExporter createHibernateMappingExporter(File folder2Gen, final
IExporterNewOutputDir enod) {
- return new HibernateMappingExporter(configuration, folder2Gen) {
- @SuppressWarnings("unchecked")
- protected void exportPOJO(Map additionalContext, POJOClass element) {
- File outputdir4FileOld = getOutputDirectory();
- File outputdir4FileNew = enod.getNewOutputDir(element, outputdir4FileOld);
- if (!outputdir4FileNew.exists()) {
- outputdir4FileNew.mkdirs();
- }
- setOutputDirectory(outputdir4FileNew);
- super.exportPOJO(additionalContext, element);
- setOutputDirectory(outputdir4FileOld);
- }
- };
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<Throwable> doSchemaExport() {
- SchemaExport export = new SchemaExport(configuration);
- export.create(false, true);
- if (!export.getExceptions().isEmpty()) {
- return (Iterator<Throwable>)export.getExceptions().iterator();
- }
- return null;
- }
-
- public void updateExporter(Exporter exporter) {
- exporter.setConfiguration(configuration);
- }
-
- public Properties getProperties() {
- return configuration.getProperties();
- }
-
- public String getProperty(String propertyName) {
- return configuration.getProperty(propertyName);
- }
-
- /**
- * DriverManager checks what classloader a class is loaded from thus we register a
FakeDriver
- * that we know is loaded "properly" which delegates all it class to the real
driver. By doing
- * so we can convince DriverManager that we can use any dynamically loaded driver.
- *
- * @param driverClassName
- */
- @SuppressWarnings("unchecked")
- protected void registerFakeDriver(String driverClassName) {
- if (driverClassName != null) {
- try {
- Class<Driver> driverClass = ReflectHelper.classForName(driverClassName);
- if (!fakeDrivers.containsKey(driverClassName)) { // To avoid "double
registration"
- FakeDelegatingDriver fakeDelegatingDriver = new FakeDelegatingDriver(
- driverClass.newInstance());
- DriverManager.registerDriver(fakeDelegatingDriver);
- fakeDrivers.put(driverClassName, fakeDelegatingDriver);
- }
- } catch (ClassNotFoundException e) {
- String out = NLS
- .bind(
- ConsoleMessages.ConsoleConfiguration_problems_while_loading_database_driverclass,
- driverClassName);
- throw new HibernateConsoleRuntimeException(out, e);
- } catch (InstantiationException e) {
- String out = NLS
- .bind(
- ConsoleMessages.ConsoleConfiguration_problems_while_loading_database_driverclass,
- driverClassName);
- throw new HibernateConsoleRuntimeException(out, e);
- } catch (IllegalAccessException e) {
- String out = NLS
- .bind(
- ConsoleMessages.ConsoleConfiguration_problems_while_loading_database_driverclass,
- driverClassName);
- throw new HibernateConsoleRuntimeException(out, e);
- } catch (SQLException e) {
- String out = NLS
- .bind(
- ConsoleMessages.ConsoleConfiguration_problems_while_loading_database_driverclass,
- driverClassName);
- throw new HibernateConsoleRuntimeException(out, e);
- }
- }
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStubFactory.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStubFactory.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStubFactory.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,413 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Method;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import org.dom4j.DocumentException;
-import org.dom4j.Node;
-import org.dom4j.io.DOMWriter;
-import org.eclipse.datatools.connectivity.IConnectionProfile;
-import org.eclipse.datatools.connectivity.ProfileManager;
-import org.eclipse.osgi.util.NLS;
-import org.hibernate.HibernateException;
-import org.hibernate.MappingException;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.cfg.Environment;
-import org.hibernate.cfg.JDBCMetaDataConfiguration;
-import org.hibernate.cfg.NamingStrategy;
-import org.hibernate.console.ConsoleConfiguration;
-import org.hibernate.console.ConsoleMessages;
-import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
-import
org.hibernate.console.preferences.ConsoleConfigurationPreferences.ConfigurationMode;
-import org.hibernate.console.stubs.util.ReflectHelper;
-import org.hibernate.console.stubs.util.StringHelper;
-import org.hibernate.dialect.Dialect;
-import org.hibernate.dialect.resolver.DialectFactory;
-import org.hibernate.util.ConfigHelper;
-import org.hibernate.util.XMLHelper;
-import org.w3c.dom.Document;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-
-public class ConfigurationStubFactory {
-
- private ConsoleConfigurationPreferences prefs = null;
-
- public ConfigurationStubFactory(ConsoleConfigurationPreferences prefs) {
- this.prefs = prefs;
- }
-
- public ConfigurationStub createConfiguration() {
- ConfigurationStub res = new ConfigurationStub(new Configuration());
- return res;
- }
-
- public ConfigurationStubJDBCMetaData createConfigurationJDBCMetaData() {
- ConfigurationStubJDBCMetaData res = new ConfigurationStubJDBCMetaData(new
JDBCMetaDataConfiguration());
- return res;
- }
-
- public ConfigurationStub createConfiguration(ConfigurationStub cfg, boolean
includeMappings) {
- Configuration localCfg = cfg == null ? null : cfg.getConfiguration();
- Properties properties = prefs.getProperties();
- if (properties != null) {
- // to fix: JBIDE-5839 - setup this property: false is default value
- // to make hibernate tools diff hibernate versions compatible
- if (properties.getProperty("hibernate.search.autoregister_listeners") ==
null) { //$NON-NLS-1$
- properties.setProperty("hibernate.search.autoregister_listeners",
"false"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- // in case the transaction manager is empty then we need to inject a faketm since
- // hibernate will still try and instantiate it.
- String str =
properties.getProperty("hibernate.transaction.manager_lookup_class");
//$NON-NLS-1$
- if (str != null && StringHelper.isEmpty(str)) {
- properties
- .setProperty(
- "hibernate.transaction.manager_lookup_class",
"org.hibernate.console.FakeTransactionManagerLookup"); //$NON-NLS-1$
//$NON-NLS-2$
- // properties.setProperty( "hibernate.transaction.factory_class",
"");
- }
- }
- if (localCfg == null) {
- localCfg = buildConfiguration(properties, includeMappings);
- } else {
- // Properties origProperties = cfg.getProperties();
- // origProperties.putAll(properties);
- // cfg.setProperties(origProperties);
- // TODO: this is actually only for jdbc reveng...
- // localCfg = configureStandardConfiguration( includeMappings, localCfg, properties
);
- }
- // non-running databases + i havent been needed until now...
- // TODO: jpa configuration ?
- if (includeMappings) {
- File[] mappingFiles = prefs.getMappingFiles();
- for (int i = 0; i < mappingFiles.length; i++) {
- File hbm = mappingFiles[i];
- localCfg = localCfg.addFile(hbm);
- }
- }
- // TODO: HBX-
- localCfg.setProperty("hibernate.temp.use_jdbc_metadata_defaults",
"false"); //$NON-NLS-1$//$NON-NLS-2$
- localCfg.setProperty(Environment.HBM2DDL_AUTO, "false"); //$NON-NLS-1$
- ConfigurationStub res = new ConfigurationStub(localCfg);
- // here both setProperties and configxml have had their chance to tell which
databasedriver
- // is needed.
- res.registerFakeDriver(localCfg.getProperty(Environment.DRIVER));
- // autoConfigureDialect(localCfg); Disabled for now since it causes very looong
timeouts for
- return res;
- }
-
- private Configuration buildAnnotationConfiguration() throws ClassNotFoundException,
- InstantiationException, IllegalAccessException {
- Class<?> clazz = ReflectHelper
- .classForName("org.hibernate.cfg.AnnotationConfiguration",
ConsoleConfiguration.class); //$NON-NLS-1$
- Configuration annotationConfig = (Configuration)clazz.newInstance();
- return annotationConfig;
- }
-
- private Configuration buildJPAConfiguration(String persistenceUnit, Properties
properties,
- String entityResolver, boolean includeMappings) {
- if (StringHelper.isEmpty(persistenceUnit)) {
- persistenceUnit = null;
- }
- try {
- Map<Object, Object> overrides = new HashMap<Object, Object>();
- if (properties != null) {
- overrides.putAll(properties);
- }
- if (StringHelper.isNotEmpty(prefs.getNamingStrategy())) {
- overrides.put("hibernate.ejb.naming_strategy", prefs.getNamingStrategy());
//$NON-NLS-1$
- }
- if (StringHelper.isNotEmpty(prefs.getDialectName())) {
- overrides.put("hibernate.dialect", prefs.getDialectName()); //$NON-NLS-1$
- }
- if (!includeMappings) {
- overrides.put("hibernate.archive.autodetection", "none");
//$NON-NLS-1$//$NON-NLS-2$
- }
- Class<?> clazz = ReflectHelper.classForName(
- "org.hibernate.ejb.Ejb3Configuration", ConsoleConfiguration.class);
//$NON-NLS-1$
- Object ejb3cfg = clazz.newInstance();
-
- if (StringHelper.isNotEmpty(entityResolver)) {
- Class<?> resolver = ReflectHelper.classForName(entityResolver,
this.getClass());
- Object object = resolver.newInstance();
- Method method = clazz.getMethod(
- "setEntityResolver", new Class[] { EntityResolver.class });//$NON-NLS-1$
- method.invoke(ejb3cfg, new Object[] { object });
- }
-
- Method method = clazz.getMethod("configure", new Class[] { String.class,
Map.class }); //$NON-NLS-1$
- if (method.invoke(ejb3cfg, new Object[] { persistenceUnit, overrides }) == null) {
- String out = NLS.bind(
- ConsoleMessages.ConsoleConfiguration_persistence_unit_not_found,
- persistenceUnit);
- throw new HibernateConsoleRuntimeException(out, null);
- }
-
- method = clazz.getMethod("getHibernateConfiguration", new
Class[0]);//$NON-NLS-1$
- Object obj = method.invoke(ejb3cfg, (Object[]) null);
- Configuration invoke = (Configuration)obj;
- invoke = configureConnectionProfile(invoke);
-
- return invoke;
- } catch (HibernateConsoleRuntimeException he) {
- throw he;
- } catch (Exception e) {
- throw new HibernateConsoleRuntimeException(
- ConsoleMessages.ConsoleConfiguration_could_not_create_jpa_based_configuration,
- e);
- }
- }
-
- private Configuration buildConfiguration(Properties properties, boolean includeMappings)
{
- Configuration localCfg = null;
- if (prefs.getConfigurationMode().equals(ConfigurationMode.ANNOTATIONS)) {
- try {
- localCfg = buildAnnotationConfiguration();
- localCfg = configureStandardConfiguration(includeMappings, localCfg, properties);
- } catch (HibernateConsoleRuntimeException he) {
- throw he;
- } catch (Exception e) {
- throw new HibernateConsoleRuntimeException(
- ConsoleMessages.ConsoleConfiguration_could_not_load_annotationconfiguration,
- e);
- }
- } else if (prefs.getConfigurationMode().equals(ConfigurationMode.JPA)) {
- try {
- localCfg = buildJPAConfiguration(prefs.getPersistenceUnitName(), properties, prefs
- .getEntityResolverName(), includeMappings);
- } catch (HibernateConsoleRuntimeException he) {
- throw he;
- } catch (Exception e) {
- throw new HibernateConsoleRuntimeException(
- ConsoleMessages.ConsoleConfiguration_could_not_load_jpa_configuration, e);
- }
- } else {
- localCfg = new Configuration();
- localCfg = configureStandardConfiguration(includeMappings, localCfg, properties);
- }
- return localCfg;
- }
-
- private Configuration configureStandardConfiguration(final boolean includeMappings,
- Configuration localCfg, Properties properties) {
- if (properties != null) {
- localCfg = localCfg.setProperties(properties);
- }
- EntityResolver entityResolver = XMLHelper.DEFAULT_DTD_RESOLVER;
- if (StringHelper.isNotEmpty(prefs.getEntityResolverName())) {
- try {
- entityResolver = (EntityResolver) ReflectHelper.classForName(
- prefs.getEntityResolverName()).newInstance();
- } catch (Exception c) {
- throw new HibernateConsoleRuntimeException(
- ConsoleMessages.ConsoleConfiguration_could_not_configure_entity_resolver
- + prefs.getEntityResolverName(), c);
- }
- }
- localCfg.setEntityResolver(entityResolver);
- if (StringHelper.isNotEmpty(prefs.getNamingStrategy())) {
- try {
- NamingStrategy ns = (NamingStrategy) ReflectHelper.classForName(
- prefs.getNamingStrategy()).newInstance();
- localCfg.setNamingStrategy(ns);
- } catch (Exception c) {
- throw new HibernateConsoleRuntimeException(
- ConsoleMessages.ConsoleConfiguration_could_not_configure_naming_strategy
- + prefs.getNamingStrategy(), c);
- }
- }
- localCfg = loadConfigurationXML(localCfg, includeMappings, entityResolver);
- localCfg = configureConnectionProfile(localCfg);
-
- // replace dialect if it is set in preferences
- if (StringHelper.isNotEmpty(prefs.getDialectName())) {
- localCfg.setProperty("hibernate.dialect", prefs.getDialectName());
//$NON-NLS-1$
- }
-
- return localCfg;
- }
-
- @SuppressWarnings("unchecked")
- private Configuration loadConfigurationXML(Configuration localCfg, boolean
includeMappings,
- EntityResolver entityResolver) {
- File configXMLFile = prefs.getConfigXMLFile();
- if (!includeMappings) {
- org.dom4j.Document doc;
- XMLHelper xmlHelper = new XMLHelper();
- InputStream stream = null;
- String resourceName = "<unknown>"; //$NON-NLS-1$
- if (configXMLFile != null) {
- resourceName = configXMLFile.toString();
- try {
- stream = new FileInputStream(configXMLFile);
- } catch (FileNotFoundException e1) {
- throw new HibernateConsoleRuntimeException(
- ConsoleMessages.ConsoleConfiguration_could_not_access + configXMLFile,
- e1);
- }
- } else {
- resourceName = "/hibernate.cfg.xml"; //$NON-NLS-1$
- if (checkHibernateResoureExistence(resourceName)) {
- stream = ConfigHelper.getResourceAsStream(resourceName); // simulate
hibernate's
- // default look up
- } else {
- return localCfg;
- }
- }
-
- try {
- List<Throwable> errors = new ArrayList<Throwable>();
-
- doc = xmlHelper.createSAXReader(resourceName, errors, entityResolver).read(
- new InputSource(stream));
- if (errors.size() != 0) {
- throw new MappingException(
- ConsoleMessages.ConsoleConfiguration_invalid_configuration, errors
- .get(0));
- }
-
- List<Node> list = doc.getRootElement()
- .element("session-factory").elements("mapping"); //$NON-NLS-1$
//$NON-NLS-2$
- for (Node element : list) {
- element.getParent().remove(element);
- }
-
- DOMWriter dw = new DOMWriter();
- Document document = dw.write(doc);
- return localCfg.configure(document);
-
- } catch (DocumentException e) {
- throw new HibernateException(
- ConsoleMessages.ConsoleConfiguration_could_not_parse_configuration
- + resourceName, e);
- } finally {
- try {
- if (stream != null)
- stream.close();
- } catch (IOException ioe) {
- // log.warn( "could not close input stream for: " + resourceName, ioe );
- }
- }
- } else {
- if (configXMLFile != null) {
- return localCfg.configure(configXMLFile);
- } else {
- Configuration resultCfg = localCfg;
- if (checkHibernateResoureExistence("/hibernate.cfg.xml")) { //$NON-NLS-1$
- resultCfg = localCfg.configure();
- }
- return resultCfg;
- }
- }
- }
-
- private boolean checkHibernateResoureExistence(String resource) {
- InputStream is = null;
- try {
- is = ConfigHelper.getResourceAsStream(resource);
- } catch (HibernateException e) {
- // just ignore
- } finally {
- try {
- if (is != null)
- is.close();
- } catch (IOException e) {
- // ignore
- }
- }
- return (is != null);
- }
-
- private Configuration configureConnectionProfile(Configuration localCfg) {
- String connectionProfile = prefs.getConnectionProfileName();
- if (connectionProfile == null) {
- return localCfg;
- }
- IConnectionProfile profile = ProfileManager.getInstance().getProfileByName(
- connectionProfile);
- if (profile != null) {
- refreshProfile(profile);
- //
- final Properties invokeProperties = localCfg.getProperties();
- // set this property to null!
- invokeProperties.remove(Environment.DATASOURCE);
- localCfg.setProperties(invokeProperties);
- Properties cpProperties = profile.getProperties(profile.getProviderId());
- // seems we should not setup dialect here
- // String dialect =
- //
"org.hibernate.dialect.HSQLDialect";//cpProperties.getProperty("org.eclipse.datatools.connectivity.db.driverClass");
- // invoke.setProperty(Environment.DIALECT, dialect);
- String driver = cpProperties
- .getProperty("org.eclipse.datatools.connectivity.db.driverClass");
//$NON-NLS-1$
- localCfg.setProperty(Environment.DRIVER, driver);
- // TODO:
- @SuppressWarnings("unused")
- String driverJarPath = cpProperties.getProperty("jarList"); //$NON-NLS-1$
- String url =
cpProperties.getProperty("org.eclipse.datatools.connectivity.db.URL");
//$NON-NLS-1$
- // url += "/";// +
- //
cpProperties.getProperty("org.eclipse.datatools.connectivity.db.databaseName");
- localCfg.setProperty(Environment.URL, url);
- String user = cpProperties
- .getProperty("org.eclipse.datatools.connectivity.db.username");
//$NON-NLS-1$
- if (null != user && user.length() > 0) {
- localCfg.setProperty(Environment.USER, user);
- }
- String pass = cpProperties
- .getProperty("org.eclipse.datatools.connectivity.db.password");
//$NON-NLS-1$
- if (null != pass && pass.length() > 0) {
- localCfg.setProperty(Environment.PASS, pass);
- }
- } else {
- String out = NLS.bind(
- ConsoleMessages.ConsoleConfiguration_connection_profile_not_found,
- connectionProfile);
- throw new HibernateConsoleRuntimeException(out, null);
- }
- return localCfg;
- }
-
- @SuppressWarnings("unused")
- private void autoConfigureDialect(Configuration localCfg) {
- if (localCfg.getProperty(Environment.DIALECT) == null) {
- String url = localCfg.getProperty(Environment.URL);
- String user = localCfg.getProperty(Environment.USER);
- String pass = localCfg.getProperty(Environment.PASS);
- Connection connection = null;
- try {
- connection = DriverManager.getConnection(url, user, pass);
- // SQL Dialect:
- Dialect dialect = DialectFactory.buildDialect(localCfg.getProperties(), connection);
- localCfg.setProperty(Environment.DIALECT, dialect.toString());
- } catch (SQLException e) {
- // can't determine dialect
- }
- if (connection != null) {
- try {
- connection.close();
- } catch (SQLException e) {
- // ignore
- }
- }
- }
- }
-
- public static void refreshProfile(IConnectionProfile profile) {
- // refresh profile (refresh jpa connection):
- // get fresh information about current db structure and update error markers
- if (profile.getConnectionState() == IConnectionProfile.CONNECTED_STATE) {
- profile.disconnect(null);
- }
- profile.connect(null);
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStubJDBCMetaData.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStubJDBCMetaData.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStubJDBCMetaData.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,49 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.hibernate.cfg.JDBCMetaDataConfiguration;
-import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
-
-public class ConfigurationStubJDBCMetaData extends ConfigurationStub {
-
- protected JDBCMetaDataConfiguration jdbcMetaDataConfiguration;
-
- protected ConfigurationStubJDBCMetaData(JDBCMetaDataConfiguration configuration) {
- super(configuration);
- jdbcMetaDataConfiguration = configuration;
- }
-
- public void setProperties(Properties properties) {
- jdbcMetaDataConfiguration.setProperties(properties);
- }
-
- public void setPreferBasicCompositeIds(boolean flag) {
- jdbcMetaDataConfiguration.setPreferBasicCompositeIds(flag);
- }
-
- public void setReverseEngineeringStrategy(ReverseEngineeringStrategy
reverseEngineeringStrategy) {
- jdbcMetaDataConfiguration.setReverseEngineeringStrategy(reverseEngineeringStrategy);
- }
-
- public void readFromJDBC() {
- jdbcMetaDataConfiguration.readFromJDBC();
- }
-
- public ArrayList<TableStub> getTableMappingsArr() {
- ArrayList<TableStub> arr = new ArrayList<TableStub>();
- Iterator<?> it = jdbcMetaDataConfiguration.getTableMappings();
- while (it.hasNext() ) {
- Object table = it.next();
- arr.add(new TableStub(table));
- }
- return arr;
- }
-
- public Iterator<TableStub> getTableMappingsIt() {
- return getTableMappingsArr().iterator();
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConnectionProviderStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConnectionProviderStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConnectionProviderStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,15 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.connection.ConnectionProvider;
-
-public class ConnectionProviderStub {
- protected ConnectionProvider connectionProvider;
-
- protected ConnectionProviderStub(Object connectionProvider) {
- this.connectionProvider = (ConnectionProvider)connectionProvider;
- }
-
- public void close() {
- connectionProvider.close();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DefaultDatabaseCollectorStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DefaultDatabaseCollectorStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DefaultDatabaseCollectorStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,39 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.hibernate.cfg.reveng.DefaultDatabaseCollector;
-import org.hibernate.mapping.Table;
-
-public class DefaultDatabaseCollectorStub {
- protected DefaultDatabaseCollector defaultDatabaseCollector;
-
- protected DefaultDatabaseCollectorStub(Object defaultDatabaseCollector) {
- this.defaultDatabaseCollector = (DefaultDatabaseCollector)defaultDatabaseCollector;
- }
-
- public static DefaultDatabaseCollectorStub newInstance() {
- return new DefaultDatabaseCollectorStub(new DefaultDatabaseCollector());
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<Entry<String, List<TableStub>>> getQualifierEntries()
{
- Iterator<Map.Entry<String, List<Table>>> it =
defaultDatabaseCollector.getQualifierEntries();
- HashMap<String, List<TableStub>> map = new HashMap<String,
List<TableStub>>();
- while (it.hasNext()) {
- Map.Entry<String, List<Table>> entry = it.next();
- ArrayList<TableStub> arr = new ArrayList<TableStub>();
- Iterator<Table> itValue = (Iterator<Table>)entry.getValue().iterator();
- while (itValue.hasNext()) {
- arr.add(new TableStub(itValue.next()));
- }
- map.put(entry.getKey(), arr);
- }
- return map.entrySet().iterator();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DependantValueStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DependantValueStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DependantValueStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,13 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.DependantValue;
-
-public class DependantValueStub extends SimpleValueStub {
- protected DependantValue dependantValue;
-
- protected DependantValueStub(Object dependantValue) {
- super(dependantValue);
- this.dependantValue = (DependantValue)dependantValue;
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DialectStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DialectStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DialectStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,15 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.dialect.Dialect;
-
-public class DialectStub {
- protected Dialect dialect;
-
- protected DialectStub(Object dialect) {
- this.dialect = (Dialect)dialect;
- }
-
- public static DialectStub newInstance(final String dialectName) throws
InstantiationException, IllegalAccessException, ClassNotFoundException {
- return new DialectStub(Class.forName(dialectName).newInstance());
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EntityModeStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EntityModeStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EntityModeStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,16 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.EntityMode;
-
-public class EntityModeStub {
-
- public static final EntityModeStub POJO = new EntityModeStub(EntityMode.POJO);
- public static final EntityModeStub DOM4J = new EntityModeStub(EntityMode.DOM4J);
- public static final EntityModeStub MAP = new EntityModeStub(EntityMode.MAP);
-
- protected EntityMode entityMode;
-
- protected EntityModeStub(Object entityMode) {
- this.entityMode = (EntityMode)entityMode;
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EntityTypeStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EntityTypeStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EntityTypeStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,20 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.type.EntityType;
-
-public class EntityTypeStub extends AbstractTypeStub {
- protected EntityType entityType;
-
- protected EntityTypeStub(Object entityType) {
- super(entityType);
- this.entityType = (EntityType)entityType;
- }
-
- public String getAssociatedEntityName() {
- return entityType.getAssociatedEntityName();
- }
-
- public boolean isOneToOne() {
- return entityType.isOneToOne();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EnvironmentStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EnvironmentStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EnvironmentStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,46 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.hibernate.cfg.Environment;
-
-public class EnvironmentStub {
- public static final String DIALECT = Environment.DIALECT;
- public static final String DEFAULT_CATALOG = Environment.DEFAULT_CATALOG;
- public static final String DEFAULT_SCHEMA = Environment.DEFAULT_SCHEMA;
- public static final String DRIVER = Environment.DRIVER;
- public static final String PASS = Environment.PASS;
- public static final String SESSION_FACTORY_NAME = Environment.SESSION_FACTORY_NAME;
- public static final String URL = Environment.URL;
- public static final String USER = Environment.USER;
-
- @SuppressWarnings("unchecked")
- public static String[] extractHibernateProperties() {
- try {
- // TODO: extract property names from the Environment class in the users hibernate
- // configuration.
- Class cl = Environment.class;
- List<String> names = new ArrayList<String>();
- Field[] fields = cl.getFields();
- for (int i = 0; i < fields.length; i++) {
- Field field = fields[i];
- if (Modifier.isStatic(field.getModifiers()) &&
field.getType().equals(String.class)) {
- String str = (String) field.get(cl);
- if (str.startsWith("hibernate.")) { //$NON-NLS-1$
- names.add(str);
- }
- }
- }
- String[] propertyNames = (String[]) names.toArray(new String[names.size()]);
- Arrays.sort(propertyNames);
- return propertyNames;
- } catch (IllegalAccessException iae) {
- // ignore
- return new String[0];
- }
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/FetchModeStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/FetchModeStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/FetchModeStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,8 +0,0 @@
-package org.hibernate.console.stubs;
-
-public enum FetchModeStub {
- DEFAULT,
- SELECT,
- JOIN,
- SUBSELECT
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ForeignKeyStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ForeignKeyStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ForeignKeyStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,49 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.hibernate.mapping.Column;
-import org.hibernate.mapping.ForeignKey;
-
-public class ForeignKeyStub {
- protected ForeignKey foreignKey;
-
- protected ForeignKeyStub(Object foreignKey) {
- this.foreignKey = (ForeignKey)foreignKey;
- }
-
- public boolean containsColumn(ColumnStub column) {
- return foreignKey.containsColumn(column.column);
- }
-
- public TableStub getReferencedTable() {
- return new TableStub(foreignKey.getReferencedTable());
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<ColumnStub> columnIterator() {
- Iterator<Column> it = (Iterator<Column>)foreignKey.getColumnIterator();
- ArrayList<ColumnStub> al = new ArrayList<ColumnStub>();
- while (it.hasNext()) {
- al.add(new ColumnStub(it.next()));
- }
- return al.iterator();
- }
-
- @SuppressWarnings("unchecked")
- public List<ColumnStub> getReferencedColumns() {
- Iterator<Column> it = foreignKey.getReferencedColumns().iterator();
- ArrayList<ColumnStub> al = new ArrayList<ColumnStub>();
- while (it.hasNext()) {
- al.add(new ColumnStub(it.next()));
- }
- return al;
- }
-
- public boolean isReferenceToPrimaryKey() {
- return foreignKey.isReferenceToPrimaryKey();
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HQLCompletionProposalStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HQLCompletionProposalStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HQLCompletionProposalStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,44 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.tool.ide.completion.HQLCompletionProposal;
-
-public class HQLCompletionProposalStub {
-
- protected HQLCompletionProposal hqlCompletionProposal;
-
- protected HQLCompletionProposalStub(Object hqlCompletionProposal) {
- this.hqlCompletionProposal = (HQLCompletionProposal)hqlCompletionProposal;
- }
-
- public String getCompletion() {
- return hqlCompletionProposal.getCompletion();
- }
-
- public int getReplaceStart() {
- return hqlCompletionProposal.getReplaceStart();
- }
-
- public int getReplaceEnd() {
- return hqlCompletionProposal.getReplaceEnd();
- }
-
- public int getCompletionKind() {
- return hqlCompletionProposal.getCompletionKind();
- }
-
- public String getEntityName() {
- return hqlCompletionProposal.getEntityName();
- }
-
- public String getSimpleName() {
- return hqlCompletionProposal.getSimpleName();
- }
-
- public String getShortEntityName() {
- return hqlCompletionProposal.getShortEntityName();
- }
-
- public PropertyStub getProperty() {
- return new PropertyStub(hqlCompletionProposal.getProperty());
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HibernateConsoleRuntimeException.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HibernateConsoleRuntimeException.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HibernateConsoleRuntimeException.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.hibernate.console.stubs;
-
-/**
- * @author max
- *
- */
-public class HibernateConsoleRuntimeException extends RuntimeException {
-
- private static final long serialVersionUID = -9056528343206573782L;
-
- public HibernateConsoleRuntimeException(Throwable cause) {
- super("HibernateConsoleRuntimeException", cause); //$NON-NLS-1$
- }
-
- public HibernateConsoleRuntimeException(String message) {
- super(message);
- }
-
- public HibernateConsoleRuntimeException(String message, Throwable cause) {
- super(message, cause);
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HibernateStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HibernateStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HibernateStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,39 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.Hibernate;
-
-public class HibernateStub {
- public static final NullableTypeStub BOOLEAN = new NullableTypeStub(Hibernate.BOOLEAN);
- public static final NullableTypeStub BYTE = new NullableTypeStub(Hibernate.BYTE);
- public static final NullableTypeStub BIG_INTEGER = new
NullableTypeStub(Hibernate.BIG_INTEGER);
- public static final NullableTypeStub SHORT = new NullableTypeStub(Hibernate.SHORT);
- public static final NullableTypeStub CALENDAR = new
NullableTypeStub(Hibernate.CALENDAR);
- public static final NullableTypeStub CALENDAR_DATE = new
NullableTypeStub(Hibernate.CALENDAR_DATE);
- public static final NullableTypeStub INTEGER = new NullableTypeStub(Hibernate.INTEGER);
- public static final NullableTypeStub BIG_DECIMAL = new
NullableTypeStub(Hibernate.BIG_DECIMAL);
- public static final NullableTypeStub CHARACTER = new
NullableTypeStub(Hibernate.CHARACTER);
- public static final NullableTypeStub CLASS = new NullableTypeStub(Hibernate.CLASS);
- public static final NullableTypeStub CURRENCY = new
NullableTypeStub(Hibernate.CURRENCY);
- public static final NullableTypeStub DATE = new NullableTypeStub(Hibernate.DATE);
- public static final NullableTypeStub DOUBLE = new NullableTypeStub(Hibernate.DOUBLE);
- public static final NullableTypeStub FLOAT = new NullableTypeStub(Hibernate.FLOAT);
- public static final NullableTypeStub LOCALE = new NullableTypeStub(Hibernate.LOCALE);
- public static final NullableTypeStub LONG = new NullableTypeStub(Hibernate.LONG);
- public static final NullableTypeStub STRING = new NullableTypeStub(Hibernate.STRING);
- public static final NullableTypeStub TEXT = new NullableTypeStub(Hibernate.TEXT);
- public static final NullableTypeStub TIME = new NullableTypeStub(Hibernate.TIME);
- public static final NullableTypeStub TIMESTAMP = new
NullableTypeStub(Hibernate.TIMESTAMP);
- public static final NullableTypeStub TIMEZONE = new
NullableTypeStub(Hibernate.TIMEZONE);
- public static final NullableTypeStub TRUE_FALSE = new
NullableTypeStub(Hibernate.TRUE_FALSE);
- public static final NullableTypeStub YES_NO = new NullableTypeStub(Hibernate.YES_NO);
-
- protected Hibernate hibernate;
-
- protected HibernateStub(Object hibernate) {
- this.hibernate = (Hibernate)hibernate;
- }
-
- public static boolean isInitialized(Object proxy) {
- return Hibernate.isInitialized(proxy);
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HqlSqlTokenTypesStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HqlSqlTokenTypesStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HqlSqlTokenTypesStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,7 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.hql.antlr.HqlSqlTokenTypes;
-
-public class HqlSqlTokenTypesStub {
- public static final int IDENT = HqlSqlTokenTypes.IDENT;
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IHQLCodeAssistStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IHQLCodeAssistStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IHQLCodeAssistStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,19 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.tool.ide.completion.HQLCodeAssist;
-
-public class IHQLCodeAssistStub {
- protected HQLCodeAssist hqlCodeAssist;
-
- protected IHQLCodeAssistStub(Object hqlCodeAssist) {
- this.hqlCodeAssist = (HQLCodeAssist)hqlCodeAssist;
- }
-
- public static IHQLCodeAssistStub createHQLCodeAssist() {
- return new IHQLCodeAssistStub(new HQLCodeAssist(null));
- }
-
- public void codeComplete(String query, int position, IHQLCompletionRequestorStub
requestor) {
- hqlCodeAssist.codeComplete(query, position, requestor.hqlCompletionRequestor);
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IHQLCompletionRequestorStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IHQLCompletionRequestorStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IHQLCompletionRequestorStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,26 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.tool.ide.completion.HQLCompletionProposal;
-import org.hibernate.tool.ide.completion.IHQLCompletionRequestor;
-
-public abstract class IHQLCompletionRequestorStub {
-
- protected IHQLCompletionRequestor hqlCompletionRequestor;
-
- protected IHQLCompletionRequestorStub() {
- hqlCompletionRequestor = new IHQLCompletionRequestor() {
-
- public boolean accept(HQLCompletionProposal proposal) {
- return IHQLCompletionRequestorStub.this.accept(new
HQLCompletionProposalStub(proposal));
- }
-
- public void completionFailure(String errorMessage) {
- IHQLCompletionRequestorStub.this.completionFailure(errorMessage);
- }
-
- };
- }
-
- public abstract boolean accept(HQLCompletionProposalStub proposal);
- public abstract void completionFailure(String errorMessage);
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IdentifierBagStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IdentifierBagStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IdentifierBagStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,18 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.IdentifierBag;
-
-public class IdentifierBagStub extends IdentifierCollectionStub {
- protected IdentifierBag identifierBag;
-
- protected IdentifierBagStub(Object identifierBag) {
- super(identifierBag);
- this.identifierBag = (IdentifierBag)identifierBag;
- }
-
- @Override
- public Object accept(ValueVisitorStub visitor) {
- return visitor.accept(this);
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IdentifierCollectionStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IdentifierCollectionStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IdentifierCollectionStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,13 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.IdentifierCollection;
-
-public abstract class IdentifierCollectionStub extends CollectionStub {
- protected IdentifierCollection identifierCollection;
-
- protected IdentifierCollectionStub(Object identifierCollection) {
- super(identifierCollection);
- this.identifierCollection = (IdentifierCollection)identifierCollection;
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ImmutableTypeStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ImmutableTypeStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ImmutableTypeStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,13 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.type.ImmutableType;
-
-public class ImmutableTypeStub extends NullableTypeStub {
-
- protected ImmutableType immutableType;
-
- protected ImmutableTypeStub(Object immutableType) {
- super(immutableType);
- this.immutableType = (ImmutableType)immutableType;
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IndexedCollectionStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IndexedCollectionStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IndexedCollectionStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,18 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.IndexedCollection;
-
-public abstract class IndexedCollectionStub extends CollectionStub {
-
- protected IndexedCollection indexedCollection;
-
- protected IndexedCollectionStub(Object indexedCollection) {
- super(indexedCollection);
- this.indexedCollection = (IndexedCollection)indexedCollection;
- }
-
- public void setIndex(ValueStub index) {
- indexedCollection.setIndex(index.value);
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IntegerTypeStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IntegerTypeStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IntegerTypeStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,13 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.type.IntegerType;
-
-public class IntegerTypeStub extends PrimitiveTypeStub {
-
- protected IntegerType integerType;
-
- protected IntegerTypeStub(Object integerType) {
- super(integerType);
- this.integerType = (IntegerType)integerType;
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JDBCReaderStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JDBCReaderStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JDBCReaderStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,27 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.util.List;
-import java.util.Properties;
-
-import org.hibernate.cfg.JDBCReaderFactory;
-import org.hibernate.cfg.reveng.JDBCReader;
-import org.hibernate.cfg.reveng.ProgressListener;
-import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
-
-public class JDBCReaderStub {
-
- protected JDBCReader jdbcReader;
-
- protected JDBCReaderStub(Properties cfg, SettingsStub settings,
ReverseEngineeringStrategy revengStrategy) {
- jdbcReader = JDBCReaderFactory.newJDBCReader(cfg, settings.settings, revengStrategy);
- }
-
- public static JDBCReaderStub newInstance(Properties cfg, SettingsStub settings,
ReverseEngineeringStrategy revengStrategy) {
- return new JDBCReaderStub(cfg, settings, revengStrategy);
- }
-
- @SuppressWarnings("unchecked")
- public List readDatabaseSchema(DefaultDatabaseCollectorStub dbs, String catalog, String
schema, ProgressListener progress) {
- return jdbcReader.readDatabaseSchema(dbs.defaultDatabaseCollector, catalog, schema,
progress);
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JoinStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JoinStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JoinStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,25 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.hibernate.mapping.Join;
-import org.hibernate.mapping.Property;
-
-public class JoinStub {
- protected Join join;
-
- protected JoinStub(Object join) {
- this.join = (Join)join;
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<PropertyStub> getPropertyIterator() {
- Iterator<Property> it = (Iterator<Property>)join.getPropertyIterator();
- ArrayList<PropertyStub> al = new ArrayList<PropertyStub>();
- while (it.hasNext()) {
- al.add(new PropertyStub(it.next()));
- }
- return al.iterator();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JoinedSubclassStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JoinedSubclassStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JoinedSubclassStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,26 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.JoinedSubclass;
-
-public class JoinedSubclassStub extends SubclassStub {
-
- protected JoinedSubclass joinedSubclass;
-
- protected JoinedSubclassStub(Object joinedSubclass) {
- super(joinedSubclass);
- this.joinedSubclass = (JoinedSubclass)joinedSubclass;
- }
-
- public static JoinedSubclassStub newInstance(PersistentClassStub persistentClass) {
- return new JoinedSubclassStub(persistentClass);
- }
-
- public void setTable(TableStub table) {
- joinedSubclass.setTable(table.getTable());
- }
-
- public void setKey(KeyValueStub key) {
- joinedSubclass.setKey(key.keyValue);
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/KeyValueStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/KeyValueStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/KeyValueStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,16 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.KeyValue;
-
-public abstract class KeyValueStub extends ValueStub {
- protected KeyValue keyValue;
-
- protected KeyValueStub(Object keyValue) {
- super(keyValue);
- this.keyValue = (KeyValue)keyValue;
- }
-
- @Override
- public abstract Object accept(ValueVisitorStub visitor);
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ListStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ListStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ListStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,26 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.List;
-
-public class ListStub extends IndexedCollectionStub {
- protected List list;
-
- protected ListStub(Object list) {
- super(list);
- this.list = (List)list;
- }
-
- public static ListStub newInstance(PersistentClassStub owner) {
- return new ListStub(new List(owner.persistentClass));
- }
-
- @Override
- public Object accept(ValueVisitorStub visitor) {
- return visitor.accept(this);
- }
-
- public ValueStub getIndex() {
- return ValueStubFactory.createValueStub(list.getIndex());
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ManyToOneStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ManyToOneStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ManyToOneStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,21 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.ManyToOne;
-
-public class ManyToOneStub extends ToOneStub {
- protected ManyToOne manyToOne;
-
- protected ManyToOneStub(Object manyToOne) {
- super(manyToOne);
- this.manyToOne = (ManyToOne)manyToOne;
- }
-
- public static ManyToOneStub newInstance(TableStub table) {
- return new ManyToOneStub(new ManyToOne(table.table));
- }
-
- public String getReferencedEntityName() {
- return manyToOne.getReferencedEntityName();
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/MapStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/MapStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/MapStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,21 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.Map;
-
-public class MapStub extends IndexedCollectionStub {
- protected Map map;
-
- protected MapStub(Object map) {
- super(map);
- this.map = (Map)map;
- }
-
- public static MapStub newInstance(PersistentClassStub owner) {
- return new MapStub(new Map(owner.persistentClass));
- }
-
- @Override
- public Object accept(ValueVisitorStub visitor) {
- return visitor.accept(this);
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/MappingStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/MappingStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/MappingStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,11 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.engine.Mapping;
-
-public class MappingStub {
- protected Mapping mapping;
-
- protected MappingStub(Object mapping) {
- this.mapping = (Mapping)mapping;
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/MappingsStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/MappingsStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/MappingsStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,15 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.cfg.Mappings;
-
-public class MappingsStub {
- protected Mappings mappings;
-
- protected MappingsStub(Object mappings) {
- this.mappings = (Mappings)mappings;
- }
-
- public void addClass(PersistentClassStub persistentClass) {
- mappings.addClass(persistentClass.getPersistentClass());
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/NamingStrategyStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/NamingStrategyStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/NamingStrategyStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,53 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.cfg.NamingStrategy;
-
-public class NamingStrategyStub {
- protected NamingStrategy namingStrategy;
-
- protected NamingStrategyStub(Object namingStrategy) {
- this.namingStrategy = (NamingStrategy)namingStrategy;
- }
-
- @SuppressWarnings("nls")
- public static String getClassName() {
- return "org.hibernate.cfg.NamingStrategy";
- }
-
- public String classToTableName(String className) {
- return namingStrategy.classToTableName(className);
- }
-
- public String tableName(String tableName) {
- return namingStrategy.tableName(tableName);
- }
-
- public String columnName(String columnName) {
- return namingStrategy.columnName(columnName);
- }
-
- public String propertyToColumnName(String propertyName) {
- return namingStrategy.propertyToColumnName(propertyName);
- }
-
- public String joinKeyColumnName(String joinedColumn, String joinedTable) {
- return namingStrategy.joinKeyColumnName(joinedColumn, joinedTable);
- }
-
- public String collectionTableName(String ownerEntity, String ownerEntityTable,
- String associatedEntity, String associatedEntityTable,
- String propertyName) {
- return namingStrategy.collectionTableName(ownerEntity, ownerEntityTable,
- associatedEntity, associatedEntityTable, propertyName);
- }
-
- public String logicalColumnName(String columnName, String propertyName) {
- return namingStrategy.logicalColumnName(columnName, propertyName);
- }
-
- public String foreignKeyColumnName(String propertyName, String propertyEntityName,
- String propertyTableName, String referencedColumnName) {
- return namingStrategy.foreignKeyColumnName(propertyName,
- propertyEntityName, propertyTableName, referencedColumnName);
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/NullableTypeStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/NullableTypeStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/NullableTypeStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,21 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.type.NullableType;
-
-public class NullableTypeStub extends AbstractTypeStub {
-
- protected NullableType nullableType;
-
- protected NullableTypeStub(Object nullableType) {
- super(nullableType);
- this.nullableType = (NullableType)nullableType;
- }
-
- public String toString(Object value) {
- return nullableType.toString(value);
- }
-
- public Object fromStringValue(String xml) {
- return nullableType.fromStringValue(xml);
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/OneToManyStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/OneToManyStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/OneToManyStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,36 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.OneToMany;
-
-public class OneToManyStub extends ValueStub {
- protected OneToMany oneToMany;
-
- protected OneToManyStub(Object oneToMany) {
- super(oneToMany);
- this.oneToMany = (OneToMany)oneToMany;
- }
-
- public static OneToManyStub newInstance(PersistentClassStub owner) {
- return new OneToManyStub(new OneToMany(owner.persistentClass));
- }
-
- public void setAssociatedClass(PersistentClassStub associatedClass) {
- oneToMany.setAssociatedClass(associatedClass.persistentClass);
- }
-
- public void setReferencedEntityName(String referencedEntityName) {
- oneToMany.setReferencedEntityName(referencedEntityName);
- }
-
- public PersistentClassStub getAssociatedClass() {
- return
PersistentClassStubFactory.createPersistentClassStub(oneToMany.getAssociatedClass());
- }
-
- public Object accept(ValueVisitorStub visitor) {
- return visitor.accept(this);
- }
-
- public String getReferencedEntityName() {
- return oneToMany.getReferencedEntityName();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/OneToOneStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/OneToOneStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/OneToOneStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,21 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.OneToOne;
-
-public class OneToOneStub extends ToOneStub {
- protected OneToOne oneToOne;
-
- protected OneToOneStub(Object oneToOne) {
- super(oneToOne);
- this.oneToOne = (OneToOne)oneToOne;
- }
-
- public static OneToOneStub newInstance(TableStub table, PersistentClassStub owner) {
- return new OneToOneStub(new OneToOne(table.table, owner.persistentClass));
- }
-
- public String getEntityName() {
- return oneToOne.getEntityName();
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PersistentClassStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PersistentClassStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PersistentClassStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,98 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.hibernate.mapping.Join;
-import org.hibernate.mapping.PersistentClass;
-import org.hibernate.mapping.Property;
-
-public abstract class PersistentClassStub {
- protected PersistentClass persistentClass;
-
- protected PersistentClassStub(Object persistentClass) {
- this.persistentClass = (PersistentClass)persistentClass;
- }
-
- protected PersistentClass getPersistentClass() {
- return persistentClass;
- }
-
- public Boolean isAbstract() {
- return persistentClass.isAbstract();
- }
-
- public ValueStub getDiscriminator() {
- return ValueStubFactory.createValueStub(persistentClass.getDiscriminator());
- }
-
- public String getClassName() {
- return persistentClass.getClassName();
- }
-
- public String getEntityName() {
- return persistentClass.getEntityName();
- }
-
- public PropertyStub getIdentifierProperty() {
- return new PropertyStub(persistentClass.getIdentifierProperty());
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<PropertyStub> getPropertyIterator() {
- Iterator<Property> it = persistentClass.getPropertyIterator();
- ArrayList<PropertyStub> al = new ArrayList<PropertyStub>();
- while (it.hasNext()) {
- al.add(new PropertyStub(it.next()));
- }
- return al.iterator();
- }
-
- public RootClassStub getRootClass() {
- return new RootClassStub(persistentClass.getRootClass());
- }
-
- public PropertyStub getVersion() {
- return new PropertyStub(persistentClass.getVersion());
- }
-
- public TableStub getTable() {
- return new TableStub(persistentClass.getTable());
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<JoinStub> getJoinIterator() {
- Iterator<Join> it = (Iterator<Join>)persistentClass.getJoinIterator();
- ArrayList<JoinStub> al = new ArrayList<JoinStub>();
- while (it.hasNext()) {
- al.add(new JoinStub(it.next()));
- }
- return al.iterator();
- }
-
- public KeyValueStub getIdentifier() {
- return
(KeyValueStub)ValueStubFactory.createValueStub(persistentClass.getIdentifier());
- }
-
- public PersistentClassStub getSuperclass() {
- return
PersistentClassStubFactory.createPersistentClassStub(persistentClass.getSuperclass());
- }
-
- public PropertyStub getProperty(String propertyName) {
- return new PropertyStub(persistentClass.getProperty(propertyName));
- }
-
- public String getNodeName() {
- return persistentClass.getNodeName();
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<PropertyStub> getPropertyClosureIterator() {
- Iterator<Property> it =
(Iterator<Property>)persistentClass.getPropertyClosureIterator();
- ArrayList<PropertyStub> al = new ArrayList<PropertyStub>();
- while (it.hasNext()) {
- al.add(new PropertyStub(it.next()));
- }
- return al.iterator();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PersistentClassStubFactory.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PersistentClassStubFactory.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PersistentClassStubFactory.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,26 +0,0 @@
-package org.hibernate.console.stubs;
-
-public class PersistentClassStubFactory {
- @SuppressWarnings("unchecked")
- public static PersistentClassStub createPersistentClassStub(Object value) {
- final Class cl = value.getClass();
- if (0 == "org.hibernate.mapping.RootClass".compareTo(cl.getName())) {
//$NON-NLS-1$
- return new RootClassStub(value);
- //} else if (0 ==
"org.hibernate.mapping.PersistentClass".compareTo(cl.getName())) {
//$NON-NLS-1$
- // return new PersistentClassStub(value);
- } else if (0 == "org.hibernate.mapping.Subclass".compareTo(cl.getName())) {
//$NON-NLS-1$
- return new SubclassStub(value);
- } else if (0 ==
"org.hibernate.mapping.JoinedSubclass".compareTo(cl.getName())) { //$NON-NLS-1$
- return new JoinedSubclassStub(value);
- } else if (0 ==
"org.hibernate.mapping.SingleTableSubclass".compareTo(cl.getName())) {
//$NON-NLS-1$
- return new SingleTableSubclassStub(value);
- //} else if (0 ==
"org.hibernate.mapping.UnionSubclass".compareTo(cl.getName())) { //$NON-NLS-1$
- // return new UnionSubclassStub(value);
- }
- return null;
- }
-
- public static PersistentClassStub createPersistentClassStub(PersistentClassStub value)
{
- return createPersistentClassStub(value.persistentClass);
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PrimaryKeyStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PrimaryKeyStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PrimaryKeyStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,57 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.hibernate.mapping.Column;
-import org.hibernate.mapping.PrimaryKey;
-
-public class PrimaryKeyStub {
- protected PrimaryKey primaryKey;
-
- protected PrimaryKeyStub(Object primaryKey) {
- this.primaryKey = (PrimaryKey)primaryKey;
- }
-
- public boolean containsColumn(ColumnStub column) {
- return primaryKey.containsColumn(column.column);
- }
-
- public String getName() {
- return primaryKey.getName();
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<ColumnStub> columnIterator() {
- Iterator<Column> it = (Iterator<Column>)primaryKey.getColumnIterator();
- ArrayList<ColumnStub> al = new ArrayList<ColumnStub>();
- while (it.hasNext()) {
- al.add(new ColumnStub(it.next()));
- }
- return al.iterator();
- }
-
- @SuppressWarnings("unchecked")
- public List<ColumnStub> getColumns() {
- Iterator<Column> it = (Iterator<Column>)primaryKey.getColumnIterator();
- ArrayList<ColumnStub> al = new ArrayList<ColumnStub>();
- while (it.hasNext()) {
- al.add(new ColumnStub(it.next()));
- }
- return al;
- }
-
- public int getColumnSpan() {
- return primaryKey.getColumnSpan();
- }
-
- public ColumnStub getColumn(int i) {
- return new ColumnStub(primaryKey.getColumn(i));
- }
-
- public TableStub getTable() {
- return new TableStub(primaryKey.getTable());
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PrimitiveArrayStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PrimitiveArrayStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PrimitiveArrayStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,21 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.PrimitiveArray;
-
-public class PrimitiveArrayStub extends ArrayStub {
- protected PrimitiveArray primitiveArray;
-
- protected PrimitiveArrayStub(Object primitiveArray) {
- super(primitiveArray);
- this.primitiveArray = (PrimitiveArray)primitiveArray;
- }
-
- public static PrimitiveArrayStub newInstance(PersistentClassStub owner) {
- return new PrimitiveArrayStub(new PrimitiveArray(owner.persistentClass));
- }
-
- public void setElement(ValueStub element) {
- primitiveArray.setElement(element.value);
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PrimitiveTypeStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PrimitiveTypeStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PrimitiveTypeStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,13 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.type.PrimitiveType;
-
-public class PrimitiveTypeStub extends ImmutableTypeStub {
-
- protected PrimitiveType primitiveType;
-
- protected PrimitiveTypeStub(Object primitiveType) {
- super(primitiveType);
- this.primitiveType = (PrimitiveType)primitiveType;
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PropertyStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PropertyStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PropertyStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,96 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.Property;
-
-public class PropertyStub {
- protected Property property;
-
- protected PropertyStub(Object property) {
- this.property = (Property)property;
- }
-
- public static PropertyStub newInstance() {
- return new PropertyStub(new Property());
- }
-
- public void setName(String name) {
- property.setName(name);
- }
-
- public void setValue(ValueStub value) {
- property.setValue(value.value);
- }
-
- public ValueStub getValue() {
- return ValueStubFactory.createValueStub(property.getValue());
- }
-
- public void setCascade(String cascade) {
- property.setCascade(cascade);
- }
-
- public String getName() {
- return property.getName();
- }
-
- public TypeStub getType() {
- return TypeStubFactory.createTypeStub(property.getType());
- }
-
- public PersistentClassStub getPersistentClass() {
- return
PersistentClassStubFactory.createPersistentClassStub(property.getPersistentClass());
- }
-
- public void setPersistentClass(PersistentClassStub ownerClass) {
- property.setPersistentClass(ownerClass.persistentClass);
- }
-
- public boolean isSelectable() {
- return property.isSelectable();
- }
-
- public boolean isInsertable() {
- return property.isInsertable();
- }
-
- public boolean isUpdateable() {
- return property.isUpdateable();
- }
-
- public boolean isLazy() {
- return property.isLazy();
- }
-
- public boolean isOptional() {
- return property.isOptional();
- }
-
- public boolean isNaturalIdentifier() {
- return property.isNaturalIdentifier();
- }
-
- public boolean isOptimisticLocked() {
- return property.isOptimisticLocked();
- }
-
- public String getCascade() {
- return property.getCascade();
- }
-
- public String getNodeName() {
- return property.getNodeName();
- }
-
- public boolean isBackRef() {
- return property.isBackRef();
- }
-
- public boolean isComposite() {
- return property.isComposite();
- }
-
- public String getPropertyAccessorName() {
- return property.getPropertyAccessorName();
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/RootClassStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/RootClassStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/RootClassStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,195 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.hibernate.mapping.RootClass;
-import org.hibernate.mapping.Subclass;
-
-public class RootClassStub extends PersistentClassStub {
- protected RootClass rootClass;
-
- protected RootClassStub(Object rootClass) {
- super(rootClass);
- this.rootClass = (RootClass)rootClass;
- }
-
- public static RootClassStub newInstance() {
- return new RootClassStub(new RootClass());
- }
-
- public String getClassName() {
- return rootClass.getClassName();
- }
-
- public void setDiscriminator(ValueStub discr) {
- rootClass.setDiscriminator(discr.value);
- }
-
- public TableStub getTable() {
- return new TableStub(rootClass.getTable());
- }
-
- public void addProperty(PropertyStub p) {
- rootClass.addProperty(p.property);
- }
-
- public void setIdentifierProperty(PropertyStub p) {
- rootClass.setIdentifierProperty(p.property);
- }
-
- public PropertyStub getIdentifierProperty() {
- return new PropertyStub(rootClass.getIdentifierProperty());
- }
-
- public void setEntityName(String entityName) {
- rootClass.setEntityName(entityName);
- }
-
- public void setClassName(String className) {
- rootClass.setClassName(className);
- }
-
- public void setProxyInterfaceName(String proxyInterfaceName) {
- rootClass.setProxyInterfaceName(proxyInterfaceName);
- }
-
- public void setLazy(boolean lazy) {
- rootClass.setLazy(lazy);
- }
-
- public void setTable(TableStub table) {
- rootClass.setTable(table.table);
- }
-
- public void setAbstract(Boolean isAbstract) {
- rootClass.setAbstract(isAbstract);
- }
-
- public String getNodeName() {
- return rootClass.getNodeName();
- }
-
- public KeyValueStub getIdentifier() {
- return (KeyValueStub)ValueStubFactory.createValueStub(rootClass.getIdentifier());
- }
-
- public boolean isCustomDeleteCallable() {
- return rootClass.isCustomDeleteCallable();
- }
-
- public boolean isCustomInsertCallable() {
- return rootClass.isCustomInsertCallable();
- }
-
- public boolean isCustomUpdateCallable() {
- return rootClass.isCustomUpdateCallable();
- }
-
- public boolean isDiscriminatorInsertable() {
- return rootClass.isDiscriminatorInsertable();
- }
-
- public boolean isDiscriminatorValueNotNull() {
- return rootClass.isDiscriminatorValueNotNull();
- }
-
- public boolean isDiscriminatorValueNull() {
- return rootClass.isDiscriminatorValueNull();
- }
-
- public boolean isExplicitPolymorphism() {
- return rootClass.isExplicitPolymorphism();
- }
-
- public boolean isForceDiscriminator() {
- return rootClass.isForceDiscriminator();
- }
-
- public boolean isInherited() {
- return rootClass.isInherited();
- }
-
- public boolean isJoinedSubclass() {
- return rootClass.isJoinedSubclass();
- }
-
- public boolean isLazy() {
- return rootClass.isLazy();
- }
-
- public boolean isLazyPropertiesCacheable() {
- return rootClass.isLazyPropertiesCacheable();
- }
-
- public boolean isMutable() {
- return rootClass.isMutable();
- }
-
- public boolean isPolymorphic() {
- return rootClass.isPolymorphic();
- }
-
- public boolean isVersioned() {
- return rootClass.isVersioned();
- }
-
- public int getBatchSize() {
- return rootClass.getBatchSize();
- }
-
- public String getCacheConcurrencyStrategy() {
- return rootClass.getCacheConcurrencyStrategy();
- }
-
- public String getCustomSQLDelete() {
- return rootClass.getCustomSQLDelete();
- }
-
- public String getCustomSQLInsert() {
- return rootClass.getCustomSQLInsert();
- }
-
- public String getCustomSQLUpdate() {
- return rootClass.getCustomSQLUpdate();
- }
-
- public String getDiscriminatorValue() {
- return rootClass.getDiscriminatorValue();
- }
-
- public String getLoaderName() {
- return rootClass.getLoaderName();
- }
-
- public int getOptimisticLockMode() {
- return rootClass.getOptimisticLockMode();
- }
-
- public String getTemporaryIdTableDDL() {
- return rootClass.getTemporaryIdTableDDL();
- }
-
- public String getTemporaryIdTableName() {
- return rootClass.getTemporaryIdTableName();
- }
-
- public String getWhere() {
- return rootClass.getWhere();
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<SubclassStub> getSubclassIterator() {
- Iterator<Subclass> it =
(Iterator<Subclass>)rootClass.getSubclassIterator();
- ArrayList<SubclassStub> al = new ArrayList<SubclassStub>();
- while (it.hasNext()) {
- al.add(new SubclassStub(it.next()));
- }
- return al.iterator();
- }
-
- @Override
- public ValueStub getDiscriminator() {
- return ValueStubFactory.createValueStub(rootClass.getDiscriminator());
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SessionStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SessionStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SessionStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,345 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.sql.Time;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-import org.hibernate.Criteria;
-import org.hibernate.EntityMode;
-import org.hibernate.Session;
-import org.hibernate.Query;
-import org.hibernate.HibernateException;
-import org.hibernate.SessionFactory;
-import org.hibernate.console.ConsoleMessages;
-import org.hibernate.console.ConsoleQueryParameter;
-import org.hibernate.console.QueryInputModel;
-import org.hibernate.console.util.CollectionPropertySource;
-import org.hibernate.engine.SessionImplementor;
-import org.hibernate.metadata.ClassMetadata;
-import org.hibernate.metadata.CollectionMetadata;
-import org.hibernate.proxy.HibernateProxyHelper;
-import org.hibernate.type.Type;
-
-import bsh.EvalError;
-import bsh.Interpreter;
-
-public class SessionStub {
-
- protected Session session;
-
- protected SessionStub(Session session) {
- this.session = session;
- }
-
- public boolean isOpen() {
- boolean res = false;
- if (session != null) {
- res = session.isOpen();
- }
- return res;
- }
-
- public void close(List<Throwable> exceptions) {
- if (session != null && session.isOpen()) {
- try {
- session.close();
- } catch (HibernateException e) {
- exceptions.add(e);
- }
- }
- }
-
- public boolean contains(Object obj) {
- boolean res = false;
- if (session != null) {
- res = session.contains(obj);
- }
- return res;
- }
-
- public boolean hasMetaData(Object obj) {
- boolean res = false;
- if (session != null) {
- res = session.getSessionFactory().getClassMetadata(
- HibernateProxyHelper.getClassWithoutInitializingProxy(obj)) != null;
- }
- return res;
- }
-
- public boolean hasMetaData(Object obj, List<Throwable> exceptions) {
- boolean res = false;
- if (session != null) {
- try {
- res = session.getSessionFactory().getClassMetadata(
- HibernateProxyHelper.getClassWithoutInitializingProxy(obj)) != null;
- } catch (HibernateException e) {
- exceptions.add(e);
- }
- }
- return res;
- }
-
- public String getEntityName(Object obj) {
- String res = null;
- if (session != null) {
- res = session.getEntityName(obj);
- }
- return res;
- }
-
- public String getEntityName(Object obj, List<Throwable> exceptions) {
- String res = null;
- if (session != null) {
- try {
- res = session.getEntityName(obj);
- } catch (HibernateException e) {
- exceptions.add(e);
- }
- }
- return res;
- }
-
- public Object getPropertyValue(Object obj, Object id) {
- Object pv = null;
- if (session != null) {
- SessionFactory sf = session.getSessionFactory();
- ClassMetadata classMetadata;
- if (session.isOpen()) {
- classMetadata = sf.getClassMetadata(session.getEntityName(obj));
- } else {
- classMetadata = sf.getClassMetadata(HibernateProxyHelper
- .getClassWithoutInitializingProxy(obj));
- }
- if (id.equals(classMetadata.getIdentifierPropertyName())) {
- pv = classMetadata.getIdentifier(obj, EntityMode.POJO);
- } else {
- pv = classMetadata.getPropertyValue(obj, (String) id, EntityMode.POJO);
- }
- if (pv instanceof Collection<?>) {
- CollectionMetadata collectionMetadata = sf.getCollectionMetadata(classMetadata
- .getEntityName()
- + "." + id); //$NON-NLS-1$
- if (collectionMetadata != null) {
- pv = new CollectionPropertySource((Collection<?>) pv);
- }
- }
- }
- return pv;
- }
-
- public IPropertyDescriptor[] getPropertyDescriptors(final Object obj) {
- SessionFactory sf = session.getSessionFactory();
- ClassMetadata classMetadata;
- if (session.isOpen()) {
- classMetadata = sf.getClassMetadata(session.getEntityName(obj));
- } else {
- classMetadata = sf.getClassMetadata(HibernateProxyHelper
- .getClassWithoutInitializingProxy(obj));
- }
- return initializePropertyDescriptors(classMetadata);
- }
-
- protected IPropertyDescriptor[] initializePropertyDescriptors(ClassMetadata
classMetadata) {
-
- String[] propertyNames = classMetadata.getPropertyNames();
- int length = propertyNames.length;
-
- PropertyDescriptor identifier = null;
-
- if (classMetadata.hasIdentifierProperty()) {
- identifier = new PropertyDescriptor(classMetadata.getIdentifierPropertyName(),
- classMetadata.getIdentifierPropertyName());
- identifier.setCategory(ConsoleMessages.EntityPropertySource_identifier);
- length++;
- }
-
- PropertyDescriptor[] properties = new PropertyDescriptor[length];
-
- int idx = 0;
- if (identifier != null) {
- properties[idx++] = identifier;
- }
-
- for (int i = 0; i < propertyNames.length; i++) {
- PropertyDescriptor prop = new PropertyDescriptor(propertyNames[i], propertyNames[i]);
- prop.setCategory(ConsoleMessages.EntityPropertySource_properties);
- properties[i + idx] = prop;
- }
-
- return properties;
- }
-
- @SuppressWarnings("unchecked")
- public List<Object> evalCriteria(String criteriaCode, QueryInputModel model, Time
queryTime,
- List<Throwable> exceptions) {
- List<Object> res = Collections.emptyList();
- if (criteriaCode.indexOf("System.exit") >= 0) { // TODO: externalize run
so we don't need this bogus check! //$NON-NLS-1$
- exceptions.add(new IllegalArgumentException(ConsoleMessages.JavaPage_not_allowed));
- return res;
- }
- try {
- Interpreter ip = setupInterpreter();
- final Integer maxResults = model.getMaxResults();
- long startTime = System.currentTimeMillis();
- Object o = ip.eval(criteriaCode);
- // ugly! TODO: make un-ugly!
- if (o instanceof Criteria) {
- Criteria criteria = (Criteria) o;
- if (maxResults != null) {
- criteria.setMaxResults(maxResults.intValue());
- }
- res = criteria.list();
- } else if (o instanceof List<?>) {
- res = (List<Object>) o;
- if (maxResults != null) {
- res = res.subList(0, Math.min(res.size(), maxResults.intValue()));
- }
- } else {
- res = new ArrayList<Object>();
- res.add(o);
- }
- queryTime.setTime(System.currentTimeMillis() - startTime);
- } catch (EvalError e) {
- exceptions.add(e);
- } catch (HibernateException e) {
- exceptions.add(e);
- }
- return res;
- }
-
- @SuppressWarnings("unchecked")
- private Interpreter setupInterpreter() throws EvalError, HibernateException {
- Interpreter interpreter = new Interpreter();
-
- interpreter.set("session", session); //$NON-NLS-1$
- interpreter.setClassLoader(Thread.currentThread().getContextClassLoader());
- SessionImplementor si = (SessionImplementor) session;
-
- Map<String, ?> map = si.getFactory().getAllClassMetadata();
-
- Iterator<String> iterator = map.keySet().iterator();
- // TODO: filter non classes.
- String imports = ""; //$NON-NLS-1$
- while (iterator.hasNext()) {
- String element = iterator.next();
- imports += "import " + element + ";\n"; //$NON-NLS-1$
//$NON-NLS-2$
- }
-
- imports += "import org.hibernate.criterion.*;\n"; //$NON-NLS-1$
- imports += "import org.hibernate.*;\n"; //$NON-NLS-1$
- // TODO: expose the parameters as values to be used in the code.
- interpreter.eval(imports);
-
- return interpreter;
- }
-
- public List<Object> evalQuery(String queryString, QueryInputModel model, Time
queryTime,
- List<Throwable> exceptions) {
- List<Object> res = Collections.emptyList();
- Query query = null;
- try {
- query = session.createQuery(queryString);
- } catch (HibernateException e) {
- exceptions.add(e);
- } catch (Exception e) {
- exceptions.add(e);
- }
- if (query == null) {
- return res;
- }
- try {
- res = new ArrayList<Object>();
- setupParameters(query, model);
- long startTime = System.currentTimeMillis();
- // need to be user-controllable to toggle between iterate, scroll etc.
- Iterator<?> iter = query.list().iterator();
- queryTime.setTime(System.currentTimeMillis() - startTime);
- while (iter.hasNext()) {
- Object element = iter.next();
- res.add(element);
- }
- } catch (HibernateException e) {
- exceptions.add(e);
- } catch (IllegalArgumentException e) {
- exceptions.add(e);
- }
- return res;
- }
-
- private void setupParameters(Query query, QueryInputModel model) {
- if (model.getMaxResults() != null) {
- query.setMaxResults(model.getMaxResults().intValue());
- }
- ConsoleQueryParameter[] qp = model.getQueryParameters();
- for (int i = 0; i < qp.length; i++) {
- ConsoleQueryParameter parameter = qp[i];
- try {
- int pos = Integer.parseInt(parameter.getName());
- query.setParameter(pos, calcValue(parameter), parameter.getType().type);
- } catch (NumberFormatException nfe) {
- query.setParameter(parameter.getName(), calcValue(parameter),
parameter.getType().type);
- }
- }
- }
-
- private Object calcValue(ConsoleQueryParameter parameter) {
- return parameter.getValueForQuery();
- }
-
- public List<String> evalQueryPathNames(String queryString, QueryInputModel model,
- List<Throwable> exceptions) {
- List<String> res = Collections.emptyList();
- Query query = null;
- try {
- query = session.createQuery(queryString);
- } catch (HibernateException e) {
- exceptions.add(e);
- } catch (Exception e) {
- exceptions.add(e);
- }
- if (query == null) {
- return res;
- }
- try {
- String[] returnAliases = null;
- try {
- returnAliases = query.getReturnAliases();
- } catch (NullPointerException e) {
- // ignore -
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
- }
- if (returnAliases == null) {
- Type[] t;
- try {
- t = query.getReturnTypes();
- } catch (NullPointerException npe) {
- t = new Type[] { null };
- // ignore -
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
- }
- res = new ArrayList<String>(t.length);
- for (int i = 0; i < t.length; i++) {
- Type type = t[i];
- if (type == null) {
- res.add("<multiple types>"); //$NON-NLS-1$
- } else {
- res.add(type.getName());
- }
- }
- } else {
- String[] t = returnAliases;
- res = new ArrayList<String>(t.length);
- for (int i = 0; i < t.length; i++) {
- res.add(t[i]);
- }
- }
- } catch (HibernateException e) {
- exceptions.add(e);
- }
- return res;
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SessionStubFactory.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SessionStubFactory.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SessionStubFactory.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,164 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.hibernate.SessionFactory;
-import org.hibernate.console.ConsoleMessages;
-import org.hibernate.console.util.ELTransformer;
-import org.hibernate.console.util.QLFormatHelper;
-import org.hibernate.engine.query.HQLQueryPlan;
-import org.hibernate.hql.QueryTranslator;
-import org.hibernate.impl.SessionFactoryImpl;
-import org.hibernate.metadata.ClassMetadata;
-import org.hibernate.metadata.CollectionMetadata;
-import org.hibernate.type.Type;
-
-public class SessionStubFactory {
-
- protected SessionFactory sessionFactory;
-
- public SessionStubFactory(ConfigurationStub configStub) {
- sessionFactory = configStub.buildSessionFactory();
- }
-
- public boolean isSessionFactoryCreated() {
- return sessionFactory != null;
- }
-
- public SessionStub openSession() {
- if (sessionFactory != null) {
- return new SessionStub(sessionFactory.openSession());
- }
- return null;
- }
-
- public void close() {
- if (sessionFactory != null) {
- sessionFactory.close();
- }
- }
-
- @SuppressWarnings("unchecked")
- public List<String> getClasses() {
- List<String> res = Collections.emptyList();
- if (sessionFactory != null) {
- res = new ArrayList<String>();
- res.addAll(sessionFactory.getAllClassMetadata().keySet());
- }
- return res;
- }
-
- @SuppressWarnings("unchecked")
- public Map<String, ClassMetadataStub> getClassMetaData() {
- if (sessionFactory == null) {
- return new HashMap<String, ClassMetadataStub>();
- }
- Map<String, ClassMetadata> allClassMetadata =
sessionFactory.getAllClassMetadata();
- Iterator<Map.Entry<String, ClassMetadata>> it =
allClassMetadata.entrySet().iterator();
- Map<String, ClassMetadataStub> res = new HashMap<String,
ClassMetadataStub>();
- while (it.hasNext()) {
- Map.Entry<String, ClassMetadata> entry = it.next();
- res.put(entry.getKey(), new ClassMetadataStub(entry.getValue()));
- }
- return res;
- }
-
- @SuppressWarnings("unchecked")
- public Map<String, CollectionMetadataStub> getCollectionMetaData() {
- if (sessionFactory == null) {
- return new HashMap<String, CollectionMetadataStub>();
- }
- Map<String, CollectionMetadata> allClassMetadata =
sessionFactory.getAllCollectionMetadata();
- Iterator<Map.Entry<String, CollectionMetadata>> it =
allClassMetadata.entrySet().iterator();
- Map<String, CollectionMetadataStub> res = new HashMap<String,
CollectionMetadataStub>();
- while (it.hasNext()) {
- Map.Entry<String, CollectionMetadata> entry = it.next();
- res.put(entry.getKey(), new CollectionMetadataStub(entry.getValue()));
- }
- return res;
- }
-
- /**
- * Given a ConsoleConfiguration and a query this method validates the query through
hibernate if
- * a sessionfactory is available.
- *
- * @param query
- * @param allowEL
- * if true, EL syntax will be replaced as a named variable
- */
- public void checkQuery(String query, boolean allowEL) {
- if (sessionFactory != null) {
- if (allowEL) {
- query = ELTransformer.removeEL(query);
- }
- new HQLQueryPlan(query, false, Collections.EMPTY_MAP,
- (SessionFactoryImpl) sessionFactory);
- }
- }
-
- public String generateSQL(String query) {
- try {
- SessionFactoryImpl sfimpl = (SessionFactoryImpl) sessionFactory; // hack - to get to
the
- // actual queries..
- StringBuffer str = new StringBuffer(256);
- HQLQueryPlan plan = new HQLQueryPlan(query, false, Collections.EMPTY_MAP, sfimpl);
-
- QueryTranslator[] translators = plan.getTranslators();
- for (int i = 0; i < translators.length; i++) {
- QueryTranslator translator = translators[i];
- if (translator.isManipulationStatement()) {
- str.append(ConsoleMessages.DynamicSQLPreviewView_manipulation_of + i
- + ":"); //$NON-NLS-1$
- Iterator<?> iterator = translator.getQuerySpaces().iterator();
- while (iterator.hasNext()) {
- Object qspace = iterator.next();
- str.append(qspace);
- if (iterator.hasNext()) {
- str.append(", ");} //$NON-NLS-1$
- }
-
- } else {
- Type[] returnTypes = translator.getReturnTypes();
- str.append(i + ": "); //$NON-NLS-1$
- for (int j = 0; j < returnTypes.length; j++) {
- Type returnType = returnTypes[j];
- str.append(returnType.getName());
- if (j < returnTypes.length - 1) {
- str.append(", ");} //$NON-NLS-1$
- }
- }
- str.append("\n-----------------\n"); //$NON-NLS-1$
- Iterator<?> sqls = translator.collectSqlStrings().iterator();
- while (sqls.hasNext()) {
- String sql = (String) sqls.next();
- str.append(QLFormatHelper.formatForScreen(sql));
- str.append("\n\n"); //$NON-NLS-1$
- }
- }
- return str.toString();
- } catch (Throwable t) {
- // StringWriter sw = new StringWriter();
- StringBuffer msgs = new StringBuffer();
-
- Throwable cause = t;
- while (cause != null) {
- msgs.append(t);
- if (cause.getCause() == cause) {
- cause = null;
- } else {
- cause = cause.getCause();
- if (cause != null)
- msgs.append(ConsoleMessages.DynamicSQLPreviewView_caused_by);
- }
- }
- // t.printStackTrace(new PrintWriter(sw));
- // return sw.getBuffer().toString();
- return msgs.toString();
- }
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SetStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SetStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SetStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,22 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.Set;
-
-public class SetStub extends CollectionStub {
- protected Set set;
-
- protected SetStub(Object set) {
- super(set);
- this.set = (Set)set;
- }
-
- public static SetStub newInstance(PersistentClassStub owner) {
- return new SetStub(new Set(owner.persistentClass));
- }
-
- @Override
- public Object accept(ValueVisitorStub visitor) {
- return visitor.accept(this);
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SettingsStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SettingsStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SettingsStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,23 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.cfg.Settings;
-
-public class SettingsStub {
- protected Settings settings;
-
- protected SettingsStub(Object settings) {
- this.settings = (Settings)settings;
- }
-
- public ConnectionProviderStub getConnectionProvider() {
- return new ConnectionProviderStub(settings.getConnectionProvider());
- }
-
- public String getDefaultCatalogName() {
- return settings.getDefaultCatalogName();
- }
-
- public String getDefaultSchemaName() {
- return settings.getDefaultSchemaName();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SimpleValueStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SimpleValueStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SimpleValueStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,52 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.util.Properties;
-
-import org.hibernate.mapping.SimpleValue;
-
-public class SimpleValueStub extends KeyValueStub {
-
- protected SimpleValue simpleValue;
-
- protected SimpleValueStub(Object simpleValue) {
- super(simpleValue);
- this.simpleValue = (SimpleValue)simpleValue;
- }
-
- public static SimpleValueStub newInstance() {
- return new SimpleValueStub(new SimpleValue());
- }
-
- public void setTypeName(String type) {
- simpleValue.setTypeName(type);
- }
-
- public void addColumn(ColumnStub column) {
- simpleValue.addColumn(column.column);
- }
-
- public void setTable(TableStub table) {
- simpleValue.setTable(table.table);
- }
-
- public void setTypeParameters(Properties parameterMap) {
- simpleValue.setTypeParameters(parameterMap);
- }
-
- public String getForeignKeyName() {
- return simpleValue.getForeignKeyName();
- }
-
- public String getTypeName() {
- return simpleValue.getTypeName();
- }
-
- public boolean isTypeSpecified() {
- return simpleValue.isTypeSpecified();
- }
-
- @Override
- public Object accept(ValueVisitorStub visitor) {
- return visitor.accept(this);
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SingleTableSubclassStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SingleTableSubclassStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SingleTableSubclassStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,17 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.SingleTableSubclass;
-
-public class SingleTableSubclassStub extends SubclassStub {
- protected SingleTableSubclass singleTableSubclass;
-
- protected SingleTableSubclassStub(Object singleTableSubclass) {
- super(singleTableSubclass);
- this.singleTableSubclass = (SingleTableSubclass)singleTableSubclass;
- }
-
- public static SingleTableSubclassStub newInstance(Object singleTableSubclass) {
- return new SingleTableSubclassStub(singleTableSubclass);
- }
-
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SubclassStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SubclassStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SubclassStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,41 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.mapping.Subclass;
-
-public class SubclassStub extends PersistentClassStub {
-
- protected Subclass subclass;
-
- protected SubclassStub(Object subclass) {
- super(subclass);
- this.subclass = (Subclass)subclass;
- }
-
- public void setClassName(String className) {
- subclass.setClassName(className);
- }
-
- public void setEntityName(String entityName) {
- subclass.setEntityName(entityName);
- }
-
- public void setDiscriminatorValue(String discriminatorValue) {
- subclass.setDiscriminatorValue(discriminatorValue);
- }
-
- public void setAbstract(Boolean isAbstract) {
- subclass.setAbstract(isAbstract);
- }
-
- public void addProperty(PropertyStub p) {
- subclass.addProperty(p.property);
- }
-
- public TableStub getRootTable() {
- return new TableStub(subclass.getRootTable());
- }
-
- public boolean isJoinedSubclass() {
- return subclass.isJoinedSubclass();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TableIdentifierStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TableIdentifierStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TableIdentifierStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,23 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.cfg.reveng.TableIdentifier;
-
-public class TableIdentifierStub {
- protected TableIdentifier tableIdentifier;
-
- protected TableIdentifierStub(Object tableIdentifier) {
- this.tableIdentifier = (TableIdentifier)tableIdentifier;
- }
-
- public static TableIdentifierStub create(TableStub table) {
- return newInstance(table.getCatalog(), table.getSchema(), table.getName() );
- }
-
- public static TableIdentifierStub newInstance(String catalog, String schema, String
name) {
- return new TableIdentifierStub(new TableIdentifier(catalog, schema, name));
- }
-
- public String getName() {
- return tableIdentifier.getName();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TableStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TableStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TableStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,92 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.hibernate.mapping.Column;
-import org.hibernate.mapping.ForeignKey;
-import org.hibernate.mapping.Table;
-
-public class TableStub {
- protected Table table;
-
- protected TableStub(Object table) {
- this.table = (Table)table;
- }
-
- protected Table getTable() {
- return table;
- }
-
- public static TableStub newInstance(String name) {
- return new TableStub(new Table(name));
- }
-
- public String getName() {
- return table.getName();
- }
-
- public PrimaryKeyStub getPrimaryKey() {
- return new PrimaryKeyStub(table.getPrimaryKey());
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<ForeignKeyStub> getForeignKeyIterator() {
- Iterator<ForeignKey> it =
(Iterator<ForeignKey>)table.getForeignKeyIterator();
- ArrayList<ForeignKeyStub> al = new ArrayList<ForeignKeyStub>();
- while (it.hasNext()) {
- al.add(new ForeignKeyStub(it.next()));
- }
- return al.iterator();
- }
-
- public String getCatalog() {
- return table.getCatalog();
- }
-
- public String getSchema() {
- return table.getSchema();
- }
-
- public DependantValueStub getIdentifierValue() {
- return new DependantValueStub(table.getIdentifierValue());
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<ColumnStub> getColumnIterator() {
- Iterator<Column> it = (Iterator<Column>)table.getColumnIterator();
- ArrayList<ColumnStub> al = new ArrayList<ColumnStub>();
- while (it.hasNext()) {
- al.add(new ColumnStub(it.next()));
- }
- return al.iterator();
- }
-
- public String getComment() {
- return table.getComment();
- }
-
- public String getRowId() {
- return table.getRowId();
- }
-
- public String getSubselect() {
- return table.getSubselect();
- }
-
- public boolean hasDenormalizedTables() {
- return table.hasDenormalizedTables();
- }
-
- public boolean isAbstract() {
- return table.isAbstract();
- }
-
- public boolean isAbstractUnionTable() {
- return table.isAbstractUnionTable();
- }
-
- public boolean isPhysicalTable() {
- return table.isPhysicalTable();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ToOneStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ToOneStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ToOneStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,36 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.FetchMode;
-import org.hibernate.mapping.ToOne;
-
-public class ToOneStub extends SimpleValueStub {
- protected ToOne toOne;
-
- protected ToOneStub(Object toOne) {
- super(toOne);
- this.toOne = (ToOne)toOne;
- }
-
- public void setReferencedEntityName(String referencedEntityName) {
- toOne.setReferencedEntityName(referencedEntityName);
- }
-
- public void setReferencedPropertyName(String name) {
- toOne.setReferencedPropertyName(name);
- }
-
- public void setFetchMode(FetchModeStub fetchMode) {
- if (FetchModeStub.DEFAULT.equals(fetchMode)) {
- toOne.setFetchMode(FetchMode.DEFAULT);
- } else if (FetchModeStub.SELECT.equals(fetchMode)) {
- toOne.setFetchMode(FetchMode.SELECT);
- } else if (FetchModeStub.JOIN.equals(fetchMode)) {
- toOne.setFetchMode(FetchMode.JOIN);
- } else if (FetchModeStub.SUBSELECT.equals(fetchMode)) {
- }
- }
-
- public boolean isEmbedded() {
- return toOne.isEmbedded();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TypeStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TypeStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TypeStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,36 +0,0 @@
-package org.hibernate.console.stubs;
-
-import org.hibernate.type.Type;
-
-public abstract class TypeStub {
- protected Type type;
-
- protected TypeStub(Object type) {
- this.type = (Type)type;
- }
-
- @SuppressWarnings("unchecked")
- public Class getReturnedClass() {
- return type.getReturnedClass();
- }
-
- public boolean isCollectionType() {
- return type.isCollectionType();
- }
-
- public boolean isEntityType() {
- return type.isEntityType();
- }
-
- public boolean isAnyType() {
- return type.isAnyType();
- }
-
- public boolean isComponentType() {
- return type.isComponentType();
- }
-
- public String getName() {
- return type.getName();
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TypeStubFactory.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TypeStubFactory.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TypeStubFactory.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,34 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.lang.reflect.Type;
-
-public class TypeStubFactory {
- @SuppressWarnings("unchecked")
- public static TypeStub createTypeStub(Object value) {
- final Class cl = value.getClass();
- if (isClassOrOffspring(cl, "org.hibernate.type.CollectionType")) {
//$NON-NLS-1$
- return new CollectionTypeStub(value);
- //} else if (0 == "org.hibernate.type.Type".compareTo(cl.getName())) {
//$NON-NLS-1$
- // return new TypeStub(value);
- } else if (isClassOrOffspring(cl, "org.hibernate.type.EntityType")) {
//$NON-NLS-1$
- return new EntityTypeStub(value);
- } else if (isClassOrOffspring(cl, "org.hibernate.type.NullableType")) {
//$NON-NLS-1$
- return new NullableTypeStub(value);
- }
- return new AbstractTypeStub(value);
- }
-
- protected static boolean isClassOrOffspring(final Class<?> cl, final String name)
{
- if (cl == null || name == null) {
- return false;
- }
- if (0 == name.compareTo(cl.getName())) {
- return true;
- }
- Type type = cl.getGenericSuperclass();
- if (type instanceof Class<?>) {
- return isClassOrOffspring((Class<?>)type, name);
- }
- return false;
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ValueStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ValueStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ValueStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,39 +0,0 @@
-package org.hibernate.console.stubs;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.hibernate.mapping.Column;
-import org.hibernate.mapping.Value;
-
-public abstract class ValueStub {
- protected Value value;
-
- protected ValueStub(Object value) {
- this.value = (Value)value;
- }
-
- public TableStub getTable() {
- return new TableStub(value.getTable());
- }
-
- public boolean isSimpleValue() {
- return value.isSimpleValue();
- }
-
- public TypeStub getType() {
- return TypeStubFactory.createTypeStub(value.getType());
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<ColumnStub> getColumnIterator() {
- Iterator<Column> it = (Iterator<Column>)value.getColumnIterator();
- ArrayList<ColumnStub> al = new ArrayList<ColumnStub>();
- while (it.hasNext()) {
- al.add(new ColumnStub(it.next()));
- }
- return al.iterator();
- }
-
- public abstract Object accept(ValueVisitorStub visitor);
-};
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ValueStubFactory.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ValueStubFactory.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ValueStubFactory.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,46 +0,0 @@
-package org.hibernate.console.stubs;
-
-public class ValueStubFactory {
- @SuppressWarnings("unchecked")
- public static ValueStub createValueStub(Object value) {
- final Class cl = value.getClass();
- if (0 == "org.hibernate.mapping.Bag".compareTo(cl.getName())) {
//$NON-NLS-1$
- return new BagStub(value);
- //} else if (0 ==
"org.hibernate.mapping.IdentifierCollection".compareTo(cl.getName())) {
//$NON-NLS-1$
- // return new IdentifierCollectionStub(value);
- } else if (0 ==
"org.hibernate.mapping.IdentifierBag".compareTo(cl.getName())) { //$NON-NLS-1$
- return new IdentifierBagStub(value);
- //} else if (0 ==
"org.hibernate.mapping.IndexedCollection".compareTo(cl.getName())) {
//$NON-NLS-1$
- // return new IndexedCollectionStub(value);
- } else if (0 == "org.hibernate.mapping.List".compareTo(cl.getName())) {
//$NON-NLS-1$
- return new ListStub(value);
- } else if (0 == "org.hibernate.mapping.Array".compareTo(cl.getName())) {
//$NON-NLS-1$
- return new ArrayStub(value);
- } else if (0 ==
"org.hibernate.mapping.PrimitiveArray".compareTo(cl.getName())) { //$NON-NLS-1$
- return new PrimitiveArrayStub(value);
- } else if (0 == "org.hibernate.mapping.Map".compareTo(cl.getName())) {
//$NON-NLS-1$
- return new MapStub(value);
- } else if (0 == "org.hibernate.mapping.Set".compareTo(cl.getName())) {
//$NON-NLS-1$
- return new SetStub(value);
- } else if (0 == "org.hibernate.mapping.OneToMany".compareTo(cl.getName())) {
//$NON-NLS-1$
- return new OneToManyStub(value);
- //} else if (0 == "org.hibernate.mapping.KeyValue".compareTo(cl.getName())) {
//$NON-NLS-1$
- // return new KeyValueStub(value);
- } else if (0 == "org.hibernate.mapping.SimpleValue".compareTo(cl.getName()))
{ //$NON-NLS-1$
- return new SimpleValueStub(value);
- } else if (0 == "org.hibernate.mapping.Any".compareTo(cl.getName())) {
//$NON-NLS-1$
- return new AnyStub(value);
- } else if (0 == "org.hibernate.mapping.Component".compareTo(cl.getName())) {
//$NON-NLS-1$
- return new ComponentStub(value);
- } else if (0 ==
"org.hibernate.mapping.DependantValue".compareTo(cl.getName())) { //$NON-NLS-1$
- return new DependantValueStub(value);
- } else if (0 == "org.hibernate.mapping.ToOne".compareTo(cl.getName())) {
//$NON-NLS-1$
- return new ToOneStub(value);
- } else if (0 == "org.hibernate.mapping.ManyToOne".compareTo(cl.getName())) {
//$NON-NLS-1$
- return new ManyToOneStub(value);
- } else if (0 == "org.hibernate.mapping.OneToOne".compareTo(cl.getName())) {
//$NON-NLS-1$
- return new OneToOneStub(value);
- }
- return null;
- }
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ValueVisitorStub.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ValueVisitorStub.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ValueVisitorStub.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,19 +0,0 @@
-package org.hibernate.console.stubs;
-
-// look at org.hibernate.mapping.ValueVisitor
-public interface ValueVisitorStub {
- Object accept(BagStub bag);
- Object accept(IdentifierBagStub bag);
- Object accept(ListStub list);
- Object accept(PrimitiveArrayStub primitiveArray);
- Object accept(ArrayStub list);
- Object accept(MapStub map);
- Object accept(OneToManyStub many);
- Object accept(SetStub set);
- Object accept(AnyStub any);
- Object accept(SimpleValueStub value);
- Object accept(DependantValueStub value);
- Object accept(ComponentStub component);
- Object accept(ManyToOneStub mto);
- Object accept(OneToOneStub oto);
-}
Deleted:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/CurrentContext.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/CurrentContext.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/CurrentContext.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -1,62 +0,0 @@
-package org.hibernate.eclipse.logging;
-
-import java.util.Hashtable;
-import java.util.Stack;
-
-/**
- * CurrentContext is here to have one place where we can keep track on the
- * "current" console configuration to allow logging to be seperated per
config.
- *
- */
-
-public class CurrentContext {
-
- static Hashtable<Thread, Stack<Object>> map = new Hashtable<Thread,
Stack<Object>>();
-
- private CurrentContext() {
- }
-
- public static int getDepth() {
- Stack<Object> stack = map.get( Thread.currentThread() );
- if ( stack == null )
- return 0;
- else
- return stack.size();
- }
-
- public static Object pop() {
- Thread key = Thread.currentThread();
- Stack<Object> stack = map.get( key );
- if ( stack != null && !stack.isEmpty() )
- return (stack.pop() );
- else
- return null;
- }
-
- public static Object peek() {
- Thread key = Thread.currentThread();
- Stack<Object> stack = map.get( key );
- if ( stack != null && !stack.isEmpty() )
- return stack.peek();
- else
- return null;
- }
-
- public static void push(Object message) {
- Thread key = Thread.currentThread();
- Stack<Object> stack = map.get( key );
-
- if ( stack == null ) {
- stack = new Stack<Object>();
- map.put( key, stack );
- stack.push( message );
- }
- else {
- stack.push( message );
- }
- }
-
- static public void remove() {
- map.remove( Thread.currentThread() );
- }
-}
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginFileAppender.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginFileAppender.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginFileAppender.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -27,7 +27,7 @@
import org.apache.log4j.RollingFileAppender;
import org.apache.log4j.spi.LoggingEvent;
import org.eclipse.core.runtime.IPath;
-import org.hibernate.console.ConsoleMessages;
+import org.hibernate.mediator.Messages;
/**
* PluginFileAppender
@@ -95,7 +95,7 @@
* and call activateOptions
* @param stateLocation IPath containing the plug-in state location
*/
- void setStateLocation(IPath stateLocation) {
+ public void setStateLocation(IPath stateLocation) {
this.stateLocation = stateLocation;
if (this.stateLocation != null && this.activateOptionsPending) {
this.activateOptionsPending = false;
@@ -122,7 +122,7 @@
*/
public void setFile(String fileName,boolean append,boolean bufferedIO,int bufferSize)
throws IOException {
if (this.stateLocation == null)
- throw new
IOException(ConsoleMessages.PluginFileAppender_missing_plugin_state_location);
+ throw new IOException(Messages.PluginFileAppender_missing_plugin_state_location);
fileName = (this.translatePath) ? getTranslatedFileName(fileName) : fileName;
super.setFile(fileName,append,bufferedIO,bufferSize);
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogAppender.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogAppender.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogAppender.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -23,8 +23,6 @@
import java.io.PrintWriter;
import java.io.StringWriter;
-import java.util.HashMap;
-import java.util.Map;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.spi.ErrorCode;
@@ -34,6 +32,7 @@
import org.eclipse.ui.console.MessageConsoleStream;
import org.hibernate.console.ConsoleMessages;
import org.hibernate.console.KnownConfigurations;
+import org.hibernate.mediator.logging.CurrentContext;
/**
* PluginLogAppender
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogListener.java
===================================================================
---
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogListener.java 2010-03-29
16:26:55 UTC (rev 21118)
+++
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogListener.java 2010-03-29
16:32:11 UTC (rev 21119)
@@ -33,7 +33,7 @@
* and translating plug-in log requests to Logger events.
* @author Manoel Marques
*/
-class PluginLogListener implements ILogListener {
+public class PluginLogListener implements ILogListener {
private ILog log;
private Logger logger;
@@ -44,7 +44,7 @@
* @param plugin the plug-in object
* @param logger logger instance
*/
- PluginLogListener(ILog log,Logger logger) {
+ public PluginLogListener(ILog log,Logger logger) {
this.log = log;
this.logger = logger;
log.addLogListener(this);
@@ -53,7 +53,7 @@
/**
* Removes itself from the plug-in log, reset instance variables.
*/
- void dispose() {
+ public void dispose() {
if (this.log != null) {
this.log.removeLogListener(this);
this.log = null;
@@ -80,14 +80,11 @@
Level level = Level.DEBUG;
if (severity == IStatus.ERROR)
level = Level.ERROR;
- else
- if (severity == IStatus.WARNING)
+ else if (severity == IStatus.WARNING)
level = Level.WARN;
- else
- if (severity == IStatus.INFO)
+ else if (severity == IStatus.INFO)
level = Level.INFO;
- else
- if (severity == IStatus.CANCEL)
+ else if (severity == IStatus.CANCEL)
level = Level.FATAL;
plugin = formatText(plugin);