JBoss Tools SVN: r21167 - workspace/snjeza/esbexamples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-03-31 14:10:44 -0400 (Wed, 31 Mar 2010)
New Revision: 21167
Removed:
workspace/snjeza/esbexamples/helloworldall.zip
Log:
Deleted: workspace/snjeza/esbexamples/helloworldall.zip
===================================================================
(Binary files differ)
14 years, 9 months
JBoss Tools SVN: r21166 - in branches/hibernatetools-multiversion/hibernatetools/plugins: org.hibernate.mediator/src/org/hibernate/mediator/stubs and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-03-31 14:08:46 -0400 (Wed, 31 Mar 2010)
New Revision: 21166
Added:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/FormulaStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/KeyValueStubFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SelectableStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SelectableStubFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/UnionSubclassStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/util/ClassHelper.java
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/Messages.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/Messages.properties
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/AbstractTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/AnyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ArrayStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ArtifactCollectorStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/BagStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/Cfg2HbmToolStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ClassMetadataStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/CollectionMetadataStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/CollectionStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/CollectionTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ColumnStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ComponentStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConfigurationStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConfigurationStubFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConfigurationStubJDBCMetaData.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConnectionProviderStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DefaultDatabaseCollectorStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DefaultReverseEngineeringStrategyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DependantValueStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DialectStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/EntityModeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/EntityTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/EnumTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ExporterStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ForeignKeyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/GenericExporterStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HQLCompletionProposalStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateConfigurationExporterStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateMappingExporterStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateMappingGlobalSettingsStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IHQLCodeAssistStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IdentifierBagStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IdentifierCollectionStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ImmutableTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IndexedCollectionStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IntegerTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/JoinStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/JoinedSubclassStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/KeyValueStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ListStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ManyToOneStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/MapStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/MappingStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/MappingsStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/NamingStrategyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/NullableTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/OneToManyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/OneToOneStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/OverrideRepositoryStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/POJOClassStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PersistentClassStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PersistentClassStubFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PrimaryKeyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PrimitiveArrayStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PrimitiveTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PropertyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ReverseEngineeringSettingsStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ReverseEngineeringStrategyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/RootClassStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SessionStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SetStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SettingsStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SimpleValueStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SingleTableSubclassStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SubclassStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TableFilterStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TableIdentifierStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TableStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ToOneStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TypeStubFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ValueStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ValueStubFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/util/HqlBaseLexerStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/SpecialRootClass.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6070 - update - fix JUnit tests
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/Messages.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/Messages.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/Messages.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -37,6 +37,7 @@
public static String EntityPropertySource_properties;
public static String DynamicSQLPreviewView_caused_by;
public static String DynamicSQLPreviewView_manipulation_of;
+ public static String Stub_create_null_stub_prohibit;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/Messages.properties
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/Messages.properties 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/Messages.properties 2010-03-31 18:08:46 UTC (rev 21166)
@@ -31,3 +31,4 @@
EntityPropertySource_properties=Properties
DynamicSQLPreviewView_caused_by=\nCaused by:\n
DynamicSQLPreviewView_manipulation_of=Manipulation of
+Stub_create_null_stub_prohibit=Create stub for null obj reference prohibit
\ No newline at end of file
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/AbstractTypeStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/AbstractTypeStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/AbstractTypeStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,5 +1,6 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.type.AbstractType;
public class AbstractTypeStub extends TypeStub {
@@ -7,6 +8,9 @@
protected AbstractTypeStub(Object abstractType) {
super(abstractType);
+ if (abstractType == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.abstractType = (AbstractType)abstractType;
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/AnyStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/AnyStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/AnyStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.Any;
+import org.hibernate.mediator.Messages;
public class AnyStub extends SimpleValueStub {
protected Any any;
protected AnyStub(Object any) {
super(any);
+ if (any == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.any = (Any)any;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ArrayStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ArrayStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ArrayStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.Array;
+import org.hibernate.mediator.Messages;
public class ArrayStub extends ListStub {
protected Array array;
protected ArrayStub(Object array) {
super(array);
+ if (array == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.array = (Array)array;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ArtifactCollectorStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ArtifactCollectorStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ArtifactCollectorStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -2,6 +2,7 @@
import java.io.File;
+import org.hibernate.mediator.Messages;
import org.hibernate.tool.hbm2x.ArtifactCollector;
public class ArtifactCollectorStub {
@@ -9,6 +10,9 @@
protected ArtifactCollector artifactCollector;
protected ArtifactCollectorStub(Object artifactCollector) {
+ if (artifactCollector == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.artifactCollector = (ArtifactCollector)artifactCollector;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/BagStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/BagStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/BagStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.Bag;
+import org.hibernate.mediator.Messages;
public class BagStub extends CollectionStub {
protected Bag bag;
protected BagStub(Object bag) {
super(bag);
+ if (bag == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.bag = (Bag)bag;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/Cfg2HbmToolStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/Cfg2HbmToolStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/Cfg2HbmToolStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,11 +1,15 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.tool.hbm2x.Cfg2HbmTool;
public class Cfg2HbmToolStub {
protected Cfg2HbmTool cfg2HbmTool;
protected Cfg2HbmToolStub(Object cfg2HbmTool) {
+ if (cfg2HbmTool == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.cfg2HbmTool = (Cfg2HbmTool)cfg2HbmTool;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ClassMetadataStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ClassMetadataStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ClassMetadataStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,5 +1,6 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.type.Type;
@@ -7,6 +8,9 @@
protected ClassMetadata classMetadata;
protected ClassMetadataStub(Object classMetadata) {
+ if (classMetadata == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.classMetadata = (ClassMetadata)classMetadata;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/CollectionMetadataStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/CollectionMetadataStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/CollectionMetadataStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,11 +1,15 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.metadata.CollectionMetadata;
public class CollectionMetadataStub {
protected CollectionMetadata collectionMetadata;
protected CollectionMetadataStub(Object collectionMetadata) {
+ if (collectionMetadata == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.collectionMetadata = (CollectionMetadata)collectionMetadata;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/CollectionStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/CollectionStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/CollectionStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -2,6 +2,7 @@
import org.hibernate.FetchMode;
import org.hibernate.mapping.Collection;
+import org.hibernate.mediator.Messages;
public abstract class CollectionStub extends ValueStub {
@@ -9,6 +10,9 @@
protected CollectionStub(Object collection) {
super(collection);
+ if (collection == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.collection = (Collection)collection;
}
@@ -48,7 +52,11 @@
}
public TableStub getCollectionTable() {
- return new TableStub(collection.getCollectionTable());
+ Object obj = collection.getCollectionTable();
+ if (obj == null) {
+ return null;
+ }
+ return new TableStub(obj);
}
public KeyValueStub getKey() {
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/CollectionTypeStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/CollectionTypeStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/CollectionTypeStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,5 +1,6 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.type.CollectionType;
public class CollectionTypeStub extends AbstractTypeStub {
@@ -8,6 +9,9 @@
protected CollectionTypeStub(Object collectionType) {
super(collectionType);
+ if (collectionType == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.collectionType = (CollectionType)collectionType;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ColumnStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ColumnStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ColumnStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,8 +1,9 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.Column;
+import org.hibernate.mediator.Messages;
-public class ColumnStub {
+public class ColumnStub extends SelectableStub {
public static final int DEFAULT_LENGTH = 255;
public static final int DEFAULT_PRECISION = 19;
public static final int DEFAULT_SCALE = 2;
@@ -10,6 +11,10 @@
protected Column column;
protected ColumnStub(Object column) {
+ super(column);
+ if (column == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.column = (Column)column;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ComponentStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ComponentStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ComponentStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -5,12 +5,16 @@
import org.hibernate.mapping.Component;
import org.hibernate.mapping.Property;
+import org.hibernate.mediator.Messages;
public class ComponentStub extends SimpleValueStub {
protected Component component;
protected ComponentStub(Object component) {
super(component);
+ if (component == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.component = (Component)component;
}
@@ -31,7 +35,10 @@
Iterator<Property> it = (Iterator<Property>)component.getPropertyIterator();
ArrayList<PropertyStub> al = new ArrayList<PropertyStub>();
while (it.hasNext()) {
- al.add(new PropertyStub(it.next()));
+ Object obj = it.next();
+ if (obj != null) {
+ al.add(new PropertyStub(obj));
+ }
}
return al.iterator();
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConfigurationStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConfigurationStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConfigurationStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -29,9 +29,9 @@
protected Configuration configuration;
protected ConfigurationStub(Configuration configuration) {
- //Class.forName(className)
- //Method ReflectionUtils.findPublicMethod(Class declaringClass, "isOpen",
- // new Class[]());
+ if (configuration == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.configuration = configuration;
}
@@ -56,7 +56,11 @@
}
public SettingsStub buildSettings() {
- return new SettingsStub(configuration.buildSettings());
+ Object obj = configuration.buildSettings();
+ if (obj == null) {
+ return null;
+ }
+ return new SettingsStub(obj);
}
protected SessionFactory buildSessionFactory() {
@@ -72,7 +76,11 @@
}
public NamingStrategyStub getNamingStrategy() {
- return new NamingStrategyStub(configuration.getNamingStrategy());
+ Object obj = configuration.getNamingStrategy();
+ if (obj == null) {
+ return null;
+ }
+ return new NamingStrategyStub(obj);
}
public boolean hasNamingStrategy() {
@@ -94,11 +102,19 @@
}
public MappingsStub createMappings() {
- return new MappingsStub(configuration.createMappings());
+ Object obj = configuration.createMappings();
+ if (obj == null) {
+ return null;
+ }
+ return new MappingsStub(obj);
}
public MappingStub buildMapping() {
- return new MappingStub(configuration.buildMapping());
+ Object obj = configuration.buildMapping();
+ if (obj == null) {
+ return null;
+ }
+ return new MappingStub(obj);
}
public static interface IExporterNewOutputDir {
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConfigurationStubFactory.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConfigurationStubFactory.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConfigurationStubFactory.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -45,6 +45,9 @@
private ConsoleConfigurationPreferences prefs = null;
public ConfigurationStubFactory(ConsoleConfigurationPreferences prefs) {
+ if (prefs == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.prefs = prefs;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConfigurationStubJDBCMetaData.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConfigurationStubJDBCMetaData.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConfigurationStubJDBCMetaData.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -5,6 +5,7 @@
import java.util.Properties;
import org.hibernate.cfg.JDBCMetaDataConfiguration;
+import org.hibernate.mediator.Messages;
public class ConfigurationStubJDBCMetaData extends ConfigurationStub {
@@ -12,6 +13,9 @@
protected ConfigurationStubJDBCMetaData(JDBCMetaDataConfiguration configuration) {
super(configuration);
+ if (configuration == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
jdbcMetaDataConfiguration = configuration;
}
@@ -35,8 +39,10 @@
ArrayList<TableStub> arr = new ArrayList<TableStub>();
Iterator<?> it = jdbcMetaDataConfiguration.getTableMappings();
while (it.hasNext() ) {
- Object table = it.next();
- arr.add(new TableStub(table));
+ Object obj = it.next();
+ if (obj != null) {
+ arr.add(new TableStub(obj));
+ }
}
return arr;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConnectionProviderStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConnectionProviderStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ConnectionProviderStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,11 +1,15 @@
package org.hibernate.mediator.stubs;
import org.hibernate.connection.ConnectionProvider;
+import org.hibernate.mediator.Messages;
public class ConnectionProviderStub {
protected ConnectionProvider connectionProvider;
protected ConnectionProviderStub(Object connectionProvider) {
+ if (connectionProvider == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.connectionProvider = (ConnectionProvider)connectionProvider;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DefaultDatabaseCollectorStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DefaultDatabaseCollectorStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DefaultDatabaseCollectorStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -9,11 +9,15 @@
import org.hibernate.cfg.reveng.DefaultDatabaseCollector;
import org.hibernate.mapping.Table;
+import org.hibernate.mediator.Messages;
public class DefaultDatabaseCollectorStub {
protected DefaultDatabaseCollector defaultDatabaseCollector;
protected DefaultDatabaseCollectorStub(Object defaultDatabaseCollector) {
+ if (defaultDatabaseCollector == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.defaultDatabaseCollector = (DefaultDatabaseCollector)defaultDatabaseCollector;
}
@@ -30,7 +34,10 @@
ArrayList<TableStub> arr = new ArrayList<TableStub>();
Iterator<Table> itValue = (Iterator<Table>)entry.getValue().iterator();
while (itValue.hasNext()) {
- arr.add(new TableStub(itValue.next()));
+ Object obj = itValue.next();
+ if (obj != null) {
+ arr.add(new TableStub(obj));
+ }
}
map.put(entry.getKey(), arr);
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DefaultReverseEngineeringStrategyStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DefaultReverseEngineeringStrategyStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DefaultReverseEngineeringStrategyStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,6 +1,7 @@
package org.hibernate.mediator.stubs;
import org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy;
+import org.hibernate.mediator.Messages;
public class DefaultReverseEngineeringStrategyStub extends ReverseEngineeringStrategyStub {
@@ -8,6 +9,9 @@
protected DefaultReverseEngineeringStrategyStub(Object defaultReverseEngineeringStrategy) {
super(defaultReverseEngineeringStrategy);
+ if (defaultReverseEngineeringStrategy == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.defaultReverseEngineeringStrategy = (DefaultReverseEngineeringStrategy)defaultReverseEngineeringStrategy;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DependantValueStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DependantValueStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DependantValueStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.DependantValue;
+import org.hibernate.mediator.Messages;
public class DependantValueStub extends SimpleValueStub {
protected DependantValue dependantValue;
protected DependantValueStub(Object dependantValue) {
super(dependantValue);
+ if (dependantValue == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.dependantValue = (DependantValue)dependantValue;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DialectStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DialectStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/DialectStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,11 +1,15 @@
package org.hibernate.mediator.stubs;
import org.hibernate.dialect.Dialect;
+import org.hibernate.mediator.Messages;
public class DialectStub {
protected Dialect dialect;
protected DialectStub(Object dialect) {
+ if (dialect == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.dialect = (Dialect)dialect;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/EntityModeStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/EntityModeStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/EntityModeStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,6 +1,7 @@
package org.hibernate.mediator.stubs;
import org.hibernate.EntityMode;
+import org.hibernate.mediator.Messages;
public class EntityModeStub {
@@ -11,6 +12,9 @@
protected EntityMode entityMode;
protected EntityModeStub(Object entityMode) {
+ if (entityMode == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.entityMode = (EntityMode)entityMode;
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/EntityTypeStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/EntityTypeStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/EntityTypeStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,5 +1,6 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.type.EntityType;
public class EntityTypeStub extends AbstractTypeStub {
@@ -7,6 +8,9 @@
protected EntityTypeStub(Object entityType) {
super(entityType);
+ if (entityType == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.entityType = (EntityType)entityType;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/EnumTypeStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/EnumTypeStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/EnumTypeStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,5 +1,6 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.type.EnumType;
public class EnumTypeStub {
@@ -10,6 +11,9 @@
protected EnumType enumType;
protected EnumTypeStub(Object enumType) {
+ if (enumType == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.enumType = (EnumType)enumType;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ExporterStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ExporterStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ExporterStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -3,6 +3,7 @@
import java.io.File;
import java.util.Properties;
+import org.hibernate.mediator.Messages;
import org.hibernate.tool.hbm2x.Exporter;
public class ExporterStub {
@@ -10,6 +11,9 @@
protected Exporter exporter;
protected ExporterStub(Object exporter) {
+ if (exporter == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.exporter = (Exporter)exporter;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ForeignKeyStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ForeignKeyStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ForeignKeyStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -6,11 +6,15 @@
import org.hibernate.mapping.Column;
import org.hibernate.mapping.ForeignKey;
+import org.hibernate.mediator.Messages;
public class ForeignKeyStub {
protected ForeignKey foreignKey;
protected ForeignKeyStub(Object foreignKey) {
+ if (foreignKey == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.foreignKey = (ForeignKey)foreignKey;
}
@@ -19,7 +23,11 @@
}
public TableStub getReferencedTable() {
- return new TableStub(foreignKey.getReferencedTable());
+ Object obj = foreignKey.getReferencedTable();
+ if (obj == null) {
+ return null;
+ }
+ return new TableStub(obj);
}
@SuppressWarnings("unchecked")
@@ -27,7 +35,10 @@
Iterator<Column> it = (Iterator<Column>)foreignKey.getColumnIterator();
ArrayList<ColumnStub> al = new ArrayList<ColumnStub>();
while (it.hasNext()) {
- al.add(new ColumnStub(it.next()));
+ Object obj = it.next();
+ if (obj != null) {
+ al.add(new ColumnStub(obj));
+ }
}
return al.iterator();
}
@@ -37,7 +48,10 @@
Iterator<Column> it = foreignKey.getReferencedColumns().iterator();
ArrayList<ColumnStub> al = new ArrayList<ColumnStub>();
while (it.hasNext()) {
- al.add(new ColumnStub(it.next()));
+ Object obj = it.next();
+ if (obj != null) {
+ al.add(new ColumnStub(obj));
+ }
}
return al;
}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/FormulaStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/FormulaStub.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/FormulaStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -0,0 +1,17 @@
+package org.hibernate.mediator.stubs;
+
+import org.hibernate.mapping.Formula;
+import org.hibernate.mediator.Messages;
+
+public class FormulaStub extends SelectableStub {
+
+ protected Formula formula;
+
+ protected FormulaStub(Object formula) {
+ super(formula);
+ if (formula == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
+ this.formula = (Formula)formula;
+ }
+}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/GenericExporterStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/GenericExporterStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/GenericExporterStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,5 +1,6 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.tool.hbm2x.GenericExporter;
public class GenericExporterStub extends ExporterStub {
@@ -7,6 +8,9 @@
protected GenericExporterStub(Object genericExporter) {
super(genericExporter);
+ if (genericExporter == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.genericExporter = (GenericExporter)genericExporter;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HQLCompletionProposalStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HQLCompletionProposalStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HQLCompletionProposalStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,5 +1,6 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.tool.ide.completion.HQLCompletionProposal;
public class HQLCompletionProposalStub {
@@ -13,6 +14,9 @@
protected HQLCompletionProposal hqlCompletionProposal;
protected HQLCompletionProposalStub(Object hqlCompletionProposal) {
+ if (hqlCompletionProposal == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.hqlCompletionProposal = (HQLCompletionProposal)hqlCompletionProposal;
}
@@ -45,6 +49,10 @@
}
public PropertyStub getProperty() {
- return new PropertyStub(hqlCompletionProposal.getProperty());
+ Object obj = hqlCompletionProposal.getProperty();
+ if (obj == null) {
+ return null;
+ }
+ return new PropertyStub(obj);
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateConfigurationExporterStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateConfigurationExporterStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateConfigurationExporterStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -3,6 +3,7 @@
import java.io.StringWriter;
import java.util.Properties;
+import org.hibernate.mediator.Messages;
import org.hibernate.tool.hbm2x.HibernateConfigurationExporter;
public class HibernateConfigurationExporterStub extends ExporterStub {
@@ -10,6 +11,9 @@
protected HibernateConfigurationExporterStub(Object hibernateConfigurationExporter) {
super(hibernateConfigurationExporter);
+ if (hibernateConfigurationExporter == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.hibernateConfigurationExporter = (HibernateConfigurationExporter)hibernateConfigurationExporter;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateMappingExporterStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateMappingExporterStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateMappingExporterStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -5,6 +5,7 @@
import java.lang.reflect.Method;
import java.util.Map;
+import org.hibernate.mediator.Messages;
import org.hibernate.tool.hbm2x.HibernateMappingExporter;
public class HibernateMappingExporterStub {
@@ -12,6 +13,9 @@
protected HibernateMappingExporter hibernateMappingExporter;
protected HibernateMappingExporterStub(ConfigurationStub cfg, File outputdir) {
+ if (cfg.configuration == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
hibernateMappingExporter = new HibernateMappingExporter(cfg.configuration, outputdir);
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateMappingGlobalSettingsStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateMappingGlobalSettingsStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateMappingGlobalSettingsStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,5 +1,6 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.tool.hbm2x.HibernateMappingGlobalSettings;
public class HibernateMappingGlobalSettingsStub {
@@ -7,6 +8,9 @@
protected HibernateMappingGlobalSettings hibernateMappingGlobalSettings;
protected HibernateMappingGlobalSettingsStub(Object hibernateMappingGlobalSettings) {
+ if (hibernateMappingGlobalSettings == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.hibernateMappingGlobalSettings = (HibernateMappingGlobalSettings)hibernateMappingGlobalSettings;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/HibernateStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,6 +1,7 @@
package org.hibernate.mediator.stubs;
import org.hibernate.Hibernate;
+import org.hibernate.mediator.Messages;
public class HibernateStub {
public static final NullableTypeStub BOOLEAN = new NullableTypeStub(Hibernate.BOOLEAN);
@@ -30,6 +31,9 @@
protected Hibernate hibernate;
protected HibernateStub(Object hibernate) {
+ if (hibernate == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.hibernate = (Hibernate)hibernate;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IHQLCodeAssistStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IHQLCodeAssistStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IHQLCodeAssistStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,11 +1,15 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.tool.ide.completion.HQLCodeAssist;
public class IHQLCodeAssistStub {
protected HQLCodeAssist hqlCodeAssist;
protected IHQLCodeAssistStub(Object hqlCodeAssist) {
+ if (hqlCodeAssist == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.hqlCodeAssist = (HQLCodeAssist)hqlCodeAssist;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IdentifierBagStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IdentifierBagStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IdentifierBagStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.IdentifierBag;
+import org.hibernate.mediator.Messages;
public class IdentifierBagStub extends IdentifierCollectionStub {
protected IdentifierBag identifierBag;
protected IdentifierBagStub(Object identifierBag) {
super(identifierBag);
+ if (identifierBag == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.identifierBag = (IdentifierBag)identifierBag;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IdentifierCollectionStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IdentifierCollectionStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IdentifierCollectionStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.IdentifierCollection;
+import org.hibernate.mediator.Messages;
public abstract class IdentifierCollectionStub extends CollectionStub {
protected IdentifierCollection identifierCollection;
protected IdentifierCollectionStub(Object identifierCollection) {
super(identifierCollection);
+ if (identifierCollection == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.identifierCollection = (IdentifierCollection)identifierCollection;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ImmutableTypeStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ImmutableTypeStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ImmutableTypeStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,5 +1,6 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.type.ImmutableType;
public class ImmutableTypeStub extends NullableTypeStub {
@@ -8,6 +9,9 @@
protected ImmutableTypeStub(Object immutableType) {
super(immutableType);
+ if (immutableType == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.immutableType = (ImmutableType)immutableType;
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IndexedCollectionStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IndexedCollectionStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IndexedCollectionStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,6 +1,7 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.IndexedCollection;
+import org.hibernate.mediator.Messages;
public abstract class IndexedCollectionStub extends CollectionStub {
@@ -8,6 +9,9 @@
protected IndexedCollectionStub(Object indexedCollection) {
super(indexedCollection);
+ if (indexedCollection == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.indexedCollection = (IndexedCollection)indexedCollection;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IntegerTypeStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IntegerTypeStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/IntegerTypeStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,5 +1,6 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.type.IntegerType;
public class IntegerTypeStub extends PrimitiveTypeStub {
@@ -8,6 +9,9 @@
protected IntegerTypeStub(Object integerType) {
super(integerType);
+ if (integerType == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.integerType = (IntegerType)integerType;
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/JoinStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/JoinStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/JoinStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -5,11 +5,15 @@
import org.hibernate.mapping.Join;
import org.hibernate.mapping.Property;
+import org.hibernate.mediator.Messages;
public class JoinStub {
protected Join join;
protected JoinStub(Object join) {
+ if (join == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.join = (Join)join;
}
@@ -18,7 +22,10 @@
Iterator<Property> it = (Iterator<Property>)join.getPropertyIterator();
ArrayList<PropertyStub> al = new ArrayList<PropertyStub>();
while (it.hasNext()) {
- al.add(new PropertyStub(it.next()));
+ Object obj = it.next();
+ if (obj != null) {
+ al.add(new PropertyStub(obj));
+ }
}
return al.iterator();
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/JoinedSubclassStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/JoinedSubclassStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/JoinedSubclassStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,6 +1,7 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.JoinedSubclass;
+import org.hibernate.mediator.Messages;
public class JoinedSubclassStub extends SubclassStub {
@@ -8,6 +9,9 @@
protected JoinedSubclassStub(Object joinedSubclass) {
super(joinedSubclass);
+ if (joinedSubclass == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.joinedSubclass = (JoinedSubclass)joinedSubclass;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/KeyValueStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/KeyValueStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/KeyValueStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.KeyValue;
+import org.hibernate.mediator.Messages;
public abstract class KeyValueStub extends ValueStub {
protected KeyValue keyValue;
protected KeyValueStub(Object keyValue) {
super(keyValue);
+ if (keyValue == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.keyValue = (KeyValue)keyValue;
}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/KeyValueStubFactory.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/KeyValueStubFactory.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/KeyValueStubFactory.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -0,0 +1,5 @@
+package org.hibernate.mediator.stubs;
+
+public class KeyValueStubFactory {
+
+}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ListStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ListStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ListStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.List;
+import org.hibernate.mediator.Messages;
public class ListStub extends IndexedCollectionStub {
protected List list;
protected ListStub(Object list) {
super(list);
+ if (list == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.list = (List)list;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ManyToOneStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ManyToOneStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ManyToOneStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.ManyToOne;
+import org.hibernate.mediator.Messages;
public class ManyToOneStub extends ToOneStub {
protected ManyToOne manyToOne;
protected ManyToOneStub(Object manyToOne) {
super(manyToOne);
+ if (manyToOne == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.manyToOne = (ManyToOne)manyToOne;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/MapStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/MapStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/MapStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.Map;
+import org.hibernate.mediator.Messages;
public class MapStub extends IndexedCollectionStub {
protected Map map;
protected MapStub(Object map) {
super(map);
+ if (map == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.map = (Map)map;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/MappingStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/MappingStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/MappingStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,11 +1,15 @@
package org.hibernate.mediator.stubs;
import org.hibernate.engine.Mapping;
+import org.hibernate.mediator.Messages;
public class MappingStub {
protected Mapping mapping;
protected MappingStub(Object mapping) {
+ if (mapping == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.mapping = (Mapping)mapping;
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/MappingsStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/MappingsStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/MappingsStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,11 +1,15 @@
package org.hibernate.mediator.stubs;
import org.hibernate.cfg.Mappings;
+import org.hibernate.mediator.Messages;
public class MappingsStub {
protected Mappings mappings;
protected MappingsStub(Object mappings) {
+ if (mappings == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.mappings = (Mappings)mappings;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/NamingStrategyStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/NamingStrategyStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/NamingStrategyStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,11 +1,15 @@
package org.hibernate.mediator.stubs;
import org.hibernate.cfg.NamingStrategy;
+import org.hibernate.mediator.Messages;
public class NamingStrategyStub {
protected NamingStrategy namingStrategy;
protected NamingStrategyStub(Object namingStrategy) {
+ if (namingStrategy == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.namingStrategy = (NamingStrategy)namingStrategy;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/NullableTypeStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/NullableTypeStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/NullableTypeStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,5 +1,6 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.type.NullableType;
public class NullableTypeStub extends AbstractTypeStub {
@@ -8,6 +9,9 @@
protected NullableTypeStub(Object nullableType) {
super(nullableType);
+ if (nullableType == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.nullableType = (NullableType)nullableType;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/OneToManyStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/OneToManyStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/OneToManyStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.OneToMany;
+import org.hibernate.mediator.Messages;
public class OneToManyStub extends ValueStub {
protected OneToMany oneToMany;
protected OneToManyStub(Object oneToMany) {
super(oneToMany);
+ if (oneToMany == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.oneToMany = (OneToMany)oneToMany;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/OneToOneStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/OneToOneStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/OneToOneStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.OneToOne;
+import org.hibernate.mediator.Messages;
public class OneToOneStub extends ToOneStub {
protected OneToOne oneToOne;
protected OneToOneStub(Object oneToOne) {
super(oneToOne);
+ if (oneToOne == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.oneToOne = (OneToOne)oneToOne;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/OverrideRepositoryStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/OverrideRepositoryStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/OverrideRepositoryStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -3,11 +3,15 @@
import java.io.File;
import org.hibernate.cfg.reveng.OverrideRepository;
+import org.hibernate.mediator.Messages;
public class OverrideRepositoryStub {
protected OverrideRepository overrideRepository;
protected OverrideRepositoryStub(Object overrideRepository) {
+ if (overrideRepository == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.overrideRepository = (OverrideRepository)overrideRepository;
}
@@ -21,8 +25,11 @@
public ReverseEngineeringStrategyStub getReverseEngineeringStrategy(
ReverseEngineeringStrategyStub res) {
- return new ReverseEngineeringStrategyStub(
- overrideRepository.getReverseEngineeringStrategy(res.reverseEngineeringStrategy));
+ Object obj = overrideRepository.getReverseEngineeringStrategy(res.reverseEngineeringStrategy);
+ if (obj == null) {
+ return null;
+ }
+ return new ReverseEngineeringStrategyStub(obj);
}
public void addTableFilter(TableFilterStub tf) {
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/POJOClassStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/POJOClassStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/POJOClassStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,5 +1,6 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.tool.hbm2x.pojo.POJOClass;
public class POJOClassStub {
@@ -7,6 +8,9 @@
protected POJOClass pojoClass;
protected POJOClassStub(Object pojoClass) {
+ if (pojoClass == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.pojoClass = (POJOClass)pojoClass;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PersistentClassStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PersistentClassStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PersistentClassStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -6,12 +6,20 @@
import org.hibernate.mapping.Join;
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.Property;
+import org.hibernate.mediator.Messages;
public abstract class PersistentClassStub {
protected PersistentClass persistentClass;
protected PersistentClassStub(Object persistentClass) {
- this.persistentClass = (PersistentClass)persistentClass;
+ if (persistentClass == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
+ if (persistentClass instanceof PersistentClassStub) {
+ this.persistentClass = ((PersistentClassStub)persistentClass).persistentClass;
+ } else {
+ this.persistentClass = (PersistentClass)persistentClass;
+ }
}
protected PersistentClass getPersistentClass() {
@@ -35,7 +43,11 @@
}
public PropertyStub getIdentifierProperty() {
- return new PropertyStub(persistentClass.getIdentifierProperty());
+ Object obj = persistentClass.getIdentifierProperty();
+ if (obj == null) {
+ return null;
+ }
+ return new PropertyStub(obj);
}
@SuppressWarnings("unchecked")
@@ -43,21 +55,36 @@
Iterator<Property> it = persistentClass.getPropertyIterator();
ArrayList<PropertyStub> al = new ArrayList<PropertyStub>();
while (it.hasNext()) {
- al.add(new PropertyStub(it.next()));
+ Object obj = it.next();
+ if (obj != null) {
+ al.add(new PropertyStub(obj));
+ }
}
return al.iterator();
}
public RootClassStub getRootClass() {
- return new RootClassStub(persistentClass.getRootClass());
+ Object obj = persistentClass.getRootClass();
+ if (obj == null) {
+ return null;
+ }
+ return new RootClassStub(obj);
}
public PropertyStub getVersion() {
- return new PropertyStub(persistentClass.getVersion());
+ Object obj = persistentClass.getVersion();
+ if (obj == null) {
+ return null;
+ }
+ return new PropertyStub(obj);
}
public TableStub getTable() {
- return new TableStub(persistentClass.getTable());
+ Object obj = persistentClass.getTable();
+ if (obj == null) {
+ return null;
+ }
+ return new TableStub(obj);
}
@SuppressWarnings("unchecked")
@@ -65,7 +92,10 @@
Iterator<Join> it = (Iterator<Join>)persistentClass.getJoinIterator();
ArrayList<JoinStub> al = new ArrayList<JoinStub>();
while (it.hasNext()) {
- al.add(new JoinStub(it.next()));
+ Object obj = it.next();
+ if (obj != null) {
+ al.add(new JoinStub(obj));
+ }
}
return al.iterator();
}
@@ -79,7 +109,11 @@
}
public PropertyStub getProperty(String propertyName) {
- return new PropertyStub(persistentClass.getProperty(propertyName));
+ Object obj = persistentClass.getProperty(propertyName);
+ if (obj == null) {
+ return null;
+ }
+ return new PropertyStub(obj);
}
public String getNodeName() {
@@ -91,7 +125,10 @@
Iterator<Property> it = (Iterator<Property>)persistentClass.getPropertyClosureIterator();
ArrayList<PropertyStub> al = new ArrayList<PropertyStub>();
while (it.hasNext()) {
- al.add(new PropertyStub(it.next()));
+ Object obj = it.next();
+ if (obj != null) {
+ al.add(new PropertyStub(obj));
+ }
}
return al.iterator();
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PersistentClassStubFactory.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PersistentClassStubFactory.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PersistentClassStubFactory.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -3,6 +3,9 @@
public class PersistentClassStubFactory {
@SuppressWarnings("unchecked")
public static PersistentClassStub createPersistentClassStub(Object value) {
+ if (value == null) {
+ return null;
+ }
final Class cl = value.getClass();
if (0 == "org.hibernate.mapping.RootClass".compareTo(cl.getName())) { //$NON-NLS-1$
return new RootClassStub(value);
@@ -14,8 +17,8 @@
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);
+ } else if (0 == "org.hibernate.mapping.UnionSubclass".compareTo(cl.getName())) { //$NON-NLS-1$
+ return new UnionSubclassStub(value);
}
return null;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PrimaryKeyStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PrimaryKeyStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PrimaryKeyStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -6,11 +6,15 @@
import org.hibernate.mapping.Column;
import org.hibernate.mapping.PrimaryKey;
+import org.hibernate.mediator.Messages;
public class PrimaryKeyStub {
protected PrimaryKey primaryKey;
protected PrimaryKeyStub(Object primaryKey) {
+ if (primaryKey == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.primaryKey = (PrimaryKey)primaryKey;
}
@@ -27,7 +31,10 @@
Iterator<Column> it = (Iterator<Column>)primaryKey.getColumnIterator();
ArrayList<ColumnStub> al = new ArrayList<ColumnStub>();
while (it.hasNext()) {
- al.add(new ColumnStub(it.next()));
+ Object obj = it.next();
+ if (obj != null) {
+ al.add(new ColumnStub(obj));
+ }
}
return al.iterator();
}
@@ -37,7 +44,10 @@
Iterator<Column> it = (Iterator<Column>)primaryKey.getColumnIterator();
ArrayList<ColumnStub> al = new ArrayList<ColumnStub>();
while (it.hasNext()) {
- al.add(new ColumnStub(it.next()));
+ Object obj = it.next();
+ if (obj != null) {
+ al.add(new ColumnStub(obj));
+ }
}
return al;
}
@@ -47,11 +57,19 @@
}
public ColumnStub getColumn(int i) {
- return new ColumnStub(primaryKey.getColumn(i));
+ Object obj = primaryKey.getColumn(i);
+ if (obj == null) {
+ return null;
+ }
+ return new ColumnStub(obj);
}
public TableStub getTable() {
- return new TableStub(primaryKey.getTable());
+ Object obj = primaryKey.getTable();
+ if (obj == null) {
+ return null;
+ }
+ return new TableStub(obj);
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PrimitiveArrayStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PrimitiveArrayStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PrimitiveArrayStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.PrimitiveArray;
+import org.hibernate.mediator.Messages;
public class PrimitiveArrayStub extends ArrayStub {
protected PrimitiveArray primitiveArray;
protected PrimitiveArrayStub(Object primitiveArray) {
super(primitiveArray);
+ if (primitiveArray == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.primitiveArray = (PrimitiveArray)primitiveArray;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PrimitiveTypeStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PrimitiveTypeStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PrimitiveTypeStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,5 +1,6 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.type.PrimitiveType;
public class PrimitiveTypeStub extends ImmutableTypeStub {
@@ -8,6 +9,9 @@
protected PrimitiveTypeStub(Object primitiveType) {
super(primitiveType);
+ if (primitiveType == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.primitiveType = (PrimitiveType)primitiveType;
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PropertyStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PropertyStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/PropertyStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,20 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.Property;
+import org.hibernate.mediator.Messages;
public class PropertyStub {
protected Property property;
protected PropertyStub(Object property) {
- this.property = (Property)property;
+ if (property == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
+ if (property instanceof PropertyStub) {
+ this.property = ((PropertyStub)property).property;
+ } else {
+ this.property = (Property)property;
+ }
}
public static PropertyStub newInstance() {
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ReverseEngineeringSettingsStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ReverseEngineeringSettingsStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ReverseEngineeringSettingsStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.cfg.reveng.ReverseEngineeringSettings;
+import org.hibernate.mediator.Messages;
public class ReverseEngineeringSettingsStub {
protected ReverseEngineeringSettings reverseEngineeringSettings;
protected ReverseEngineeringSettingsStub(Object reverseEngineeringSettings) {
+ if (reverseEngineeringSettings == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.reverseEngineeringSettings = (ReverseEngineeringSettings)reverseEngineeringSettings;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ReverseEngineeringStrategyStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ReverseEngineeringStrategyStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ReverseEngineeringStrategyStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
+import org.hibernate.mediator.Messages;
public class ReverseEngineeringStrategyStub {
protected ReverseEngineeringStrategy reverseEngineeringStrategy;
protected ReverseEngineeringStrategyStub(Object reverseEngineeringStrategy) {
+ if (reverseEngineeringStrategy == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.reverseEngineeringStrategy = (ReverseEngineeringStrategy)reverseEngineeringStrategy;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/RootClassStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/RootClassStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/RootClassStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -5,13 +5,21 @@
import org.hibernate.mapping.RootClass;
import org.hibernate.mapping.Subclass;
+import org.hibernate.mediator.Messages;
public class RootClassStub extends PersistentClassStub {
protected RootClass rootClass;
protected RootClassStub(Object rootClass) {
super(rootClass);
- this.rootClass = (RootClass)rootClass;
+ if (rootClass == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
+ if (rootClass instanceof RootClassStub) {
+ this.rootClass = ((RootClassStub)rootClass).rootClass;
+ } else {
+ this.rootClass = (RootClass)rootClass;
+ }
}
public static RootClassStub newInstance() {
@@ -27,7 +35,11 @@
}
public TableStub getTable() {
- return new TableStub(rootClass.getTable());
+ Object obj = rootClass.getTable();
+ if (obj == null) {
+ return null;
+ }
+ return new TableStub(obj);
}
public void addProperty(PropertyStub p) {
@@ -39,7 +51,11 @@
}
public PropertyStub getIdentifierProperty() {
- return new PropertyStub(rootClass.getIdentifierProperty());
+ Object obj = rootClass.getIdentifierProperty();
+ if (obj == null) {
+ return null;
+ }
+ return new PropertyStub(obj);
}
public void setEntityName(String entityName) {
@@ -183,7 +199,10 @@
Iterator<Subclass> it = (Iterator<Subclass>)rootClass.getSubclassIterator();
ArrayList<SubclassStub> al = new ArrayList<SubclassStub>();
while (it.hasNext()) {
- al.add(new SubclassStub(it.next()));
+ Object obj = it.next();
+ if (obj != null) {
+ al.add(new SubclassStub(obj));
+ }
}
return al.iterator();
}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SelectableStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SelectableStub.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SelectableStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -0,0 +1,16 @@
+package org.hibernate.mediator.stubs;
+
+import org.hibernate.mapping.Selectable;
+import org.hibernate.mediator.Messages;
+
+public class SelectableStub {
+
+ protected Selectable selectable;
+
+ protected SelectableStub(Object selectable) {
+ if (selectable == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
+ this.selectable = (Selectable)selectable;
+ }
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SelectableStubFactory.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SelectableStubFactory.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SelectableStubFactory.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -0,0 +1,17 @@
+package org.hibernate.mediator.stubs;
+
+public class SelectableStubFactory {
+ @SuppressWarnings("unchecked")
+ public static SelectableStub createSelectableStub(Object selectable) {
+ if (selectable == null) {
+ return null;
+ }
+ final Class cl = selectable.getClass();
+ if (0 == "org.hibernate.mapping.Column".compareTo(cl.getName())) { //$NON-NLS-1$
+ return new ColumnStub(selectable);
+ } else if (0 == "org.hibernate.mapping.Formula".compareTo(cl.getName())) { //$NON-NLS-1$
+ return new FormulaStub(selectable);
+ }
+ return null;
+ }
+}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SessionStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SessionStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SessionStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -34,6 +34,9 @@
protected Session session;
protected SessionStub(Session session) {
+ if (session == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.session = session;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SetStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SetStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SetStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.Set;
+import org.hibernate.mediator.Messages;
public class SetStub extends CollectionStub {
protected Set set;
protected SetStub(Object set) {
super(set);
+ if (set == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.set = (Set)set;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SettingsStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SettingsStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SettingsStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,11 +1,15 @@
package org.hibernate.mediator.stubs;
import org.hibernate.cfg.Settings;
+import org.hibernate.mediator.Messages;
public class SettingsStub {
protected Settings settings;
protected SettingsStub(Object settings) {
+ if (settings == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.settings = (Settings)settings;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SimpleValueStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SimpleValueStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SimpleValueStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -3,6 +3,7 @@
import java.util.Properties;
import org.hibernate.mapping.SimpleValue;
+import org.hibernate.mediator.Messages;
public class SimpleValueStub extends KeyValueStub {
@@ -10,6 +11,9 @@
protected SimpleValueStub(Object simpleValue) {
super(simpleValue);
+ if (simpleValue == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.simpleValue = (SimpleValue)simpleValue;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SingleTableSubclassStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SingleTableSubclassStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SingleTableSubclassStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,16 +1,23 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.SingleTableSubclass;
+import org.hibernate.mediator.Messages;
public class SingleTableSubclassStub extends SubclassStub {
protected SingleTableSubclass singleTableSubclass;
protected SingleTableSubclassStub(Object singleTableSubclass) {
super(singleTableSubclass);
+ if (singleTableSubclass == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.singleTableSubclass = (SingleTableSubclass)singleTableSubclass;
}
public static SingleTableSubclassStub newInstance(Object singleTableSubclass) {
+ if (singleTableSubclass == null) {
+ return null;
+ }
return new SingleTableSubclassStub(singleTableSubclass);
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SubclassStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SubclassStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/SubclassStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,6 +1,7 @@
package org.hibernate.mediator.stubs;
import org.hibernate.mapping.Subclass;
+import org.hibernate.mediator.Messages;
public class SubclassStub extends PersistentClassStub {
@@ -8,6 +9,9 @@
protected SubclassStub(Object subclass) {
super(subclass);
+ if (subclass == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.subclass = (Subclass)subclass;
}
@@ -32,7 +36,11 @@
}
public TableStub getRootTable() {
- return new TableStub(subclass.getRootTable());
+ Object obj = subclass.getRootTable();
+ if (obj == null) {
+ return null;
+ }
+ return new TableStub(obj);
}
public boolean isJoinedSubclass() {
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TableFilterStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TableFilterStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TableFilterStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,12 +1,16 @@
package org.hibernate.mediator.stubs;
import org.hibernate.cfg.reveng.TableFilter;
+import org.hibernate.mediator.Messages;
public class TableFilterStub {
protected TableFilter tableFilter;
protected TableFilterStub(Object tableFilter) {
+ if (tableFilter == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.tableFilter = (TableFilter)tableFilter;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TableIdentifierStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TableIdentifierStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TableIdentifierStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,11 +1,15 @@
package org.hibernate.mediator.stubs;
import org.hibernate.cfg.reveng.TableIdentifier;
+import org.hibernate.mediator.Messages;
public class TableIdentifierStub {
protected TableIdentifier tableIdentifier;
protected TableIdentifierStub(Object tableIdentifier) {
+ if (tableIdentifier == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.tableIdentifier = (TableIdentifier)tableIdentifier;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TableStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TableStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TableStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -6,11 +6,15 @@
import org.hibernate.mapping.Column;
import org.hibernate.mapping.ForeignKey;
import org.hibernate.mapping.Table;
+import org.hibernate.mediator.Messages;
public class TableStub {
protected Table table;
protected TableStub(Object table) {
+ if (table == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.table = (Table)table;
}
@@ -27,7 +31,11 @@
}
public PrimaryKeyStub getPrimaryKey() {
- return new PrimaryKeyStub(table.getPrimaryKey());
+ Object obj = table.getPrimaryKey();
+ if (obj == null) {
+ return null;
+ }
+ return new PrimaryKeyStub(obj);
}
@SuppressWarnings("unchecked")
@@ -35,7 +43,10 @@
Iterator<ForeignKey> it = (Iterator<ForeignKey>)table.getForeignKeyIterator();
ArrayList<ForeignKeyStub> al = new ArrayList<ForeignKeyStub>();
while (it.hasNext()) {
- al.add(new ForeignKeyStub(it.next()));
+ Object obj = it.next();
+ if (obj != null) {
+ al.add(new ForeignKeyStub(obj));
+ }
}
return al.iterator();
}
@@ -48,8 +59,16 @@
return table.getSchema();
}
- public DependantValueStub getIdentifierValue() {
- return new DependantValueStub(table.getIdentifierValue());
+ public KeyValueStub getIdentifierValue() {
+ Object obj = table.getIdentifierValue();
+ if (obj == null) {
+ return null;
+ }
+ ValueStub res = ValueStubFactory.createValueStub(obj);
+ if (res instanceof KeyValueStub) {
+ return (KeyValueStub)res;
+ }
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
}
@SuppressWarnings("unchecked")
@@ -57,7 +76,10 @@
Iterator<Column> it = (Iterator<Column>)table.getColumnIterator();
ArrayList<ColumnStub> al = new ArrayList<ColumnStub>();
while (it.hasNext()) {
- al.add(new ColumnStub(it.next()));
+ Object obj = it.next();
+ if (obj != null) {
+ al.add(new ColumnStub(obj));
+ }
}
return al.iterator();
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ToOneStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ToOneStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ToOneStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -2,12 +2,16 @@
import org.hibernate.FetchMode;
import org.hibernate.mapping.ToOne;
+import org.hibernate.mediator.Messages;
public class ToOneStub extends SimpleValueStub {
protected ToOne toOne;
protected ToOneStub(Object toOne) {
super(toOne);
+ if (toOne == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.toOne = (ToOne)toOne;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TypeStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TypeStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TypeStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -1,11 +1,15 @@
package org.hibernate.mediator.stubs;
+import org.hibernate.mediator.Messages;
import org.hibernate.type.Type;
public abstract class TypeStub {
protected Type type;
protected TypeStub(Object type) {
+ if (type == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.type = (Type)type;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TypeStubFactory.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TypeStubFactory.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/TypeStubFactory.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -2,33 +2,24 @@
import java.lang.reflect.Type;
+import org.hibernate.mediator.stubs.util.ClassHelper;
+
public class TypeStubFactory {
@SuppressWarnings("unchecked")
public static TypeStub createTypeStub(Object value) {
+ if (value == null) {
+ return null;
+ }
final Class cl = value.getClass();
- if (isClassOrOffspring(cl, "org.hibernate.type.CollectionType")) { //$NON-NLS-1$
+ if (ClassHelper.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$
+ } else if (ClassHelper.isClassOrOffspring(cl, "org.hibernate.type.EntityType")) { //$NON-NLS-1$
return new EntityTypeStub(value);
- } else if (isClassOrOffspring(cl, "org.hibernate.type.NullableType")) { //$NON-NLS-1$
+ } else if (ClassHelper.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;
- }
}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/UnionSubclassStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/UnionSubclassStub.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/UnionSubclassStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -0,0 +1,16 @@
+package org.hibernate.mediator.stubs;
+
+import org.hibernate.mapping.UnionSubclass;
+import org.hibernate.mediator.Messages;
+
+public class UnionSubclassStub extends SubclassStub {
+ protected UnionSubclass unionSubclass;
+
+ protected UnionSubclassStub(Object unionSubclass) {
+ super(unionSubclass);
+ if (unionSubclass == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
+ this.unionSubclass = (UnionSubclass)unionSubclass;
+ }
+}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ValueStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ValueStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ValueStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -4,17 +4,26 @@
import java.util.Iterator;
import org.hibernate.mapping.Column;
+import org.hibernate.mapping.Selectable;
import org.hibernate.mapping.Value;
+import org.hibernate.mediator.Messages;
public abstract class ValueStub {
protected Value value;
protected ValueStub(Object value) {
+ if (value == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.value = (Value)value;
}
public TableStub getTable() {
- return new TableStub(value.getTable());
+ Object obj = value.getTable();
+ if (obj == null) {
+ return null;
+ }
+ return new TableStub(obj);
}
public boolean isSimpleValue() {
@@ -26,11 +35,14 @@
}
@SuppressWarnings("unchecked")
- public Iterator<ColumnStub> getColumnIterator() {
- Iterator<Column> it = (Iterator<Column>)value.getColumnIterator();
- ArrayList<ColumnStub> al = new ArrayList<ColumnStub>();
+ public Iterator<SelectableStub> getColumnIterator() {
+ Iterator<Selectable> it = (Iterator<Selectable>)value.getColumnIterator();
+ ArrayList<SelectableStub> al = new ArrayList<SelectableStub>();
while (it.hasNext()) {
- al.add(new ColumnStub(it.next()));
+ Selectable obj = it.next();
+ if (obj != null) {
+ al.add(SelectableStubFactory.createSelectableStub(obj));
+ }
}
return al.iterator();
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ValueStubFactory.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ValueStubFactory.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/ValueStubFactory.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -3,6 +3,9 @@
public class ValueStubFactory {
@SuppressWarnings("unchecked")
public static ValueStub createValueStub(Object value) {
+ if (value == null) {
+ return null;
+ }
final Class cl = value.getClass();
if (0 == "org.hibernate.mapping.Bag".compareTo(cl.getName())) { //$NON-NLS-1$
return new BagStub(value);
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/util/ClassHelper.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/util/ClassHelper.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/util/ClassHelper.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -0,0 +1,19 @@
+package org.hibernate.mediator.stubs.util;
+
+import java.lang.reflect.Type;
+
+public class ClassHelper {
+ public 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;
+ }
+}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/util/HqlBaseLexerStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/util/HqlBaseLexerStub.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/util/HqlBaseLexerStub.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -3,6 +3,8 @@
import java.io.Reader;
import org.hibernate.hql.antlr.HqlBaseLexer;
+import org.hibernate.mediator.Messages;
+import org.hibernate.mediator.stubs.HibernateConsoleRuntimeException;
import org.hibernate.mediator.stubs.HqlSqlTokenTypesStub;
import antlr.Token;
@@ -13,6 +15,9 @@
protected HqlBaseLexer hqlBaseLexer;
protected HqlBaseLexerStub(HqlBaseLexer hqlBaseLexer) {
+ if (hqlBaseLexer == null) {
+ throw new HibernateConsoleRuntimeException(Messages.Stub_create_null_stub_prohibit);
+ }
this.hqlBaseLexer = hqlBaseLexer;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/SpecialRootClass.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/SpecialRootClass.java 2010-03-31 18:07:31 UTC (rev 21165)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/SpecialRootClass.java 2010-03-31 18:08:46 UTC (rev 21166)
@@ -34,7 +34,7 @@
//protected RootClass rootClass;
public SpecialRootClass(PropertyStub property) {
- super(property);
+ super(RootClassStub.newInstance());
this.property = property;
//this.rootClass = null;
generate();
14 years, 9 months
JBoss Tools SVN: r21165 - branches/modular_build/jmx/features/org.jboss.tools.jmx.tests.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-03-31 14:07:31 -0400 (Wed, 31 Mar 2010)
New Revision: 21165
Modified:
branches/modular_build/jmx/features/org.jboss.tools.jmx.tests.feature/feature.xml
Log:
remove o.e.test from feature.xml to allow tycho build
Modified: branches/modular_build/jmx/features/org.jboss.tools.jmx.tests.feature/feature.xml
===================================================================
--- branches/modular_build/jmx/features/org.jboss.tools.jmx.tests.feature/feature.xml 2010-03-31 17:53:31 UTC (rev 21164)
+++ branches/modular_build/jmx/features/org.jboss.tools.jmx.tests.feature/feature.xml 2010-03-31 18:07:31 UTC (rev 21165)
@@ -28,7 +28,7 @@
<import plugin="org.eclipse.debug.core" version="3.2.0" match="compatible"/>
</requires>
- <plugin
+ <!-- <plugin
id="org.eclipse.ant.optional.junit"
download-size="0"
install-size="0"
@@ -39,7 +39,7 @@
id="org.eclipse.test"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="0.0.0"/> -->
<plugin
id="org.jboss.tools.tests"
14 years, 9 months
JBoss Tools SVN: r21164 - workspace/snjeza/esbexamples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-03-31 13:53:31 -0400 (Wed, 31 Mar 2010)
New Revision: 21164
Added:
workspace/snjeza/esbexamples/helloworldall.zip
Removed:
workspace/snjeza/esbexamples/helloworld.zip
Log:
https://jira.jboss.org/jira/browse/JBIDE-5645 Missing requirements description for Project Examples
Deleted: workspace/snjeza/esbexamples/helloworld.zip
===================================================================
(Binary files differ)
Copied: workspace/snjeza/esbexamples/helloworldall.zip (from rev 21162, workspace/snjeza/esbexamples/helloworld.zip)
===================================================================
(Binary files differ)
14 years, 9 months
JBoss Tools SVN: r21162 - workspace/snjeza/esbexamples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-03-31 13:51:33 -0400 (Wed, 31 Mar 2010)
New Revision: 21162
Added:
workspace/snjeza/esbexamples/helloworld.zip
workspace/snjeza/esbexamples/project-examples-test-esb.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-5645 Missing requirements description for Project Examples
Added: workspace/snjeza/esbexamples/helloworld.zip
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/esbexamples/helloworld.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/snjeza/esbexamples/project-examples-test-esb.xml
===================================================================
--- workspace/snjeza/esbexamples/project-examples-test-esb.xml (rev 0)
+++ workspace/snjeza/esbexamples/project-examples-test-esb.xml 2010-03-31 17:51:33 UTC (rev 21162)
@@ -0,0 +1,24 @@
+<projects>
+ <project>
+
+ <category>ESB</category>
+ <name>helloworld</name>
+ <included-projects>helloworld, helloworld_testclient</included-projects>
+ <shortDescription>JBoss ESB HelloWorld Example - **TEST**</shortDescription>
+ <description>This example is to prove that the ESB is is properly configured and happy.
+As well as to demonstrate the needed minimal files to make a basic ESB component execute.
+The example includes the helloworld and helloworld_testclient project. It requires JBoss SOA 4.3 </description>
+ <size>1081344</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example/hel...
+ </url>
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.43</property>
+ <property name="eclipse-projects">helloworld</property>
+ <property name="required-component">esb</property>
+ <property name="description">This project example requires the JBoss SOA 4.3</property>
+ </fix>
+ </fixes>
+ </project>
+</projects>
\ No newline at end of file
14 years, 9 months
JBoss Tools SVN: r21160 - trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-03-31 13:36:25 -0400 (Wed, 31 Mar 2010)
New Revision: 21160
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
Log:
Change removeProjectFromServers() method to search for specified string when searching for project to be removed from server not just test beginning and end of Servers tree item label.
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2010-03-31 17:33:28 UTC (rev 21159)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2010-03-31 17:36:25 UTC (rev 21160)
@@ -13,12 +13,8 @@
import static org.jboss.tools.ui.bot.ext.SWTTestExt.eclipse;
-import java.util.List;
-import java.util.Vector;
-
import org.apache.log4j.Logger;
import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Table;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
@@ -28,7 +24,6 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.types.ViewType;
@@ -174,9 +169,9 @@
/**
* Remove Project from all Servers
* @param projectName
- * @param suffix
+ * @param stringToContain
*/
- public void removeProjectFromServers(String projectName , String suffix){
+ public void removeProjectFromServers(String projectName , String stringToContain){
eclipse.showView(ViewType.SERVERS);
@@ -198,7 +193,7 @@
do{
treeItemlabel = serverTreeItemChildren[itemIndex].getText();
found = treeItemlabel.startsWith(projectName)
- && (suffix == null || treeItemlabel.endsWith(suffix));
+ && (stringToContain == null || treeItemlabel.indexOf(stringToContain) >= 0);
} while (!found && ++itemIndex < serverTreeItemChildren.length);
// Server Tree Item has Child with Text equal to JSF TEst Project
if (found){
14 years, 9 months
JBoss Tools SVN: r21159 - branches/modular_build/common/features/org.jboss.tools.common.all.tests.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-03-31 13:33:28 -0400 (Wed, 31 Mar 2010)
New Revision: 21159
Modified:
branches/modular_build/common/features/org.jboss.tools.common.all.tests.feature/feature.xml
Log:
comment out source plugins so build can run w/ tycho
Modified: branches/modular_build/common/features/org.jboss.tools.common.all.tests.feature/feature.xml
===================================================================
--- branches/modular_build/common/features/org.jboss.tools.common.all.tests.feature/feature.xml 2010-03-31 17:06:55 UTC (rev 21158)
+++ branches/modular_build/common/features/org.jboss.tools.common.all.tests.feature/feature.xml 2010-03-31 17:33:28 UTC (rev 21159)
@@ -29,7 +29,7 @@
</requires>
<!-- add to allow buildTests and tests to run via an Athena build; remove for uberbuilder -->
- <plugin
+ <!-- <plugin
id="org.eclipse.ant.optional.junit"
download-size="0"
install-size="0"
@@ -40,7 +40,7 @@
id="org.eclipse.test"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="0.0.0"/> -->
<!-- add to allow buildTests and tests to run via an Athena build; remove for uberbuilder -->
<plugin
@@ -55,11 +55,11 @@
install-size="0"
version="0.0.0"/>
- <plugin
+ <!-- <plugin
id="org.jboss.tools.common.el.core.test.source"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="0.0.0"/> -->
<plugin
id="org.jboss.tools.common.model.test"
@@ -67,11 +67,11 @@
install-size="0"
version="0.0.0"/>
- <plugin
+ <!-- <plugin
id="org.jboss.tools.common.model.test.source"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="0.0.0"/> -->
<plugin
id="org.jboss.tools.common.model.ui.test"
@@ -79,11 +79,11 @@
install-size="0"
version="0.0.0"/>
- <plugin
+ <!-- <plugin
id="org.jboss.tools.common.model.ui.test.source"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="0.0.0"/> -->
<plugin
id="org.jboss.tools.common.test"
@@ -91,11 +91,11 @@
install-size="0"
version="0.0.0"/>
- <plugin
+ <!-- <plugin
id="org.jboss.tools.common.test.source"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="0.0.0"/> -->
<plugin
id="org.jboss.tools.common.text.ext.test"
@@ -103,11 +103,11 @@
install-size="0"
version="0.0.0"/>
- <plugin
+ <!-- <plugin
id="org.jboss.tools.common.text.ext.test.source"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="0.0.0"/> -->
<plugin
id="org.jboss.tools.common.verification.test"
@@ -115,11 +115,11 @@
install-size="0"
version="0.0.0"/>
- <plugin
+ <!-- <plugin
id="org.jboss.tools.common.verification.test.source"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="0.0.0"/> -->
<plugin
id="org.jboss.tools.common.verification.ui.test"
@@ -127,10 +127,10 @@
install-size="0"
version="0.0.0"/>
- <plugin
+ <!-- <plugin
id="org.jboss.tools.common.verification.ui.test.source"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="0.0.0"/> -->
</feature>
14 years, 9 months
JBoss Tools SVN: r21158 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2010-03-31 13:06:55 -0400 (Wed, 31 Mar 2010)
New Revision: 21158
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml
Log:
Note in "1.4. JBoss Developer Studio Installation" is updated.
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml 2010-03-31 16:29:05 UTC (rev 21157)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml 2010-03-31 17:06:55 UTC (rev 21158)
@@ -352,8 +352,8 @@
<note>
<title>Note:</title>
- <para>JBoss Developer Studio needs Java 6 and "gij" isn't available on
- every platform.</para>
+ <para>JBoss Developer Studio 3.0 comes integrated with JBoss EAP 5.0 that requires JDK 6.0 to run
+ and "gij" isn't available on every platform.</para>
</note>
<itemizedlist>
14 years, 9 months