JBoss Tools SVN: r2482 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core: validation and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-07-17 13:38:56 -0400 (Tue, 17 Jul 2007)
New Revision: 2482
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamJavaValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
Log:
http://jira.jboss.com/jira/browse/EXIN-327 @Factory, @DataModelSelection, @DataModelSelectionIndex validation
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java 2007-07-17 16:34:59 UTC (rev 2481)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java 2007-07-17 17:38:56 UTC (rev 2482)
@@ -16,12 +16,14 @@
import org.jboss.tools.seam.core.ISeamAnnotatedFactory;
import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
import org.jboss.tools.seam.core.IValueInfo;
+import org.jboss.tools.seam.core.ScopeType;
import org.jboss.tools.seam.core.event.Change;
/**
* @author Viacheslav Kabanovich
*/
public class SeamAnnotatedFactory extends SeamJavaContextVariable implements ISeamAnnotatedFactory {
+
boolean autoCreate = false;
public IMethod getSourceMethod() {
@@ -53,4 +55,29 @@
setAutoCreate(value != null && "true".equals(value.getValue()));
}
-}
+ @Override
+ public void setScope(ScopeType scope) {
+ if(scope==null) {
+ this.scopeType = ScopeType.EVENT;
+ } else {
+ super.setScope(scope);
+ }
+ }
+
+ @Override
+ public ScopeType getScope() {
+ if(scope==null) {
+ return ScopeType.EVENT;
+ }
+ return super.getScope();
+ }
+
+ @Override
+ public void setScopeAsString(String scope) {
+ if(scope==null) {
+ this.scopeType = ScopeType.EVENT;
+ } else {
+ super.setScopeAsString(scope);
+ }
+ }
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamJavaValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamJavaValidator.java 2007-07-17 16:34:59 UTC (rev 2481)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamJavaValidator.java 2007-07-17 17:38:56 UTC (rev 2482)
@@ -30,11 +30,13 @@
import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
+import org.jboss.tools.seam.core.IRole;
import org.jboss.tools.seam.core.ISeamAnnotatedFactory;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
import org.jboss.tools.seam.core.ISeamComponentMethod;
import org.jboss.tools.seam.core.ISeamContextVariable;
+import org.jboss.tools.seam.core.ISeamElement;
import org.jboss.tools.seam.core.ISeamFactory;
import org.jboss.tools.seam.core.ISeamJavaComponentDeclaration;
import org.jboss.tools.seam.core.ISeamProject;
@@ -42,6 +44,7 @@
import org.jboss.tools.seam.core.ScopeType;
import org.jboss.tools.seam.core.SeamComponentMethodType;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.internal.core.AbstractContextVariable;
import org.jboss.tools.seam.internal.core.SeamComponentDeclaration;
import org.jboss.tools.seam.internal.core.SeamProject;
import org.jboss.tools.seam.internal.core.SeamTextSourceReference;
@@ -52,7 +55,7 @@
*/
public class SeamJavaValidator extends SeamValidator {
- private static final String MARKED_COMPONENT_MESSAGE_GROUP = "markedComponent";
+ private static final String MARKED_SEAM_RESOURCE_MESSAGE_GROUP = "markedSeamResource";
private static final String NONUNIQUE_COMPONENT_NAME_MESSAGE_ID = "NONUNIQUE_COMPONENT_NAME_MESSAGE";
private static final String UNKNOWN_INJECTION_NAME_MESSAGE_ID = "UNKNOWN_INJECTION_NAME";
@@ -64,7 +67,8 @@
private static final String STATEFUL_COMPONENT_WRONG_SCOPE_MESSAGE_ID = "STATEFUL_COMPONENT_WRONG_SCOPE";
private static final String ENTITY_COMPONENT_WRONG_SCOPE_MESSAGE_ID = "ENTITY_COMPONENT_WRONG_SCOPE";
private static final String UNKNOWN_FACTORY_NAME_MESSAGE_ID = "UNKNOWN_FACTORY_NAME";
- private static final String DUPLICATE_FACTORY_NAME_MESSAGE_ID = "DUPLICATE_FACTORY_NAME";
+ private static final String MULTIPLE_DATA_BINDER_MESSAGE_ID = "MULTIPLE_DATA_BINDER";
+ private static final String DUPLICATE_VARIABLE_NAME_MESSAGE_ID = "DUPLICATE_VARIABLE_NAME";
private SeamValidationContext validationContext;
private ISeamProject project;
@@ -127,7 +131,7 @@
for (IPath linkedResource : resources) {
// Remove markers from collected java file
IFile sourceFile = root.getFile(linkedResource);
- reporter.removeMessageSubset(this, sourceFile, MARKED_COMPONENT_MESSAGE_GROUP);
+ reporter.removeMessageSubset(this, sourceFile, MARKED_SEAM_RESOURCE_MESSAGE_GROUP);
validateComponent(linkedResource, checkedComponents);
validateFactory(linkedResource, markedDuplicateFactoryNames);
// TODO
@@ -171,27 +175,32 @@
ScopeType factoryScope = factory.getScope();
Set<ISeamContextVariable> variables = project.getVariablesByName(factoryName);
boolean unknownVariable = true;
- boolean firstDuplicateNameWasMarked = false;
+ boolean firstDuplicateVariableWasMarked = false;
for (ISeamContextVariable variable : variables) {
if((factoryScope == variable.getScope() || factoryScope.getPriority()>variable.getScope().getPriority())) {
- if(variable instanceof ISeamFactory) {
+ if(variable instanceof ISeamFactory || variable instanceof ISeamComponent || variable instanceof IRole) {
if(variable!=factory && !markedDuplicateFactoryNames.contains(factoryName)) {
// Duplicate factory name. Mark it.
// save link to factory resource
- validationContext.addLinkedResource(factoryName, variable.getSourcePath());
- this.addError(DUPLICATE_FACTORY_NAME_MESSAGE_ID, new String[]{factoryName}, (ISeamTextSourceReference)variable, variable.getResource(), MARKED_COMPONENT_MESSAGE_GROUP);
- if(!firstDuplicateNameWasMarked) {
- firstDuplicateNameWasMarked = true;
- // mark first factory
+ ISeamTextSourceReference location = null;
+ if(!firstDuplicateVariableWasMarked) {
+ firstDuplicateVariableWasMarked = true;
+ // mark original factory
validationContext.addLinkedResource(factoryName, factory.getSourcePath());
- this.addError(DUPLICATE_FACTORY_NAME_MESSAGE_ID, new String[]{factoryName}, factory, factory.getResource(), MARKED_COMPONENT_MESSAGE_GROUP);
+ location = getLoactionOfName(factory);
+ this.addError(DUPLICATE_VARIABLE_NAME_MESSAGE_ID, new String[]{factoryName}, location, factory.getResource(), MARKED_SEAM_RESOURCE_MESSAGE_GROUP);
}
+ // mark duplicate variable
+ IResource resource = getComponentResourceWithName(variable);
+ validationContext.addLinkedResource(factoryName, resource.getFullPath());
+ location = getLoactionOfName(variable);
+ this.addError(DUPLICATE_VARIABLE_NAME_MESSAGE_ID, new String[]{factoryName}, location, resource, MARKED_SEAM_RESOURCE_MESSAGE_GROUP);
+
markedDuplicateFactoryNames.add(factoryName);
}
} else {
// We have that variable name
unknownVariable = false;
- break;
}
}
}
@@ -199,7 +208,7 @@
// mark unknown factory name
// save link to factory resource
validationContext.addLinkedResource(factoryName, factory.getSourcePath());
- this.addError(UNKNOWN_FACTORY_NAME_MESSAGE_ID, new String[]{factoryName}, factory, factory.getResource(), MARKED_COMPONENT_MESSAGE_GROUP);
+ this.addError(UNKNOWN_FACTORY_NAME_MESSAGE_ID, new String[]{factoryName}, getLoactionOfName(factory), factory.getResource(), MARKED_SEAM_RESOURCE_MESSAGE_GROUP);
}
}
} catch (Exception e) {
@@ -211,6 +220,38 @@
}
}
+ private static IResource getComponentResourceWithName(ISeamElement element) {
+ if(element instanceof ISeamComponent) {
+ Set declarations = ((ISeamComponent)element).getAllDeclarations();
+ for (Object o : declarations) {
+ SeamComponentDeclaration d = (SeamComponentDeclaration)o;
+ if(d.getLocationFor(SeamComponentDeclaration.PATH_OF_NAME)!=null) {
+ return d.getResource();
+ }
+ }
+ }
+ return element.getResource();
+ }
+
+ private static ISeamTextSourceReference getLoactionOfName(ISeamElement element) {
+ ISeamTextSourceReference location = null;
+ if(element instanceof AbstractContextVariable) {
+ location = ((AbstractContextVariable)element).getLocationFor("name");
+ } else if(element instanceof ISeamComponent) {
+ Set declarations = ((ISeamComponent)element).getAllDeclarations();
+ for (Object d : declarations) {
+ location = ((SeamComponentDeclaration)d).getLocationFor(SeamComponentDeclaration.PATH_OF_NAME);
+ if(location!=null) {
+ break;
+ }
+ }
+ }
+ if(location==null && element instanceof ISeamTextSourceReference) {
+ location = (ISeamTextSourceReference)element;
+ }
+ return location;
+ }
+
private void validateComponent(IPath sourceFilePath, Set<ISeamComponent> checkedComponents) {
Set<ISeamComponent> components = project.getComponentsByPath(sourceFilePath);
for (ISeamComponent component : components) {
@@ -297,7 +338,7 @@
IResource checkedDeclarationResource = checkedDeclaration.getResource();
ISeamTextSourceReference location = ((SeamComponentDeclaration)checkedDeclaration).getLocationFor(SeamComponentDeclaration.PATH_OF_NAME);
if(location!=null) {
- addError(NONUNIQUE_COMPONENT_NAME_MESSAGE_ID, new String[]{component.getName()}, location, checkedDeclarationResource, MARKED_COMPONENT_MESSAGE_GROUP);
+ addError(NONUNIQUE_COMPONENT_NAME_MESSAGE_ID, new String[]{component.getName()}, location, checkedDeclarationResource, MARKED_SEAM_RESOURCE_MESSAGE_GROUP);
}
markedDeclarations.add(checkedDeclaration);
}
@@ -305,7 +346,7 @@
markedDeclarations.add(javaDeclaration);
ISeamTextSourceReference location = ((SeamComponentDeclaration)javaDeclaration).getLocationFor(SeamComponentDeclaration.PATH_OF_NAME);
if(location!=null) {
- addError(NONUNIQUE_COMPONENT_NAME_MESSAGE_ID, new String[]{component.getName()}, location, javaDeclarationResource, MARKED_COMPONENT_MESSAGE_GROUP);
+ addError(NONUNIQUE_COMPONENT_NAME_MESSAGE_ID, new String[]{component.getName()}, location, javaDeclarationResource, MARKED_SEAM_RESOURCE_MESSAGE_GROUP);
}
}
}
@@ -326,7 +367,7 @@
ScopeType scope = component.getScope();
if(scope == ScopeType.STATELESS) {
ISeamTextSourceReference location = getScopeLocation(component);
- addError(ENTITY_COMPONENT_WRONG_SCOPE_MESSAGE_ID, new String[]{component.getName()}, location, javaDeclaration.getResource(), MARKED_COMPONENT_MESSAGE_GROUP);
+ addError(ENTITY_COMPONENT_WRONG_SCOPE_MESSAGE_ID, new String[]{component.getName()}, location, javaDeclaration.getResource(), MARKED_SEAM_RESOURCE_MESSAGE_GROUP);
}
}
}
@@ -360,7 +401,7 @@
ScopeType scope = component.getScope();
if(scope == ScopeType.PAGE || scope == ScopeType.STATELESS) {
ISeamTextSourceReference location = getScopeLocation(component);
- addError(STATEFUL_COMPONENT_WRONG_SCOPE_MESSAGE_ID, new String[]{component.getName()}, location, javaDeclaration.getResource(), MARKED_COMPONENT_MESSAGE_GROUP);
+ addError(STATEFUL_COMPONENT_WRONG_SCOPE_MESSAGE_ID, new String[]{component.getName()}, location, javaDeclaration.getResource(), MARKED_SEAM_RESOURCE_MESSAGE_GROUP);
}
}
}
@@ -370,7 +411,7 @@
ISeamTextSourceReference classNameLocation = getClassNameLocation(javaDeclaration);
Set<ISeamComponentMethod> methods = javaDeclaration.getMethodsByType(methodType);
if(methods==null || methods.size()==0) {
- addError(STATEFUL_COMPONENT_DOES_NOT_CONTENT_METHOD_SUFIX_MESSAGE_ID + postfixMessageId, new String[]{component.getName()}, classNameLocation, javaDeclaration.getResource(), MARKED_COMPONENT_MESSAGE_GROUP);
+ addError(STATEFUL_COMPONENT_DOES_NOT_CONTENT_METHOD_SUFIX_MESSAGE_ID + postfixMessageId, new String[]{component.getName()}, classNameLocation, javaDeclaration.getResource(), MARKED_SEAM_RESOURCE_MESSAGE_GROUP);
}
}
@@ -388,7 +429,7 @@
try {
IMethod javaMethod = (IMethod)method.getSourceMember();
String methodName = javaMethod.getElementName();
- addError(DUPLICATE_METHOD_SUFIX_MESSAGE_ID + postfixMessageId, new String[]{methodName}, method, javaDeclaration.getResource(), MARKED_COMPONENT_MESSAGE_GROUP);
+ addError(DUPLICATE_METHOD_SUFIX_MESSAGE_ID + postfixMessageId, new String[]{methodName}, method, javaDeclaration.getResource(), MARKED_SEAM_RESOURCE_MESSAGE_GROUP);
} catch (Exception e) {
SeamCorePlugin.getDefault().logError(e);
}
@@ -408,20 +449,30 @@
}
for (IBijectedAttribute bijection : bijections) {
String name = bijection.getName();
- if(name.startsWith("#{")) {
- // TODO Validate EL
+ if(name==null) {
+ if(bijection.isOfType(BijectedAttributeType.DATA_MODEL_SELECTION) || bijection.isOfType(BijectedAttributeType.DATA_MODEL_SELECTION_INDEX)) {
+ // here must be the only one @DataModel in the component
+ Set<IBijectedAttribute> dataBinders = declaration.getBijectedAttributesByType(BijectedAttributeType.DATA_BINDER);
+ if(dataBinders.size()>0) {
+ for (IBijectedAttribute dataBinder : dataBinders) {
+ addError(MULTIPLE_DATA_BINDER_MESSAGE_ID, dataBinder, declaration.getResource(), MARKED_SEAM_RESOURCE_MESSAGE_GROUP);
+ }
+ }
+ }
+ } else if(name.startsWith("#{")) {
+ // EL Validator should do this work.
} else {
// save link between java source and variable name
validationContext.addLinkedResource(name, declaration.getSourcePath());
- if(bijection.isOfType(BijectedAttributeType.IN)) {
- // Validate injection
+ // Validate @In & @DataModelSelection & @DataModelSelectionIndex
+ if(bijection.isOfType(BijectedAttributeType.IN) || bijection.isOfType(BijectedAttributeType.DATA_MODEL_SELECTION) || bijection.isOfType(BijectedAttributeType.DATA_MODEL_SELECTION_INDEX)) {
Set<ISeamContextVariable> variables = project.getVariablesByName(name);
if(variables==null || variables.size()<1) {
// Injection has unknown name. Mark it.
// TODO check preferences to mark it as Error or Warning or ignore it.
IResource declarationResource = declaration.getResource();
- addError(UNKNOWN_INJECTION_NAME_MESSAGE_ID, new String[]{name}, bijection, declarationResource, MARKED_COMPONENT_MESSAGE_GROUP);
+ addError(UNKNOWN_INJECTION_NAME_MESSAGE_ID, new String[]{name}, bijection, declarationResource, MARKED_SEAM_RESOURCE_MESSAGE_GROUP);
}
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2007-07-17 16:34:59 UTC (rev 2481)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2007-07-17 17:38:56 UTC (rev 2482)
@@ -18,4 +18,5 @@
DUPLICATE_DESTROY=Duplicate @Destroy method "{0}"
DUPLICATE_CREATE=Duplicate @Create method "{0}"
UNKNOWN_FACTORY_NAME=Factory method "{0}" with a void return type must have an associated @Out/Databinder
-DUPLICATE_FACTORY_NAME=Duplicate @Factory method: "{0}"
\ No newline at end of file
+MULTIPLE_DATA_BINDER=@DataModelSelection and @DataModelSelectionIndex without name requires the only one @DataModel in the component.
+DUPLICATE_VARIABLE_NAME=Duplicate variable name: {0}
\ No newline at end of file
17 years, 5 months
JBoss Tools SVN: r2481 - trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-17 12:34:59 -0400 (Tue, 17 Jul 2007)
New Revision: 2481
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Address.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Animal.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Animal.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/BooleanLiteralEntity.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/BooleanLiteralEntity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Car.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Cat.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Classification.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/ClassificationType.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/ComponentContainer.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/ComponentContainer.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/CrazyCompositeKey.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/CrazyIdFieldNames.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Dog.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/DomesticAnimal.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/EntityWithCrazyCompositeKey.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/EntityWithCrazyCompositeKey.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/FooBarCopy.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/HeresAnotherCrazyIdFieldName.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Human.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/IntegerVersioned.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Joiner.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/KeyManyToOneEntity.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/KeyManyToOneEntity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/KeyManyToOneKeyEntity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Lizard.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Mammal.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/MoreCrazyIdFieldNameStuffEntity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Name.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/PettingZoo.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Pickup.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Reptile.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SUV.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SimpleAssociatedEntity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SimpleEntityWithAssociation.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SimpleEntityWithAssociation.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/StateProvince.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/TimestampVersioned.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Truck.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/User.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Vehicle.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Vehicle.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Versions.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Zoo.java
Log:
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Address.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Address.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Address.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,55 @@
+// $Id: Address.java 7996 2005-08-22 14:49:57Z steveebersole $
+package mapping.hql;
+
+/**
+ * Implementation of Address.
+ *
+ * @author Steve Ebersole
+ */
+public class Address {
+ private String street;
+ private String city;
+ private String postalCode;
+ private String country;
+ private StateProvince stateProvince;
+
+ public String getStreet() {
+ return street;
+ }
+
+ public void setStreet(String street) {
+ this.street = street;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public String getPostalCode() {
+ return postalCode;
+ }
+
+ public void setPostalCode(String postalCode) {
+ this.postalCode = postalCode;
+ }
+
+ public String getCountry() {
+ return country;
+ }
+
+ public void setCountry(String country) {
+ this.country = country;
+ }
+
+ public StateProvince getStateProvince() {
+ return stateProvince;
+ }
+
+ public void setStateProvince(StateProvince stateProvince) {
+ this.stateProvince = stateProvince;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Animal.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Animal.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Animal.hbm.xml 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,150 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+<hibernate-mapping
+ package="mapping.hql"
+ default-access="field">
+
+ <class name="Animal">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="description"/>
+ <property name="bodyWeight" column="body_weight"/>
+ <many-to-one name="mother" column="mother_id"/>
+ <many-to-one name="father" column="father_id"/>
+ <many-to-one name="zoo" column="zoo_id"/>
+ <property name="serialNumber"/>
+ <set name="offspring" order-by="father_id">
+ <key column="mother_id"/>
+ <one-to-many class="Animal"/>
+ </set>
+ <joined-subclass name="Reptile">
+ <key column="animal"/>
+ <property name="bodyTemperature"/>
+ <joined-subclass name="Lizard">
+ <key column="reptile"/>
+ </joined-subclass>
+ </joined-subclass>
+ <joined-subclass name="Mammal">
+ <key column="animal"/>
+ <property name="pregnant"/>
+ <property name="birthdate" type="date"/>
+ <joined-subclass name="DomesticAnimal">
+ <key column="mammal"/>
+ <many-to-one name="owner"/>
+ <joined-subclass name="Cat">
+ <key column="mammal"/>
+ </joined-subclass>
+ <joined-subclass name="Dog">
+ <key column="mammal"/>
+ </joined-subclass>
+ </joined-subclass>
+ <joined-subclass name="Human">
+ <key column="mammal"/>
+ <component name="name">
+ <property name="first" column="name_first"/>
+ <property name="initial" column="name_initial"/>
+ <property name="last" column="name_last"/>
+ </component>
+ <property name="nickName"/>
+ <property name="height"/>
+
+ <property name="intValue"/>
+ <property name="floatValue"/>
+ <property name="bigDecimalValue"/>
+ <property name="bigIntegerValue"/>
+
+ <bag name="friends">
+ <key column="human1"/>
+ <many-to-many column="human2" class="Human"/>
+ </bag>
+ <map name="family">
+ <key column="human1"/>
+ <map-key column="relationship" type="string"/>
+ <many-to-many column="human2" class="Human"/>
+ </map>
+ <bag name="pets" inverse="true">
+ <key column="owner"/>
+ <one-to-many class="DomesticAnimal"/>
+ </bag>
+ <set name="nickNames" lazy="false" table="human_nick_names" sort="natural">
+ <key column="human"/>
+ <element column="nick_name" type="string" not-null="true"/>
+ </set>
+ <map name="addresses" table="addresses">
+ <key column="human"/>
+ <map-key type="string" column="type"/>
+ <composite-element class="Address">
+ <property name="street"/>
+ <property name="city"/>
+ <property name="postalCode"/>
+ <property name="country"/>
+ <many-to-one name="stateProvince" column="state_prov_id" class="StateProvince"/>
+ </composite-element>
+ </map>
+ </joined-subclass>
+ </joined-subclass>
+ </class>
+
+ <class name="User" table="`User`">
+ <id name="id">
+ <generator class="foreign">
+ <param name="property">human</param>
+ </generator>
+ </id>
+ <property name="userName"/>
+ <one-to-one name="human" constrained="true"/>
+ <list name="permissions">
+ <key column="userId"/>
+ <list-index column="permissionId"/>
+ <element type="string" column="permissionName"/>
+ </list>
+ </class>
+
+ <class name="Zoo" discriminator-value="Z">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <discriminator column="zooType" type="character"/>
+ <property name="name" type="string"/>
+ <property name="classification" type="mapping.hql.ClassificationType"/>
+ <map name="mammals">
+ <key column="mammalZoo_id"/>
+ <index type="string" column="name"/>
+ <one-to-many class="Mammal"/>
+ </map>
+ <map name="animals" inverse="true">
+ <key column="zoo_id"/>
+ <index type="string" column="serialNumber"/>
+ <one-to-many class="Animal"/>
+ </map>
+ <component name="address" class="Address">
+ <property name="street"/>
+ <property name="city"/>
+ <property name="postalCode"/>
+ <property name="country"/>
+ <many-to-one name="stateProvince" column="state_prov_id" class="StateProvince"/>
+ </component>
+ <subclass name="PettingZoo" discriminator-value="P"/>
+ </class>
+
+ <class name="StateProvince">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="name"/>
+ <property name="isoCode"/>
+ </class>
+
+ <class name="Joiner">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="name"/>
+ <join table="JOINED">
+ <key column="ID"/>
+ <property name="joinedName"/>
+ </join>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Animal.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Animal.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Animal.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,99 @@
+//$Id: Animal.java 7445 2005-07-10 16:51:17Z oneovthafew $
+package mapping.hql;
+
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * @author Gavin King
+ */
+public class Animal {
+ private Long id;
+ private float bodyWeight;
+ private Set offspring;
+ private Animal mother;
+ private Animal father;
+ private String description;
+ private Zoo zoo;
+ private String serialNumber;
+
+ public Animal() {
+ }
+
+ public Animal(String description, float bodyWeight) {
+ this.description = description;
+ this.bodyWeight = bodyWeight;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public float getBodyWeight() {
+ return bodyWeight;
+ }
+
+ public void setBodyWeight(float bodyWeight) {
+ this.bodyWeight = bodyWeight;
+ }
+
+ public Set getOffspring() {
+ return offspring;
+ }
+
+ public void addOffspring(Animal offspring) {
+ if ( this.offspring == null ) {
+ this.offspring = new HashSet();
+ }
+
+ this.offspring.add( offspring );
+ }
+
+ public void setOffspring(Set offspring) {
+ this.offspring = offspring;
+ }
+
+ public Animal getMother() {
+ return mother;
+ }
+
+ public void setMother(Animal mother) {
+ this.mother = mother;
+ }
+
+ public Animal getFather() {
+ return father;
+ }
+
+ public void setFather(Animal father) {
+ this.father = father;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Zoo getZoo() {
+ return zoo;
+ }
+
+ public void setZoo(Zoo zoo) {
+ this.zoo = zoo;
+ }
+
+ public String getSerialNumber() {
+ return serialNumber;
+ }
+
+ public void setSerialNumber(String serialNumber) {
+ this.serialNumber = serialNumber;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/BooleanLiteralEntity.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/BooleanLiteralEntity.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/BooleanLiteralEntity.hbm.xml 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.hql" default-access="field">
+
+ <class name="BooleanLiteralEntity">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="yesNoBoolean" column="Y_N_BOOL" type="yes_no"/>
+ <property name="trueFalseBoolean" column="T_F_BOOL" type="true_false"/>
+ <property name="zeroOneBoolean" column="NUM_BOOL" type="boolean"/>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/BooleanLiteralEntity.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/BooleanLiteralEntity.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/BooleanLiteralEntity.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,45 @@
+package mapping.hql;
+
+/**
+ * todo: describe BooleanLiteralEntity
+ *
+ * @author Steve Ebersole
+ */
+public class BooleanLiteralEntity {
+ private Long id;
+ private boolean yesNoBoolean;
+ private boolean trueFalseBoolean;
+ private boolean zeroOneBoolean;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public boolean isYesNoBoolean() {
+ return yesNoBoolean;
+ }
+
+ public void setYesNoBoolean(boolean yesNoBoolean) {
+ this.yesNoBoolean = yesNoBoolean;
+ }
+
+ public boolean isTrueFalseBoolean() {
+ return trueFalseBoolean;
+ }
+
+ public void setTrueFalseBoolean(boolean trueFalseBoolean) {
+ this.trueFalseBoolean = trueFalseBoolean;
+ }
+
+ public boolean isZeroOneBoolean() {
+ return zeroOneBoolean;
+ }
+
+ public void setZeroOneBoolean(boolean zeroOneBoolean) {
+ this.zeroOneBoolean = zeroOneBoolean;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Car.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Car.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Car.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,10 @@
+// $Id: Car.java 7087 2005-06-08 18:23:44Z steveebersole $
+package mapping.hql;
+
+/**
+ * Implementation of Car.
+ *
+ * @author Steve Ebersole
+ */
+public class Car extends Vehicle {
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Cat.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Cat.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Cat.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,9 @@
+//$Id: Cat.java 4476 2004-09-02 02:28:13Z oneovthafew $
+package mapping.hql;
+
+/**
+ * @author Gavin King
+ */
+public class Cat extends DomesticAnimal {
+
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Classification.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Classification.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Classification.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,78 @@
+package mapping.hql;
+
+import java.io.Serializable;
+import java.util.HashMap;
+
+/**
+ * Mimic a JDK 5 enum.
+ *
+ * @author Steve Ebersole
+ */
+public class Classification implements Serializable, Comparable {
+
+ public static final Classification COOL = new Classification( "COOL", 0 );
+ public static final Classification LAME = new Classification( "LAME", 1 );
+
+ private static final HashMap INSTANCES = new HashMap();
+ static {
+ INSTANCES.put( COOL.name, COOL );
+ INSTANCES.put( LAME.name, LAME );
+ }
+
+ private final String name;
+ private final int ordinal;
+ private final int hashCode;
+
+ private Classification(String name, int ordinal) {
+ this.name = name;
+ this.ordinal = ordinal;
+
+ int hashCode = name.hashCode();
+ hashCode = 29 * hashCode + ordinal;
+ this.hashCode = hashCode;
+ }
+
+ public String name() {
+ return name;
+ }
+
+ public int ordinal() {
+ return ordinal;
+ }
+
+ public boolean equals(Object obj) {
+ return compareTo( obj ) == 0;
+ }
+
+ public int compareTo(Object o) {
+ int otherOrdinal = ( ( Classification ) o ).ordinal;
+ if ( ordinal == otherOrdinal ) {
+ return 0;
+ }
+ else if ( ordinal > otherOrdinal ) {
+ return 1;
+ }
+ else {
+ return -1;
+ }
+ }
+
+ public int hashCode() {
+ return hashCode;
+ }
+
+ public static Classification valueOf(String name) {
+ return ( Classification ) INSTANCES.get( name );
+ }
+
+ public static Classification valueOf(Integer ordinal) {
+ if ( ordinal == null ) {
+ return null;
+ }
+ switch ( ordinal.intValue() ) {
+ case 0: return COOL;
+ case 1: return LAME;
+ default: throw new IllegalArgumentException( "unknown classification ordinal [" + ordinal + "]" );
+ }
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/ClassificationType.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/ClassificationType.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/ClassificationType.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,101 @@
+package mapping.hql;
+
+import org.hibernate.usertype.EnhancedUserType;
+import org.hibernate.HibernateException;
+import org.hibernate.Hibernate;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.PreparedStatement;
+import java.sql.Types;
+import java.io.Serializable;
+
+/**
+ * A custom type for mapping {@link org.hibernate.test.hql.Classification} instances
+ * to the respective db column.
+ * </p>
+ * THis is largely intended to mimic JDK5 enum support in JPA. Here we are
+ * using the approach of storing the ordinal values, rather than the names.
+ *
+ * @author Steve Ebersole
+ */
+public class ClassificationType implements EnhancedUserType {
+
+ public int[] sqlTypes() {
+ return new int[] { Types.TINYINT };
+ }
+
+ public Class returnedClass() {
+ return Classification.class;
+ }
+
+ public boolean equals(Object x, Object y) throws HibernateException {
+ if ( x == null && y == null ) {
+ return false;
+ }
+ else if ( x != null ) {
+ return x.equals( y );
+ }
+ else {
+ return y.equals( x );
+ }
+ }
+
+ public int hashCode(Object x) throws HibernateException {
+ return x.hashCode();
+ }
+
+ public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
+ Integer ordinal = ( Integer ) Hibernate.INTEGER.nullSafeGet( rs, names[0] );
+ return Classification.valueOf( ordinal );
+ }
+
+ public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
+ Integer ordinal = value == null ? null : new Integer( ( ( Classification ) value ).ordinal() );
+ Hibernate.INTEGER.nullSafeSet( st, ordinal, index );
+ }
+
+ public Object deepCopy(Object value) throws HibernateException {
+ return value;
+ }
+
+ public boolean isMutable() {
+ return false;
+ }
+
+ public Serializable disassemble(Object value) throws HibernateException {
+ return ( Classification ) value;
+ }
+
+ public Object assemble(Serializable cached, Object owner) throws HibernateException {
+ return cached;
+ }
+
+ public Object replace(Object original, Object target, Object owner) throws HibernateException {
+ return original;
+ }
+
+ public String objectToSQLString(Object value) {
+ return extractOrdinalString( value );
+ }
+
+ public String toXMLString(Object value) {
+ return extractName( value );
+ }
+
+ public Object fromXMLString(String xmlValue) {
+ return Classification.valueOf( xmlValue );
+ }
+
+ private String extractName(Object obj) {
+ return ( ( Classification ) obj ).name();
+ }
+
+ private int extractOrdinal(Object value) {
+ return ( ( Classification ) value ).ordinal();
+ }
+
+ private String extractOrdinalString(Object value) {
+ return Integer.toString( extractOrdinal( value ) );
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/ComponentContainer.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/ComponentContainer.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/ComponentContainer.hbm.xml 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.hql" default-access="field">
+
+ <class name="ComponentContainer" table="HQL_COMP_CONT">
+ <id name="id" type="long" column="ID">
+ <generator class="increment" />
+ </id>
+ <component name="address" class="ComponentContainer$Address">
+ <property name="street" type="string" column="STREET_ADDR" />
+ <property name="city" type="string" column="CITY_ADDR" />
+ <property name="state" type="string" column="STATE_ADDR" />
+ <component name="zip" class="ComponentContainer$Address$Zip">
+ <property name="code" type="int" column="ZIP_CODE_ADDR" />
+ <property name="plus4" type="int" column="ZIP_PLUS4_ADDR" />
+ </component>
+ </component>
+ </class>
+
+</hibernate-mapping>
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/ComponentContainer.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/ComponentContainer.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/ComponentContainer.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,107 @@
+package mapping.hql;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class ComponentContainer {
+
+ private Long id;
+ private ComponentContainer.Address address;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public ComponentContainer.Address getAddress() {
+ return address;
+ }
+
+ public void setAddress(ComponentContainer.Address address) {
+ this.address = address;
+ }
+
+ public static class Address {
+ private String street;
+ private String city;
+ private String state;
+ private ComponentContainer.Address.Zip zip;
+
+ public Address() {
+ }
+
+ public Address(String street, String city, String state, ComponentContainer.Address.Zip zip) {
+ this.street = street;
+ this.city = city;
+ this.state = state;
+ this.zip = zip;
+ }
+
+ public String getStreet() {
+ return street;
+ }
+
+ public void setStreet(String street) {
+ this.street = street;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public ComponentContainer.Address.Zip getZip() {
+ return zip;
+ }
+
+ public void setZip(ComponentContainer.Address.Zip zip) {
+ this.zip = zip;
+ }
+
+ public static class Zip {
+ private int code;
+ private int plus4;
+
+ public Zip() {
+ }
+
+ public Zip(int code, int plus4) {
+ this.code = code;
+ this.plus4 = plus4;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ public void setCode(int code) {
+ this.code = code;
+ }
+
+ public int getPlus4() {
+ return plus4;
+ }
+
+ public void setPlus4(int plus4) {
+ this.plus4 = plus4;
+ }
+ }
+ }
+
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/CrazyCompositeKey.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/CrazyCompositeKey.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/CrazyCompositeKey.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,40 @@
+// $Id: CrazyCompositeKey.java 6970 2005-05-31 20:24:41Z oneovthafew $
+package mapping.hql;
+
+import java.io.Serializable;
+
+/**
+ * Implementation of CrazyCompositeKey.
+ *
+ * @author Steve Ebersole
+ */
+public class CrazyCompositeKey implements Serializable {
+ private Long id;
+ private Long otherId;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public Long getOtherId() {
+ return otherId;
+ }
+
+ public void setOtherId(Long otherId) {
+ this.otherId = otherId;
+ }
+
+ public boolean equals(Object that) {
+ CrazyCompositeKey cck = (CrazyCompositeKey) that;
+ return cck.id.longValue() == id.longValue()
+ && cck.otherId.longValue() == otherId.longValue();
+ }
+
+ public int hashCode() {
+ return id.hashCode() + otherId.hashCode();
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/CrazyIdFieldNames.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/CrazyIdFieldNames.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/CrazyIdFieldNames.hbm.xml 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.hql">
+
+ <class name="HeresAnotherCrazyIdFieldName" table="CRAZY_ID_NODE">
+ <id name="heresAnotherCrazyIdFieldName" column="ID" type="long">
+ <generator class="increment"/>
+ </id>
+ <property name="name" type="string"/>
+ </class>
+
+ <class name="MoreCrazyIdFieldNameStuffEntity" table="CRAZY_ID_TOP">
+ <id name="moreCrazyIdFieldNameStuffEntity" column="ID" type="long">
+ <generator class="increment"/>
+ </id>
+ <property name="name" type="string" />
+ <many-to-one name="heresAnotherCrazyIdFieldName" class="HeresAnotherCrazyIdFieldName"/>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Dog.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Dog.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Dog.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,9 @@
+//$Id: Dog.java 4476 2004-09-02 02:28:13Z oneovthafew $
+package mapping.hql;
+
+/**
+ * @author Gavin King
+ */
+public class Dog extends DomesticAnimal {
+
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/DomesticAnimal.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/DomesticAnimal.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/DomesticAnimal.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,17 @@
+//$Id: DomesticAnimal.java 4899 2004-12-06 14:17:24Z pgmjsd $
+package mapping.hql;
+
+/**
+ * @author Gavin King
+ */
+public class DomesticAnimal extends Mammal {
+ private Human owner;
+
+ public Human getOwner() {
+ return owner;
+ }
+
+ public void setOwner(Human owner) {
+ this.owner = owner;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/EntityWithCrazyCompositeKey.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/EntityWithCrazyCompositeKey.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/EntityWithCrazyCompositeKey.hbm.xml 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.hql">
+
+ <class name="EntityWithCrazyCompositeKey">
+ <composite-id name="id" class="CrazyCompositeKey">
+ <key-property name="id" column="id"/>
+ <key-property name="otherId" column="other_id"/>
+ </composite-id>
+ <property name="name"/>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/EntityWithCrazyCompositeKey.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/EntityWithCrazyCompositeKey.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/EntityWithCrazyCompositeKey.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,28 @@
+// $Id: EntityWithCrazyCompositeKey.java 6567 2005-04-27 17:41:57Z steveebersole $
+package mapping.hql;
+
+/**
+ * Implementation of EntityWithCrazyCompositeKey.
+ *
+ * @author Steve Ebersole
+ */
+public class EntityWithCrazyCompositeKey {
+ private CrazyCompositeKey id;
+ private String name;
+
+ public CrazyCompositeKey getId() {
+ return id;
+ }
+
+ public void setId(CrazyCompositeKey id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/FooBarCopy.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/FooBarCopy.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/FooBarCopy.hbm.xml 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,137 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping default-lazy="false" package="mapping.hql">
+
+ <!-- a slightly modified copy of FooBar.hbm.xml from the legacy test package -->
+
+ <class
+ name="Foo"
+ table="`foos`"
+ proxy="FooProxy"
+ discriminator-value="F"
+ batch-size="4"
+ dynamic-insert="true"
+ dynamic-update="true"
+ select-before-update="true">
+
+ <id name="key" type="string">
+ <column name="`foo_idcolumnname123`" length="36"/>
+ <generator class="uuid.hex">
+ <param name="seperator">:</param>
+ </generator>
+ </id>
+
+ <discriminator column="`foo_subclass_1234`" type="character" force="true"/>
+ <version name="version"/>
+
+ <many-to-one name="foo" class="Foo">
+ <column name="foo" length="36" index="fbmtoidx"/>
+ </many-to-one>
+
+ <property name="long">
+ <column name="long_" index="fbmtoidx" unique-key="abc" not-null="true"/>
+ </property>
+ <property name="integer">
+ <column name="`integer__`" unique-key="abc" not-null="true"/>
+ </property>
+ <property name="float">
+ <column name="float_" unique-key="abc" not-null="true" check="float_ > 0.0"/>
+ </property>
+ <property name="x"/>
+ <property name="double" column="double_"/>
+
+ <primitive-array name="bytes" table="foobytes">
+ <key column="id"/>
+ <index column="i"/>
+ <element column="byte_" type="byte"/>
+ </primitive-array>
+
+ <property name="date" type="date" column="date_"/>
+ <property name="timestamp" type="timestamp" column="timestamp_"/>
+ <property name="boolean" column="boolean_"/>
+ <property name="bool" column="bool_"/>
+ <property name="null" column="null_"/>
+ <property name="short" column="short_"/>
+ <property name="char" column="char_"/>
+ <property name="zero" column="zero_"/>
+ <property name="int" column="int_"/>
+ <property name="string">
+ <column name="string_" length="48" index="fbstridx"/>
+ </property>
+ <property name="byte" column="byte_"/>
+ <property name="yesno" type="yes_no"/>
+ <property name="blob" type="org.hibernate.test.legacy.Foo$Struct" column="blobb_"/>
+ <property name="nullBlob" type="serializable"/>
+ <property name="binary" column="bin_"/>
+ <property name="theLocale" access="field" column="`localeayzabc123`"/>
+
+ <property name="formula" formula="int_/2"/>
+
+ <property name="custom" type="org.hibernate.test.legacy.DoubleStringType" access="field">
+ <column name="first_name" length="66"/>
+ <column name="surname" length="66"/>
+ </property>
+ <component name="nullComponent">
+ <property name="name" column="null_cmpnt_"/>
+ </component>
+
+ <join table="jointable">
+ <key column="fooid" on-delete="cascade"/>
+ <property name="joinedProp"/>
+ </join>
+
+ <subclass
+ name="Trivial"
+ proxy="FooProxy"
+ discriminator-value="T"/>
+
+ <subclass
+ name="Abstract"
+ proxy="AbstractProxy"
+ discriminator-value="null">
+ <set name="abstracts" batch-size="2">
+ <key column="abstract_id"/>
+ <one-to-many class="Abstract"/>
+ </set>
+ <property name="time" column="the_time"/>
+
+ <subclass
+ name="Bar"
+ proxy="BarProxy"
+ discriminator-value="B">
+ <property name="barString">
+ <column name="bar_string" length="24"/>
+ </property>
+ <any name="object" meta-type="character" id-type="long" cascade="all">
+ <meta-value value="O" class="One"/>
+ <meta-value value="M" class="Many"/>
+ <column name="clazz" length="100"/>
+ <column name="gen_id"/>
+ </any>
+ <join table="bar_join_table">
+ <key column="bar_id"/>
+ <property name="name" column="name_name"/>
+ </join>
+ </subclass>
+ </subclass>
+ </class>
+
+ <class name="One" table="one">
+ <id name="key" column="one_key">
+ <generator class="native" />
+ </id>
+ <property name="x"/>
+ <property column="one_value" name="value"/>
+ </class>
+
+ <class name="Many" table="many">
+ <id name="key" column="many_key">
+ <generator class="native" />
+ </id>
+ <property name="x"/>
+ </class>
+
+</hibernate-mapping>
+
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/HeresAnotherCrazyIdFieldName.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/HeresAnotherCrazyIdFieldName.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/HeresAnotherCrazyIdFieldName.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,35 @@
+// $Id: HeresAnotherCrazyIdFieldName.java 7471 2005-07-14 14:58:28Z steveebersole $
+package mapping.hql;
+
+/**
+ * Implementation of HeresAnotherCrazyIdFieldName.
+ *
+ * @author Steve Ebersole
+ */
+public class HeresAnotherCrazyIdFieldName {
+ private Long heresAnotherCrazyIdFieldName;
+ private String name;
+
+ public HeresAnotherCrazyIdFieldName() {
+ }
+
+ public HeresAnotherCrazyIdFieldName(String name) {
+ this.name = name;
+ }
+
+ public Long getHeresAnotherCrazyIdFieldName() {
+ return heresAnotherCrazyIdFieldName;
+ }
+
+ public void setHeresAnotherCrazyIdFieldName(Long heresAnotherCrazyIdFieldName) {
+ this.heresAnotherCrazyIdFieldName = heresAnotherCrazyIdFieldName;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Human.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Human.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Human.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,126 @@
+//$Id: Human.java 9873 2006-05-04 13:42:48Z max.andersen(a)jboss.com $
+package mapping.hql;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Gavin King
+ */
+public class Human extends Mammal {
+ private Name name;
+ private String nickName;
+ private Collection friends;
+ private Collection pets;
+ private Map family;
+ private double height;
+
+ private BigInteger bigIntegerValue;
+ private BigDecimal bigDecimalValue;
+ private int intValue;
+ private float floatValue;
+
+ private Set nickNames;
+ private Map addresses;
+
+ public Collection getFriends() {
+ return friends;
+ }
+
+ public void setFriends(Collection friends) {
+ this.friends = friends;
+ }
+
+ public Collection getPets() {
+ return pets;
+ }
+
+ public void setPets(Collection pets) {
+ this.pets = pets;
+ }
+
+ public Name getName() {
+ return name;
+ }
+
+ public void setName(Name name) {
+ this.name = name;
+ }
+
+ public String getNickName() {
+ return nickName;
+ }
+
+ public void setNickName(String nickName) {
+ this.nickName = nickName;
+ }
+
+ public double getHeight() {
+ return height;
+ }
+ public void setHeight(double height) {
+ this.height = height;
+ }
+
+ public Map getFamily() {
+ return family;
+ }
+
+
+ public void setFamily(Map family) {
+ this.family = family;
+ }
+
+ public Set getNickNames() {
+ return nickNames;
+ }
+
+ public void setNickNames(Set nickNames) {
+ this.nickNames = nickNames;
+ }
+
+ public Map getAddresses() {
+ return addresses;
+ }
+
+ public void setAddresses(Map addresses) {
+ this.addresses = addresses;
+ }
+
+ public BigDecimal getBigDecimalValue() {
+ return bigDecimalValue;
+ }
+
+ public void setBigDecimalValue(BigDecimal bigDecimalValue) {
+ this.bigDecimalValue = bigDecimalValue;
+ }
+
+ public BigInteger getBigIntegerValue() {
+ return bigIntegerValue;
+ }
+
+ public void setBigIntegerValue(BigInteger bigIntegerValue) {
+ this.bigIntegerValue = bigIntegerValue;
+ }
+
+ public float getFloatValue() {
+ return floatValue;
+ }
+
+ public void setFloatValue(float floatValue) {
+ this.floatValue = floatValue;
+ }
+
+ public int getIntValue() {
+ return intValue;
+ }
+
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/IntegerVersioned.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/IntegerVersioned.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/IntegerVersioned.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,36 @@
+// $Id: IntegerVersioned.java 7384 2005-07-06 17:04:45Z steveebersole $
+package mapping.hql;
+
+/**
+ * Implementation of IntegerVersioned.
+ *
+ * @author Steve Ebersole
+ */
+public class IntegerVersioned {
+ private Long id;
+ private int version = -1;
+ private String name;
+
+ public IntegerVersioned() {
+ }
+
+ public IntegerVersioned(String name) {
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public int getVersion() {
+ return version;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Joiner.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Joiner.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Joiner.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,37 @@
+// $Id: Joiner.java 6021 2005-03-06 02:02:30Z steveebersole $
+package mapping.hql;
+
+/**
+ * Implementation of Joiner.
+ *
+ * @author Steve Ebersole
+ */
+public class Joiner {
+ private Long id;
+ private String name;
+ private String joinedName;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getJoinedName() {
+ return joinedName;
+ }
+
+ public void setJoinedName(String joinedName) {
+ this.joinedName = joinedName;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/KeyManyToOneEntity.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/KeyManyToOneEntity.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/KeyManyToOneEntity.hbm.xml 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="mapping.hql">
+
+ <class name="KeyManyToOneKeyEntity">
+ <id name="id" type="long" access="field" >
+ <generator class="native"/>
+ </id>
+ <property name="name" type="string"/>
+ </class>
+
+ <class name="KeyManyToOneEntity">
+ <composite-id name="id" access="field" class="KeyManyToOneEntity$Id" unsaved-value="undefined" >
+ <key-many-to-one name="key1" class="KeyManyToOneKeyEntity" />
+ <key-property name="key2" type="string"/>
+ </composite-id>
+ <property name="name" type="string"/>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/KeyManyToOneEntity.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/KeyManyToOneEntity.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/KeyManyToOneEntity.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,52 @@
+// $Id: KeyManyToOneEntity.java 7091 2005-06-08 19:31:26Z steveebersole $
+package mapping.hql;
+
+import java.io.Serializable;
+
+/**
+ * Implementation of KeyManyToOneEntity.
+ *
+ * @author Steve Ebersole
+ */
+public class KeyManyToOneEntity {
+ private Id id;
+ private String name;
+
+ public KeyManyToOneEntity(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public static class Id implements Serializable {
+ private KeyManyToOneKeyEntity key1;
+ private String key2;
+
+ public Id(KeyManyToOneKeyEntity key1, String key2) {
+ this.key1 = key1;
+ this.key2 = key2;
+ }
+
+ public KeyManyToOneKeyEntity getKey1() {
+ return key1;
+ }
+
+ public void setKey1(KeyManyToOneKeyEntity key1) {
+ this.key1 = key1;
+ }
+
+ public String getKey2() {
+ return key2;
+ }
+
+ public void setKey2(String key2) {
+ this.key2 = key2;
+ }
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/KeyManyToOneKeyEntity.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/KeyManyToOneKeyEntity.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/KeyManyToOneKeyEntity.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,24 @@
+// $Id: KeyManyToOneKeyEntity.java 7091 2005-06-08 19:31:26Z steveebersole $
+package mapping.hql;
+
+/**
+ * Implementation of KeyManyToOneKeyEntity.
+ *
+ * @author Steve Ebersole
+ */
+public class KeyManyToOneKeyEntity {
+ private Long id;
+ private String name;
+
+ public KeyManyToOneKeyEntity(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Lizard.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Lizard.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Lizard.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,9 @@
+//$Id: Lizard.java 3890 2004-06-03 16:31:32Z steveebersole $
+package mapping.hql;
+
+/**
+ * @author Gavin King
+ */
+public class Lizard extends Reptile {
+
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Mammal.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Mammal.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Mammal.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,30 @@
+//$Id: Mammal.java 6005 2005-03-04 11:41:11Z oneovthafew $
+package mapping.hql;
+
+import java.util.Date;
+
+/**
+ * @author Gavin King
+ */
+public class Mammal extends Animal {
+ private boolean pregnant;
+ private Date birthdate;
+
+ public boolean isPregnant() {
+ return pregnant;
+ }
+
+ public void setPregnant(boolean pregnant) {
+ this.pregnant = pregnant;
+ }
+
+ public Date getBirthdate() {
+ return birthdate;
+ }
+
+
+ public void setBirthdate(Date birthdate) {
+ this.birthdate = birthdate;
+ }
+
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/MoreCrazyIdFieldNameStuffEntity.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/MoreCrazyIdFieldNameStuffEntity.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/MoreCrazyIdFieldNameStuffEntity.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,44 @@
+// $Id: MoreCrazyIdFieldNameStuffEntity.java 7471 2005-07-14 14:58:28Z steveebersole $
+package mapping.hql;
+
+/**
+ * Implementation of MoreCrazyIdFieldNameStuffEntity.
+ *
+ * @author Steve Ebersole
+ */
+public class MoreCrazyIdFieldNameStuffEntity {
+ private Long moreCrazyIdFieldNameStuffEntity;
+ private HeresAnotherCrazyIdFieldName heresAnotherCrazyIdFieldName; // silly ain't it ;)
+ private String name;
+
+ public MoreCrazyIdFieldNameStuffEntity() {
+ }
+
+ public MoreCrazyIdFieldNameStuffEntity(String name) {
+ this.name = name;
+ }
+
+ public Long getMoreCrazyIdFieldNameStuffEntity() {
+ return moreCrazyIdFieldNameStuffEntity;
+ }
+
+ public void setMoreCrazyIdFieldNameStuffEntity(Long moreCrazyIdFieldNameStuffEntity) {
+ this.moreCrazyIdFieldNameStuffEntity = moreCrazyIdFieldNameStuffEntity;
+ }
+
+ public HeresAnotherCrazyIdFieldName getHeresAnotherCrazyIdFieldName() {
+ return heresAnotherCrazyIdFieldName;
+ }
+
+ public void setHeresAnotherCrazyIdFieldName(HeresAnotherCrazyIdFieldName heresAnotherCrazyIdFieldName) {
+ this.heresAnotherCrazyIdFieldName = heresAnotherCrazyIdFieldName;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Name.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Name.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Name.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,43 @@
+//$Id: Name.java 5686 2005-02-12 07:27:32Z steveebersole $
+package mapping.hql;
+
+/**
+ * @author Gavin King
+ */
+public class Name {
+ private String first;
+ private char initial;
+ private String last;
+
+ protected Name() {}
+
+ public Name(String first, char initial, String last) {
+ this.first = first;
+ this.initial = initial;
+ this.last = last;
+ }
+
+ public String getFirst() {
+ return first;
+ }
+
+ public void setFirst(String first) {
+ this.first = first;
+ }
+
+ public char getInitial() {
+ return initial;
+ }
+
+ public void setInitial(char initial) {
+ this.initial = initial;
+ }
+
+ public String getLast() {
+ return last;
+ }
+
+ public void setLast(String last) {
+ this.last = last;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/PettingZoo.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/PettingZoo.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/PettingZoo.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,9 @@
+//$Id: PettingZoo.java 4857 2004-12-02 16:28:57Z oneovthafew $
+package mapping.hql;
+
+/**
+ * @author Gavin King
+ */
+public class PettingZoo extends Zoo {
+
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Pickup.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Pickup.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Pickup.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,10 @@
+// $Id: Pickup.java 7087 2005-06-08 18:23:44Z steveebersole $
+package mapping.hql;
+
+/**
+ * Implementation of Pickup.
+ *
+ * @author Steve Ebersole
+ */
+public class Pickup extends Truck {
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Reptile.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Reptile.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Reptile.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,15 @@
+//$Id: Reptile.java 5686 2005-02-12 07:27:32Z steveebersole $
+package mapping.hql;
+
+/**
+ * @author Gavin King
+ */
+public class Reptile extends Animal {
+ private float bodyTemperature;
+ public float getBodyTemperature() {
+ return bodyTemperature;
+ }
+ public void setBodyTemperature(float bodyTemperature) {
+ this.bodyTemperature = bodyTemperature;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SUV.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SUV.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SUV.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,10 @@
+// $Id: SUV.java 7087 2005-06-08 18:23:44Z steveebersole $
+package mapping.hql;
+
+/**
+ * Implementation of SUV.
+ *
+ * @author Steve Ebersole
+ */
+public class SUV extends Truck {
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SimpleAssociatedEntity.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SimpleAssociatedEntity.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SimpleAssociatedEntity.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,63 @@
+package mapping.hql;
+
+/**
+ * @author Steve Ebersole
+ */
+public class SimpleAssociatedEntity {
+ private Long id;
+ private String name;
+ private SimpleEntityWithAssociation owner;
+
+ public SimpleAssociatedEntity() {
+ }
+
+ public SimpleAssociatedEntity(String name) {
+ this.name = name;
+ }
+
+ public SimpleAssociatedEntity(String name, SimpleEntityWithAssociation owner) {
+ this( name );
+ bindToOwner( owner );
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public SimpleEntityWithAssociation getOwner() {
+ return owner;
+ }
+
+ public void setOwner(SimpleEntityWithAssociation owner) {
+ this.owner = owner;
+ }
+
+ public void bindToOwner(SimpleEntityWithAssociation owner) {
+ if ( owner != this.owner ) {
+ unbindFromCurrentOwner();
+ if ( owner != null ) {
+ owner.getAssociatedEntities().add( this );
+ }
+ }
+ this.owner = owner;
+ }
+
+ public void unbindFromCurrentOwner() {
+ if ( this.owner != null ) {
+ this.owner.getAssociatedEntities().remove( this );
+ this.owner = null;
+ }
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SimpleEntityWithAssociation.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SimpleEntityWithAssociation.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SimpleEntityWithAssociation.hbm.xml 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.hql">
+
+ <!-- *Very* important for the test cases that these entities have identically named columns! -->
+
+ <class name="SimpleEntityWithAssociation" table="SIMPLE_1">
+ <id name="id" column="ID" type="long">
+ <generator class="native"/>
+ </id>
+ <property name="name" column="NAME" type="string"/>
+ <set name="associatedEntities" cascade="all" inverse="true" lazy="true">
+ <key column="SIMPLE_1_ID"/>
+ <one-to-many class="SimpleAssociatedEntity"/>
+ </set>
+ <set name="manyToManyAssociatedEntities" cascade="save-update" inverse="false" lazy="true" table="MANY_TO_MANY">
+ <key column="IN_ID"/>
+ <many-to-many class="SimpleEntityWithAssociation" column="OUT_ID"/>
+ </set>
+ </class>
+
+ <class name="SimpleAssociatedEntity" table="SIMPLE_2">
+ <id name="id" column="ID" type="long">
+ <generator class="native"/>
+ </id>
+ <property name="name" column="NAME" type="string" />
+ <many-to-one name="owner" class="SimpleEntityWithAssociation" column="SIMPLE_1_ID"/>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SimpleEntityWithAssociation.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SimpleEntityWithAssociation.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/SimpleEntityWithAssociation.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,70 @@
+package mapping.hql;
+
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * @author Steve Ebersole
+ */
+public class SimpleEntityWithAssociation {
+ private Long id;
+ private String name;
+ private Set associatedEntities = new HashSet();
+ private Set manyToManyAssociatedEntities = new HashSet();
+
+ public SimpleEntityWithAssociation() {
+ }
+
+ public SimpleEntityWithAssociation(String name) {
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Set getAssociatedEntities() {
+ return associatedEntities;
+ }
+
+ public void setAssociatedEntities(Set associatedEntities) {
+ this.associatedEntities = associatedEntities;
+ }
+
+ public SimpleAssociatedEntity addAssociation(String name) {
+ return new SimpleAssociatedEntity( name, this );
+ }
+
+ public void addAssociation(SimpleAssociatedEntity association) {
+ association.bindToOwner( this );
+ }
+
+ public void removeAssociation(SimpleAssociatedEntity association) {
+ if ( getAssociatedEntities().contains( association ) ) {
+ association.unbindFromCurrentOwner();
+ }
+ else {
+ throw new IllegalArgumentException( "SimpleAssociatedEntity [" + association + "] not currently bound to this [" + this + "]" );
+ }
+ }
+
+ public Set getManyToManyAssociatedEntities() {
+ return manyToManyAssociatedEntities;
+ }
+
+ public void setManyToManyAssociatedEntities(Set manyToManyAssociatedEntities) {
+ this.manyToManyAssociatedEntities = manyToManyAssociatedEntities;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/StateProvince.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/StateProvince.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/StateProvince.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,37 @@
+// $Id: StateProvince.java 7996 2005-08-22 14:49:57Z steveebersole $
+package mapping.hql;
+
+/**
+ * Implementation of StateProvince.
+ *
+ * @author Steve Ebersole
+ */
+public class StateProvince {
+ private Long id;
+ private String name;
+ private String isoCode;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getIsoCode() {
+ return isoCode;
+ }
+
+ public void setIsoCode(String isoCode) {
+ this.isoCode = isoCode;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/TimestampVersioned.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/TimestampVersioned.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/TimestampVersioned.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,38 @@
+// $Id: TimestampVersioned.java 7384 2005-07-06 17:04:45Z steveebersole $
+package mapping.hql;
+
+import java.util.Date;
+
+/**
+ * Implementation of TimestampVersioned.
+ *
+ * @author Steve Ebersole
+ */
+public class TimestampVersioned {
+ private Long id;
+ private Date version;
+ private String name;
+
+ public TimestampVersioned() {
+ }
+
+ public TimestampVersioned(String name) {
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public Date getVersion() {
+ return version;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Truck.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Truck.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Truck.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,10 @@
+// $Id: Truck.java 7087 2005-06-08 18:23:44Z steveebersole $
+package mapping.hql;
+
+/**
+ * Implementation of Truck.
+ *
+ * @author Steve Ebersole
+ */
+public class Truck extends Vehicle {
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/User.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/User.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/User.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,48 @@
+//$Id: User.java 5891 2005-02-24 01:18:15Z oneovthafew $
+package mapping.hql;
+
+import java.util.List;
+
+/**
+ * @author Gavin King
+ */
+public class User {
+ private Long id;
+ private String userName;
+ private Human human;
+ private List permissions;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public Human getHuman() {
+ return human;
+ }
+
+ public void setHuman(Human human) {
+ this.human = human;
+ }
+
+ public List getPermissions() {
+ return permissions;
+ }
+
+
+ public void setPermissions(List permissions) {
+ this.permissions = permissions;
+ }
+
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Vehicle.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Vehicle.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Vehicle.hbm.xml 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="mapping.hql">
+
+ <!-- Vehicle represents an abstract root of a union-subclass hierarchy -->
+ <class name="Vehicle" abstract="true">
+ <id name="id" access="field" type="long">
+ <generator class="increment"/>
+ </id>
+ <property name="vin" type="string"/>
+ <property name="owner" type="string"/>
+
+ <!-- Car represents a concrete leaf of a union-subclass hierarchy with no concrete super -->
+ <union-subclass name="Car"/>
+
+ <!-- Truck represents a concrete subclass in a union-subclass hierarchy with concrete subclasses and no concrete super -->
+ <union-subclass name="Truck">
+ <!-- Both SUV and Pickup represent concrete leaf of a union-subclass hierarchy (like Car), but with a concrete super -->
+ <union-subclass name="SUV"/>
+ <union-subclass name="Pickup"/>
+ </union-subclass>
+ </class>
+
+ <sql-query name="native-delete-car">
+ <synchronize table="Car"/>
+ delete from CAR where owner = ?
+ </sql-query>
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Vehicle.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Vehicle.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Vehicle.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,29 @@
+// $Id: Vehicle.java 7087 2005-06-08 18:23:44Z steveebersole $
+package mapping.hql;
+
+/**
+ * Implementation of Vehicle.
+ *
+ * @author Steve Ebersole
+ */
+public abstract class Vehicle {
+ private Long id;
+ private String vin;
+ private String owner;
+
+ public String getVin() {
+ return vin;
+ }
+
+ public void setVin(String vin) {
+ this.vin = vin;
+ }
+
+ public String getOwner() {
+ return owner;
+ }
+
+ public void setOwner(String owner) {
+ this.owner = owner;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Versions.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Versions.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Versions.hbm.xml 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.hql" default-access="field">
+
+ <class name="IntegerVersioned">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <version name="version" column="vers"/>
+ <property name="name"/>
+ </class>
+
+ <class name="TimestampVersioned">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <timestamp name="version" column="vers"/>
+ <property name="name"/>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Zoo.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Zoo.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/Zoo.java 2007-07-17 16:34:59 UTC (rev 2481)
@@ -0,0 +1,64 @@
+//$Id: Zoo.java 10976 2006-12-12 23:22:26Z steve.ebersole(a)jboss.com $
+package mapping.hql;
+
+import java.util.Map;
+
+/**
+ * @author Gavin King
+ */
+public class Zoo {
+ private Long id;
+ private String name;
+ private Classification classification;
+ private Map animals;
+ private Map mammals;
+ private Address address;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Map getMammals() {
+ return mammals;
+ }
+
+ public void setMammals(Map mammals) {
+ this.mammals = mammals;
+ }
+
+ public Map getAnimals() {
+ return animals;
+ }
+
+ public void setAnimals(Map animals) {
+ this.animals = animals;
+ }
+
+ public Address getAddress() {
+ return address;
+ }
+
+ public void setAddress(Address address) {
+ this.address = address;
+ }
+
+ public Classification getClassification() {
+ return classification;
+ }
+
+ public void setClassification(Classification classification) {
+ this.classification = classification;
+ }
+}
17 years, 5 months
JBoss Tools SVN: r2480 - trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-17 12:33:46 -0400 (Tue, 17 Jul 2007)
New Revision: 2480
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/MSSQLGeneratedPropertyEntity.hbm.xml
Log:
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.hbm.xml 2007-07-17 16:33:46 UTC (rev 2480)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="mapping.generated">
+
+ <class name="ComponentOwner" table="part_gen_comp">
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <property name="name" />
+ <component name="component" class="ComponentOwner$Component">
+ <property name="generated" type="int" generated="always" column="GENED"/>
+ </component>
+ </class>
+
+ <database-object>
+ <create>
+ <![CDATA[CREATE OR REPLACE TRIGGER t_iu_part_gen_comp
+ BEFORE INSERT OR UPDATE ON part_gen_comp
+ FOR EACH ROW
+ BEGIN
+ IF INSERTING THEN
+ :new.gened := 1;
+ ELSE
+ :new.gened := :old.gened + 1;
+ END IF;
+ END;]]>
+ </create>
+ <drop>
+ <![CDATA[DROP TRIGGER t_iu_part_gen_comp]]>
+ </drop>
+ <dialect-scope name="org.hibernate.dialect.Oracle9Dialect"/>
+ <dialect-scope name="org.hibernate.dialect.OracleDialect"/>
+ </database-object>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.java 2007-07-17 16:33:46 UTC (rev 2480)
@@ -0,0 +1,55 @@
+package mapping.generated;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class ComponentOwner {
+ private Long id;
+ private String name;
+ private Component component;
+
+ public ComponentOwner() {
+ }
+
+ public ComponentOwner(String name) {
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Component getComponent() {
+ return component;
+ }
+
+ public void setComponent(Component component) {
+ this.component = component;
+ }
+
+ public static class Component {
+ private int generated;
+
+ public int getGenerated() {
+ return generated;
+ }
+
+ public void setGenerated(int generated) {
+ this.generated = generated;
+ }
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.hbm.xml 2007-07-17 16:33:46 UTC (rev 2480)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="mapping.generated">
+
+ <class name="GeneratedPropertyEntity" table="gen_prop">
+
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="name"/>
+ <property name="lastModified" generated="always" type="binary">
+ <column name="lastModified" length="8"/>
+ </property>
+
+ </class>
+
+ <database-object>
+ <create>
+ <![CDATA[CREATE OR REPLACE TRIGGER t_iu_gen_prop
+ BEFORE INSERT OR UPDATE ON gen_prop
+ FOR EACH ROW
+ BEGIN
+ IF INSERTING THEN
+ :new.lastModified := HEXTORAW( '1' );
+ ELSE
+ :new.lastModified := HEXTORAW(
+ TO_NUMBER( RAWTOHEX( :old.lastModified ) ) + 1
+ );
+ END IF;
+ END;]]>
+ </create>
+ <drop>
+ <![CDATA[DROP TRIGGER t_iu_gen_prop]]>
+ </drop>
+ <dialect-scope name="org.hibernate.dialect.Oracle9Dialect"/>
+ <dialect-scope name="org.hibernate.dialect.OracleDialect"/>
+ </database-object>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.java 2007-07-17 16:33:46 UTC (rev 2480)
@@ -0,0 +1,37 @@
+// $Id: GeneratedPropertyEntity.java 7800 2005-08-10 12:13:00Z steveebersole $
+package mapping.generated;
+
+/**
+ * Implementation of GeneratedPropertyEntity.
+ *
+ * @author Steve Ebersole
+ */
+public class GeneratedPropertyEntity {
+ private Long id;
+ private String name;
+ private byte[] lastModified;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public byte[] getLastModified() {
+ return lastModified;
+ }
+
+ public void setLastModified(byte[] lastModified) {
+ this.lastModified = lastModified;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/MSSQLGeneratedPropertyEntity.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/MSSQLGeneratedPropertyEntity.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/MSSQLGeneratedPropertyEntity.hbm.xml 2007-07-17 16:33:46 UTC (rev 2480)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="mapping.generated">
+
+ <class name="GeneratedPropertyEntity" table="gen_prop">
+
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="name"/>
+ <property name="lastModified" generated="always" type="binary">
+ <column name="lastModified" length="8" sql-type="TIMESTAMP"/>
+ </property>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
17 years, 5 months
JBoss Tools SVN: r2479 - trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/formulajoin.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-17 12:33:24 -0400 (Tue, 17 Jul 2007)
New Revision: 2479
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/formulajoin/Detail.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/formulajoin/Master.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/formulajoin/Master.java
Log:
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/formulajoin/Detail.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/formulajoin/Detail.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/formulajoin/Detail.java 2007-07-17 16:33:24 UTC (rev 2479)
@@ -0,0 +1,46 @@
+//$Id: Detail.java 4602 2004-09-26 11:42:47Z oneovthafew $
+package mapping.formulajoin;
+
+import java.io.Serializable;
+
+/**
+ * @author Gavin King
+ */
+public class Detail implements Serializable {
+ private Long id;
+ private Master master;
+ private int version;
+ private String details;
+ private boolean currentVersion;
+
+ public boolean isCurrentVersion() {
+ return currentVersion;
+ }
+ public void setCurrentVersion(boolean currentVersion) {
+ this.currentVersion = currentVersion;
+ }
+ public String getDetails() {
+ return details;
+ }
+ public void setDetails(String details) {
+ this.details = details;
+ }
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ public Master getMaster() {
+ return master;
+ }
+ public void setMaster(Master master) {
+ this.master = master;
+ }
+ public int getVersion() {
+ return version;
+ }
+ public void setVersion(int version) {
+ this.version = version;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/formulajoin/Master.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/formulajoin/Master.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/formulajoin/Master.hbm.xml 2007-07-17 16:33:24 UTC (rev 2479)
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+
+ Demonstrates use of an association "filtered" using a formula
+ mapping in the foreign key.
+
+-->
+
+<hibernate-mapping package="mapping.formulajoin">
+
+ <class name="Master" table="t_masters">
+
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+
+ <property name="name"
+ not-null="true"
+ length="100"
+ update="false"/>
+
+ <many-to-one name="detail"
+ property-ref="currentMaster"
+ insert="false"
+ update="false">
+ <column name="id"/>
+ <formula>1</formula>
+ </many-to-one>
+
+ </class>
+
+ <class name="Detail" table="t_details">
+
+ <id name="id">
+ <generator class="hilo"/>
+ </id>
+
+ <property name="details"
+ length="300"
+ update="false"
+ not-null="true"/>
+
+ <property name="version" update="false">
+ <column name="version"
+ not-null="true"
+ unique-key="masterVersion"/>
+ </property>
+
+ <properties name="currentMaster">
+ <many-to-one name="master">
+ <column name="cur_master"
+ unique-key="masterVersion"
+ not-null="true"/>
+ </many-to-one>
+ <property name="currentVersion"
+ not-null="true"/>
+ </properties>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/formulajoin/Master.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/formulajoin/Master.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/formulajoin/Master.java 2007-07-17 16:33:24 UTC (rev 2479)
@@ -0,0 +1,31 @@
+//$Id: Master.java 4602 2004-09-26 11:42:47Z oneovthafew $
+package mapping.formulajoin;
+
+import java.io.Serializable;
+
+/**
+ * @author Gavin King
+ */
+public class Master implements Serializable {
+ private Long id;
+ private String name;
+ private Detail detail;
+ public Detail getDetail() {
+ return detail;
+ }
+ public void setDetail(Detail detail) {
+ this.detail = detail;
+ }
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+}
17 years, 5 months
JBoss Tools SVN: r2478 - trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-17 12:32:28 -0400 (Tue, 17 Jul 2007)
New Revision: 2478
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/defs.hbm.xml
Log:
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.hbm.xml 2007-07-17 16:32:28 UTC (rev 2478)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping
+ SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.filter">
+
+ <class name="Category" table="CATEGORY">
+ <id name="id" column="CAT_ID" >
+ <generator class="native"/>
+ </id>
+
+ <property name="name" type="string"/>
+ <property name="effectiveStartDate" column="eff_start_dt" type="java.util.Date"/>
+ <property name="effectiveEndDate" column="eff_end_dt" type="java.util.Date"/>
+
+ <set cascade="none" inverse="true" name="products" table="PROD_CAT">
+ <key column="CAT_ID"/>
+ <many-to-many column="PROD_ID" class="Product"/>
+ </set>
+
+ <filter name="effectiveDate" condition=":asOfDate BETWEEN eff_start_dt and eff_end_dt"/>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.java 2007-07-17 16:32:28 UTC (rev 2478)
@@ -0,0 +1,104 @@
+// $Id: Category.java 6507 2005-04-25 16:57:32Z steveebersole $
+package mapping.filter;
+
+import java.util.Date;
+import java.util.Set;
+
+/**
+ * Implementation of Category.
+ *
+ * @author Steve Ebersole
+ */
+public class Category {
+ private Long id;
+ private String name;
+ private Date effectiveStartDate;
+ private Date effectiveEndDate;
+ private Set products;
+
+ public Category() {
+ }
+
+ public Category(String name) {
+ this.name = name;
+ }
+
+ public Category(String name, Date effectiveStartDate, Date effectiveEndDate) {
+ this.name = name;
+ this.effectiveStartDate = effectiveStartDate;
+ this.effectiveEndDate = effectiveEndDate;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Date getEffectiveStartDate() {
+ return effectiveStartDate;
+ }
+
+ public void setEffectiveStartDate(Date effectiveStartDate) {
+ this.effectiveStartDate = effectiveStartDate;
+ }
+
+ public Date getEffectiveEndDate() {
+ return effectiveEndDate;
+ }
+
+ public void setEffectiveEndDate(Date effectiveEndDate) {
+ this.effectiveEndDate = effectiveEndDate;
+ }
+
+ public Set getProducts() {
+ return products;
+ }
+
+ public void setProducts(Set products) {
+ this.products = products;
+ }
+
+ public boolean equals(Object o) {
+ if ( this == o ) return true;
+ if ( !( o instanceof Category ) ) return false;
+
+ final Category category = ( Category ) o;
+
+ if ( !name.equals( category.name ) ) {
+ return false;
+ }
+
+ if ( effectiveEndDate != null ?
+ !effectiveEndDate.equals( category.effectiveEndDate ) :
+ category.effectiveEndDate != null ) {
+ return false;
+ }
+
+ if ( effectiveStartDate != null ?
+ !effectiveStartDate.equals( category.effectiveStartDate ) :
+ category.effectiveStartDate != null ) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public int hashCode() {
+ int result;
+ result = name.hashCode();
+ result = 29 * result + ( effectiveStartDate != null ? effectiveStartDate.hashCode() : 0 );
+ result = 29 * result + ( effectiveEndDate != null ? effectiveEndDate.hashCode() : 0 );
+ return result;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.hbm.xml 2007-07-17 16:32:28 UTC (rev 2478)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping
+ SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.filter">
+
+ <class name="Department" table="DEPARTMENT">
+ <id name="id" column="DEPT_ID" type="long">
+ <generator class="native"/>
+ </id>
+
+ <property name="name" column="REG" type="string"/>
+
+ <set name="salespersons" cascade="save-update" inverse="true">
+ <key column="DEPT_ID"/>
+ <one-to-many class="Salesperson"/>
+ <filter name="seniorSalespersons"><![CDATA[`hire dt` < :asOfDate]]></filter>
+ </set>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.java 2007-07-17 16:32:28 UTC (rev 2478)
@@ -0,0 +1,40 @@
+// $Id: Department.java 4448 2004-08-28 02:29:05Z steveebersole $
+package mapping.filter;
+
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * Implementation of Department.
+ *
+ * @author Steve
+ */
+public class Department {
+ private Long id;
+ private String name;
+ private Set salespersons = new HashSet();
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Set getSalespersons() {
+ return salespersons;
+ }
+
+ public void setSalespersons(Set salespersons) {
+ this.salespersons = salespersons;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.hbm.xml 2007-07-17 16:32:28 UTC (rev 2478)
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping
+ SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.filter">
+
+ <class name="LineItem" table="ORDER_ITEM">
+ <id name="id" column="ITEM_ID" >
+ <generator class="native"/>
+ </id>
+
+ <many-to-one name="order" class="Order" column="ORDER_ID" cascade="none"/>
+ <property name="sequence" column="SEQ" type="int"/>
+ <many-to-one name="product" class="Product" column="PRODUCT_ID" cascade="none"/>
+ <property name="quantity" column="AMT" type="long"/>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.java 2007-07-17 16:32:28 UTC (rev 2478)
@@ -0,0 +1,67 @@
+// $Id: LineItem.java 4046 2004-07-20 04:07:40Z steveebersole $
+package mapping.filter;
+
+/**
+ * Implementation of LineItem.
+ *
+ * @author Steve
+ */
+public class LineItem {
+ private Long id;
+ private Order order;
+ private int sequence;
+ private Product product;
+ private long quantity;
+
+ /*package*/ LineItem() {}
+
+ public static LineItem generate(Order order, int sequence, Product product, long quantity) {
+ LineItem item = new LineItem();
+ item.order = order;
+ item.sequence = sequence;
+ item.product = product;
+ item.quantity = quantity;
+ item.order.getLineItems().add(sequence, item);
+ return item;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public Order getOrder() {
+ return order;
+ }
+
+ public void setOrder(Order order) {
+ this.order = order;
+ }
+
+ public int getSequence() {
+ return sequence;
+ }
+
+ public void setSequence(int sequence) {
+ this.sequence = sequence;
+ }
+
+ public Product getProduct() {
+ return product;
+ }
+
+ public void setProduct(Product product) {
+ this.product = product;
+ }
+
+ public long getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(long quantity) {
+ this.quantity = quantity;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.hbm.xml 2007-07-17 16:32:28 UTC (rev 2478)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping
+ SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.filter">
+
+ <class name="Order" table="T_ORDER">
+ <id name="id" column="ORDER_ID" type="long">
+ <generator class="native"/>
+ </id>
+
+ <property name="region" column="REG" type="string"/>
+ <property name="buyer" column="BUYER" type="string"/>
+ <property name="placementDate" column="`ord dt`" type="java.util.Date"/>
+ <property name="fulfillmentDate" column="`close dt`" type="java.util.Date"/>
+
+ <many-to-one name="salesperson" class="Salesperson" column="SALES_PERSON_ID"/>
+
+ <list cascade="all-delete-orphan" inverse="true" name="lineItems">
+ <key column="ORDER_ID"/>
+ <index column="SEQ"/>
+ <one-to-many class="LineItem"/>
+ </list>
+
+ <filter name="region" condition="REG = :region"/>
+ <filter name="fulfilledOrders"><![CDATA[`close dt` < :asOfDate]]></filter>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.java 2007-07-17 16:32:28 UTC (rev 2478)
@@ -0,0 +1,87 @@
+// $Id: Order.java 4222 2004-08-10 05:19:46Z steveebersole $
+package mapping.filter;
+
+import java.util.Date;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author Steve Ebersole
+ */
+public class Order {
+ private Long id;
+ private String region;
+ private Date placementDate;
+ private Date fulfillmentDate;
+ private Salesperson salesperson;
+ private String buyer;
+ private List lineItems = new ArrayList();
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public Date getPlacementDate() {
+ return placementDate;
+ }
+
+ public void setPlacementDate(Date placementDate) {
+ this.placementDate = placementDate;
+ }
+
+ public Date getFulfillmentDate() {
+ return fulfillmentDate;
+ }
+
+ public void setFulfillmentDate(Date fulfillmentDate) {
+ this.fulfillmentDate = fulfillmentDate;
+ }
+
+ public Salesperson getSalesperson() {
+ return salesperson;
+ }
+
+ public void setSalesperson(Salesperson salesperson) {
+ this.salesperson = salesperson;
+ }
+
+ public String getBuyer() {
+ return buyer;
+ }
+
+ public void setBuyer(String buyer) {
+ this.buyer = buyer;
+ }
+
+ public List getLineItems() {
+ return lineItems;
+ }
+
+ protected void setLineItems(List lineItems) {
+ this.lineItems = lineItems;
+ }
+
+ public LineItem addLineItem(Product product, long quantity) {
+ return LineItem.generate(this, getLineItems().size(), product, quantity);
+ }
+
+ public void removeLineItem(LineItem item) {
+ removeLineItem( item.getSequence() );
+ }
+
+ public void removeLineItem(int sequence) {
+ getLineItems().remove(sequence);
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.hbm.xml 2007-07-17 16:32:28 UTC (rev 2478)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping
+ SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.filter">
+
+ <class name="Product" table="PRODUCT">
+ <id name="id" column="PROD_ID" >
+ <generator class="native"/>
+ </id>
+
+ <property name="name" type="string"/>
+ <property name="stockNumber" column="STOCK_NUM" type="int"/>
+
+ <property name="effectiveStartDate" column="eff_start_dt" type="java.util.Date"/>
+ <property name="effectiveEndDate" column="eff_end_dt" type="java.util.Date"/>
+
+ <set cascade="none" inverse="true" name="orderLineItems">
+ <key column="PROD_ID"/>
+ <one-to-many class="LineItem"/>
+ </set>
+
+ <set cascade="all" inverse="false" name="categories" fetch="join" table="PROD_CAT" >
+ <key column="PROD_ID"/>
+ <many-to-many class="Category" column="CAT_ID" fetch="join" >
+ <filter name="effectiveDate" condition=":asOfDate BETWEEN eff_start_dt and eff_end_dt"/>
+ <filter name="cat" condition="CAT_ID = :catId"/>
+ </many-to-many>
+ </set>
+
+ <filter name="effectiveDate" condition=":asOfDate BETWEEN eff_start_dt and eff_end_dt"/>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.java 2007-07-17 16:32:28 UTC (rev 2478)
@@ -0,0 +1,99 @@
+// $Id: Product.java 6507 2005-04-25 16:57:32Z steveebersole $
+package mapping.filter;
+
+import java.util.Set;
+import java.util.Date;
+import java.util.HashSet;
+
+/**
+ * @author Steve Ebersole
+ */
+public class Product {
+ private Long id;
+ private String name;
+ private int stockNumber; // int for ease of hashCode() impl
+ private Date effectiveStartDate;
+ private Date effectiveEndDate;
+ private Set orderLineItems;
+ private Set categories;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Set getOrderLineItems() {
+ return orderLineItems;
+ }
+
+ public void setOrderLineItems(Set orderLineItems) {
+ this.orderLineItems = orderLineItems;
+ }
+
+ public int getStockNumber() {
+ return stockNumber;
+ }
+
+ public void setStockNumber(int stockNumber) {
+ this.stockNumber = stockNumber;
+ }
+
+ public int hashCode() {
+ return stockNumber;
+ }
+
+ public boolean equals(Object obj) {
+ return ( (Product) obj ).stockNumber == this.stockNumber;
+ }
+
+ public Date getEffectiveStartDate() {
+ return effectiveStartDate;
+ }
+
+ public void setEffectiveStartDate(Date effectiveStartDate) {
+ this.effectiveStartDate = effectiveStartDate;
+ }
+
+ public Date getEffectiveEndDate() {
+ return effectiveEndDate;
+ }
+
+ public void setEffectiveEndDate(Date effectiveEndDate) {
+ this.effectiveEndDate = effectiveEndDate;
+ }
+
+ public Set getCategories() {
+ return categories;
+ }
+
+ public void setCategories(Set categories) {
+ this.categories = categories;
+ }
+
+ public void addCategory(Category category) {
+ if ( category == null ) {
+ return;
+ }
+
+ if ( categories == null ) {
+ categories = new HashSet();
+ }
+
+ categories.add( category );
+ if ( category.getProducts() == null ) {
+ category.setProducts( new HashSet() );
+ }
+ category.getProducts().add( this );
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.hbm.xml 2007-07-17 16:32:28 UTC (rev 2478)
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping
+ SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.filter">
+
+ <class name="Salesperson" table="SALES_PERSON">
+ <id name="id" column="SALES_PERSON_ID" >
+ <generator class="native"/>
+ </id>
+
+ <property name="name" column="NAME" type="string"/>
+ <property name="region" column="REG" type="string"/>
+
+ <many-to-one name="department" cascade="none" class="Department" column="DEPT_ID"/>
+
+ <property name="hireDate" column="`hire dt`" type="java.util.Date"/>
+
+ <set name="orders" cascade="none" inverse="true" fetch="join">
+ <key column="SALES_PERSON_ID"/>
+ <one-to-many class="Order"/>
+ <filter name="region" condition="REG = :region"/>
+ <filter name="fulfilledOrders"><![CDATA[`close dt` < :asOfDate]]></filter>
+ </set>
+
+ <filter name="region" condition="REG = :region"/>
+ <filter name="regionlist" condition="REG IN (:regions)"/>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.java 2007-07-17 16:32:28 UTC (rev 2478)
@@ -0,0 +1,68 @@
+// $Id: Salesperson.java 4448 2004-08-28 02:29:05Z steveebersole $
+package mapping.filter;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Date;
+
+/**
+ * Implementation of Salesperson.
+ *
+ * @author Steve
+ */
+public class Salesperson {
+ private Long id;
+ private String name;
+ private String region;
+ private Date hireDate;
+ private Department department;
+ private Set orders = new HashSet();
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public Set getOrders() {
+ return orders;
+ }
+
+ public void setOrders(Set orders) {
+ this.orders = orders;
+ }
+
+ public Date getHireDate() {
+ return hireDate;
+ }
+
+ public void setHireDate(Date hireDate) {
+ this.hireDate = hireDate;
+ }
+
+ public Department getDepartment() {
+ return department;
+ }
+
+ public void setDepartment(Department department) {
+ this.department = department;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/defs.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/defs.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/defs.hbm.xml 2007-07-17 16:32:28 UTC (rev 2478)
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping
+ SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping>
+ <filter-def name="region">
+ <filter-param name="region" type="string"/>
+ </filter-def>
+
+ <filter-def name="regionlist">
+ <filter-param name="regions" type="string"/>
+ </filter-def>
+
+ <filter-def name="fulfilledOrders">
+ <filter-param name="asOfDate" type="timestamp"/>
+ </filter-def>
+
+ <filter-def name="effectiveDate">
+ <filter-param name="asOfDate" type="timestamp"/>
+ </filter-def>
+
+ <filter-def name="seniorSalespersons">
+ <filter-param name="asOfDate" type="timestamp"/>
+ </filter-def>
+
+ <filter-def name="cat">
+ <filter-param name="catId" type="long"/>
+ </filter-def>
+</hibernate-mapping>
\ No newline at end of file
17 years, 5 months
JBoss Tools SVN: r2477 - in trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping: generatedkeys and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-17 12:31:04 -0400 (Tue, 17 Jul 2007)
New Revision: 2477
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MyChild.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MyEntity.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MyEntity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MySibling.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/select/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/select/MyEntity.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/select/MyEntity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/seqidentity/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/seqidentity/MyEntity.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/seqidentity/MyEntity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/hql/
Log:
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MyChild.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MyChild.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MyChild.java 2007-07-17 16:31:04 UTC (rev 2477)
@@ -0,0 +1,41 @@
+package mapping.generatedkeys.identity;
+
+/**
+ * @author Steve Ebersole
+ */
+public class MyChild {
+ private Long id;
+ private String name;
+ private MyEntity inverseParent;
+
+ public MyChild() {
+ }
+
+ public MyChild(String name) {
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public MyEntity getInverseParent() {
+ return inverseParent;
+ }
+
+ public void setInverseParent(MyEntity inverseParent) {
+ this.inverseParent = inverseParent;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MyEntity.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MyEntity.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MyEntity.hbm.xml 2007-07-17 16:31:04 UTC (rev 2477)
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="mapping.generatedkeys.identity" default-access="field">
+
+ <class name="MyEntity" table="my_entity">
+ <id name="id">
+ <generator class="identity"/>
+ </id>
+ <property name="name"/>
+
+ <!-- used to test cascades "out" to a many-to-one association -->
+ <many-to-one name="sibling" class="MySibling" cascade="persist, merge"/>
+
+ <!-- used to test cascades "out" to non-inverse collections -->
+ <set name="nonInverseChildren" inverse="false" cascade="persist, merge">
+ <key column="non_inv_parent_id"/>
+ <one-to-many class="MyChild"/>
+ </set>
+
+ <!-- used to test cascades "out" to inverse collections -->
+ <set name="inverseChildren" inverse="true" cascade="persist, merge">
+ <key column="inv_parent_id"/>
+ <one-to-many class="MyChild"/>
+ </set>
+ </class>
+
+
+ <class name="MySibling" table="my_sibling">
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <property name="name"/>
+ <many-to-one name="entity" class="MyEntity" cascade="persist, merge"/>
+ </class>
+
+
+ <class name="MyChild" table="my_child">
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <property name="name"/>
+ <many-to-one name="inverseParent" column="inv_parent_id" class="MyEntity"/>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MyEntity.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MyEntity.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MyEntity.java 2007-07-17 16:31:04 UTC (rev 2477)
@@ -0,0 +1,62 @@
+package mapping.generatedkeys.identity;
+
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * @author Steve Ebersole
+ */
+public class MyEntity {
+ private Long id;
+ private String name;
+ private MySibling sibling;
+ private Set nonInverseChildren = new HashSet();
+ private Set inverseChildren = new HashSet();
+
+ public MyEntity() {
+ }
+
+ public MyEntity(String name) {
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public MySibling getSibling() {
+ return sibling;
+ }
+
+ public void setSibling(MySibling sibling) {
+ this.sibling = sibling;
+ }
+
+ public Set getNonInverseChildren() {
+ return nonInverseChildren;
+ }
+
+ public void setNonInverseChildren(Set nonInverseChildren) {
+ this.nonInverseChildren = nonInverseChildren;
+ }
+
+ public Set getInverseChildren() {
+ return inverseChildren;
+ }
+
+ public void setInverseChildren(Set inverseChildren) {
+ this.inverseChildren = inverseChildren;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MySibling.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MySibling.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/identity/MySibling.java 2007-07-17 16:31:04 UTC (rev 2477)
@@ -0,0 +1,41 @@
+package mapping.generatedkeys.identity;
+
+/**
+ * @author Steve Ebersole
+ */
+public class MySibling {
+ private Long id;
+ private String name;
+ private MyEntity entity;
+
+ public MySibling() {
+ }
+
+ public MySibling(String name) {
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public MyEntity getEntity() {
+ return entity;
+ }
+
+ public void setEntity(MyEntity entity) {
+ this.entity = entity;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/select/MyEntity.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/select/MyEntity.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/select/MyEntity.hbm.xml 2007-07-17 16:31:04 UTC (rev 2477)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="mapping.generatedkeys.select" default-access="field">
+
+ <class name="MyEntity" table="my_entity">
+
+ <id name="id">
+ <generator class="select"/>
+ </id>
+ <natural-id>
+ <property name="name"/>
+ </natural-id>
+ </class>
+
+ <database-object>
+ <create>
+ <![CDATA[CREATE OR REPLACE TRIGGER t_i_my_entity
+ BEFORE INSERT ON my_entity
+ FOR EACH ROW
+ BEGIN
+ select nvl( max(id), 0 ) + 1
+ into :new.id
+ from my_entity;
+ END;]]>
+ </create>
+ <drop>
+ <![CDATA[DROP TRIGGER t_i_my_entity]]>
+ </drop>
+ <dialect-scope name="org.hibernate.dialect.Oracle9Dialect"/>
+ <dialect-scope name="org.hibernate.dialect.OracleDialect"/>
+ </database-object>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/select/MyEntity.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/select/MyEntity.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/select/MyEntity.java 2007-07-17 16:31:04 UTC (rev 2477)
@@ -0,0 +1,28 @@
+package mapping.generatedkeys.select;
+
+/**
+ * @author <a href="mailto:steve@hibernate.org">Steve Ebersole </a>
+ */
+public class MyEntity {
+ private Long id;
+ private String name;
+
+ public MyEntity() {
+ }
+
+ public MyEntity(String name) {
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/seqidentity/MyEntity.hbm.xml
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/seqidentity/MyEntity.hbm.xml (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/seqidentity/MyEntity.hbm.xml 2007-07-17 16:31:04 UTC (rev 2477)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="mapping.generatedkeys.seqidentity" default-access="field">
+
+ <class name="MyEntity" table="my_entity">
+
+ <id name="id">
+ <generator class="sequence-identity"/>
+ </id>
+ <natural-id>
+ <property name="name"/>
+ </natural-id>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/seqidentity/MyEntity.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/seqidentity/MyEntity.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generatedkeys/seqidentity/MyEntity.java 2007-07-17 16:31:04 UTC (rev 2477)
@@ -0,0 +1,28 @@
+package mapping.generatedkeys.seqidentity;
+
+/**
+ * @author <a href="mailto:steve@hibernate.org">Steve Ebersole </a>
+ */
+public class MyEntity {
+ private Long id;
+ private String name;
+
+ public MyEntity() {
+ }
+
+ public MyEntity(String name) {
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
17 years, 5 months
JBoss Tools SVN: r2476 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-17 12:12:16 -0400 (Tue, 17 Jul 2007)
New Revision: 2476
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java
Log:
EXIN-217 Method getLocationFor moved to AbstractContextVariable
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java 2007-07-17 15:30:43 UTC (rev 2475)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java 2007-07-17 16:12:16 UTC (rev 2476)
@@ -97,6 +97,26 @@
return s1 == null ? s2 == null : s1.equals(s2);
}
+ /**
+ * @param path
+ * @return source reference for some member of declaration.
+ * e.g. if you need source reference for @Name you have to
+ * invoke getLocationFor("name");
+ */
+ public ISeamTextSourceReference getLocationFor(String path) {
+ final IValueInfo valueInfo = attributes.get(path);
+ ISeamTextSourceReference reference = new ISeamTextSourceReference() {
+ public int getLength() {
+ return valueInfo != null ? valueInfo.getLength() : 0;
+ }
+
+ public int getStartPosition() {
+ return valueInfo != null ? valueInfo.getStartPosition() : 0;
+ }
+ };
+ return reference;
+ }
+
public void setName(IValueInfo value) {
attributes.put(ISeamXmlComponentDeclaration.NAME, value);
name = value == null ? null : value.getValue();
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java 2007-07-17 15:30:43 UTC (rev 2475)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java 2007-07-17 16:12:16 UTC (rev 2476)
@@ -14,7 +14,6 @@
import org.eclipse.jdt.core.IMethod;
import org.jboss.tools.seam.core.ISeamAnnotatedFactory;
-import org.jboss.tools.seam.core.ISeamTextSourceReference;
import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
import org.jboss.tools.seam.core.IValueInfo;
import org.jboss.tools.seam.core.event.Change;
@@ -49,26 +48,6 @@
return changes;
}
- /**
- * @param path
- * @return source reference for some member of declaration.
- * e.g. if you need source reference for @Name you have to
- * invoke getLocationFor("name");
- */
- public ISeamTextSourceReference getLocationFor(String path) {
- final IValueInfo valueInfo = attributes.get(path);
- ISeamTextSourceReference reference = new ISeamTextSourceReference() {
- public int getLength() {
- return valueInfo != null ? valueInfo.getLength() : 0;
- }
-
- public int getStartPosition() {
- return valueInfo != null ? valueInfo.getStartPosition() : 0;
- }
- };
- return reference;
- }
-
public void setAutoCreate(IValueInfo value) {
attributes.put(ISeamXmlComponentDeclaration.AUTO_CREATE, value);
setAutoCreate(value != null && "true".equals(value.getValue()));
17 years, 5 months
JBoss Tools SVN: r2475 - trunk/seam/plugins/org.jboss.tools.seam.core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-07-17 11:30:43 -0400 (Tue, 17 Jul 2007)
New Revision: 2475
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
Log:
Changed seam nature id
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2007-07-17 15:29:09 UTC (rev 2474)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2007-07-17 15:30:43 UTC (rev 2475)
@@ -137,7 +137,7 @@
id="SeamAnnatationValidator"
name="Seam Annatation Validator">
<validator>
- <projectNature id="org.jboss.tools.seam.core.seam" />
+ <projectNature id="org.jboss.tools.seam.core.seamnature" />
<filter
objectClass="org.eclipse.core.resources.IFile"
nameFilter="*.java"/>
@@ -163,4 +163,4 @@
type="org.eclipse.wst.validation.problemmarker">
</super>
</extension>
-</plugin>
+</plugin>
\ No newline at end of file
17 years, 5 months
JBoss Tools SVN: r2474 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-17 11:29:09 -0400 (Tue, 17 Jul 2007)
New Revision: 2474
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/RootContentProvider.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamLabelProvider.java
Log:
EXIN-218 JDT icons used
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/RootContentProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/RootContentProvider.java 2007-07-17 15:25:26 UTC (rev 2473)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/RootContentProvider.java 2007-07-17 15:29:09 UTC (rev 2474)
@@ -71,7 +71,7 @@
children.addAll(rs);
}
}
- return ((ISeamComponent)parentElement).getAllDeclarations().toArray(new Object[0]);
+ return children.toArray(new Object[0]);
}
return null;
}
@@ -79,6 +79,9 @@
public Object getParent(Object element) {
if(element instanceof ISeamProject) {
return root;
+ } else if(element instanceof IRole) {
+ ISeamElement p = ((IRole)element).getParent();
+ return p == null ? p : p.getParent();
} else if(element instanceof ISeamElement) {
return ((ISeamElement)element).getParent();
}
@@ -87,6 +90,7 @@
public boolean hasChildren(Object element) {
if(element instanceof ISeamComponentDeclaration) return false;
+ if(element instanceof IRole) return false;
return true;
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamLabelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamLabelProvider.java 2007-07-17 15:25:26 UTC (rev 2473)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamLabelProvider.java 2007-07-17 15:29:09 UTC (rev 2474)
@@ -2,8 +2,12 @@
import org.eclipse.core.resources.IProjectNature;
import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.IClassFile;
+import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.internal.ui.JavaPluginImages;
+import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.ISharedImages;
@@ -16,8 +20,11 @@
import org.jboss.tools.seam.core.ISeamJavaSourceReference;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.ISeamScope;
+import org.jboss.tools.seam.internal.core.SeamComponentDeclaration;
+import org.jboss.tools.seam.internal.core.SeamProject;
public class SeamLabelProvider extends LabelProvider {
+ JavaElementImageProvider jip = new JavaElementImageProvider();
public String getText(Object element) {
if(element instanceof ISeamProject) {
@@ -50,7 +57,9 @@
public Image getImage(Object obj) {
String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
if (obj instanceof ISeamProject) {
- imageKey = org.eclipse.ui.ide.IDE.SharedImages.IMG_OBJ_PROJECT;
+ SeamProject p = (SeamProject)obj;
+ return jip.getImageLabel(p.getProject(), 3);
+// imageKey = org.eclipse.ui.ide.IDE.SharedImages.IMG_OBJ_PROJECT;
} else if(obj instanceof ISeamScope) {
imageKey = ISharedImages.IMG_OBJ_FOLDER;
} else if(obj instanceof ISeamComponent) {
@@ -58,9 +67,22 @@
} else if(obj instanceof IRole) {
//
} else if(obj instanceof ISeamJavaComponentDeclaration) {
- imageKey = org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_CLASS;
- return new org.eclipse.jdt.internal.ui.SharedImages().getImage(imageKey);
+ ISeamJavaComponentDeclaration d = (ISeamJavaComponentDeclaration)obj;
+ IType type = (IType)d.getSourceMember();
+ if(type != null) {
+ if(type.isBinary()) {
+ return new org.eclipse.jdt.internal.ui.SharedImages().getImage(JavaPluginImages.IMG_OBJS_CFILE);
+ }
+ IResource r = d.getResource();
+ if(r != null) return jip.getImageLabel(r, 3);
+ ICompilationUnit f = type.getCompilationUnit();
+ return(f != null) ? jip.getImageLabel(f, 0) : jip.getImageLabel(type, 3);
+ }
+ return new org.eclipse.jdt.internal.ui.SharedImages().getImage(JavaPluginImages.IMG_OBJS_CFILECLASS);
} else if(obj instanceof ISeamComponentDeclaration) {
+ SeamComponentDeclaration d = (SeamComponentDeclaration)obj;
+ IResource r = d.getResource();
+ if(r != null) return jip.getImageLabel(r, 3);
imageKey = ISharedImages.IMG_OBJ_FILE;
}
return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
17 years, 5 months
JBoss Tools SVN: r2473 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-17 11:25:26 -0400 (Tue, 17 Jul 2007)
New Revision: 2473
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/PropertiesScanner.java
Log:
EXIN-217 PropertiesScanner fixed
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/PropertiesScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/PropertiesScanner.java 2007-07-17 15:21:33 UTC (rev 2472)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/PropertiesScanner.java 2007-07-17 15:25:26 UTC (rev 2473)
@@ -86,6 +86,7 @@
}
d.addStringProperty(propertyName, value);
}
+ ds.getComponents().addAll(ds1.values());
return ds;
}
17 years, 5 months