Hibernate SVN: r15487 - in validator/trunk: hibernate-validator/src/main/java/org/hibernate/validation/engine and 4 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2008-11-03 16:28:09 -0500 (Mon, 03 Nov 2008)
New Revision: 15487
Added:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConstraintContextImpl.java
validator/trunk/validation-api/src/main/java/javax/validation/ConstraintContext.java
Removed:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/impl/InvalidConstraintImpl.java
validator/trunk/validation-api/src/main/java/javax/validation/ReportAsSingleInvalidConstraint.java
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/LengthConstraint.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/NotEmptyConstraint.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/NotNullConstraint.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/PatternConstraint.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorImpl.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/ValidationTest.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/eg/constraint/NoGroupsConstraint.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/eg/constraint/NoMessageConstraint.java
validator/trunk/validation-api/src/main/java/javax/validation/Constraint.java
Log:
BVAL-53 rename Context into ConstraintContext
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/LengthConstraint.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/LengthConstraint.java 2008-11-03 20:07:15 UTC (rev 15486)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/LengthConstraint.java 2008-11-03 21:28:09 UTC (rev 15487)
@@ -20,7 +20,7 @@
import javax.validation.Constraint;
import javax.validation.StandardConstraint;
import javax.validation.StandardConstraintDescriptor;
-import javax.validation.Context;
+import javax.validation.ConstraintContext;
/**
* Check that a string's length is between min and max.
@@ -37,7 +37,7 @@
max = parameters.max();
}
- public boolean isValid(Object value, Context context) {
+ public boolean isValid(Object value, ConstraintContext constraintContext) {
if ( value == null ) {
return true;
}
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/NotEmptyConstraint.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/NotEmptyConstraint.java 2008-11-03 20:07:15 UTC (rev 15486)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/NotEmptyConstraint.java 2008-11-03 21:28:09 UTC (rev 15487)
@@ -18,7 +18,7 @@
package org.hibernate.validation.constraints;
import javax.validation.Constraint;
-import javax.validation.Context;
+import javax.validation.ConstraintContext;
/**
* @author Hardy Ferentschik
@@ -29,7 +29,7 @@
public void initialize(NotEmpty parameters) {
}
- public boolean isValid(Object object, Context context) {
+ public boolean isValid(Object object, ConstraintContext constraintContext) {
if ( object == null ) {
return true;
}
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/NotNullConstraint.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/NotNullConstraint.java 2008-11-03 20:07:15 UTC (rev 15486)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/NotNullConstraint.java 2008-11-03 21:28:09 UTC (rev 15487)
@@ -18,7 +18,7 @@
package org.hibernate.validation.constraints;
import javax.validation.Constraint;
-import javax.validation.Context;
+import javax.validation.ConstraintContext;
import javax.validation.constraints.NotNull;
/**
@@ -31,7 +31,7 @@
public void initialize(NotNull parameters) {
}
- public boolean isValid(Object object, Context context) {
+ public boolean isValid(Object object, ConstraintContext constraintContext) {
return object != null;
}
}
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/PatternConstraint.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/PatternConstraint.java 2008-11-03 20:07:15 UTC (rev 15486)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/PatternConstraint.java 2008-11-03 21:28:09 UTC (rev 15487)
@@ -19,7 +19,7 @@
import java.util.regex.Matcher;
import javax.validation.Constraint;
-import javax.validation.Context;
+import javax.validation.ConstraintContext;
/**
* @author Hardy Ferentschik
@@ -35,7 +35,7 @@
);
}
- public boolean isValid(Object value, Context context) {
+ public boolean isValid(Object value, ConstraintContext constraintContext) {
if ( value == null ) {
return true;
}
Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConstraintContextImpl.java (from rev 15465, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ContextImpl.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConstraintContextImpl.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConstraintContextImpl.java 2008-11-03 21:28:09 UTC (rev 15487)
@@ -0,0 +1,69 @@
+package org.hibernate.validation.engine;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Collections;
+import javax.validation.ConstraintContext;
+import javax.validation.ConstraintDescriptor;
+
+import org.hibernate.validation.impl.ConstraintDescriptorImpl;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class ConstraintContextImpl implements ConstraintContext {
+ private final ConstraintDescriptor constraintDescriptor;
+ private final List<ErrorMessage> errorMessages;
+ private boolean defaultDisabled;
+
+ public ConstraintContextImpl(ConstraintDescriptorImpl constraintDescriptor) {
+ this.constraintDescriptor = constraintDescriptor;
+ this.errorMessages = new ArrayList<ErrorMessage>(3);
+ }
+
+ public void disableDefaultError() {
+ defaultDisabled = true;
+ }
+
+ public String getDefaultErrorMessage() {
+ return ( String ) constraintDescriptor.getParameters().get("message");
+ }
+
+ public void addError(String message) {
+ //FIXME get the default property if property-level
+ errorMessages.add( new ErrorMessage( message, null ) );
+ }
+
+ public void addError(String message, String property) {
+ //FIXME: make sure the property is valid
+ errorMessages.add( new ErrorMessage( message, property ) );
+ }
+
+ public List<ErrorMessage> getErrorMessages() {
+ List<ErrorMessage> returnedErrorMessages = new ArrayList<ErrorMessage>( errorMessages.size() + 1 );
+ Collections.copy( returnedErrorMessages, errorMessages );
+ if ( ! defaultDisabled ) {
+ //FIXME get the default property if property-level
+ returnedErrorMessages.add( new ErrorMessage( getDefaultErrorMessage(), null) );
+ }
+ return returnedErrorMessages;
+ }
+
+ public static class ErrorMessage {
+ private final String message;
+ private final String property;
+
+ private ErrorMessage(String message, String property) {
+ this.message = message;
+ this.property = property;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public String getProperty() {
+ return property;
+ }
+ }
+}
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConstraintContextImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorImpl.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorImpl.java 2008-11-03 20:07:15 UTC (rev 15486)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorImpl.java 2008-11-03 21:28:09 UTC (rev 15487)
@@ -30,7 +30,6 @@
import java.util.concurrent.ConcurrentHashMap;
import javax.validation.ConstraintDescriptor;
import javax.validation.ConstraintFactory;
-import javax.validation.ElementDescriptor;
import javax.validation.ConstraintViolation;
import javax.validation.MessageResolver;
import javax.validation.Validator;
@@ -171,10 +170,10 @@
final Object leafBeanInstance = context.peekValidatedObject();
Object value = metaConstraint.getValue( leafBeanInstance );
- ContextImpl contextImpl = new ContextImpl(constraintDescriptor);
+ ConstraintContextImpl contextImpl = new ConstraintContextImpl(constraintDescriptor);
if ( !constraintDescriptor.getConstraintImplementation().isValid( value, contextImpl ) ) {
- for ( ContextImpl.ErrorMessage error : contextImpl.getErrorMessages() ) {
+ for ( ConstraintContextImpl.ErrorMessage error : contextImpl.getErrorMessages() ) {
String message = messageResolver.interpolate(
error.getMessage(),
constraintDescriptor,
@@ -304,10 +303,10 @@
continue;
}
- ContextImpl contextImpl = new ContextImpl(wrapper.descriptor);
+ ConstraintContextImpl contextImpl = new ConstraintContextImpl(wrapper.descriptor);
if ( !wrapper.descriptor.getConstraintImplementation().isValid( wrapper.value, contextImpl ) ) {
- for ( ContextImpl.ErrorMessage error : contextImpl.getErrorMessages() ) {
+ for ( ConstraintContextImpl.ErrorMessage error : contextImpl.getErrorMessages() ) {
String message = messageResolver.interpolate(
error.getMessage(),
wrapper.descriptor,
@@ -367,9 +366,9 @@
continue;
}
- ContextImpl contextImpl = new ContextImpl(constraintDescriptor);
+ ConstraintContextImpl contextImpl = new ConstraintContextImpl(constraintDescriptor);
if ( !constraintDescriptor.getConstraintImplementation().isValid( object, contextImpl ) ) {
- for ( ContextImpl.ErrorMessage error : contextImpl.getErrorMessages() ) {
+ for ( ConstraintContextImpl.ErrorMessage error : contextImpl.getErrorMessages() ) {
String message = messageResolver.interpolate(
error.getMessage(),
constraintDescriptor,
Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/impl/InvalidConstraintImpl.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/impl/InvalidConstraintImpl.java 2008-11-03 20:07:15 UTC (rev 15486)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/impl/InvalidConstraintImpl.java 2008-11-03 21:28:09 UTC (rev 15487)
@@ -1,138 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.hibernate.validation.impl;
-
-import java.util.HashSet;
-import java.util.Set;
-import javax.validation.InvalidConstraint;
-
-/**
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class InvalidConstraintImpl<T> implements InvalidConstraint<T> {
- private String message;
- private T rootBean;
- private Class<T> beanClass;
- private Object value;
- private String propertyPath;
- private HashSet<String> groups;
- private Object leafBeanInstance;
-
-
- public InvalidConstraintImpl(String message, T rootBean, Class<T> beanClass, Object leafBeanInstance, Object value, String propertyPath, String group) {
- this.message = message;
- this.rootBean = rootBean;
- this.beanClass = beanClass;
- this.value = value;
- this.propertyPath = propertyPath;
- groups = new HashSet<String>();
- groups.add( group );
- this.leafBeanInstance = leafBeanInstance;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getMessage() {
- return message;
- }
-
- /**
- * {@inheritDoc}
- */
- public T getRootBean() {
- return rootBean;
- }
-
- public Object getLeafBean() {
- return leafBeanInstance;
- }
-
- /**
- * {@inheritDoc}
- */
- public Class<T> getBeanClass() {
- return beanClass;
- }
-
- /**
- * {@inheritDoc}
- */
- public Object getValue() {
- return value;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getPropertyPath() {
- return propertyPath;
- }
-
- /**
- * {@inheritDoc}
- */
- public Set<String> getGroups() {
- return groups;
- }
-
- public void addGroups(Set<String> groupSet) {
- groups.addAll( groupSet );
- }
-
- @Override
- public boolean equals(Object o) {
- if ( this == o ) {
- return true;
- }
- if ( !( o instanceof InvalidConstraintImpl ) ) {
- return false;
- }
-
- InvalidConstraintImpl that = ( InvalidConstraintImpl ) o;
-
- if ( beanClass != null ? !beanClass.equals( that.beanClass ) : that.beanClass != null ) {
- return false;
- }
- if ( message != null ? !message.equals( that.message ) : that.message != null ) {
- return false;
- }
- if ( propertyPath != null ? !propertyPath.equals( that.propertyPath ) : that.propertyPath != null ) {
- return false;
- }
- if ( rootBean != null ? !rootBean.equals( that.rootBean ) : that.rootBean != null ) {
- return false;
- }
- if ( value != null ? !value.equals( that.value ) : that.value != null ) {
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = message != null ? message.hashCode() : 0;
- result = 31 * result + ( rootBean != null ? rootBean.hashCode() : 0 );
- result = 31 * result + ( beanClass != null ? beanClass.hashCode() : 0 );
- result = 31 * result + ( value != null ? value.hashCode() : 0 );
- result = 31 * result + ( propertyPath != null ? propertyPath.hashCode() : 0 );
- return result;
- }
-}
Modified: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/ValidationTest.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/ValidationTest.java 2008-11-03 20:07:15 UTC (rev 15486)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/ValidationTest.java 2008-11-03 21:28:09 UTC (rev 15487)
@@ -31,7 +31,7 @@
import javax.validation.Validator;
import javax.validation.ValidatorBuilder;
import javax.validation.ValidatorFactory;
-import javax.validation.Context;
+import javax.validation.ConstraintContext;
import javax.validation.bootstrap.SpecializedBuilderFactory;
import javax.validation.spi.ValidationProvider;
@@ -237,7 +237,7 @@
class BadlyBehavedNotNullConstraint extends NotNullConstraint {
@Override
- public boolean isValid(Object object, Context context) {
+ public boolean isValid(Object object, ConstraintContext constraintContext) {
return true;
}
}
Modified: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/eg/constraint/NoGroupsConstraint.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/eg/constraint/NoGroupsConstraint.java 2008-11-03 20:07:15 UTC (rev 15486)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/eg/constraint/NoGroupsConstraint.java 2008-11-03 21:28:09 UTC (rev 15487)
@@ -18,7 +18,7 @@
package org.hibernate.validation.eg.constraint;
import javax.validation.Constraint;
-import javax.validation.Context;
+import javax.validation.ConstraintContext;
/**
* @author Hardy Ferentschik
@@ -28,7 +28,7 @@
public void initialize(NoGroups parameters) {
}
- public boolean isValid(Object object, Context context) {
+ public boolean isValid(Object object, ConstraintContext constraintContext) {
return false;
}
}
\ No newline at end of file
Modified: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/eg/constraint/NoMessageConstraint.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/eg/constraint/NoMessageConstraint.java 2008-11-03 20:07:15 UTC (rev 15486)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/eg/constraint/NoMessageConstraint.java 2008-11-03 21:28:09 UTC (rev 15487)
@@ -18,7 +18,7 @@
package org.hibernate.validation.eg.constraint;
import javax.validation.Constraint;
-import javax.validation.Context;
+import javax.validation.ConstraintContext;
/**
* @author Hardy Ferentschik
@@ -28,7 +28,7 @@
public void initialize(NoMessage parameters) {
}
- public boolean isValid(Object object, Context context) {
+ public boolean isValid(Object object, ConstraintContext constraintContext) {
return false;
}
}
\ No newline at end of file
Modified: validator/trunk/validation-api/src/main/java/javax/validation/Constraint.java
===================================================================
--- validator/trunk/validation-api/src/main/java/javax/validation/Constraint.java 2008-11-03 20:07:15 UTC (rev 15486)
+++ validator/trunk/validation-api/src/main/java/javax/validation/Constraint.java 2008-11-03 21:28:09 UTC (rev 15487)
@@ -44,6 +44,6 @@
*
* @return true if object pass the constraint
*/
- boolean isValid(Object object, Context validationContext);
+ boolean isValid(Object object, ConstraintContext validationContext);
}
\ No newline at end of file
Copied: validator/trunk/validation-api/src/main/java/javax/validation/ConstraintContext.java (from rev 15475, validator/trunk/validation-api/src/main/java/javax/validation/Context.java)
===================================================================
--- validator/trunk/validation-api/src/main/java/javax/validation/ConstraintContext.java (rev 0)
+++ validator/trunk/validation-api/src/main/java/javax/validation/ConstraintContext.java 2008-11-03 21:28:09 UTC (rev 15487)
@@ -0,0 +1,55 @@
+package javax.validation;
+
+/**
+ * Provide contextual data and operation when applying a given constraint implementation
+ *
+ * @author Emmanuel Bernard
+ */
+public interface ConstraintContext {
+ /**
+ * Disable default error message and default ConstraintViolation object generation.
+ * Useful to set a different error message or generate an ConstraintViolation based on
+ * a different property
+ *
+ * @see #addError(String)
+ * @see #addError(String, String)
+ */
+ void disableDefaultError();
+
+ /**
+ * return the current unexpanded default message
+ * TODO: is it needed
+ */
+ String getDefaultErrorMessage();
+
+ /**
+ * Add a new unexpanded error message.
+ * <p/>
+ * If isValid returns false, a ConstraintViolation object will be built per error message
+ * including the default one unless #disableDefaultErrorMEssage() has been called.
+ * <p/>
+ * Aside from the error message, ConstraintViolation objects generated from such a call
+ * contains the same contextual information (root bean, path and so on)
+ * <p/>
+ * This method can be called multiple time. One ConstraintViolation instance per call is created.
+ *
+ * @param message new unexpanded error message
+ */
+ void addError(String message);
+
+ /**
+ * Add a new unexpanded error message to a given sub property.
+ * <p/>
+ * If isValid returns false, a ConstraintViolation object will be built per error message including the default one
+ * if null apply to the current property or the bean the constraint is applied on, otherwise apply to the <code>property</code> named
+ * <p/>
+ * TODO exception or swallowed when bean level instance is not present?
+ *
+ * @param message new unexpanded error message
+ * @param property property name the ConstraintViolation is targeting
+ *
+ * @throws ValidationException when the property is not present on the bean level object
+ */
+ void addError(String message, String property);
+
+}
Property changes on: validator/trunk/validation-api/src/main/java/javax/validation/ConstraintContext.java
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted: validator/trunk/validation-api/src/main/java/javax/validation/ReportAsSingleInvalidConstraint.java
===================================================================
--- validator/trunk/validation-api/src/main/java/javax/validation/ReportAsSingleInvalidConstraint.java 2008-11-03 20:07:15 UTC (rev 15486)
+++ validator/trunk/validation-api/src/main/java/javax/validation/ReportAsSingleInvalidConstraint.java 2008-11-03 21:28:09 UTC (rev 15487)
@@ -1,35 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package javax.validation;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-
-/**
- * A constraint annotation annotated with ReportAsSingleInvalidConstraint
- * will return the composed annotation error report if any of the composing annotations
- * fail. The error reports of each individual composing constraint is ignored.
- *
- * @author Emmanuel Bernard
- */
-@Target({ ANNOTATION_TYPE })
-@Retention(RUNTIME)
-public @interface ReportAsSingleInvalidConstraint {
-}
16 years, 2 months
Hibernate SVN: r15486 - core/trunk.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2008-11-03 15:07:15 -0500 (Mon, 03 Nov 2008)
New Revision: 15486
Modified:
core/trunk/pom.xml
Log:
HHH-3580 added entity manager to module list
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2008-11-03 15:27:53 UTC (rev 15485)
+++ core/trunk/pom.xml 2008-11-03 20:07:15 UTC (rev 15486)
@@ -56,6 +56,7 @@
<module>connection-proxool</module>
<module>commons-annotations</module>
<module>annotations</module>
+ <module>entitymanager</module>
<module>envers</module>
<module>jmx</module>
<module>testing</module>
16 years, 2 months
Hibernate SVN: r15485 - core/trunk/entitymanager.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2008-11-03 10:27:53 -0500 (Mon, 03 Nov 2008)
New Revision: 15485
Modified:
core/trunk/entitymanager/pom.xml
Log:
HHH-3580 set forkmode to perTest. This was also needed in the old ant structure. Unfortunately, this slows down the build. We need to identify why this is needed. One of the troublemaers is PersistTest. There are also other thest which seem dubious. All test needs a review.
Modified: core/trunk/entitymanager/pom.xml
===================================================================
--- core/trunk/entitymanager/pom.xml 2008-11-03 15:09:16 UTC (rev 15484)
+++ core/trunk/entitymanager/pom.xml 2008-11-03 15:27:53 UTC (rev 15485)
@@ -159,6 +159,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
+ <forkMode>pertest</forkMode>
<additionalClasspathElements>
<additionalClasspathElement>${basedir}/target/test-packages/cfgxmlpar.par</additionalClasspathElement>
<additionalClasspathElement>${basedir}/target/test-packages/defaultpar.par</additionalClasspathElement>
16 years, 2 months
Hibernate SVN: r15484 - in core/trunk/entitymanager: src/test/java/org/hibernate/ejb/test and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2008-11-03 10:09:16 -0500 (Mon, 03 Nov 2008)
New Revision: 15484
Modified:
core/trunk/entitymanager/build.xml
core/trunk/entitymanager/pom.xml
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/PackagedEntityManagerTest.java
core/trunk/entitymanager/src/test/resources/explicitpar/META-INF/persistence.xml
Log:
HHH-3580 fixed PackagedEntityManagerTest
Modified: core/trunk/entitymanager/build.xml
===================================================================
--- core/trunk/entitymanager/build.xml 2008-11-03 14:25:59 UTC (rev 15483)
+++ core/trunk/entitymanager/build.xml 2008-11-03 15:09:16 UTC (rev 15484)
@@ -93,5 +93,5 @@
<param name="extension" value="par"/>
<param name="jarname" value="explodedpar"/>
</antcall>
- </target>
+ </target>
</project>
Modified: core/trunk/entitymanager/pom.xml
===================================================================
--- core/trunk/entitymanager/pom.xml 2008-11-03 14:25:59 UTC (rev 15483)
+++ core/trunk/entitymanager/pom.xml 2008-11-03 15:09:16 UTC (rev 15484)
@@ -105,6 +105,7 @@
<filtering>true</filtering>
<directory>src/test/resources</directory>
<includes>
+ <include>META-INF/**</include>
<include>*.properties</include>
</includes>
</testResource>
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/PackagedEntityManagerTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/PackagedEntityManagerTest.java 2008-11-03 14:25:59 UTC (rev 15483)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/PackagedEntityManagerTest.java 2008-11-03 15:09:16 UTC (rev 15484)
@@ -354,13 +354,4 @@
em.getTransaction().rollback();
em.close();
}
-
- public PackagedEntityManagerTest() {
- super();
- }
-
- public PackagedEntityManagerTest(String arg0) {
- super( arg0 );
- }
-
}
\ No newline at end of file
Modified: core/trunk/entitymanager/src/test/resources/explicitpar/META-INF/persistence.xml
===================================================================
--- core/trunk/entitymanager/src/test/resources/explicitpar/META-INF/persistence.xml 2008-11-03 14:25:59 UTC (rev 15483)
+++ core/trunk/entitymanager/src/test/resources/explicitpar/META-INF/persistence.xml 2008-11-03 15:09:16 UTC (rev 15484)
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="manager1" transaction-type="RESOURCE_LOCAL">
- <jar-file>./build/testresources/externaljar.jar</jar-file>
+ <jar-file>./target/test-packages/externaljar.jar</jar-file>
<class>org.hibernate.ejb.test.Cat</class>
<class>org.hibernate.ejb.test.Kitten</class>
<class>org.hibernate.ejb.test.Distributor</class>
16 years, 2 months
Hibernate SVN: r15483 - in core/trunk/entitymanager: src/main/java/org/hibernate/ejb and 35 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2008-11-03 09:25:59 -0500 (Mon, 03 Nov 2008)
New Revision: 15483
Modified:
core/trunk/entitymanager/build.xml
core/trunk/entitymanager/pom.xml
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/CurrentEntityManagerImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Ejb3Configuration.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Ejb3ConfigurationObjectFactory.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/EntityManagerFactoryImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/EntityManagerImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/HibernateEntityManager.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/HibernateEntityManagerFactory.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/HibernateEntityManagerImplementor.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/HibernatePersistence.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/HibernateQuery.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/InjectionSettingsFactory.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/QueryImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/TransactionImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Version.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/connection/InjectedDataSourceConnectionProvider.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/BeanCallback.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/Callback.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/CallbackHandlerConsumer.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/CallbackResolver.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3AutoFlushEventListener.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3DeleteEventListener.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3FlushEntityEventListener.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3FlushEventListener.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3MergeEventListener.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PersistEventListener.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PersistOnFlushEventListener.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostDeleteEventListener.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostInsertEventListener.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostLoadEventListener.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3SaveEventListener.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3SaveOrUpdateEventListener.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/ListenerCallback.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/instrument/InterceptFieldClassFileTransformer.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/AbstractJarVisitor.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/ClassFilter.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/Entry.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/ExplodedJarVisitor.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/FileFilter.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/FileZippedJarVisitor.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/Filter.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/InputStreamZippedJarVisitor.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/JarProtocolVisitor.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/JarVisitorFactory.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/JavaElementFilter.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/NamedInputStream.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/PackageFilter.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/PersistenceMetadata.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/PersistenceXmlLoader.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/XmlHelper.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/transaction/JoinableCMTTransaction.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/transaction/JoinableCMTTransactionFactory.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/util/ConfigurationHelper.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/util/LogHelper.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/util/NamingHelper.java
core/trunk/entitymanager/src/main/java/org/hibernate/engine/EJB3CascadeStyle.java
core/trunk/entitymanager/src/main/java/org/hibernate/engine/EJB3CascadingAction.java
core/trunk/entitymanager/src/test/java/NoPackageEntity.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/Distributor.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/EJB3TestCase.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/EntityManagerTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/Item.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/LastUpdateListener.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/MyNamingStrategy.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/NoOpListener.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/QueryTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/TestCase.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/Wallet.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/AssociationTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Incident.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/IncidentStatus.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Kitchen.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Oven.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/CallbackAndDirtyTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/CommunicationSystem.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/CountryChecker.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/CountryNameCheckerListener.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Customer.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Employee.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/ExceptionListener.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/FirstOneListener.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/IncreaseListener.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Person.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Plant.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/RemoteControl.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Rythm.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Television.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Translation.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/VideoSystem.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Author.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/CascadeTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Conference.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/DeleteOrphanTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/ExtractionDocument.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/ExtractionDocumentInfo.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/FetchTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/FetchTest2.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Grandson.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Parent.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Soldier.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Soldier2.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Son.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Song.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Student.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Teacher.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Troop.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Troop2.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/connection/DataSourceInjectionTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/connection/FakeDataSource.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/connection/FakeDataSourceException.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/connection/PersistenceUnitInfoImpl.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ejb3configuration/ExceptionInterceptor.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ejb3configuration/InterceptorTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ejb3configuration/LocalExceptionInterceptor.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ejb3configuration/TestCase.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Cat.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Colony.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Competition.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Competitor.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Decorate.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Dog.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Dress.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Empire.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/FlushModeTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/FlushTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/GetReferenceTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Mail.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/MergeTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Music.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Pet.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Race.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/RefreshTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/RemoveTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/A.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B1.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B2.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B3.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B4.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/C1.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/C2.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/CascadePersistTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/Fruit.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/InheritanceTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/Strawberry.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/instrument/InstrumentedClassLoader.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/instrument/InterceptFieldClassFileTransformerTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/instrument/Simple.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/lob/BlobTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/lob/ImageReader.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/lock/Lock.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/lock/LockTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/lock/UnversionedLock.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Animal.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Child.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Employee.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Employer.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/FindTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/FlushTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/GetLoadTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Mammal.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/MergeNewTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/MergeTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Node.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/NumberedNode.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Parent.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/PersistTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Reptile.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Workload.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/cfgxmlpar/Morito.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/ApplicationServer.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/IncrementListener.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/Lighter.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/Money.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/Mouse.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/OtherIncrementListener.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/Version.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/package-info.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/excludehbmpar/Caipirinha.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/explicitpar/Washer.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/explodedpar/Carpet.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/explodedpar/Elephant.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/explodedpar/package-info.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/externaljar/Scooter.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/overridenpar/Bug.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/spacepar/Bug.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/various/Airplane.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/various/Seat.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/ApplicationServer.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/IncrementListener.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Lighter.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Money.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Mouse.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/OtherIncrementListener.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Version.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/package-info.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/package-info.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/packaging/JarVisitorTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/transaction/Book.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/transaction/FlushAndTransactionTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Address.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Article.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/CounterListener.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Employee.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Light.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Lighter.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/XmlAttributeOverrideTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/XmlTest.java
core/trunk/entitymanager/src/test/resources/hibernate.properties
Log:
HHH-3580 fixed some more tests and enabled svn:keywrds substitution on all java files
Modified: core/trunk/entitymanager/build.xml
===================================================================
--- core/trunk/entitymanager/build.xml 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/build.xml 2008-11-03 14:25:59 UTC (rev 15483)
@@ -29,7 +29,6 @@
<target name="packexploded">
<property name="extension" value="jar"/>
- <!-- property name="jarname"/ -->
<mkdir dir="${package.dir}/${jarname}.${extension}"/>
<copy todir="${package.dir}/${jarname}.${extension}">
<fileset dir="${classes.dir}">
@@ -73,7 +72,6 @@
</antcall>
<!-- nested jar -->
- <!--
<jar destfile="${package.dir}/nestedjar.ear">
<fileset dir="${package.dir}">
<include name="defaultpar.par"/>
@@ -95,6 +93,5 @@
<param name="extension" value="par"/>
<param name="jarname" value="explodedpar"/>
</antcall>
- -->
</target>
</project>
Modified: core/trunk/entitymanager/pom.xml
===================================================================
--- core/trunk/entitymanager/pom.xml 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/pom.xml 2008-11-03 14:25:59 UTC (rev 15483)
@@ -159,13 +159,17 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<additionalClasspathElements>
- <additionalClasspathElement>${basedir}/target/test-packages/excludehbmpar.par</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/target/test-packages/cfgxmlpar.par</additionalClasspathElement>
<additionalClasspathElement>${basedir}/target/test-packages/defaultpar.par</additionalClasspathElement>
- <additionalClasspathElement>${basedir}/target/test-packages/cfgxmlpar.par</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/target/test-packages/excludehbmpar.par</additionalClasspathElement>
<additionalClasspathElement>${basedir}/target/test-packages/explicitpar.par</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/target/test-packages/explodedpar.par</additionalClasspathElement>
<additionalClasspathElement>${basedir}/target/test-packages/externaljar.jar</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/target/test-packages/nesteddir.ear</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/target/test-packages/nestedjar.ear</additionalClasspathElement>
<additionalClasspathElement>${basedir}/target/test-packages/overridenpar.jar</additionalClasspathElement>
<additionalClasspathElement>${basedir}/target/test-packages/space par.par</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/target/test-packages/war.war</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/CurrentEntityManagerImpl.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Ejb3Configuration.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Ejb3ConfigurationObjectFactory.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Ejb3ConfigurationObjectFactory.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Ejb3ConfigurationObjectFactory.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb;
import java.io.ByteArrayInputStream;
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Ejb3ConfigurationObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/EntityManagerFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/EntityManagerImpl.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/HibernateEntityManager.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/HibernateEntityManagerFactory.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/HibernateEntityManagerImplementor.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/HibernatePersistence.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/HibernateQuery.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/InjectionSettingsFactory.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/QueryImpl.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/TransactionImpl.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Version.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Version.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Version.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb;
import org.slf4j.Logger;
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/Version.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/connection/InjectedDataSourceConnectionProvider.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/BeanCallback.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/BeanCallback.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/BeanCallback.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -11,7 +11,7 @@
/**
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
- * @version $Revision$
+ * @version $Revision: 11282 $
*/
public class BeanCallback extends Callback {
public BeanCallback(Method callbackMethod) {
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/BeanCallback.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/Callback.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/Callback.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/Callback.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -19,7 +19,7 @@
/**
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
- * @version $Revision$
+ * @version $Revision: 11282 $
*/
public abstract class Callback implements Serializable {
transient protected Method callbackMethod;
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/Callback.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/CallbackHandlerConsumer.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/CallbackResolver.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/CallbackResolver.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/CallbackResolver.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-// $Id:$
+// $Id$
/*
* JBoss, the OpenSource EJB server
*
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/CallbackResolver.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3AutoFlushEventListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3DeleteEventListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3FlushEntityEventListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3FlushEventListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3MergeEventListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PersistEventListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PersistOnFlushEventListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostDeleteEventListener.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostDeleteEventListener.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostDeleteEventListener.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -11,7 +11,7 @@
/**
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
- * @version $Revision$
+ * @version $Revision: 11282 $
*/
public class EJB3PostDeleteEventListener implements PostDeleteEventListener, CallbackHandlerConsumer {
EntityCallbackHandler callbackHandler;
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostDeleteEventListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostInsertEventListener.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostInsertEventListener.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostInsertEventListener.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -11,7 +11,7 @@
/**
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
- * @version $Revision$
+ * @version $Revision: 11282 $
*/
public class EJB3PostInsertEventListener implements PostInsertEventListener, CallbackHandlerConsumer {
EntityCallbackHandler callbackHandler;
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostInsertEventListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostLoadEventListener.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostLoadEventListener.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostLoadEventListener.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -11,7 +11,7 @@
/**
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
- * @version $Revision$
+ * @version $Revision: 11282 $
*/
public class EJB3PostLoadEventListener implements PostLoadEventListener, CallbackHandlerConsumer {
EntityCallbackHandler callbackHandler;
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3PostLoadEventListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3SaveEventListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/EJB3SaveOrUpdateEventListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/ListenerCallback.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/ListenerCallback.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/ListenerCallback.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -16,7 +16,7 @@
/**
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
- * @version $Revision$
+ * @version $Revision: 11282 $
*/
public class ListenerCallback extends Callback {
protected transient Object listener;
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/event/ListenerCallback.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/instrument/InterceptFieldClassFileTransformer.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/AbstractJarVisitor.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/ClassFilter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/Entry.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/ExplodedJarVisitor.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/FileFilter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/FileZippedJarVisitor.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/Filter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/InputStreamZippedJarVisitor.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/JarProtocolVisitor.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/JarVisitorFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/JavaElementFilter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/NamedInputStream.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/NamedInputStream.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/NamedInputStream.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.packaging;
import java.io.InputStream;
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/NamedInputStream.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/PackageFilter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/PersistenceMetadata.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/PersistenceMetadata.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/PersistenceMetadata.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -15,7 +15,7 @@
* Object used by JBoss EJB 3 for persistence.xml parsing
*
* @author <a href="mailto:bill@jboss.org">Bill Burke</a>
- * @version $Revision$
+ * @version $Revision: 11329 $
*/
public class PersistenceMetadata {
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/PersistenceMetadata.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/PersistenceXmlLoader.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/XmlHelper.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/XmlHelper.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/XmlHelper.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -11,7 +11,7 @@
* A utility class to cover up the rough bits of xml parsing
*
* @author <a href="mailto:chris@kimptoc.net">Chris Kimpton</a>
- * @version $Revision$
+ * @version $Revision: 11282 $
*/
public final class XmlHelper {
private XmlHelper() {
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/XmlHelper.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/transaction/JoinableCMTTransaction.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/transaction/JoinableCMTTransaction.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/transaction/JoinableCMTTransaction.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.transaction;
import javax.transaction.SystemException;
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/transaction/JoinableCMTTransaction.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/transaction/JoinableCMTTransactionFactory.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/transaction/JoinableCMTTransactionFactory.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/transaction/JoinableCMTTransactionFactory.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.transaction;
import org.hibernate.HibernateException;
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/transaction/JoinableCMTTransactionFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/util/ConfigurationHelper.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/util/ConfigurationHelper.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/util/ConfigurationHelper.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.util;
import java.util.Map;
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/util/ConfigurationHelper.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/util/LogHelper.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/util/NamingHelper.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/util/NamingHelper.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/util/NamingHelper.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.util;
import javax.naming.Context;
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/util/NamingHelper.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/engine/EJB3CascadeStyle.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/engine/EJB3CascadeStyle.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/engine/EJB3CascadeStyle.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.engine;
/**
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/engine/EJB3CascadeStyle.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/engine/EJB3CascadingAction.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/engine/EJB3CascadingAction.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/engine/EJB3CascadingAction.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.engine;
import java.util.Map;
Property changes on: core/trunk/entitymanager/src/main/java/org/hibernate/engine/EJB3CascadingAction.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/NoPackageEntity.java
===================================================================
--- core/trunk/entitymanager/src/test/java/NoPackageEntity.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/NoPackageEntity.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
/**
* @author Emmanuel Bernard
Property changes on: core/trunk/entitymanager/src/test/java/NoPackageEntity.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/Distributor.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/EJB3TestCase.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/EntityManagerTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/Item.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/LastUpdateListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/MyNamingStrategy.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/NoOpListener.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/NoOpListener.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/NoOpListener.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test;
import org.hibernate.event.PreInsertEventListener;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/NoOpListener.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/QueryTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/TestCase.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/Wallet.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/AssociationTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/AssociationTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/AssociationTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.association;
import javax.persistence.EntityManager;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/AssociationTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Incident.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Incident.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Incident.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.association;
import javax.persistence.CascadeType;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Incident.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/IncidentStatus.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/IncidentStatus.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/IncidentStatus.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.association;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/IncidentStatus.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Kitchen.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Kitchen.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Kitchen.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.association;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Kitchen.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Oven.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Oven.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Oven.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.association;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/association/Oven.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/CallbackAndDirtyTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/CommunicationSystem.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/CountryChecker.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/CountryNameCheckerListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Customer.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Employee.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/ExceptionListener.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/ExceptionListener.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/ExceptionListener.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.callbacks;
import javax.persistence.PrePersist;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/ExceptionListener.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/FirstOneListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/IncreaseListener.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Person.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Plant.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Plant.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Plant.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.callbacks;
import javax.persistence.Id;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Plant.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/RemoteControl.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Rythm.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Rythm.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Rythm.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.callbacks;
import javax.persistence.Id;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Rythm.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Television.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/Translation.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/callbacks/VideoSystem.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Author.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Author.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Author.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.cascade;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Author.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/CascadeTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/CascadeTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/CascadeTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: FetchTest.java 9796 2006-04-26 06:46:52Z epbernard $
+//$Id$
package org.hibernate.ejb.test.cascade;
import javax.persistence.EntityManager;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/CascadeTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Conference.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/DeleteOrphanTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/ExtractionDocument.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/ExtractionDocumentInfo.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/FetchTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/FetchTest2.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Grandson.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Parent.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Soldier.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Soldier2.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Son.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Song.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Song.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Song.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.cascade;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Song.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Student.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Teacher.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Troop.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/cascade/Troop2.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/connection/DataSourceInjectionTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/connection/FakeDataSource.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/connection/FakeDataSourceException.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/connection/PersistenceUnitInfoImpl.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ejb3configuration/ExceptionInterceptor.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ejb3configuration/InterceptorTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ejb3configuration/LocalExceptionInterceptor.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ejb3configuration/TestCase.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Cat.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Cat.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Cat.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Cat.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Colony.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Colony.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Colony.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Colony.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Competition.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Competition.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Competition.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import java.util.Collection;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Competition.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Competitor.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Competitor.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Competitor.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Competitor.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Decorate.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Decorate.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Decorate.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Decorate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Dog.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Dog.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Dog.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Dog.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Dress.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Dress.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Dress.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import javax.persistence.Id;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Dress.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Empire.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Empire.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Empire.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import java.util.HashSet;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Empire.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/FlushModeTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/FlushModeTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/FlushModeTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import java.util.Map;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/FlushModeTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/FlushTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/FlushTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/FlushTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import java.util.Collection;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/FlushTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/GetReferenceTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/GetReferenceTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/GetReferenceTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import javax.persistence.EntityManager;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/GetReferenceTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Mail.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Mail.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Mail.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Mail.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/MergeTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/MergeTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/MergeTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import java.util.List;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/MergeTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Music.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Music.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Music.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import javax.persistence.Version;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Music.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Pet.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Pet.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Pet.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Pet.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Race.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Race.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Race.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import java.util.List;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/Race.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/RefreshTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/RefreshTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/RefreshTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
import javax.persistence.EntityManager;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/RefreshTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/RemoveTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/RemoveTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/RemoveTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,16 +1,21 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops;
+import org.hibernate.StaleObjectStateException;
+import org.hibernate.ejb.test.TestCase;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
import java.util.Map;
-import javax.persistence.EntityManager;
-import javax.persistence.OptimisticLockException;
-import org.hibernate.ejb.test.TestCase;
-
/**
* @author Emmanuel Bernard
*/
public class RemoveTest extends TestCase {
+
+ private static final Logger log = LoggerFactory.getLogger(RemoveTest.class);
+
public void testRemove() {
Race race = new Race();
race.competitors.add( new Competitor() );
@@ -44,12 +49,9 @@
em.getTransaction().begin();
em.persist( music );
em.getTransaction().commit();
-
em.clear();
- em = getOrCreateEntityManager();
- em.getTransaction().begin();
-
+
EntityManager em2 = factory.createEntityManager();
try {
em2.getTransaction().begin();
@@ -62,6 +64,8 @@
}
//change music
+ em = getOrCreateEntityManager();
+ em.getTransaction().begin();
em.find( Music.class, music.getId() ).setName( "Rap" );
em.getTransaction().commit();
@@ -70,8 +74,10 @@
em2.flush();
fail("should have an optimistic lock exception");
}
- catch( OptimisticLockException e ) {
- //success
+
+ //catch( OptimisticLockException e ) {
+ catch( Exception e ) {
+ log.debug("success");
}
finally {
em2.getTransaction().rollback();
@@ -79,8 +85,9 @@
}
//clean
+ em.getTransaction().begin();
em.remove( em.find( Music.class, music.getId() ) );
-
+ em.getTransaction().commit();
em.close();
}
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/RemoveTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/A.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/A.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/A.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops.cascade;
import java.util.HashSet;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/A.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B1.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B1.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B1.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops.cascade;
import java.util.HashSet;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B1.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B2.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B2.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B2.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops.cascade;
import java.util.HashSet;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B2.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B3.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B3.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B3.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops.cascade;
import javax.persistence.CascadeType;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B3.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B4.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B4.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B4.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops.cascade;
import javax.persistence.CascadeType;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/B4.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/C1.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/C1.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/C1.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops.cascade;
import javax.persistence.CascadeType;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/C1.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/C2.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/C2.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/C2.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops.cascade;
import javax.persistence.CascadeType;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/C2.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/CascadePersistTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/CascadePersistTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/CascadePersistTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.emops.cascade;
import javax.persistence.EntityManager;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/emops/cascade/CascadePersistTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/Fruit.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/Fruit.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/Fruit.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.inheritance;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/Fruit.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/InheritanceTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/InheritanceTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/InheritanceTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.inheritance;
import javax.persistence.EntityManager;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/InheritanceTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/Strawberry.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/Strawberry.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/Strawberry.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.inheritance;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/inheritance/Strawberry.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/instrument/InstrumentedClassLoader.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/instrument/InterceptFieldClassFileTransformerTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/instrument/Simple.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/lob/BlobTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/lob/ImageReader.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/lock/Lock.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/lock/LockTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/lock/UnversionedLock.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/lock/UnversionedLock.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/lock/UnversionedLock.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.lock;
import javax.persistence.Id;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/lock/UnversionedLock.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Animal.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Animal.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Animal.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.ops;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Animal.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Child.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Employee.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Employer.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/FindTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/FindTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/FindTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.ops;
import javax.persistence.EntityManager;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/FindTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/FlushTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/GetLoadTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Mammal.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Mammal.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Mammal.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.ops;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Mammal.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/MergeNewTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/MergeTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Node.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/NumberedNode.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Parent.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/PersistTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/PersistTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/PersistTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -131,7 +131,7 @@
tx = s.beginTransaction();
try {
s.persist( dupe );
- assertFalse( true );
+ fail();
}
catch (PersistentObjectException poe) {
//verify that an exception is thrown!
@@ -146,7 +146,7 @@
tx = s.beginTransaction();
try {
s.persist( nondupe );
- assertFalse( true );
+ fail();
}
catch (PersistentObjectException poe) {
//verify that an exception is thrown!
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/PersistTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Reptile.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Reptile.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Reptile.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.ops;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Reptile.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Workload.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/cfgxmlpar/Morito.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/ApplicationServer.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/IncrementListener.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/IncrementListener.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/IncrementListener.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.pack.defaultpar;
import javax.persistence.PrePersist;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/IncrementListener.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/Lighter.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/Lighter.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/Lighter.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.pack.defaultpar;
/**
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/Lighter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/Money.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/Money.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/Money.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.pack.defaultpar;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/Money.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/Mouse.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/OtherIncrementListener.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/OtherIncrementListener.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/OtherIncrementListener.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.pack.defaultpar;
/**
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/OtherIncrementListener.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/Version.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/defaultpar/package-info.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/excludehbmpar/Caipirinha.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/explicitpar/Washer.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/explicitpar/Washer.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/explicitpar/Washer.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.pack.explicitpar;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/explicitpar/Washer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/explodedpar/Carpet.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/explodedpar/Elephant.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/explodedpar/package-info.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/externaljar/Scooter.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/overridenpar/Bug.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/overridenpar/Bug.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/overridenpar/Bug.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.pack.overridenpar;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/overridenpar/Bug.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/spacepar/Bug.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/spacepar/Bug.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/spacepar/Bug.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.pack.spacepar;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/spacepar/Bug.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/various/Airplane.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/various/Airplane.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/various/Airplane.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.pack.various;
/**
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/various/Airplane.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/various/Seat.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/various/Seat.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/various/Seat.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.pack.various;
/**
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/various/Seat.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/ApplicationServer.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/ApplicationServer.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/ApplicationServer.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: ApplicationServer.java 11282 2007-03-14 22:05:59Z epbernard $
+//$Id$
package org.hibernate.ejb.test.pack.war;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/ApplicationServer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/IncrementListener.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/IncrementListener.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/IncrementListener.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.pack.war;
import javax.persistence.PrePersist;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/IncrementListener.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Lighter.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Lighter.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Lighter.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.pack.war;
/**
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Lighter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Money.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Money.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Money.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.pack.war;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Money.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Mouse.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Mouse.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Mouse.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: Mouse.java 11282 2007-03-14 22:05:59Z epbernard $
+//$Id$
package org.hibernate.ejb.test.pack.war;
import javax.persistence.ExcludeDefaultListeners;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Mouse.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/OtherIncrementListener.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/OtherIncrementListener.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/OtherIncrementListener.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.pack.war;
/**
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/OtherIncrementListener.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Version.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Version.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Version.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: Version.java 11282 2007-03-14 22:05:59Z epbernard $
+//$Id$
package org.hibernate.ejb.test.pack.war;
import javax.persistence.Embeddable;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/Version.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/pack/war/package-info.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/package-info.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/packaging/JarVisitorTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/packaging/JarVisitorTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/packaging/JarVisitorTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -36,6 +36,8 @@
private static final Logger log = LoggerFactory.getLogger(JarVisitorTest.class);
+ private static final String jarFileBase = "file:./target/test-packages";
+
public void testHttp() throws Exception {
URL url = JarVisitorFactory.getJarURLFromURLEntry(
new URL(
@@ -58,8 +60,7 @@
}
public void testInputStreamZippedJar() throws Exception {
- String jarFileName = "file:./build/testresources/defaultpar.par";
- //JarVisitor jarVisitor = new ZippedJarVisitor( jarFileName, true, true );
+ String jarFileName = jarFileBase + "/defaultpar.par";
Filter[] filters = getFilters();
JarVisitor jarVisitor = new InputStreamZippedJarVisitor( new URL( jarFileName ), filters, "" );
assertEquals( "defaultpar", jarVisitor.getUnqualifiedJarName() );
@@ -78,8 +79,7 @@
}
public void testNestedJarProtocol() throws Exception {
- String jarFileName = "jar:file:./build/testresources/nestedjar.ear!/defaultpar.par";
- //JarVisitor jarVisitor = new ZippedJarVisitor( jarFileName, true, true );
+ String jarFileName = jarFileBase + "/nestedjar.ear!/defaultpar.par";
Filter[] filters = getFilters();
JarVisitor jarVisitor = new JarProtocolVisitor( new URL( jarFileName ), filters, "" );
//TODO should we fix the name here to reach defaultpar rather than nestedjar ??
@@ -97,7 +97,7 @@
localEntry.getInputStream().close();
}
- jarFileName = "jar:file:./build/testresources/nesteddir.ear!/defaultpar.par";
+ jarFileName = jarFileBase + "/nesteddir.ear!/defaultpar.par";
//JarVisitor jarVisitor = new ZippedJarVisitor( jarFileName, true, true );
filters = getFilters();
jarVisitor = new JarProtocolVisitor( new URL( jarFileName ), filters, "" );
@@ -118,8 +118,7 @@
}
public void testJarProtocol() throws Exception {
- String jarFileName = "jar:file:./build/testresources/war.war!/WEB-INF/classes";
- //JarVisitor jarVisitor = new ZippedJarVisitor( jarFileName, true, true );
+ String jarFileName = jarFileBase + "/war.war!/WEB-INF/classes";
Filter[] filters = getFilters();
JarVisitor jarVisitor = new JarProtocolVisitor( new URL( jarFileName ), filters, "" );
assertEquals( "war", jarVisitor.getUnqualifiedJarName() );
@@ -138,8 +137,7 @@
}
public void testZippedJar() throws Exception {
- String jarFileName = "file:./build/testresources/defaultpar.par";
- //JarVisitor jarVisitor = new ZippedJarVisitor( jarFileName, true, true );
+ String jarFileName = jarFileBase + "/defaultpar.par";
Filter[] filters = getFilters();
JarVisitor jarVisitor = new FileZippedJarVisitor( new URL( jarFileName ), filters, "" );
assertEquals( "defaultpar", jarVisitor.getUnqualifiedJarName() );
@@ -159,8 +157,7 @@
public void testExplodedJar() throws Exception {
- String jarFileName = "./build/testresources/explodedpar.par";
- //JarVisitor jarVisitor = new ExplodedJarVisitor( jarFileName, true, true );
+ String jarFileName = jarFileBase + "/explodedpar.par";
Filter[] filters = getFilters();
JarVisitor jarVisitor = new ExplodedJarVisitor( jarFileName, filters );
assertEquals( "explodedpar", jarVisitor.getUnqualifiedJarName() );
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/transaction/Book.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/transaction/FlushAndTransactionTest.java
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Address.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Address.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Address.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.xml;
/**
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Address.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Article.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Article.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Article.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.xml;
import javax.persistence.Column;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Article.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/CounterListener.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/CounterListener.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/CounterListener.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.xml;
import javax.persistence.PrePersist;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/CounterListener.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Employee.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Employee.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Employee.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.xml;
import javax.persistence.Entity;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Employee.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Light.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Light.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Light.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.xml;
/**
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Light.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Lighter.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Lighter.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Lighter.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.xml;
/**
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/Lighter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/XmlAttributeOverrideTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/XmlAttributeOverrideTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/XmlAttributeOverrideTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.xml;
import javax.persistence.EntityManager;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/XmlAttributeOverrideTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/XmlTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/XmlTest.java 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/XmlTest.java 2008-11-03 14:25:59 UTC (rev 15483)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package org.hibernate.ejb.test.xml;
import javax.persistence.EntityManager;
Property changes on: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/xml/XmlTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: core/trunk/entitymanager/src/test/resources/hibernate.properties
===================================================================
--- core/trunk/entitymanager/src/test/resources/hibernate.properties 2008-11-03 12:55:04 UTC (rev 15482)
+++ core/trunk/entitymanager/src/test/resources/hibernate.properties 2008-11-03 14:25:59 UTC (rev 15483)
@@ -33,6 +33,8 @@
hibernate.show_sql true
hibernate.format_sql true
+hibernate.hbm2ddl.auto create-drop
+
hibernate.max_fetch_depth 5
hibernate.cache.region_prefix hibernate.test
16 years, 2 months
Hibernate SVN: r15482 - in core/trunk/entitymanager: src/main/docbook/en and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2008-11-03 07:55:04 -0500 (Mon, 03 Nov 2008)
New Revision: 15482
Added:
core/trunk/entitymanager/build.xml
Removed:
core/trunk/entitymanager/doc/
core/trunk/entitymanager/src/main/docbook/en/styles/
Modified:
core/trunk/entitymanager/pom.xml
core/trunk/entitymanager/src/main/docbook/en/master.xml
core/trunk/entitymanager/src/main/docbook/en/modules/architecture.xml
core/trunk/entitymanager/src/main/docbook/en/modules/batch.xml
core/trunk/entitymanager/src/main/docbook/en/modules/configuration.xml
core/trunk/entitymanager/src/main/docbook/en/modules/entitymanagerapi.xml
core/trunk/entitymanager/src/main/docbook/en/modules/listeners.xml
core/trunk/entitymanager/src/main/docbook/en/modules/query_ejbql.xml
core/trunk/entitymanager/src/main/docbook/en/modules/query_native.xml
core/trunk/entitymanager/src/main/docbook/en/modules/transactions.xml
Log:
HHH-3580 removed some more obsolete resources and started to fix the failing tests; later we might move build.xml into the pom
Added: core/trunk/entitymanager/build.xml
===================================================================
--- core/trunk/entitymanager/build.xml (rev 0)
+++ core/trunk/entitymanager/build.xml 2008-11-03 12:55:04 UTC (rev 15482)
@@ -0,0 +1,100 @@
+<!-- $Id: build.xml 15105 2008-08-18 19:20:37Z hardy.ferentschik $ -->
+<!--
+ Hibernate Entity Manager ANT build script.
+-->
+
+<project name="HibernateEntityManager" basedir=".">
+
+ <target name="packjar">
+ <property name="extension" value="jar"/>
+ <property name="packagename" value="${jarname}"/>
+ <property name="headerdirectory" value="."/>
+ <mkdir dir="${package.dir}"/>
+ <mkdir dir="${package.tmp.dir}/${headerdirectory}"/>
+ <copy todir="${package.tmp.dir}/${headerdirectory}">
+ <fileset dir="${classes.dir}">
+ <include name="**/test/pack/${packagename}/**.*"/>
+ </fileset>
+ </copy>
+ <jar destfile="${package.dir}/${jarname}.${extension}">
+ <fileset dir="${package.tmp.dir}">
+ <include name="**/*.*"/>
+ </fileset>
+ <fileset dir="${testresources.dir}/${jarname}">
+ <include name="**/*.*"/>
+ </fileset>
+ </jar>
+ <delete dir="${package.tmp.dir}"/>
+ </target>
+
+ <target name="packexploded">
+ <property name="extension" value="jar"/>
+ <!-- property name="jarname"/ -->
+ <mkdir dir="${package.dir}/${jarname}.${extension}"/>
+ <copy todir="${package.dir}/${jarname}.${extension}">
+ <fileset dir="${classes.dir}">
+ <include name="**/test/pack/${jarname}/**.*"/>
+ </fileset>
+ <fileset dir="${testresources.dir}/${jarname}">
+ <include name="**/*.*"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="package" description="Prepare all needed jars and pars">
+ <antcall target="packjar" inheritall="true">
+ <param name="extension" value="par"/>
+ <param name="jarname" value="defaultpar"/>
+ </antcall>
+ <antcall target="packjar" inheritall="true">
+ <param name="extension" value="par"/>
+ <param name="jarname" value="space par"/>
+ <param name="packagename" value="spacepar"/>
+ </antcall>
+ <antcall target="packjar" inheritall="true">
+ <param name="extension" value="par"/>
+ <param name="jarname" value="explicitpar"/>
+ </antcall>
+ <antcall target="packjar" inheritall="true">
+ <param name="extension" value="par"/>
+ <param name="jarname" value="excludehbmpar"/>
+ </antcall>
+ <antcall target="packjar" inheritall="true">
+ <param name="extension" value="jar"/>
+ <param name="jarname" value="externaljar"/>
+ </antcall>
+ <antcall target="packjar" inheritall="true">
+ <param name="extension" value="par"/>
+ <param name="jarname" value="cfgxmlpar"/>
+ </antcall>
+ <antcall target="packjar" inheritall="true">
+ <param name="extension" value="jar"/>
+ <param name="jarname" value="overridenpar"/>
+ </antcall>
+
+ <!-- nested jar -->
+ <!--
+ <jar destfile="${package.dir}/nestedjar.ear">
+ <fileset dir="${package.dir}">
+ <include name="defaultpar.par"/>
+ </fileset>
+ </jar>
+ <copy todir="${package.dir}/nesteddir.ear">
+ <fileset dir="${package.dir}">
+ <include name="defaultpar.par"/>
+ </fileset>
+ </copy>
+
+ <antcall target="packjar" inheritall="true">
+ <param name="extension" value="war"/>
+ <param name="jarname" value="war"/>
+ <param name="headerdirectory" value="WEB-INF/classes"/>
+ </antcall>
+
+ <antcall target="packexploded" inheritall="true">
+ <param name="extension" value="par"/>
+ <param name="jarname" value="explodedpar"/>
+ </antcall>
+ -->
+ </target>
+</project>
Modified: core/trunk/entitymanager/pom.xml
===================================================================
--- core/trunk/entitymanager/pom.xml 2008-11-03 11:24:30 UTC (rev 15481)
+++ core/trunk/entitymanager/pom.xml 2008-11-03 12:55:04 UTC (rev 15482)
@@ -104,10 +104,36 @@
<testResource>
<filtering>true</filtering>
<directory>src/test/resources</directory>
+ <includes>
+ <include>*.properties</include>
+ </includes>
</testResource>
</testResources>
<plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>package-tests</id>
+ <phase>process-test-classes</phase>
+ <configuration>
+ <tasks>
+ <property name="package.dir" value="${basedir}/target/test-packages"/>
+ <property name="package.tmp.dir" value="${basedir}/target/tmp"/>
+ <property name="classes.dir" value="${project.build.directory}/test-classes"/>
+ <property name="testresources.dir" value="${basedir}/src/test/resources"/>
+ <ant antfile="${basedir}/build.xml">
+ <target name="package"/>
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
@@ -128,10 +154,24 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <additionalClasspathElements>
+ <additionalClasspathElement>${basedir}/target/test-packages/excludehbmpar.par</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/target/test-packages/defaultpar.par</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/target/test-packages/cfgxmlpar.par</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/target/test-packages/explicitpar.par</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/target/test-packages/externaljar.jar</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/target/test-packages/overridenpar.jar</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/target/test-packages/space par.par</additionalClasspathElement>
+ </additionalClasspathElements>
+ </configuration>
+ </plugin>
</plugins>
</build>
-
<profiles>
<profile>
<id>doc</id>
Modified: core/trunk/entitymanager/src/main/docbook/en/master.xml
===================================================================
--- core/trunk/entitymanager/src/main/docbook/en/master.xml 2008-11-03 11:24:30 UTC (rev 15481)
+++ core/trunk/entitymanager/src/main/docbook/en/master.xml 2008-11-03 12:55:04 UTC (rev 15482)
@@ -1,14 +1,31 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"../support/docbook-dtd/docbookx.dtd" [
-<!ENTITY architecture SYSTEM "modules/architecture.xml">
-<!ENTITY configuration SYSTEM "modules/configuration.xml">
-<!ENTITY entitymanagerapi SYSTEM "modules/entitymanagerapi.xml">
-<!ENTITY transactions SYSTEM "modules/transactions.xml">
-<!ENTITY listeners SYSTEM "modules/listeners.xml">
-<!ENTITY batch SYSTEM "modules/batch.xml">
-<!ENTITY query-ejbql SYSTEM "modules/query_ejbql.xml">
-<!ENTITY native SYSTEM "modules/query_native.xml">
+<?xml version='1.0' encoding="UTF-8"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY versionNumber "3.4.0.GA">
+ <!ENTITY copyrightYear "2004">
+ <!ENTITY copyrightHolder "Red Hat Middleware, LLC.">
]>
<book lang="en">
<bookinfo>
@@ -16,7 +33,7 @@
<subtitle>User guide</subtitle>
- <releaseinfo>3.4.0.GA</releaseinfo>
+ <releaseinfo>&versionNumber;</releaseinfo>
<mediaobject>
<imageobject>
@@ -25,7 +42,7 @@
</mediaobject>
</bookinfo>
- <toc></toc>
+ <toc/>
<preface>
<title>Introducing EJB3 Persistence</title>
@@ -45,19 +62,13 @@
if required, even to native JDBC and SQL.</para>
</preface>
- &architecture;
+ <xi:include href="modules/architecture.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/entitymanagerapi.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/transactions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/listeners.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/batch.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/query_ejbql.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/query_native.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- &configuration;
-
- &entitymanagerapi;
-
- &transactions;
-
- &listeners;
-
- &batch;
-
- &query-ejbql;
-
- &native;
</book>
\ No newline at end of file
Modified: core/trunk/entitymanager/src/main/docbook/en/modules/architecture.xml
===================================================================
--- core/trunk/entitymanager/src/main/docbook/en/modules/architecture.xml 2008-11-03 11:24:30 UTC (rev 15481)
+++ core/trunk/entitymanager/src/main/docbook/en/modules/architecture.xml 2008-11-03 12:55:04 UTC (rev 15482)
@@ -1,4 +1,29 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version='1.0' encoding="UTF-8"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="architecture">
<title>Architecture</title>
Modified: core/trunk/entitymanager/src/main/docbook/en/modules/batch.xml
===================================================================
--- core/trunk/entitymanager/src/main/docbook/en/modules/batch.xml 2008-11-03 11:24:30 UTC (rev 15481)
+++ core/trunk/entitymanager/src/main/docbook/en/modules/batch.xml 2008-11-03 12:55:04 UTC (rev 15482)
@@ -1,4 +1,29 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version='1.0' encoding="UTF-8"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="batch">
<title>Batch processing</title>
Modified: core/trunk/entitymanager/src/main/docbook/en/modules/configuration.xml
===================================================================
--- core/trunk/entitymanager/src/main/docbook/en/modules/configuration.xml 2008-11-03 11:24:30 UTC (rev 15481)
+++ core/trunk/entitymanager/src/main/docbook/en/modules/configuration.xml 2008-11-03 12:55:04 UTC (rev 15482)
@@ -1,4 +1,29 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version='1.0' encoding="UTF-8"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="configuration">
<title id="setup">Setup and configuration</title>
Modified: core/trunk/entitymanager/src/main/docbook/en/modules/entitymanagerapi.xml
===================================================================
--- core/trunk/entitymanager/src/main/docbook/en/modules/entitymanagerapi.xml 2008-11-03 11:24:30 UTC (rev 15481)
+++ core/trunk/entitymanager/src/main/docbook/en/modules/entitymanagerapi.xml 2008-11-03 12:55:04 UTC (rev 15482)
@@ -1,4 +1,29 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version='1.0' encoding="UTF-8"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="objectstate">
<title>Working with objects</title>
Modified: core/trunk/entitymanager/src/main/docbook/en/modules/listeners.xml
===================================================================
--- core/trunk/entitymanager/src/main/docbook/en/modules/listeners.xml 2008-11-03 11:24:30 UTC (rev 15481)
+++ core/trunk/entitymanager/src/main/docbook/en/modules/listeners.xml 2008-11-03 12:55:04 UTC (rev 15482)
@@ -1,4 +1,29 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version='1.0' encoding="UTF-8"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="listeners">
<title>Entity listeners and Callback methods</title>
Modified: core/trunk/entitymanager/src/main/docbook/en/modules/query_ejbql.xml
===================================================================
--- core/trunk/entitymanager/src/main/docbook/en/modules/query_ejbql.xml 2008-11-03 11:24:30 UTC (rev 15481)
+++ core/trunk/entitymanager/src/main/docbook/en/modules/query_ejbql.xml 2008-11-03 12:55:04 UTC (rev 15482)
@@ -1,4 +1,29 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version='1.0' encoding="UTF-8"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="queryhql">
<title>EJB-QL: The Object Query Language</title>
Modified: core/trunk/entitymanager/src/main/docbook/en/modules/query_native.xml
===================================================================
--- core/trunk/entitymanager/src/main/docbook/en/modules/query_native.xml 2008-11-03 11:24:30 UTC (rev 15481)
+++ core/trunk/entitymanager/src/main/docbook/en/modules/query_native.xml 2008-11-03 12:55:04 UTC (rev 15482)
@@ -1,4 +1,29 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version='1.0' encoding="UTF-8"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="query_native">
<title>Native query</title>
Modified: core/trunk/entitymanager/src/main/docbook/en/modules/transactions.xml
===================================================================
--- core/trunk/entitymanager/src/main/docbook/en/modules/transactions.xml 2008-11-03 11:24:30 UTC (rev 15481)
+++ core/trunk/entitymanager/src/main/docbook/en/modules/transactions.xml 2008-11-03 12:55:04 UTC (rev 15482)
@@ -1,4 +1,29 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version='1.0' encoding="UTF-8"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="transactions" revision="1">
<title>Transactions and Concurrency</title>
16 years, 2 months
Hibernate SVN: r15481 - in core/trunk/envers/src: main/java/org/hibernate/envers/configuration/metadata and 17 other directories.
by hibernate-commits@lists.jboss.org
Author: adamw
Date: 2008-11-03 06:24:30 -0500 (Mon, 03 Nov 2008)
New Revision: 15481
Added:
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PersistentClassAuditingData.java
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PersistentPropertyAuditingData.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/PropertyData.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/FieldAccessType.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/FieldAccessTypeEntity.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/MixedAccessType.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/MixedAccessTypeEntity.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/PropertyAccessType.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/PropertyAccessTypeEntity.java
Removed:
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PersistentClassVersioningData.java
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PropertyStoreInfo.java
Modified:
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/AuditConfiguration.java
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/EntitiesConfigurator.java
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/RevisionInfoConfiguration.java
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/AnnotationsMetadataReader.java
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/AuditMetadataGenerator.java
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/BasicMetadataGenerator.java
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/CollectionMetadataGenerator.java
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/IdMetadataGenerator.java
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/ToOneRelationMetadataGenerator.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/EntityInstantiator.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/CompositeMapperBuilder.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/MapPropertyMapper.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/MultiPropertyMapper.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/SimpleMapperBuilder.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/SinglePropertyMapper.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/SubclassPropertyMapper.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/AbstractCompositeIdMapper.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/EmbeddedIdMapper.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/MultipleIdMapper.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/SingleIdMapper.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/AbstractCollectionMapper.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/CommonCollectionMapperData.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/OneToOneNotOwningMapper.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/ToOneIdMapper.java
core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/component/MiddleMapKeyPropertyComponentMapper.java
core/trunk/envers/src/main/java/org/hibernate/envers/query/RevisionProperty.java
core/trunk/envers/src/main/java/org/hibernate/envers/query/RevisionTypeProperty.java
core/trunk/envers/src/main/java/org/hibernate/envers/query/criteria/IdentifierEqVersionsExpression.java
core/trunk/envers/src/main/java/org/hibernate/envers/query/criteria/RevisionVersionsExpression.java
core/trunk/envers/src/main/java/org/hibernate/envers/query/impl/AbstractVersionsQuery.java
core/trunk/envers/src/main/java/org/hibernate/envers/query/impl/EntitiesAtRevisionQuery.java
core/trunk/envers/src/main/java/org/hibernate/envers/query/impl/RevisionsOfEntityQuery.java
core/trunk/envers/src/main/java/org/hibernate/envers/query/order/RevisionVersionsOrder.java
core/trunk/envers/src/main/java/org/hibernate/envers/query/projection/RevisionVersionsProjection.java
core/trunk/envers/src/main/java/org/hibernate/envers/revisioninfo/DefaultRevisionInfoGenerator.java
core/trunk/envers/src/main/java/org/hibernate/envers/revisioninfo/RevisionInfoNumberReader.java
core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/AbstractAuditWorkUnit.java
core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/AddWorkUnit.java
core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/CollectionChangeWorkUnit.java
core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/DelWorkUnit.java
core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/ModWorkUnit.java
core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/PersistentCollectionChangeWorkUnit.java
core/trunk/envers/src/main/java/org/hibernate/envers/tools/Tools.java
core/trunk/envers/src/main/java/org/hibernate/envers/tools/reflection/ReflectionTools.java
core/trunk/envers/src/test/resources/hibernate.test.cfg.xml
core/trunk/envers/src/test/resources/testng.xml
Log:
HHH-3565: adding support for field and property access types; changed the way properties are read. Now, instead of a sole property name, a special "PropertyData" object is passed around which encapsulates the property name and access type information.
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/AuditConfiguration.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/AuditConfiguration.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/AuditConfiguration.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -41,18 +41,18 @@
*/
public class AuditConfiguration {
private final GlobalConfiguration globalCfg;
- private final AuditEntitiesConfiguration verEntCfg;
- private final AuditSyncManager versionsSyncManager;
+ private final AuditEntitiesConfiguration auditEntCfg;
+ private final AuditSyncManager auditSyncManager;
private final EntitiesConfigurations entCfg;
private final RevisionInfoQueryCreator revisionInfoQueryCreator;
private final RevisionInfoNumberReader revisionInfoNumberReader;
- public AuditEntitiesConfiguration getVerEntCfg() {
- return verEntCfg;
+ public AuditEntitiesConfiguration getAuditEntCfg() {
+ return auditEntCfg;
}
public AuditSyncManager getSyncManager() {
- return versionsSyncManager;
+ return auditSyncManager;
}
public GlobalConfiguration getGlobalCfg() {
@@ -78,12 +78,12 @@
ReflectionManager reflectionManager = ((AnnotationConfiguration) cfg).getReflectionManager();
RevisionInfoConfiguration revInfoCfg = new RevisionInfoConfiguration();
RevisionInfoConfigurationResult revInfoCfgResult = revInfoCfg.configure(cfg, reflectionManager);
- verEntCfg = new AuditEntitiesConfiguration(properties, revInfoCfgResult.getRevisionInfoEntityName());
+ auditEntCfg = new AuditEntitiesConfiguration(properties, revInfoCfgResult.getRevisionInfoEntityName());
globalCfg = new GlobalConfiguration(properties);
- versionsSyncManager = new AuditSyncManager(revInfoCfgResult.getRevisionInfoGenerator());
+ auditSyncManager = new AuditSyncManager(revInfoCfgResult.getRevisionInfoGenerator());
revisionInfoQueryCreator = revInfoCfgResult.getRevisionInfoQueryCreator();
revisionInfoNumberReader = revInfoCfgResult.getRevisionInfoNumberReader();
- entCfg = new EntitiesConfigurator().configure(cfg, reflectionManager, globalCfg, verEntCfg,
+ entCfg = new EntitiesConfigurator().configure(cfg, reflectionManager, globalCfg, auditEntCfg,
revInfoCfgResult.getRevisionInfoXmlMapping(), revInfoCfgResult.getRevisionInfoRelationMapping());
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/EntitiesConfigurator.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/EntitiesConfigurator.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/EntitiesConfigurator.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -39,7 +39,7 @@
import org.dom4j.io.XMLWriter;
import org.hibernate.envers.configuration.metadata.AnnotationsMetadataReader;
import org.hibernate.envers.configuration.metadata.EntityXmlMappingData;
-import org.hibernate.envers.configuration.metadata.PersistentClassVersioningData;
+import org.hibernate.envers.configuration.metadata.PersistentClassAuditingData;
import org.hibernate.envers.configuration.metadata.AuditMetadataGenerator;
import org.hibernate.envers.entities.EntitiesConfigurations;
import org.hibernate.envers.tools.StringTools;
@@ -64,8 +64,8 @@
// Sorting the persistent class topologically - superclass always before subclass
Iterator<PersistentClass> classes = GraphTopologicalSort.sort(new PersistentClassGraphDefiner(cfg)).iterator();
- Map<PersistentClass, PersistentClassVersioningData> pcDatas =
- new HashMap<PersistentClass, PersistentClassVersioningData>();
+ Map<PersistentClass, PersistentClassAuditingData> pcDatas =
+ new HashMap<PersistentClass, PersistentClassAuditingData>();
Map<PersistentClass, EntityXmlMappingData> xmlMappings = new HashMap<PersistentClass, EntityXmlMappingData>();
// First pass
@@ -74,23 +74,23 @@
// Collecting information from annotations on the persistent class pc
AnnotationsMetadataReader annotationsMetadataReader =
new AnnotationsMetadataReader(globalCfg, reflectionManager, pc);
- PersistentClassVersioningData versioningData = annotationsMetadataReader.getVersioningData();
+ PersistentClassAuditingData auditData = annotationsMetadataReader.getAuditData();
- if (versioningData.isVersioned()) {
- pcDatas.put(pc, versioningData);
+ if (auditData.isAudited()) {
+ pcDatas.put(pc, auditData);
- if (!StringTools.isEmpty(versioningData.versionsTable.value())) {
- verEntCfg.addCustomVersionsTableName(pc.getEntityName(), versioningData.versionsTable.value());
+ if (!StringTools.isEmpty(auditData.getAuditTable().value())) {
+ verEntCfg.addCustomVersionsTableName(pc.getEntityName(), auditData.getAuditTable().value());
}
EntityXmlMappingData xmlMappingData = new EntityXmlMappingData();
- versionsMetaGen.generateFirstPass(pc, versioningData, xmlMappingData);
+ versionsMetaGen.generateFirstPass(pc, auditData, xmlMappingData);
xmlMappings.put(pc, xmlMappingData);
}
}
// Second pass
- for (Map.Entry<PersistentClass, PersistentClassVersioningData> pcDatasEntry : pcDatas.entrySet()) {
+ for (Map.Entry<PersistentClass, PersistentClassAuditingData> pcDatasEntry : pcDatas.entrySet()) {
EntityXmlMappingData xmlMappingData = xmlMappings.get(pcDatasEntry.getKey());
versionsMetaGen.generateSecondPass(pcDatasEntry.getKey(), pcDatasEntry.getValue(), xmlMappingData);
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/RevisionInfoConfiguration.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/RevisionInfoConfiguration.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/RevisionInfoConfiguration.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -30,6 +30,7 @@
import org.dom4j.Element;
import org.hibernate.envers.Audited;
import org.hibernate.envers.*;
+import org.hibernate.envers.entities.PropertyData;
import org.hibernate.envers.configuration.metadata.MetadataTools;
import org.hibernate.envers.revisioninfo.DefaultRevisionInfoGenerator;
import org.hibernate.envers.revisioninfo.RevisionInfoGenerator;
@@ -49,16 +50,16 @@
*/
public class RevisionInfoConfiguration {
private String revisionInfoEntityName;
- private String revisionInfoIdName;
- private String revisionInfoTimestampName;
+ private PropertyData revisionInfoIdData;
+ private PropertyData revisionInfoTimestampData;
private String revisionInfoTimestampType;
private String revisionPropType;
public RevisionInfoConfiguration() {
revisionInfoEntityName = "org.hibernate.envers.DefaultRevisionEntity";
- revisionInfoIdName = "id";
- revisionInfoTimestampName = "timestamp";
+ revisionInfoIdData = new PropertyData("id", "field", null);
+ revisionInfoTimestampData = new PropertyData("timestamp", "field", null);
revisionInfoTimestampType = "long";
revisionPropType = "integer";
@@ -72,11 +73,11 @@
class_mapping.addAttribute("name", revisionInfoEntityName);
class_mapping.addAttribute("table", "_revisions_info");
- Element idProperty = MetadataTools.addNativelyGeneratedId(class_mapping, revisionInfoIdName,
+ Element idProperty = MetadataTools.addNativelyGeneratedId(class_mapping, revisionInfoIdData.getName(),
revisionPropType);
MetadataTools.addColumn(idProperty, "revision_id", null);
- Element timestampProperty = MetadataTools.addProperty(class_mapping, revisionInfoTimestampName,
+ Element timestampProperty = MetadataTools.addProperty(class_mapping, revisionInfoTimestampData.getName(),
revisionInfoTimestampType, true, false);
MetadataTools.addColumn(timestampProperty, "revision_timestamp", null);
@@ -107,11 +108,11 @@
XClass revisionNumberClass = property.getType();
if (reflectionManager.equals(revisionNumberClass, Integer.class) ||
reflectionManager.equals(revisionNumberClass, Integer.TYPE)) {
- revisionInfoIdName = property.getName();
+ revisionInfoIdData = new PropertyData(property.getName(), accessType, null);
revisionNumberFound.set();
} else if (reflectionManager.equals(revisionNumberClass, Long.class) ||
reflectionManager.equals(revisionNumberClass, Long.TYPE)) {
- revisionInfoIdName = property.getName();
+ revisionInfoIdData = new PropertyData(property.getName(), accessType, null);
revisionNumberFound.set();
// The default is integer
@@ -130,7 +131,7 @@
XClass revisionTimestampClass = property.getType();
if (reflectionManager.equals(revisionTimestampClass, Long.class) ||
reflectionManager.equals(revisionTimestampClass, Long.TYPE)) {
- revisionInfoTimestampName = property.getName();
+ revisionInfoTimestampData = new PropertyData(property.getName(), accessType, null);
revisionTimestampFound.set();
} else {
throw new MappingException("The field annotated with @RevisionTimestamp must be of type " +
@@ -178,7 +179,7 @@
// Checking if custom revision entity isn't versioned
if (clazz.getAnnotation(Audited.class) != null) {
- throw new MappingException("An entity annotated with @RevisionEntity cannot be versioned!");
+ throw new MappingException("An entity annotated with @RevisionEntity cannot be audited!");
}
revisionEntityFound = true;
@@ -202,7 +203,7 @@
revisionInfoClass = pc.getMappedClass();
revisionInfoGenerator = new DefaultRevisionInfoGenerator(revisionInfoEntityName, revisionInfoClass,
- revisionEntity.value(), revisionInfoTimestampName);
+ revisionEntity.value(), revisionInfoTimestampData);
}
}
@@ -212,15 +213,16 @@
if (revisionInfoGenerator == null) {
revisionInfoClass = DefaultRevisionEntity.class;
revisionInfoGenerator = new DefaultRevisionInfoGenerator(revisionInfoEntityName, revisionInfoClass,
- RevisionListener.class, revisionInfoTimestampName);
+ RevisionListener.class, revisionInfoTimestampData);
revisionInfoXmlMapping = generateDefaultRevisionInfoXmlMapping();
}
return new RevisionInfoConfigurationResult(
revisionInfoGenerator, revisionInfoXmlMapping,
- new RevisionInfoQueryCreator(revisionInfoEntityName, revisionInfoIdName, revisionInfoTimestampName),
+ new RevisionInfoQueryCreator(revisionInfoEntityName, revisionInfoIdData.getName(),
+ revisionInfoTimestampData.getName()),
generateRevisionInfoRelationMapping(),
- new RevisionInfoNumberReader(revisionInfoClass, revisionInfoIdName), revisionInfoEntityName);
+ new RevisionInfoNumberReader(revisionInfoClass, revisionInfoIdData), revisionInfoEntityName);
}
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/AnnotationsMetadataReader.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/AnnotationsMetadataReader.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/AnnotationsMetadataReader.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -24,11 +24,15 @@
package org.hibernate.envers.configuration.metadata;
import java.lang.annotation.Annotation;
+import java.util.Set;
+import java.util.Iterator;
import javax.persistence.MapKey;
import javax.persistence.Version;
+import javax.persistence.JoinColumn;
import org.hibernate.envers.SecondaryAuditTable;
import org.hibernate.envers.*;
+import org.hibernate.envers.tools.Tools;
import org.hibernate.envers.configuration.GlobalConfiguration;
import org.hibernate.MappingException;
@@ -36,6 +40,7 @@
import org.hibernate.annotations.common.reflection.XClass;
import org.hibernate.annotations.common.reflection.XProperty;
import org.hibernate.mapping.PersistentClass;
+import org.hibernate.mapping.Property;
/**
* A helper class to read versioning meta-data from annotations on a persistent class.
@@ -51,62 +56,105 @@
* This object is filled with information read from annotations and returned by the <code>getVersioningData</code>
* method.
*/
- private final PersistentClassVersioningData versioningData;
+ private final PersistentClassAuditingData auditData;
+ /**
+ * Not null if the whole class is annotated with @Audited; the variable then holds the value of this
+ * annotation's "modStore" parameter.
+ */
+ private ModificationStore defaultStore;
+
+ private Set<String> propertyPersistentProperties;
+ private Set<String> fieldPersistentProperties;
+
public AnnotationsMetadataReader(GlobalConfiguration globalCfg, ReflectionManager reflectionManager,
PersistentClass pc) {
this.globalCfg = globalCfg;
this.reflectionManager = reflectionManager;
this.pc = pc;
- versioningData = new PersistentClassVersioningData();
- }
+ auditData = new PersistentClassAuditingData();
- private void addPropertyVersioned(XProperty property) {
- Audited ver = property.getAnnotation(Audited.class);
- if (ver != null) {
- versioningData.propertyStoreInfo.propertyStores.put(property.getName(), ver.modStore());
- }
+ propertyPersistentProperties = Tools.newHashSet();
+ fieldPersistentProperties = Tools.newHashSet();
}
- private void addPropertyMapKey(XProperty property) {
- MapKey mapKey = property.getAnnotation(MapKey.class);
- if (mapKey != null) {
- versioningData.mapKeys.put(property.getName(), mapKey.name());
+ /**
+ * Checks if a property is audited and if yes, sets its modification store on the supplied property data.
+ * @param property Property to check.
+ * @param propertyData Property data, on which to set this property's modification store.
+ * @param persistentProperties Persistent properties with the access type of the given property.
+ * @return True, iff this property is audited.
+ */
+ private boolean ifPropertyAuditedAddStore(XProperty property, PersistentPropertyAuditingData propertyData,
+ Set<String> persistentProperties) {
+ // If this is not a persistent property, with the same access type as currently checked,
+ // it's not audited as well.
+ if (!persistentProperties.contains(property.getName())) {
+ return false;
}
- }
- private void addPropertyUnversioned(XProperty property) {
- // check if a property is declared as unversioned to exclude it
- // useful if a class is versioned but some properties should be excluded
+ // check if a property is declared as not audited to exclude it
+ // useful if a class is audited but some properties should be excluded
NotAudited unVer = property.getAnnotation(NotAudited.class);
if (unVer != null) {
- versioningData.unversionedProperties.add(property.getName());
+ return false;
} else {
// if the optimistic locking field has to be unversioned and the current property
- // is the optimistic locking field, add it to the unversioned properties list
+ // is the optimistic locking field, don't audit it
if (globalCfg.isUnversionedOptimisticLockingField()) {
Version jpaVer = property.getAnnotation(Version.class);
if (jpaVer != null) {
- versioningData.unversionedProperties.add(property.getName());
+ return false;
}
}
}
+
+ // Checking if this property is explicitly audited or if all properties are.
+ Audited ver = property.getAnnotation(Audited.class);
+ if (ver != null) {
+ propertyData.setStore(ver.modStore());
+ return true;
+ } else {
+ if (defaultStore != null) {
+ propertyData.setStore(defaultStore);
+ return true;
+ } else {
+ return false;
+ }
+ }
}
- private void addPropertyJoinTables(XProperty property) {
+ private void addPropertyMapKey(XProperty property, PersistentPropertyAuditingData propertyData) {
+ MapKey mapKey = property.getAnnotation(MapKey.class);
+ if (mapKey != null) {
+ propertyData.setMapKey(mapKey.name());
+ }
+ }
+
+ private void addPropertyJoinTables(XProperty property, PersistentPropertyAuditingData propertyData) {
AuditJoinTable joinTable = property.getAnnotation(AuditJoinTable.class);
if (joinTable != null) {
- versioningData.versionsJoinTables.put(property.getName(), joinTable);
+ propertyData.setJoinTable(joinTable);
+ } else {
+ propertyData.setJoinTable(getDefaultAuditJoinTable());
}
}
- private void addFromProperties(Iterable<XProperty> properties) {
+ private void addFromProperties(Iterable<XProperty> properties, String accessType, Set<String> persistenProperties) {
for (XProperty property : properties) {
- addPropertyVersioned(property);
- addPropertyUnversioned(property);
- addPropertyJoinTables(property);
- addPropertyMapKey(property);
+ PersistentPropertyAuditingData propertyData = new PersistentPropertyAuditingData();
+
+ if (ifPropertyAuditedAddStore(property, propertyData, persistenProperties)) {
+ // Now we know that the property is audited
+ auditData.getProperties().put(property.getName(), propertyData);
+
+ propertyData.setName(property.getName());
+ propertyData.setAccessType(accessType);
+
+ addPropertyJoinTables(property, propertyData);
+ addPropertyMapKey(property, propertyData);
+ }
}
}
@@ -116,24 +164,36 @@
addPropertiesFromClass(superclazz);
}
- addFromProperties(clazz.getDeclaredProperties("field"));
- addFromProperties(clazz.getDeclaredProperties("property"));
+ addFromProperties(clazz.getDeclaredProperties("field"), "field", fieldPersistentProperties);
+ addFromProperties(clazz.getDeclaredProperties("property"), "property", propertyPersistentProperties);
}
- private void addDefaultVersioned(XClass clazz) {
- Audited defaultVersioned = clazz.getAnnotation(Audited.class);
+ private void readDefaultAudited(XClass clazz) {
+ Audited defaultAudited = clazz.getAnnotation(Audited.class);
- if (defaultVersioned != null) {
- versioningData.propertyStoreInfo.defaultStore = defaultVersioned.modStore();
+ if (defaultAudited != null) {
+ defaultStore = defaultAudited.modStore();
}
}
+ private void readPersistentProperties() {
+ Iterator propertyIter = pc.getPropertyIterator();
+ while (propertyIter.hasNext()) {
+ Property property = (Property) propertyIter.next();
+ if ("field".equals(property.getPropertyAccessorName())) {
+ fieldPersistentProperties.add(property.getName());
+ } else {
+ propertyPersistentProperties.add(property.getName());
+ }
+ }
+ }
+
private void addVersionsTable(XClass clazz) {
- AuditTable versionsTable = clazz.getAnnotation(AuditTable.class);
- if (versionsTable != null) {
- versioningData.versionsTable = versionsTable;
+ AuditTable auditTable = clazz.getAnnotation(AuditTable.class);
+ if (auditTable != null) {
+ auditData.setAuditTable(auditTable);
} else {
- versioningData.versionsTable = getDefaultVersionsTable();
+ auditData.setAuditTable(getDefaultAuditTable());
}
}
@@ -141,28 +201,30 @@
// Getting information on secondary tables
SecondaryAuditTable secondaryVersionsTable1 = clazz.getAnnotation(SecondaryAuditTable.class);
if (secondaryVersionsTable1 != null) {
- versioningData.secondaryTableDictionary.put(secondaryVersionsTable1.secondaryTableName(),
+ auditData.getSecondaryTableDictionary().put(secondaryVersionsTable1.secondaryTableName(),
secondaryVersionsTable1.secondaryVersionsTableName());
}
SecondaryAuditTables secondaryVersionsTables = clazz.getAnnotation(SecondaryAuditTables.class);
if (secondaryVersionsTables != null) {
for (SecondaryAuditTable secondaryVersionsTable2 : secondaryVersionsTables.value()) {
- versioningData.secondaryTableDictionary.put(secondaryVersionsTable2.secondaryTableName(),
+ auditData.getSecondaryTableDictionary().put(secondaryVersionsTable2.secondaryTableName(),
secondaryVersionsTable2.secondaryVersionsTableName());
}
}
}
- public PersistentClassVersioningData getVersioningData() {
+ public PersistentClassAuditingData getAuditData() {
if (pc.getClassName() == null) {
- return versioningData;
+ return auditData;
}
+ readPersistentProperties();
+
try {
XClass clazz = reflectionManager.classForName(pc.getClassName(), this.getClass());
- addDefaultVersioned(clazz);
+ readDefaultAudited(clazz);
addPropertiesFromClass(clazz);
addVersionsTable(clazz);
addVersionsSecondaryTables(clazz);
@@ -170,15 +232,35 @@
throw new MappingException(e);
}
- return versioningData;
+ return auditData;
}
- private AuditTable getDefaultVersionsTable() {
- return new AuditTable() {
- public String value() { return ""; }
- public String schema() { return ""; }
- public String catalog() { return ""; }
- public Class<? extends Annotation> annotationType() { return this.getClass(); }
- };
+ private AuditTable defaultAuditTable;
+ private AuditTable getDefaultAuditTable() {
+ if (defaultAuditTable == null) {
+ defaultAuditTable = new AuditTable() {
+ public String value() { return ""; }
+ public String schema() { return ""; }
+ public String catalog() { return ""; }
+ public Class<? extends Annotation> annotationType() { return this.getClass(); }
+ };
+ }
+
+ return defaultAuditTable;
}
+
+ private AuditJoinTable defaultAuditJoinTable;
+ private AuditJoinTable getDefaultAuditJoinTable() {
+ if (defaultAuditJoinTable == null) {
+ defaultAuditJoinTable = new AuditJoinTable() {
+ public String name() { return ""; }
+ public String schema() { return ""; }
+ public String catalog() { return ""; }
+ public JoinColumn[] inverseJoinColumns() { return new JoinColumn[0]; }
+ public Class<? extends Annotation> annotationType() { return this.getClass(); }
+ };
+ }
+
+ return defaultAuditJoinTable;
+ }
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/AuditMetadataGenerator.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/AuditMetadataGenerator.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/AuditMetadataGenerator.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -25,12 +25,9 @@
import java.util.HashMap;
import java.util.Iterator;
-import java.util.List;
import java.util.Map;
import org.dom4j.Element;
-import org.hibernate.envers.ModificationStore;
-import org.hibernate.envers.AuditJoinTable;
import org.hibernate.envers.configuration.GlobalConfiguration;
import org.hibernate.envers.configuration.AuditEntitiesConfiguration;
import org.hibernate.envers.entities.EntityConfiguration;
@@ -77,8 +74,8 @@
private Logger log = LoggerFactory.getLogger(AuditMetadataGenerator.class);
public AuditMetadataGenerator(Configuration cfg, GlobalConfiguration globalCfg,
- AuditEntitiesConfiguration verEntCfg,
- Element revisionInfoRelationMapping) {
+ AuditEntitiesConfiguration verEntCfg,
+ Element revisionInfoRelationMapping) {
this.cfg = cfg;
this.globalCfg = globalCfg;
this.verEntCfg = verEntCfg;
@@ -106,38 +103,16 @@
revTypeProperty.addAttribute("type", "org.hibernate.envers.entities.RevisionTypeType");
}
- private ModificationStore getStoreForProperty(Property property, PropertyStoreInfo propertyStoreInfo,
- List<String> unversionedProperties) {
- /*
- * Checks if a property is versioned, which is when:
- * - the property isn't unversioned
- * - the whole entity is versioned, then the default store is not null
- * - there is a store defined for this entity, which is when this property is annotated
- */
-
- if (unversionedProperties.contains(property.getName())) {
- return null;
- }
-
- ModificationStore store = propertyStoreInfo.propertyStores.get(property.getName());
-
- if (store == null) {
- return propertyStoreInfo.defaultStore;
- }
-
- return store;
- }
-
@SuppressWarnings({"unchecked"})
- void addValue(Element parent, String name, Value value, CompositeMapperBuilder currentMapper,
- ModificationStore store, String entityName, EntityXmlMappingData xmlMappingData,
- AuditJoinTable joinTable, String mapKey, boolean insertable, boolean firstPass) {
+ void addValue(Element parent, Value value, CompositeMapperBuilder currentMapper, String entityName,
+ EntityXmlMappingData xmlMappingData, PersistentPropertyAuditingData persistentPropertyAuditingData,
+ boolean insertable, boolean firstPass) {
Type type = value.getType();
// only first pass
if (firstPass) {
- if (basicMetadataGenerator.addBasic(parent, name, value, currentMapper, store, entityName, insertable,
- false)) {
+ if (basicMetadataGenerator.addBasic(parent, persistentPropertyAuditingData, value, currentMapper,
+ entityName, insertable, false)) {
// The property was mapped by the basic generator.
return;
}
@@ -146,50 +121,49 @@
if (type instanceof ManyToOneType) {
// only second pass
if (!firstPass) {
- toOneRelationMetadataGenerator.addToOne(parent, name, value, currentMapper, entityName);
+ toOneRelationMetadataGenerator.addToOne(parent, persistentPropertyAuditingData, value, currentMapper,
+ entityName);
}
} else if (type instanceof OneToOneType) {
// only second pass
if (!firstPass) {
- toOneRelationMetadataGenerator.addOneToOneNotOwning(name, value, currentMapper, entityName);
+ toOneRelationMetadataGenerator.addOneToOneNotOwning(persistentPropertyAuditingData, value,
+ currentMapper, entityName);
}
} else if (type instanceof CollectionType) {
// only second pass
if (!firstPass) {
CollectionMetadataGenerator collectionMetadataGenerator = new CollectionMetadataGenerator(this,
- name, (Collection) value, currentMapper, entityName, xmlMappingData, joinTable, mapKey);
+ (Collection) value, currentMapper, entityName, xmlMappingData,
+ persistentPropertyAuditingData);
collectionMetadataGenerator.addCollection();
}
} else {
if (firstPass) {
// If we got here in the first pass, it means the basic mapper didn't map it, and none of the
// above branches either.
- throwUnsupportedTypeException(type, entityName, name);
+ throwUnsupportedTypeException(type, entityName, persistentPropertyAuditingData.getName());
}
}
}
@SuppressWarnings({"unchecked"})
private void addProperties(Element parent, Iterator<Property> properties, CompositeMapperBuilder currentMapper,
- PersistentClassVersioningData versioningData, String entityName, EntityXmlMappingData xmlMappingData,
+ PersistentClassAuditingData versioningData, String entityName, EntityXmlMappingData xmlMappingData,
boolean firstPass) {
while (properties.hasNext()) {
Property property = properties.next();
- if (!"_identifierMapper".equals(property.getName())) {
- ModificationStore store = getStoreForProperty(property, versioningData.propertyStoreInfo,
- versioningData.unversionedProperties);
-
- if (store != null) {
- addValue(parent, property.getName(), property.getValue(), currentMapper, store, entityName,
- xmlMappingData, versioningData.versionsJoinTables.get(property.getName()),
- versioningData.mapKeys.get(property.getName()), property.isInsertable(), firstPass);
- }
+ String propertyName = property.getName();
+ if (versioningData.getPropertyAuditingData(propertyName) != null) {
+ addValue(parent, property.getValue(), currentMapper, entityName,
+ xmlMappingData, versioningData.getPropertyAuditingData(propertyName),
+ property.isInsertable(), firstPass);
}
}
}
@SuppressWarnings({"unchecked"})
- private void createJoins(PersistentClass pc, Element parent, PersistentClassVersioningData versioningData) {
+ private void createJoins(PersistentClass pc, Element parent, PersistentClassAuditingData versioningData) {
Iterator<Join> joins = pc.getJoinIterator();
Map<Join, Element> joinElements = new HashMap<Join, Element>();
@@ -201,17 +175,17 @@
// Determining the table name. If there is no entry in the dictionary, just constructing the table name
// as if it was an entity (by appending/prepending configured strings).
String originalTableName = join.getTable().getName();
- String versionedTableName = versioningData.secondaryTableDictionary.get(originalTableName);
+ String versionedTableName = versioningData.getSecondaryTableDictionary().get(originalTableName);
if (versionedTableName == null) {
versionedTableName = verEntCfg.getVersionsEntityName(originalTableName);
}
- String schema = versioningData.versionsTable.schema();
+ String schema = versioningData.getAuditTable().schema();
if (StringTools.isEmpty(schema)) {
schema = join.getTable().getSchema();
}
- String catalog = versioningData.versionsTable.catalog();
+ String catalog = versioningData.getAuditTable().catalog();
if (StringTools.isEmpty(catalog)) {
catalog = join.getTable().getCatalog();
}
@@ -226,7 +200,7 @@
}
@SuppressWarnings({"unchecked"})
- private void addJoins(PersistentClass pc, CompositeMapperBuilder currentMapper, PersistentClassVersioningData versioningData,
+ private void addJoins(PersistentClass pc, CompositeMapperBuilder currentMapper, PersistentClassAuditingData versioningData,
String entityName, EntityXmlMappingData xmlMappingData,boolean firstPass) {
Iterator<Join> joins = pc.getJoinIterator();
@@ -240,14 +214,14 @@
}
@SuppressWarnings({"unchecked"})
- public void generateFirstPass(PersistentClass pc, PersistentClassVersioningData versioningData,
+ public void generateFirstPass(PersistentClass pc, PersistentClassAuditingData versioningData,
EntityXmlMappingData xmlMappingData) {
- String schema = versioningData.versionsTable.schema();
+ String schema = versioningData.getAuditTable().schema();
if (StringTools.isEmpty(schema)) {
schema = pc.getTable().getSchema();
}
- String catalog = versioningData.versionsTable.catalog();
+ String catalog = versioningData.getAuditTable().catalog();
if (StringTools.isEmpty(catalog)) {
catalog = pc.getTable().getCatalog();
}
@@ -322,7 +296,7 @@
}
@SuppressWarnings({"unchecked"})
- public void generateSecondPass(PersistentClass pc, PersistentClassVersioningData versioningData,
+ public void generateSecondPass(PersistentClass pc, PersistentClassAuditingData versioningData,
EntityXmlMappingData xmlMappingData) {
String entityName = pc.getEntityName();
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/BasicMetadataGenerator.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/BasicMetadataGenerator.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/BasicMetadataGenerator.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -49,28 +49,28 @@
* @author Adam Warski (adam at warski dot org)
*/
public final class BasicMetadataGenerator {
- boolean addBasic(Element parent, String name, Value value, CompositeMapperBuilder mapper,
- ModificationStore store, String entityName, boolean insertable, boolean key) {
+ boolean addBasic(Element parent, PersistentPropertyAuditingData persistentPropertyAuditingData, Value value,
+ CompositeMapperBuilder mapper, String entityName, boolean insertable, boolean key) {
Type type = value.getType();
if (type instanceof ComponentType) {
- addComponent(parent, name, value, mapper, entityName, key);
+ addComponent(parent, persistentPropertyAuditingData, value, mapper, entityName, key);
return true;
} else {
- return addBasicNoComponent(parent, name, value, mapper, store, insertable, key);
+ return addBasicNoComponent(parent, persistentPropertyAuditingData, value, mapper, insertable, key);
}
}
- boolean addBasicNoComponent(Element parent, String name, Value value, SimpleMapperBuilder mapper,
- ModificationStore store, boolean insertable, boolean key) {
+ boolean addBasicNoComponent(Element parent, PersistentPropertyAuditingData persistentPropertyAuditingData,
+ Value value, SimpleMapperBuilder mapper, boolean insertable, boolean key) {
Type type = value.getType();
if (type instanceof ImmutableType || type instanceof MutableType) {
- addSimpleValue(parent, name, value, mapper, store, insertable, key);
+ addSimpleValue(parent, persistentPropertyAuditingData, value, mapper, insertable, key);
} else if (type instanceof CustomType || type instanceof CompositeCustomType) {
- addCustomValue(parent, name, value, mapper, store, insertable, key);
+ addCustomValue(parent, persistentPropertyAuditingData, value, mapper, insertable, key);
} else if ("org.hibernate.type.PrimitiveByteArrayBlobType".equals(type.getClass().getName())) {
- addSimpleValue(parent, name, value, mapper, store, insertable, key);
+ addSimpleValue(parent, persistentPropertyAuditingData, value, mapper, insertable, key);
} else {
return false;
}
@@ -79,25 +79,25 @@
}
@SuppressWarnings({"unchecked"})
- private void addSimpleValue(Element parent, String name, Value value, SimpleMapperBuilder mapper,
- ModificationStore store, boolean insertable, boolean key) {
+ private void addSimpleValue(Element parent, PersistentPropertyAuditingData persistentPropertyAuditingData,
+ Value value, SimpleMapperBuilder mapper, boolean insertable, boolean key) {
if (parent != null) {
- Element prop_mapping = MetadataTools.addProperty(parent, name,
+ Element prop_mapping = MetadataTools.addProperty(parent, persistentPropertyAuditingData.getName(),
value.getType().getName(), insertable, key);
MetadataTools.addColumns(prop_mapping, (Iterator<Column>) value.getColumnIterator());
}
// A null mapper means that we only want to add xml mappings
if (mapper != null) {
- mapper.add(name, store);
+ mapper.add(persistentPropertyAuditingData.getPropertyData());
}
}
@SuppressWarnings({"unchecked"})
- private void addCustomValue(Element parent, String name, Value value, SimpleMapperBuilder mapper,
- ModificationStore store, boolean insertable, boolean key) {
+ private void addCustomValue(Element parent, PersistentPropertyAuditingData persistentPropertyAuditingData,
+ Value value, SimpleMapperBuilder mapper, boolean insertable, boolean key) {
if (parent != null) {
- Element prop_mapping = MetadataTools.addProperty(parent, name,
+ Element prop_mapping = MetadataTools.addProperty(parent, persistentPropertyAuditingData.getName(),
null, insertable, key);
//CustomType propertyType = (CustomType) value.getType();
@@ -120,7 +120,7 @@
}
if (mapper != null) {
- mapper.add(name, store);
+ mapper.add(persistentPropertyAuditingData.getPropertyData());
}
}
@@ -131,8 +131,8 @@
}
@SuppressWarnings({"unchecked"})
- private void addComponent(Element parent, String name, Value value, CompositeMapperBuilder mapper,
- String entityName, boolean key) {
+ private void addComponent(Element parent, PersistentPropertyAuditingData persistentPropertyAuditingData,
+ Value value, CompositeMapperBuilder mapper, String entityName, boolean key) {
Element component_mapping = null;
Component prop_component = (Component) value;
@@ -157,18 +157,19 @@
*/
component_mapping = parent.addElement("component");
- component_mapping.addAttribute("name", name);
+ component_mapping.addAttribute("name", persistentPropertyAuditingData.getName());
addComponentClassName(component_mapping, prop_component);
}
- CompositeMapperBuilder componentMapper = mapper.addComposite(name);
+ CompositeMapperBuilder componentMapper = mapper.addComposite(persistentPropertyAuditingData.getPropertyData());
Iterator<Property> properties = (Iterator<Property>) prop_component.getPropertyIterator();
while (properties.hasNext()) {
Property property = properties.next();
- addBasic(component_mapping, property.getName(), property.getValue(), componentMapper,
- ModificationStore.FULL, entityName, property.isInsertable(), key);
+ addBasic(component_mapping,
+ new PersistentPropertyAuditingData(property.getName(), property.getPropertyAccessorName(), ModificationStore.FULL),
+ property.getValue(), componentMapper, entityName, property.isInsertable(), key);
}
}
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/CollectionMetadataGenerator.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/CollectionMetadataGenerator.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/CollectionMetadataGenerator.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -23,7 +23,6 @@
*/
package org.hibernate.envers.configuration.metadata;
-import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -37,7 +36,6 @@
import org.dom4j.Element;
import org.hibernate.envers.ModificationStore;
-import org.hibernate.envers.AuditJoinTable;
import org.hibernate.envers.entities.EntityConfiguration;
import org.hibernate.envers.entities.IdMappingData;
import org.hibernate.envers.entities.mapper.CompositeMapperBuilder;
@@ -91,8 +89,7 @@
private final CompositeMapperBuilder currentMapper;
private final String referencingEntityName;
private final EntityXmlMappingData xmlMappingData;
- private final AuditJoinTable joinTable;
- private final String mapKey;
+ private final PersistentPropertyAuditingData persistentPropertyAuditingData;
private final EntityConfiguration referencingEntityConfiguration;
/**
@@ -102,30 +99,29 @@
/**
* @param mainGenerator Main generator, giving access to configuration and the basic mapper.
- * @param propertyName Name of the property that references the collection in the referencing entity.
* @param propertyValue Value of the collection, as mapped by Hibernate.
* @param currentMapper Mapper, to which the appropriate {@link org.hibernate.envers.entities.mapper.PropertyMapper}
* will be added.
* @param referencingEntityName Name of the entity that owns this collection.
* @param xmlMappingData In case this collection requires a middle table, additional mapping documents will
* be created using this object.
- * @param joinTable User data for the middle (join) table. <code>null</code> if the user didn't specify it.
- * @param mapKey The value of the name() property of the MapKey annotation on this property. Null, if this
- * property isn't annotated with this annotation.
+ * @param persistentPropertyAuditingData Property auditing (meta-)data. Among other things, holds the name of the
+ * property that references the collection in the referencing entity, the user data for middle (join)
+ * table and the value of the <code>@MapKey</code> annotation, if there was one.
*/
- public CollectionMetadataGenerator(AuditMetadataGenerator mainGenerator, String propertyName,
+ public CollectionMetadataGenerator(AuditMetadataGenerator mainGenerator,
Collection propertyValue, CompositeMapperBuilder currentMapper,
String referencingEntityName, EntityXmlMappingData xmlMappingData,
- AuditJoinTable joinTable, String mapKey) {
+ PersistentPropertyAuditingData persistentPropertyAuditingData) {
this.mainGenerator = mainGenerator;
- this.propertyName = propertyName;
this.propertyValue = propertyValue;
this.currentMapper = currentMapper;
this.referencingEntityName = referencingEntityName;
this.xmlMappingData = xmlMappingData;
- this.joinTable = joinTable == null ? getDefaultVersionsJoinTable() : joinTable;
- this.mapKey = mapKey;
+ this.persistentPropertyAuditingData = persistentPropertyAuditingData;
+ this.propertyName = persistentPropertyAuditingData.getName();
+
referencingEntityConfiguration = mainGenerator.getEntitiesConfigurations().get(referencingEntityName);
if (referencingEntityConfiguration == null) {
throw new MappingException("Unable to read versioning configuration for " + referencingEntityName + "!");
@@ -192,7 +188,8 @@
// Creating common mapper data.
CommonCollectionMapperData commonCollectionMapperData = new CommonCollectionMapperData(
- mainGenerator.getVerEntCfg(), referencedEntityName, propertyName,
+ mainGenerator.getVerEntCfg(), referencedEntityName,
+ persistentPropertyAuditingData.getPropertyData(),
referencingIdData, queryGenerator);
// Checking the type of the collection and adding an appropriate mapper.
@@ -238,9 +235,9 @@
// Generating the name of the middle table
String versionsMiddleTableName;
String versionsMiddleEntityName;
- if (!StringTools.isEmpty(joinTable.name())) {
- versionsMiddleTableName = joinTable.name();
- versionsMiddleEntityName = joinTable.name();
+ if (!StringTools.isEmpty(persistentPropertyAuditingData.getJoinTable().name())) {
+ versionsMiddleTableName = persistentPropertyAuditingData.getJoinTable().name();
+ versionsMiddleEntityName = persistentPropertyAuditingData.getJoinTable().name();
} else {
String middleTableName = getMiddleTableName(propertyValue, referencingEntityName);
versionsMiddleTableName = mainGenerator.getVerEntCfg().getVersionsTableName(null, middleTableName);
@@ -304,7 +301,7 @@
// Generating the element mapping.
// ******
MiddleComponentData elementComponentData = addValueToMiddleTable(propertyValue.getElement(), middleEntityXml,
- queryGeneratorBuilder, referencedPrefix, joinTable.inverseJoinColumns());
+ queryGeneratorBuilder, referencedPrefix, persistentPropertyAuditingData.getJoinTable().inverseJoinColumns());
// ******
// Generating the index mapping, if an index exists.
@@ -319,7 +316,9 @@
// Creating common data
CommonCollectionMapperData commonCollectionMapperData = new CommonCollectionMapperData(
- mainGenerator.getVerEntCfg(), versionsMiddleEntityName, propertyName, referencingIdData, queryGenerator);
+ mainGenerator.getVerEntCfg(), versionsMiddleEntityName,
+ persistentPropertyAuditingData.getPropertyData(),
+ referencingIdData, queryGenerator);
// Checking the type of the collection and adding an appropriate mapper.
addMapper(commonCollectionMapperData, elementComponentData, indexComponentData);
@@ -333,6 +332,7 @@
private MiddleComponentData addIndex(Element middleEntityXml, QueryGeneratorBuilder queryGeneratorBuilder) {
if (propertyValue instanceof IndexedCollection) {
IndexedCollection indexedValue = (IndexedCollection) propertyValue;
+ String mapKey = persistentPropertyAuditingData.getMapKey();
if (mapKey == null) {
// This entity doesn't specify a javax.persistence.MapKey. Mapping it to the middle entity.
return addValueToMiddleTable(indexedValue.getIndex(), middleEntityXml,
@@ -347,7 +347,8 @@
referencedIdMapping.getIdMapper()), currentIndex);
} else {
// The key of the map is a property of the entity.
- return new MiddleComponentData(new MiddleMapKeyPropertyComponentMapper(mapKey), currentIndex);
+ return new MiddleComponentData(new MiddleMapKeyPropertyComponentMapper(mapKey,
+ persistentPropertyAuditingData.getAccessType()), currentIndex);
}
}
} else {
@@ -399,8 +400,9 @@
queryGeneratorBuilder.getCurrentIndex());
} else {
// Last but one parameter: collection components are always insertable
- boolean mapped = mainGenerator.getBasicMetadataGenerator().addBasicNoComponent(xmlMapping, prefix, value, null,
- ModificationStore.FULL, true, true);
+ boolean mapped = mainGenerator.getBasicMetadataGenerator().addBasicNoComponent(xmlMapping,
+ new PersistentPropertyAuditingData(prefix, "field", ModificationStore.FULL), value, null,
+ true, true);
if (mapped) {
// Simple values are always stored in the first item of the array returned by the query generator.
@@ -417,25 +419,31 @@
MiddleComponentData indexComponentData) {
Type type = propertyValue.getType();
if (type instanceof SortedSetType) {
- currentMapper.addComposite(propertyName, new BasicCollectionMapper<Set>(commonCollectionMapperData,
+ currentMapper.addComposite(persistentPropertyAuditingData.getPropertyData(),
+ new BasicCollectionMapper<Set>(commonCollectionMapperData,
TreeSet.class, SortedSetProxy.class, elementComponentData));
} else if (type instanceof SetType) {
- currentMapper.addComposite(propertyName, new BasicCollectionMapper<Set>(commonCollectionMapperData,
+ currentMapper.addComposite(persistentPropertyAuditingData.getPropertyData(),
+ new BasicCollectionMapper<Set>(commonCollectionMapperData,
HashSet.class, SetProxy.class, elementComponentData));
} else if (type instanceof SortedMapType) {
// Indexed collection, so <code>indexComponentData</code> is not null.
- currentMapper.addComposite(propertyName, new MapCollectionMapper<Map>(commonCollectionMapperData,
+ currentMapper.addComposite(persistentPropertyAuditingData.getPropertyData(),
+ new MapCollectionMapper<Map>(commonCollectionMapperData,
TreeMap.class, SortedMapProxy.class, elementComponentData, indexComponentData));
} else if (type instanceof MapType) {
// Indexed collection, so <code>indexComponentData</code> is not null.
- currentMapper.addComposite(propertyName, new MapCollectionMapper<Map>(commonCollectionMapperData,
+ currentMapper.addComposite(persistentPropertyAuditingData.getPropertyData(),
+ new MapCollectionMapper<Map>(commonCollectionMapperData,
HashMap.class, MapProxy.class, elementComponentData, indexComponentData));
} else if (type instanceof BagType) {
- currentMapper.addComposite(propertyName, new BasicCollectionMapper<List>(commonCollectionMapperData,
+ currentMapper.addComposite(persistentPropertyAuditingData.getPropertyData(),
+ new BasicCollectionMapper<List>(commonCollectionMapperData,
ArrayList.class, ListProxy.class, elementComponentData));
} else if (type instanceof ListType) {
// Indexed collection, so <code>indexComponentData</code> is not null.
- currentMapper.addComposite(propertyName, new ListCollectionMapper(commonCollectionMapperData,
+ currentMapper.addComposite(persistentPropertyAuditingData.getPropertyData(),
+ new ListCollectionMapper(commonCollectionMapperData,
elementComponentData, indexComponentData));
} else {
mainGenerator.throwUnsupportedTypeException(type, referencingEntityName, propertyName);
@@ -454,8 +462,10 @@
}
private Element createMiddleEntityXml(String versionsMiddleTableName, String versionsMiddleEntityName) {
- String schema = StringTools.isEmpty(joinTable.schema()) ? propertyValue.getCollectionTable().getSchema() : joinTable.schema();
- String catalog = StringTools.isEmpty(joinTable.catalog()) ? propertyValue.getCollectionTable().getCatalog() : joinTable.catalog();
+ String schema = StringTools.isEmpty(persistentPropertyAuditingData.getJoinTable().schema()) ?
+ propertyValue.getCollectionTable().getSchema() : persistentPropertyAuditingData.getJoinTable().schema();
+ String catalog = StringTools.isEmpty(persistentPropertyAuditingData.getJoinTable().catalog()) ?
+ propertyValue.getCollectionTable().getCatalog() : persistentPropertyAuditingData.getJoinTable().catalog();
Element middleEntityXml = MetadataTools.createEntity(xmlMappingData.newAdditionalMapping(),
versionsMiddleEntityName, versionsMiddleTableName, schema, catalog, null);
@@ -474,16 +484,6 @@
return middleEntityXmlId;
}
- private AuditJoinTable getDefaultVersionsJoinTable() {
- return new AuditJoinTable() {
- public String name() { return ""; }
- public String schema() { return ""; }
- public String catalog() { return ""; }
- public JoinColumn[] inverseJoinColumns() { return new JoinColumn[0]; }
- public Class<? extends Annotation> annotationType() { return this.getClass(); }
- };
- }
-
@SuppressWarnings({"unchecked"})
private String getMappedBy(Collection collectionValue) {
Iterator<Property> assocClassProps =
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/IdMetadataGenerator.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/IdMetadataGenerator.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/IdMetadataGenerator.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -29,6 +29,7 @@
import org.dom4j.tree.DefaultElement;
import org.hibernate.envers.ModificationStore;
import org.hibernate.envers.entities.IdMappingData;
+import org.hibernate.envers.entities.PropertyData;
import org.hibernate.envers.entities.mapper.SimpleMapperBuilder;
import org.hibernate.envers.entities.mapper.id.EmbeddedIdMapper;
import org.hibernate.envers.entities.mapper.id.MultipleIdMapper;
@@ -61,8 +62,9 @@
if (!"_identifierMapper".equals(property.getName())) {
if (propertyType instanceof ImmutableType) {
// Last but one parameter: ids are always insertable
- mainGenerator.getBasicMetadataGenerator().addBasicNoComponent(parent, property.getName(),
- property.getValue(), mapper, ModificationStore.FULL, true, key);
+ mainGenerator.getBasicMetadataGenerator().addBasicNoComponent(parent,
+ getIdPersistentPropertyAuditingData(property),
+ property.getValue(), mapper, true, key);
} else {
throw new MappingException("Type not supported: " + propertyType.getClass().getName());
}
@@ -94,7 +96,7 @@
Component id_component = (Component) id_prop.getValue();
- mapper = new EmbeddedIdMapper(id_prop.getName(), id_component.getComponentClassName());
+ mapper = new EmbeddedIdMapper(getIdPropertyData(id_prop), id_component.getComponentClassName());
addIdProperties(rel_id_mapping, (Iterator<Property>) id_component.getPropertyIterator(), mapper, false);
// null mapper - the mapping where already added the first time, now we only want to generate the xml
@@ -105,12 +107,14 @@
mapper = new SingleIdMapper();
// Last but one parameter: ids are always insertable
- mainGenerator.getBasicMetadataGenerator().addBasicNoComponent(rel_id_mapping, id_prop.getName(),
- id_prop.getValue(), mapper, ModificationStore.FULL, true, false);
+ mainGenerator.getBasicMetadataGenerator().addBasicNoComponent(rel_id_mapping,
+ getIdPersistentPropertyAuditingData(id_prop),
+ id_prop.getValue(), mapper, true, false);
// null mapper - the mapping where already added the first time, now we only want to generate the xml
- mainGenerator.getBasicMetadataGenerator().addBasicNoComponent(orig_id_mapping, id_prop.getName(),
- id_prop.getValue(), null, ModificationStore.FULL, true, true);
+ mainGenerator.getBasicMetadataGenerator().addBasicNoComponent(orig_id_mapping,
+ getIdPersistentPropertyAuditingData(id_prop),
+ id_prop.getValue(), null, true, true);
}
orig_id_mapping.addAttribute("name", mainGenerator.getVerEntCfg().getOriginalIdPropName());
@@ -120,4 +124,13 @@
return new IdMappingData(mapper, orig_id_mapping, rel_id_mapping);
}
+
+ private PropertyData getIdPropertyData(Property property) {
+ return new PropertyData(property.getName(), property.getPropertyAccessorName(), ModificationStore.FULL);
+ }
+
+ private PersistentPropertyAuditingData getIdPersistentPropertyAuditingData(Property property) {
+ return new PersistentPropertyAuditingData(property.getName(), property.getPropertyAccessorName(),
+ ModificationStore.FULL);
+ }
}
Copied: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PersistentClassAuditingData.java (from rev 15464, core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PersistentClassVersioningData.java)
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PersistentClassAuditingData.java (rev 0)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PersistentClassAuditingData.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -0,0 +1,72 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+package org.hibernate.envers.configuration.metadata;
+
+import java.util.Map;
+
+import org.hibernate.envers.AuditTable;
+import org.hibernate.envers.tools.Tools;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ * @author Sebastian Komander
+*/
+public class PersistentClassAuditingData {
+ public PersistentClassAuditingData() {
+ properties = Tools.newHashMap();
+ secondaryTableDictionary = Tools.newHashMap();
+ }
+
+ private Map<String, PersistentPropertyAuditingData> properties;
+ private AuditTable auditTable;
+ private Map<String, String> secondaryTableDictionary;
+
+ public Map<String, PersistentPropertyAuditingData> getProperties() {
+ return properties;
+ }
+
+ public PersistentPropertyAuditingData getPropertyAuditingData(String propertyName) {
+ return properties.get(propertyName);
+ }
+
+ public Map<String, String> getSecondaryTableDictionary() {
+ return secondaryTableDictionary;
+ }
+
+ public AuditTable getAuditTable() {
+ return auditTable;
+ }
+
+ public void setAuditTable(AuditTable auditTable) {
+ this.auditTable = auditTable;
+ }
+
+ public boolean isAudited() {
+ if (properties.size() > 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+}
Deleted: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PersistentClassVersioningData.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PersistentClassVersioningData.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PersistentClassVersioningData.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -1,67 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- */
-package org.hibernate.envers.configuration.metadata;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.hibernate.envers.ModificationStore;
-import org.hibernate.envers.AuditJoinTable;
-import org.hibernate.envers.AuditTable;
-
-/**
- * @author Adam Warski (adam at warski dot org)
- * @author Sebastian Komander
-*/
-public class PersistentClassVersioningData {
- public PersistentClassVersioningData() {
- propertyStoreInfo = new PropertyStoreInfo(new HashMap<String, ModificationStore>());
- secondaryTableDictionary = new HashMap<String, String>();
- unversionedProperties = new ArrayList<String>();
- versionsJoinTables = new HashMap<String, AuditJoinTable>();
- mapKeys = new HashMap<String, String>();
- }
-
- public PropertyStoreInfo propertyStoreInfo;
- public AuditTable versionsTable;
- public Map<String, String> secondaryTableDictionary;
- public List<String> unversionedProperties;
- /**
- * A map from property names to custom join tables definitions.
- */
- public Map<String, AuditJoinTable> versionsJoinTables;
- /**
- * A map from property names to the value of the related property names in a map key annotation. An empty string,
- * if the property name is not specified in the mapkey annotation.
- */
- public Map<String, String> mapKeys;
-
- public boolean isVersioned() {
- if (propertyStoreInfo.propertyStores.size() > 0) { return true; }
- if (propertyStoreInfo.defaultStore != null) { return true; }
- return false;
- }
-}
Added: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PersistentPropertyAuditingData.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PersistentPropertyAuditingData.java (rev 0)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PersistentPropertyAuditingData.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -0,0 +1,93 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.envers.configuration.metadata;
+
+import org.hibernate.envers.ModificationStore;
+import org.hibernate.envers.AuditJoinTable;
+import org.hibernate.envers.entities.PropertyData;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+public class PersistentPropertyAuditingData {
+ private String name;
+ private ModificationStore store;
+ private String mapKey;
+ private AuditJoinTable joinTable;
+ private String accessType;
+
+ public PersistentPropertyAuditingData() {
+ }
+
+ public PersistentPropertyAuditingData(String name, String accessType, ModificationStore store) {
+ this.name = name;
+ this.accessType = accessType;
+ this.store = store;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public ModificationStore getStore() {
+ return store;
+ }
+
+ public void setStore(ModificationStore store) {
+ this.store = store;
+ }
+
+ public String getMapKey() {
+ return mapKey;
+ }
+
+ public void setMapKey(String mapKey) {
+ this.mapKey = mapKey;
+ }
+
+ public AuditJoinTable getJoinTable() {
+ return joinTable;
+ }
+
+ public void setJoinTable(AuditJoinTable joinTable) {
+ this.joinTable = joinTable;
+ }
+
+ public String getAccessType() {
+ return accessType;
+ }
+
+ public void setAccessType(String accessType) {
+ this.accessType = accessType;
+ }
+
+ public PropertyData getPropertyData() {
+ return new PropertyData(name, accessType, store);
+ }
+}
Deleted: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PropertyStoreInfo.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PropertyStoreInfo.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/PropertyStoreInfo.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -1,48 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- */
-package org.hibernate.envers.configuration.metadata;
-
-import java.util.Map;
-
-import org.hibernate.envers.ModificationStore;
-
-/**
- * @author Adam Warski (adam at warski dot org)
-*/
-public class PropertyStoreInfo {
- // Not null if the whole class is versioned
- public ModificationStore defaultStore;
-
- // Maps property names to their stores defined in per-field versioned annotations
- public Map<String, ModificationStore> propertyStores;
-
- public PropertyStoreInfo(Map<String, ModificationStore> propertyStores) {
- this.propertyStores = propertyStores;
- }
-
- public PropertyStoreInfo(ModificationStore defaultStore, Map<String, ModificationStore> propertyStores) {
- this.defaultStore = defaultStore;
- this.propertyStores = propertyStores;
- }
-}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/ToOneRelationMetadataGenerator.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/ToOneRelationMetadataGenerator.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/ToOneRelationMetadataGenerator.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -26,6 +26,7 @@
import org.dom4j.Element;
import org.hibernate.envers.entities.EntityConfiguration;
import org.hibernate.envers.entities.IdMappingData;
+import org.hibernate.envers.entities.PropertyData;
import org.hibernate.envers.entities.mapper.CompositeMapperBuilder;
import org.hibernate.envers.entities.mapper.id.IdMapper;
import org.hibernate.envers.entities.mapper.relation.OneToOneNotOwningMapper;
@@ -48,7 +49,8 @@
}
@SuppressWarnings({"unchecked"})
- void addToOne(Element parent, String name, Value value, CompositeMapperBuilder mapper, String entityName) {
+ void addToOne(Element parent, PersistentPropertyAuditingData persistentPropertyAuditingData, Value value,
+ CompositeMapperBuilder mapper, String entityName) {
String referencedEntityName = ((ToOne) value).getReferencedEntityName();
EntityConfiguration configuration = mainGenerator.getEntitiesConfigurations().get(referencedEntityName);
@@ -58,28 +60,31 @@
IdMappingData idMapping = configuration.getIdMappingData();
- String lastPropertyPrefix = name + "_";
+ String lastPropertyPrefix = persistentPropertyAuditingData.getName() + "_";
// Generating the id mapper for the relation
IdMapper relMapper = idMapping.getIdMapper().prefixMappedProperties(lastPropertyPrefix);
// Storing information about this relation
- mainGenerator.getEntitiesConfigurations().get(entityName).addToOneRelation(name, referencedEntityName, relMapper);
+ mainGenerator.getEntitiesConfigurations().get(entityName).addToOneRelation(
+ persistentPropertyAuditingData.getName(), referencedEntityName, relMapper);
// Adding an element to the mapping corresponding to the references entity id's
Element properties = (Element) idMapping.getXmlRelationMapping().clone();
- properties.addAttribute("name", name);
+ properties.addAttribute("name", persistentPropertyAuditingData.getName());
MetadataTools.prefixNamesInPropertyElement(properties, lastPropertyPrefix,
MetadataTools.getColumnNameIterator(value.getColumnIterator()), false);
parent.add(properties);
// Adding mapper for the id
- mapper.addComposite(name, new ToOneIdMapper(relMapper, name, referencedEntityName));
+ PropertyData propertyData = persistentPropertyAuditingData.getPropertyData();
+ mapper.addComposite(propertyData, new ToOneIdMapper(relMapper, propertyData, referencedEntityName));
}
@SuppressWarnings({"unchecked"})
- void addOneToOneNotOwning(String name, Value value, CompositeMapperBuilder mapper, String entityName) {
+ void addOneToOneNotOwning(PersistentPropertyAuditingData persistentPropertyAuditingData, Value value,
+ CompositeMapperBuilder mapper, String entityName) {
OneToOne propertyValue = (OneToOne) value;
String owningReferencePropertyName = propertyValue.getReferencedPropertyName(); // mappedBy
@@ -102,11 +107,13 @@
IdMapper ownedIdMapper = ownedIdMapping.getIdMapper().prefixMappedProperties(lastPropertyPrefix);
// Storing information about this relation
- mainGenerator.getEntitiesConfigurations().get(entityName).addToOneNotOwningRelation(name, owningReferencePropertyName,
+ mainGenerator.getEntitiesConfigurations().get(entityName).addToOneNotOwningRelation(
+ persistentPropertyAuditingData.getName(), owningReferencePropertyName,
referencedEntityName, ownedIdMapper);
// Adding mapper for the id
- mapper.addComposite(name, new OneToOneNotOwningMapper(owningReferencePropertyName,
- referencedEntityName, name));
+ PropertyData propertyData = persistentPropertyAuditingData.getPropertyData();
+ mapper.addComposite(propertyData, new OneToOneNotOwningMapper(owningReferencePropertyName,
+ referencedEntityName, propertyData));
}
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/EntityInstantiator.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/EntityInstantiator.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/EntityInstantiator.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -67,7 +67,7 @@
// First mapping the primary key
IdMapper idMapper = verCfg.getEntCfg().get(entityName).getIdMapper();
- Map originalId = (Map) versionsEntity.get(verCfg.getVerEntCfg().getOriginalIdPropName());
+ Map originalId = (Map) versionsEntity.get(verCfg.getAuditEntCfg().getOriginalIdPropName());
Object primaryKey = idMapper.mapToIdFromMap(originalId);
Added: core/trunk/envers/src/main/java/org/hibernate/envers/entities/PropertyData.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/PropertyData.java (rev 0)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/PropertyData.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -0,0 +1,70 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+package org.hibernate.envers.entities;
+
+import org.hibernate.envers.ModificationStore;
+
+/**
+ * Holds information on a property that is audited.
+ * @author Adam Warski (adam at warski dot org)
+ */
+public class PropertyData {
+ private final String name;
+ private final String accessType;
+ private final ModificationStore store;
+
+ /**
+ * Copies the given property data, except the name.
+ * @param newName New name.
+ * @param propertyData Property data to copy the rest of properties from.
+ */
+ public PropertyData(String newName, PropertyData propertyData) {
+ this.name = newName;
+ this.accessType = propertyData.accessType;
+ this.store = propertyData.store;
+ }
+
+ /**
+ * @param name Name of the property.
+ * @param accessType Accessor type for this property.
+ * @param store How this property should be stored.
+ */
+ public PropertyData(String name, String accessType, ModificationStore store) {
+ this.name = name;
+ this.accessType = accessType;
+ this.store = store;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getAccessType() {
+ return accessType;
+ }
+
+ public ModificationStore getStore() {
+ return store;
+ }
+}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/CompositeMapperBuilder.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/CompositeMapperBuilder.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/CompositeMapperBuilder.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -23,10 +23,12 @@
*/
package org.hibernate.envers.entities.mapper;
+import org.hibernate.envers.entities.PropertyData;
+
/**
* @author Adam Warski (adam at warski dot org)
*/
public interface CompositeMapperBuilder extends SimpleMapperBuilder {
- public CompositeMapperBuilder addComposite(String propertyName);
- public void addComposite(String propertyName, PropertyMapper propertyMapper);
+ public CompositeMapperBuilder addComposite(PropertyData propertyData);
+ public void addComposite(PropertyData propertyData, PropertyMapper propertyMapper);
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/MapPropertyMapper.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/MapPropertyMapper.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/MapPropertyMapper.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -28,7 +28,7 @@
import java.util.List;
import java.util.Map;
-import org.hibernate.envers.ModificationStore;
+import org.hibernate.envers.entities.PropertyData;
import org.hibernate.envers.configuration.AuditConfiguration;
import org.hibernate.envers.exception.AuditException;
import org.hibernate.envers.reader.AuditReaderImplementor;
@@ -43,29 +43,29 @@
* @author Adam Warski (adam at warski dot org)
*/
public class MapPropertyMapper implements PropertyMapper, CompositeMapperBuilder {
- private String propertyName;
+ private PropertyData propertyData;
private ExtendedPropertyMapper delegate;
- public MapPropertyMapper(String propertyName) {
- this.propertyName = propertyName;
+ public MapPropertyMapper(PropertyData propertyData) {
+ this.propertyData = propertyData;
this.delegate = new MultiPropertyMapper();
}
- public void add(String propertyName, ModificationStore modStore) {
- delegate.add(propertyName, modStore);
+ public void add(PropertyData propertyData) {
+ delegate.add(propertyData);
}
- public CompositeMapperBuilder addComposite(String propertyName) {
- return delegate.addComposite(propertyName);
+ public CompositeMapperBuilder addComposite(PropertyData propertyData) {
+ return delegate.addComposite(propertyData);
}
- public void addComposite(String propertyName, PropertyMapper propertyMapper) {
- delegate.addComposite(propertyName, propertyMapper);
+ public void addComposite(PropertyData propertyData, PropertyMapper propertyMapper) {
+ delegate.addComposite(propertyData, propertyMapper);
}
public boolean mapToMapFromEntity(Map<String, Object> data, Object newObj, Object oldObj) {
Map<String, Object> newData = new HashMap<String, Object>();
- data.put(propertyName, newData);
+ data.put(propertyData.getName(), newData);
return delegate.mapToMapFromEntity(newData, newObj, oldObj);
}
@@ -75,13 +75,13 @@
return;
}
- Getter getter = ReflectionTools.getGetter(obj.getClass(), propertyName);
- Setter setter = ReflectionTools.getSetter(obj.getClass(), propertyName);
+ Getter getter = ReflectionTools.getGetter(obj.getClass(), propertyData);
+ Setter setter = ReflectionTools.getSetter(obj.getClass(), propertyData);
try {
Object subObj = ReflectHelper.getDefaultConstructor(getter.getReturnType()).newInstance();
setter.set(obj, subObj, null);
- delegate.mapToEntityFromMap(verCfg, subObj, (Map) data.get(propertyName), primaryKey, versionsReader, revision);
+ delegate.mapToEntityFromMap(verCfg, subObj, (Map) data.get(propertyData.getName()), primaryKey, versionsReader, revision);
} catch (Exception e) {
throw new AuditException(e);
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/MultiPropertyMapper.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/MultiPropertyMapper.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/MultiPropertyMapper.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -24,14 +24,14 @@
package org.hibernate.envers.entities.mapper;
import java.io.Serializable;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.hibernate.envers.ModificationStore;
+import org.hibernate.envers.entities.PropertyData;
import org.hibernate.envers.configuration.AuditConfiguration;
import org.hibernate.envers.reader.AuditReaderImplementor;
import org.hibernate.envers.tools.reflection.ReflectionTools;
+import org.hibernate.envers.tools.Tools;
import org.hibernate.MappingException;
import org.hibernate.collection.PersistentCollection;
@@ -41,31 +41,36 @@
* @author Adam Warski (adam at warski dot org)
*/
public class MultiPropertyMapper implements ExtendedPropertyMapper {
- protected Map<String, PropertyMapper> properties;
+ protected final Map<PropertyData, PropertyMapper> properties;
+ private final Map<String, PropertyData> propertyDatas;
public MultiPropertyMapper() {
- properties = new HashMap<String, PropertyMapper>();
+ properties = Tools.newHashMap();
+ propertyDatas = Tools.newHashMap();
}
- public void add(String propertyName, ModificationStore modStore) {
+ public void add(PropertyData propertyData) {
SinglePropertyMapper single = new SinglePropertyMapper();
- single.add(propertyName, modStore);
- properties.put(propertyName, single);
+ single.add(propertyData);
+ properties.put(propertyData, single);
+ propertyDatas.put(propertyData.getName(), propertyData);
}
- public CompositeMapperBuilder addComposite(String propertyName) {
- if (properties.get(propertyName) != null) {
- throw new MappingException("Mapping for " + propertyName + " already added!");
+ public CompositeMapperBuilder addComposite(PropertyData propertyData) {
+ if (properties.get(propertyData) != null) {
+ throw new MappingException("Mapping for " + propertyData.getName() + " already added!");
}
- MapPropertyMapper mapperBuilder = new MapPropertyMapper(propertyName);
- properties.put(propertyName, mapperBuilder);
+ MapPropertyMapper mapperBuilder = new MapPropertyMapper(propertyData);
+ properties.put(propertyData, mapperBuilder);
+ propertyDatas.put(propertyData.getName(), propertyData);
return mapperBuilder;
}
- public void addComposite(String propertyName, PropertyMapper propertyMapper) {
- properties.put(propertyName, propertyMapper);
+ public void addComposite(PropertyData propertyData, PropertyMapper propertyMapper) {
+ properties.put(propertyData, propertyMapper);
+ propertyDatas.put(propertyData.getName(), propertyData);
}
private Object getAtIndexOrNull(Object[] array, int index) { return array == null ? null : array[index]; }
@@ -75,8 +80,8 @@
for (int i=0; i<propertyNames.length; i++) {
String propertyName = propertyNames[i];
- if (properties.containsKey(propertyName)) {
- ret |= properties.get(propertyName).mapToMapFromEntity(data,
+ if (propertyDatas.containsKey(propertyName)) {
+ ret |= properties.get(propertyDatas.get(propertyName)).mapToMapFromEntity(data,
getAtIndexOrNull(newState, i),
getAtIndexOrNull(oldState, i));
}
@@ -87,17 +92,17 @@
public boolean mapToMapFromEntity(Map<String, Object> data, Object newObj, Object oldObj) {
boolean ret = false;
- for (String propertyName : properties.keySet()) {
+ for (PropertyData propertyData : properties.keySet()) {
Getter getter;
if (newObj != null) {
- getter = ReflectionTools.getGetter(newObj.getClass(), propertyName);
+ getter = ReflectionTools.getGetter(newObj.getClass(), propertyData);
} else if (oldObj != null) {
- getter = ReflectionTools.getGetter(oldObj.getClass(), propertyName);
+ getter = ReflectionTools.getGetter(oldObj.getClass(), propertyData);
} else {
return false;
}
- ret |= properties.get(propertyName).mapToMapFromEntity(data,
+ ret |= properties.get(propertyData).mapToMapFromEntity(data,
newObj == null ? null : getter.get(newObj),
oldObj == null ? null : getter.get(oldObj));
}
@@ -105,9 +110,10 @@
return ret;
}
- public void mapToEntityFromMap(AuditConfiguration verCfg, Object obj, Map data, Object primaryKey, AuditReaderImplementor versionsReader, Number revision) {
- for (String propertyName : properties.keySet()) {
- properties.get(propertyName).mapToEntityFromMap(verCfg, obj, data, primaryKey, versionsReader, revision);
+ public void mapToEntityFromMap(AuditConfiguration verCfg, Object obj, Map data, Object primaryKey,
+ AuditReaderImplementor versionsReader, Number revision) {
+ for (PropertyMapper mapper : properties.values()) {
+ mapper.mapToEntityFromMap(verCfg, obj, data, primaryKey, versionsReader, revision);
}
}
@@ -115,7 +121,7 @@
PersistentCollection newColl,
Serializable oldColl,
Serializable id) {
- PropertyMapper mapper = properties.get(referencingPropertyName);
+ PropertyMapper mapper = properties.get(propertyDatas.get(referencingPropertyName));
if (mapper != null) {
return mapper.mapCollectionChanges(referencingPropertyName, newColl, oldColl, id);
} else {
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/SimpleMapperBuilder.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/SimpleMapperBuilder.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/SimpleMapperBuilder.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -23,11 +23,11 @@
*/
package org.hibernate.envers.entities.mapper;
-import org.hibernate.envers.ModificationStore;
+import org.hibernate.envers.entities.PropertyData;
/**
* @author Adam Warski (adam at warski dot org)
*/
public interface SimpleMapperBuilder {
- public void add(String propertyName, ModificationStore modStore);
+ public void add(PropertyData propertyData);
}
\ No newline at end of file
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/SinglePropertyMapper.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/SinglePropertyMapper.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/SinglePropertyMapper.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -27,7 +27,7 @@
import java.util.List;
import java.util.Map;
-import org.hibernate.envers.ModificationStore;
+import org.hibernate.envers.entities.PropertyData;
import org.hibernate.envers.configuration.AuditConfiguration;
import org.hibernate.envers.exception.AuditException;
import org.hibernate.envers.reader.AuditReaderImplementor;
@@ -42,37 +42,38 @@
* @author Adam Warski (adam at warski dot org)
*/
public class SinglePropertyMapper implements PropertyMapper, SimpleMapperBuilder {
- private String propertyName;
+ private PropertyData propertyData;
public SinglePropertyMapper() { }
- public void add(String propertyName, ModificationStore modStore) {
- if (this.propertyName != null) {
+ public void add(PropertyData propertyData) {
+ if (this.propertyData != null) {
throw new AuditException("Only one property can be added!");
}
- this.propertyName = propertyName;
+ this.propertyData = propertyData;
}
public boolean mapToMapFromEntity(Map<String, Object> data, Object newObj, Object oldObj) {
- data.put(propertyName, newObj);
+ data.put(propertyData.getName(), newObj);
return !Tools.objectsEqual(newObj, oldObj);
}
- public void mapToEntityFromMap(AuditConfiguration verCfg, Object obj, Map data, Object primaryKey, AuditReaderImplementor versionsReader, Number revision) {
+ public void mapToEntityFromMap(AuditConfiguration verCfg, Object obj, Map data, Object primaryKey,
+ AuditReaderImplementor versionsReader, Number revision) {
if (data == null || obj == null) {
return;
}
- Setter setter = ReflectionTools.getSetter(obj.getClass(), propertyName);
- setter.set(obj, data.get(propertyName), null);
+ Setter setter = ReflectionTools.getSetter(obj.getClass(), propertyData);
+ setter.set(obj, data.get(propertyData.getName()), null);
}
public List<PersistentCollectionChangeData> mapCollectionChanges(String referencingPropertyName,
- PersistentCollection newColl,
- Serializable oldColl,
- Serializable id) {
+ PersistentCollection newColl,
+ Serializable oldColl,
+ Serializable id) {
return null;
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/SubclassPropertyMapper.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/SubclassPropertyMapper.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/SubclassPropertyMapper.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -27,7 +27,7 @@
import java.util.List;
import java.util.Map;
-import org.hibernate.envers.ModificationStore;
+import org.hibernate.envers.entities.PropertyData;
import org.hibernate.envers.configuration.AuditConfiguration;
import org.hibernate.envers.reader.AuditReaderImplementor;
@@ -80,15 +80,15 @@
}
}
- public CompositeMapperBuilder addComposite(String propertyName) {
- return main.addComposite(propertyName);
+ public CompositeMapperBuilder addComposite(PropertyData propertyData) {
+ return main.addComposite(propertyData);
}
- public void addComposite(String propertyName, PropertyMapper propertyMapper) {
- main.addComposite(propertyName, propertyMapper);
+ public void addComposite(PropertyData propertyData, PropertyMapper propertyMapper) {
+ main.addComposite(propertyData, propertyMapper);
}
- public void add(String propertyName, ModificationStore modStore) {
- main.add(propertyName, modStore);
+ public void add(PropertyData propertyData) {
+ main.add(propertyData);
}
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/AbstractCompositeIdMapper.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/AbstractCompositeIdMapper.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/AbstractCompositeIdMapper.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -23,27 +23,27 @@
*/
package org.hibernate.envers.entities.mapper.id;
-import java.util.LinkedHashMap;
import java.util.Map;
-import org.hibernate.envers.ModificationStore;
+import org.hibernate.envers.entities.PropertyData;
import org.hibernate.envers.exception.AuditException;
+import org.hibernate.envers.tools.Tools;
/**
* @author Adam Warski (adam at warski dot org)
*/
public abstract class AbstractCompositeIdMapper extends AbstractIdMapper implements SimpleIdMapperBuilder {
- protected Map<String, SingleIdMapper> ids;
+ protected Map<PropertyData, SingleIdMapper> ids;
protected String compositeIdClass;
protected AbstractCompositeIdMapper(String compositeIdClass) {
- ids = new LinkedHashMap<String, SingleIdMapper>();
+ ids = Tools.newLinkedHashMap();
this.compositeIdClass = compositeIdClass;
}
- public void add(String propertyName, ModificationStore modStore) {
- ids.put(propertyName, new SingleIdMapper(propertyName));
+ public void add(PropertyData propertyData) {
+ ids.put(propertyData, new SingleIdMapper(propertyData));
}
public Object mapToIdFromMap(Map data) {
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/EmbeddedIdMapper.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/EmbeddedIdMapper.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/EmbeddedIdMapper.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -30,6 +30,7 @@
import org.hibernate.envers.exception.AuditException;
import org.hibernate.envers.tools.reflection.ReflectionTools;
+import org.hibernate.envers.entities.PropertyData;
import org.hibernate.property.Getter;
import org.hibernate.property.Setter;
@@ -39,12 +40,12 @@
* @author Adam Warski (adam at warski dot org)
*/
public class EmbeddedIdMapper extends AbstractCompositeIdMapper implements SimpleIdMapperBuilder {
- private String idPropertyName;
+ private PropertyData idPropertyData;
- public EmbeddedIdMapper(String idPropertyName, String compositeIdClass) {
+ public EmbeddedIdMapper(PropertyData idPropertyData, String compositeIdClass) {
super(compositeIdClass);
- this.idPropertyName = idPropertyName;
+ this.idPropertyData = idPropertyData;
}
public void mapToMapFromId(Map<String, Object> data, Object obj) {
@@ -58,7 +59,7 @@
return;
}
- Getter getter = ReflectionTools.getGetter(obj.getClass(), idPropertyName);
+ Getter getter = ReflectionTools.getGetter(obj.getClass(), idPropertyData);
mapToMapFromId(data, getter.get(obj));
}
@@ -67,8 +68,8 @@
return;
}
- Getter getter = ReflectionTools.getGetter(obj.getClass(), idPropertyName);
- Setter setter = ReflectionTools.getSetter(obj.getClass(), idPropertyName);
+ Getter getter = ReflectionTools.getGetter(obj.getClass(), idPropertyData);
+ Setter setter = ReflectionTools.getSetter(obj.getClass(), idPropertyData);
try {
Object subObj = ReflectHelper.getDefaultConstructor(getter.getReturnType()).newInstance();
@@ -83,10 +84,12 @@
}
public IdMapper prefixMappedProperties(String prefix) {
- EmbeddedIdMapper ret = new EmbeddedIdMapper(idPropertyName, compositeIdClass);
+ EmbeddedIdMapper ret = new EmbeddedIdMapper(idPropertyData, compositeIdClass);
- for (String propertyName : ids.keySet()) {
- ret.ids.put(propertyName, new SingleIdMapper(propertyName, prefix + propertyName));
+ for (PropertyData propertyData : ids.keySet()) {
+ String propertyName = propertyData.getName();
+ ret.ids.put(propertyData, new SingleIdMapper(propertyName,
+ new PropertyData(prefix + propertyName, propertyData)));
}
return ret;
@@ -97,7 +100,7 @@
return null;
}
- Getter getter = ReflectionTools.getGetter(data.getClass(), idPropertyName);
+ Getter getter = ReflectionTools.getGetter(data.getClass(), idPropertyData);
return getter.get(data);
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/MultipleIdMapper.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/MultipleIdMapper.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/MultipleIdMapper.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -29,6 +29,7 @@
import java.util.Map;
import org.hibernate.envers.exception.AuditException;
+import org.hibernate.envers.entities.PropertyData;
/**
* @author Adam Warski (adam at warski dot org)
@@ -57,8 +58,10 @@
public IdMapper prefixMappedProperties(String prefix) {
MultipleIdMapper ret = new MultipleIdMapper(compositeIdClass);
- for (String propertyName : ids.keySet()) {
- ret.ids.put(propertyName, new SingleIdMapper(propertyName, prefix + propertyName));
+ for (PropertyData propertyData : ids.keySet()) {
+ String propertyName = propertyData.getName();
+ ret.ids.put(propertyData, new SingleIdMapper(propertyName,
+ new PropertyData(prefix + propertyName, propertyData)));
}
return ret;
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/SingleIdMapper.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/SingleIdMapper.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/id/SingleIdMapper.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -27,7 +27,7 @@
import java.util.List;
import java.util.Map;
-import org.hibernate.envers.ModificationStore;
+import org.hibernate.envers.entities.PropertyData;
import org.hibernate.envers.exception.AuditException;
import org.hibernate.envers.tools.reflection.ReflectionTools;
@@ -39,28 +39,28 @@
*/
public class SingleIdMapper extends AbstractIdMapper implements SimpleIdMapperBuilder {
private String beanPropertyName;
- private String propertyName;
+ private PropertyData propertyData;
public SingleIdMapper() {
}
- public SingleIdMapper(String beanPropertyName, String propertyName) {
+ public SingleIdMapper(String beanPropertyName, PropertyData propertyData) {
this.beanPropertyName = beanPropertyName;
- this.propertyName = propertyName;
+ this.propertyData = propertyData;
}
- public SingleIdMapper(String propertyName) {
- this.beanPropertyName = propertyName;
- this.propertyName = propertyName;
+ public SingleIdMapper(PropertyData propertyData) {
+ this.beanPropertyName = propertyData.getName();
+ this.propertyData = propertyData;
}
- public void add(String propertyName, ModificationStore modStore) {
- if (this.propertyName != null) {
+ public void add(PropertyData propertyData) {
+ if (this.propertyData != null) {
throw new AuditException("Only one property can be added!");
}
- this.propertyName = propertyName;
- this.beanPropertyName = propertyName;
+ this.propertyData = propertyData;
+ this.beanPropertyName = propertyData.getName();
}
public void mapToEntityFromMap(Object obj, Map data) {
@@ -68,8 +68,8 @@
return;
}
- Setter setter = ReflectionTools.getSetter(obj.getClass(), beanPropertyName);
- setter.set(obj, data.get(propertyName), null);
+ Setter setter = ReflectionTools.getSetter(obj.getClass(), beanPropertyName, propertyData.getAccessType());
+ setter.set(obj, data.get(propertyData.getName()), null);
}
public Object mapToIdFromMap(Map data) {
@@ -77,7 +77,7 @@
return null;
}
- return data.get(propertyName);
+ return data.get(propertyData.getName());
}
public Object mapToIdFromEntity(Object data) {
@@ -85,22 +85,22 @@
return null;
}
- Getter getter = ReflectionTools.getGetter(data.getClass(), beanPropertyName);
+ Getter getter = ReflectionTools.getGetter(data.getClass(), beanPropertyName, propertyData.getAccessType());
return getter.get(data);
}
public void mapToMapFromId(Map<String, Object> data, Object obj) {
if (data != null) {
- data.put(propertyName, obj);
+ data.put(propertyData.getName(), obj);
}
}
public void mapToMapFromEntity(Map<String, Object> data, Object obj) {
if (obj == null) {
- data.put(propertyName, null);
+ data.put(propertyData.getName(), null);
} else {
- Getter getter = ReflectionTools.getGetter(obj.getClass(), beanPropertyName);
- data.put(propertyName, getter.get(obj));
+ Getter getter = ReflectionTools.getGetter(obj.getClass(), beanPropertyName, propertyData.getAccessType());
+ data.put(propertyData.getName(), getter.get(obj));
}
}
@@ -109,19 +109,20 @@
return;
}
- Getter getter = ReflectionTools.getGetter(objFrom.getClass(), beanPropertyName);
- Setter setter = ReflectionTools.getSetter(objTo.getClass(), beanPropertyName);
+ Getter getter = ReflectionTools.getGetter(objFrom.getClass(), beanPropertyName, propertyData.getAccessType());
+ Setter setter = ReflectionTools.getSetter(objTo.getClass(), beanPropertyName, propertyData.getAccessType());
setter.set(objTo, getter.get(objFrom), null);
}
public IdMapper prefixMappedProperties(String prefix) {
- return new SingleIdMapper(propertyName, prefix + propertyName);
+ return new SingleIdMapper(propertyData.getName(),
+ new PropertyData(prefix + propertyData.getName(), propertyData));
}
public List<QueryParameterData> mapToQueryParametersFromId(Object obj) {
List<QueryParameterData> ret = new ArrayList<QueryParameterData>();
- ret.add(new QueryParameterData(propertyName, obj));
+ ret.add(new QueryParameterData(propertyData.getName(), obj));
return ret;
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/AbstractCollectionMapper.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/AbstractCollectionMapper.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/AbstractCollectionMapper.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -101,7 +101,8 @@
public List<PersistentCollectionChangeData> mapCollectionChanges(String referencingPropertyName,
PersistentCollection newColl,
Serializable oldColl, Serializable id) {
- if (!commonCollectionMapperData.getCollectionReferencingPropertyName().equals(referencingPropertyName)) {
+ if (!commonCollectionMapperData.getCollectionReferencingPropertyData().getName()
+ .equals(referencingPropertyName)) {
return null;
}
@@ -138,7 +139,7 @@
public void mapToEntityFromMap(AuditConfiguration verCfg, Object obj, Map data, Object primaryKey,
AuditReaderImplementor versionsReader, Number revision) {
Setter setter = ReflectionTools.getSetter(obj.getClass(),
- commonCollectionMapperData.getCollectionReferencingPropertyName());
+ commonCollectionMapperData.getCollectionReferencingPropertyData());
try {
setter.set(obj, proxyConstructor.newInstance(getInitializor(verCfg, versionsReader, primaryKey, revision)), null);
} catch (InstantiationException e) {
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/CommonCollectionMapperData.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/CommonCollectionMapperData.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/CommonCollectionMapperData.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -25,6 +25,7 @@
import org.hibernate.envers.configuration.AuditEntitiesConfiguration;
import org.hibernate.envers.entities.mapper.relation.query.RelationQueryGenerator;
+import org.hibernate.envers.entities.PropertyData;
/**
* Data that is used by all collection mappers, regardless of the type.
@@ -33,16 +34,16 @@
public final class CommonCollectionMapperData {
private final AuditEntitiesConfiguration verEntCfg;
private final String versionsMiddleEntityName;
- private final String collectionReferencingPropertyName;
+ private final PropertyData collectionReferencingPropertyData;
private final MiddleIdData referencingIdData;
private final RelationQueryGenerator queryGenerator;
public CommonCollectionMapperData(AuditEntitiesConfiguration verEntCfg, String versionsMiddleEntityName,
- String collectionReferencingPropertyName, MiddleIdData referencingIdData,
+ PropertyData collectionReferencingPropertyData, MiddleIdData referencingIdData,
RelationQueryGenerator queryGenerator) {
this.verEntCfg = verEntCfg;
this.versionsMiddleEntityName = versionsMiddleEntityName;
- this.collectionReferencingPropertyName = collectionReferencingPropertyName;
+ this.collectionReferencingPropertyData = collectionReferencingPropertyData;
this.referencingIdData = referencingIdData;
this.queryGenerator = queryGenerator;
}
@@ -55,8 +56,8 @@
return versionsMiddleEntityName;
}
- public String getCollectionReferencingPropertyName() {
- return collectionReferencingPropertyName;
+ public PropertyData getCollectionReferencingPropertyData() {
+ return collectionReferencingPropertyData;
}
public MiddleIdData getReferencingIdData() {
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/OneToOneNotOwningMapper.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/OneToOneNotOwningMapper.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/OneToOneNotOwningMapper.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -31,6 +31,7 @@
import org.hibernate.envers.configuration.AuditConfiguration;
import org.hibernate.envers.entities.mapper.PersistentCollectionChangeData;
import org.hibernate.envers.entities.mapper.PropertyMapper;
+import org.hibernate.envers.entities.PropertyData;
import org.hibernate.envers.exception.AuditException;
import org.hibernate.envers.query.AuditRestrictions;
import org.hibernate.envers.reader.AuditReaderImplementor;
@@ -46,12 +47,13 @@
public class OneToOneNotOwningMapper implements PropertyMapper {
private String owningReferencePropertyName;
private String owningEntityName;
- private String propertyName;
+ private PropertyData propertyData;
- public OneToOneNotOwningMapper(String owningReferencePropertyName, String owningEntityName, String propertyName) {
+ public OneToOneNotOwningMapper(String owningReferencePropertyName, String owningEntityName,
+ PropertyData propertyData) {
this.owningReferencePropertyName = owningReferencePropertyName;
this.owningEntityName = owningEntityName;
- this.propertyName = propertyName;
+ this.propertyData = propertyData;
}
public boolean mapToMapFromEntity(Map<String, Object> data, Object newObj, Object oldObj) {
@@ -77,7 +79,7 @@
", " + owningReferencePropertyName + ")");
}
- Setter setter = ReflectionTools.getSetter(obj.getClass(), propertyName);
+ Setter setter = ReflectionTools.getSetter(obj.getClass(), propertyData);
setter.set(obj, value, null);
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/ToOneIdMapper.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/ToOneIdMapper.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/ToOneIdMapper.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -33,6 +33,7 @@
import org.hibernate.envers.entities.mapper.PropertyMapper;
import org.hibernate.envers.entities.mapper.id.IdMapper;
import org.hibernate.envers.entities.mapper.relation.lazy.ToOneDelegateSessionImplementor;
+import org.hibernate.envers.entities.PropertyData;
import org.hibernate.envers.reader.AuditReaderImplementor;
import org.hibernate.envers.tools.Tools;
import org.hibernate.envers.tools.reflection.ReflectionTools;
@@ -45,18 +46,18 @@
*/
public class ToOneIdMapper implements PropertyMapper {
private final IdMapper delegate;
- private final String propertyName;
+ private final PropertyData propertyData;
private final String referencedEntityName;
- public ToOneIdMapper(IdMapper delegate, String propertyName, String referencedEntityName) {
+ public ToOneIdMapper(IdMapper delegate, PropertyData propertyData, String referencedEntityName) {
this.delegate = delegate;
- this.propertyName = propertyName;
+ this.propertyData = propertyData;
this.referencedEntityName = referencedEntityName;
}
public boolean mapToMapFromEntity(Map<String, Object> data, Object newObj, Object oldObj) {
HashMap<String, Object> newData = new HashMap<String, Object>();
- data.put(propertyName, newData);
+ data.put(propertyData.getName(), newData);
delegate.mapToMapFromEntity(newData, newObj);
@@ -69,7 +70,7 @@
return;
}
- Object entityId = delegate.mapToIdFromMap((Map) data.get(propertyName));
+ Object entityId = delegate.mapToIdFromMap((Map) data.get(propertyData.getName()));
Object value;
if (entityId == null) {
value = null;
@@ -84,7 +85,7 @@
}
}
- Setter setter = ReflectionTools.getSetter(obj.getClass(), propertyName);
+ Setter setter = ReflectionTools.getSetter(obj.getClass(), propertyData);
setter.set(obj, value, null);
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/component/MiddleMapKeyPropertyComponentMapper.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/component/MiddleMapKeyPropertyComponentMapper.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/entities/mapper/relation/component/MiddleMapKeyPropertyComponentMapper.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -35,17 +35,19 @@
* so <code>mapToMapFromObject</code> is empty.
* @author Adam Warski (adam at warski dot org)
*/
-public final class MiddleMapKeyPropertyComponentMapper implements MiddleComponentMapper {
+public class MiddleMapKeyPropertyComponentMapper implements MiddleComponentMapper {
private final String propertyName;
+ private final String accessType;
- public MiddleMapKeyPropertyComponentMapper(String propertyName) {
+ public MiddleMapKeyPropertyComponentMapper(String propertyName, String accessType) {
this.propertyName = propertyName;
+ this.accessType = accessType;
}
public Object mapToObjectFromFullMap(EntityInstantiator entityInstantiator, Map<String, Object> data,
Object dataObject, Number revision) {
// dataObject is not null, as this mapper can only be used in an index.
- return ReflectionTools.getGetter(dataObject.getClass(), propertyName).get(dataObject);
+ return ReflectionTools.getGetter(dataObject.getClass(), propertyName, accessType).get(dataObject);
}
public void mapToMapFromObject(Map<String, Object> data, Object obj) {
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/query/RevisionProperty.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/query/RevisionProperty.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/query/RevisionProperty.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -124,6 +124,6 @@
}
public Triple<String, String, Boolean> getData(AuditConfiguration verCfg) {
- return Triple.make(null, verCfg.getVerEntCfg().getRevisionPropPath(), false);
+ return Triple.make(null, verCfg.getAuditEntCfg().getRevisionPropPath(), false);
}
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/query/RevisionTypeProperty.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/query/RevisionTypeProperty.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/query/RevisionTypeProperty.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -42,6 +42,6 @@
}
public Triple<String, String, Boolean> getData(AuditConfiguration verCfg) {
- return Triple.make(null, verCfg.getVerEntCfg().getRevisionTypePropName(), false);
+ return Triple.make(null, verCfg.getAuditEntCfg().getRevisionTypePropName(), false);
}
}
\ No newline at end of file
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/query/criteria/IdentifierEqVersionsExpression.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/query/criteria/IdentifierEqVersionsExpression.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/query/criteria/IdentifierEqVersionsExpression.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -39,6 +39,6 @@
public void addToQuery(AuditConfiguration verCfg, String entityName, QueryBuilder qb, Parameters parameters) {
verCfg.getEntCfg().get(entityName).getIdMapper()
- .addIdEqualsToQuery(parameters, id, verCfg.getVerEntCfg().getOriginalIdPropName(), true);
+ .addIdEqualsToQuery(parameters, id, verCfg.getAuditEntCfg().getOriginalIdPropName(), true);
}
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/query/criteria/RevisionVersionsExpression.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/query/criteria/RevisionVersionsExpression.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/query/criteria/RevisionVersionsExpression.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -40,6 +40,6 @@
}
public void addToQuery(AuditConfiguration verCfg, String entityName, QueryBuilder qb, Parameters parameters) {
- parameters.addWhereWithParam(verCfg.getVerEntCfg().getRevisionPropPath(), op, value);
+ parameters.addWhereWithParam(verCfg.getAuditEntCfg().getRevisionPropPath(), op, value);
}
}
\ No newline at end of file
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/query/impl/AbstractVersionsQuery.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/query/impl/AbstractVersionsQuery.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/query/impl/AbstractVersionsQuery.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -73,7 +73,7 @@
entityInstantiator = new EntityInstantiator(verCfg, versionsReader);
entityName = cls.getName();
- versionsEntityName = verCfg.getVerEntCfg().getVersionsEntityName(entityName);
+ versionsEntityName = verCfg.getAuditEntCfg().getVersionsEntityName(entityName);
qb = new QueryBuilder(versionsEntityName, "e");
}
@@ -84,8 +84,6 @@
qb.build(querySb, queryParamValues);
- System.out.println("QUERY: " + querySb.toString());
-
Query query = versionsReader.getSession().createQuery(querySb.toString());
for (Map.Entry<String, Object> paramValue : queryParamValues.entrySet()) {
query.setParameter(paramValue.getKey(), paramValue.getValue());
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/query/impl/EntitiesAtRevisionQuery.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/query/impl/EntitiesAtRevisionQuery.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/query/impl/EntitiesAtRevisionQuery.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -59,7 +59,7 @@
QueryBuilder maxRevQb = qb.newSubQueryBuilder(versionsEntityName, "e2");
- AuditEntitiesConfiguration verEntCfg = verCfg.getVerEntCfg();
+ AuditEntitiesConfiguration verEntCfg = verCfg.getAuditEntCfg();
String revisionPropertyPath = verEntCfg.getRevisionPropPath();
String originalIdPropertyName = verEntCfg.getOriginalIdPropName();
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/query/impl/RevisionsOfEntityQuery.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/query/impl/RevisionsOfEntityQuery.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/query/impl/RevisionsOfEntityQuery.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -54,7 +54,7 @@
}
private Number getRevisionNumber(Map versionsEntity) {
- AuditEntitiesConfiguration verEntCfg = verCfg.getVerEntCfg();
+ AuditEntitiesConfiguration verEntCfg = verCfg.getAuditEntCfg();
String originalId = verEntCfg.getOriginalIdPropName();
String revisionPropertyName = verEntCfg.getRevisionPropName();
@@ -71,7 +71,7 @@
@SuppressWarnings({"unchecked"})
public List list() throws AuditException {
- AuditEntitiesConfiguration verEntCfg = verCfg.getVerEntCfg();
+ AuditEntitiesConfiguration verEntCfg = verCfg.getAuditEntCfg();
/*
The query that should be executed in the versions table:
@@ -97,8 +97,8 @@
}
if (!selectEntitiesOnly) {
- qb.addFrom(verCfg.getVerEntCfg().getRevisionInfoEntityName(), "r");
- qb.getRootParameters().addWhere(verCfg.getVerEntCfg().getRevisionPropPath(), true, "=", "r.id", false);
+ qb.addFrom(verCfg.getAuditEntCfg().getRevisionInfoEntityName(), "r");
+ qb.getRootParameters().addWhere(verCfg.getAuditEntCfg().getRevisionPropPath(), true, "=", "r.id", false);
}
List<Object> queryResult = buildAndExecuteQuery();
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/query/order/RevisionVersionsOrder.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/query/order/RevisionVersionsOrder.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/query/order/RevisionVersionsOrder.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -37,7 +37,7 @@
}
public Pair<String, Boolean> getData(AuditConfiguration verCfg) {
- String revisionPropPath = verCfg.getVerEntCfg().getRevisionPropPath();
+ String revisionPropPath = verCfg.getAuditEntCfg().getRevisionPropPath();
return Pair.make(revisionPropPath, asc);
}
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/query/projection/RevisionVersionsProjection.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/query/projection/RevisionVersionsProjection.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/query/projection/RevisionVersionsProjection.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -45,7 +45,7 @@
}
public Triple<String, String, Boolean> getData(AuditConfiguration verCfg) {
- String revisionPropPath = verCfg.getVerEntCfg().getRevisionPropPath();
+ String revisionPropPath = verCfg.getAuditEntCfg().getRevisionPropPath();
switch (type) {
case MAX: return Triple.make("max", revisionPropPath, false);
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/revisioninfo/DefaultRevisionInfoGenerator.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/revisioninfo/DefaultRevisionInfoGenerator.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/revisioninfo/DefaultRevisionInfoGenerator.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -24,6 +24,7 @@
package org.hibernate.envers.revisioninfo;
import org.hibernate.envers.RevisionListener;
+import org.hibernate.envers.entities.PropertyData;
import org.hibernate.envers.tools.reflection.ReflectionTools;
import org.hibernate.MappingException;
@@ -41,11 +42,11 @@
public DefaultRevisionInfoGenerator(String revisionInfoEntityName, Class<?> revisionInfoClass,
Class<? extends RevisionListener> listenerClass,
- String revisionInfoTimestampName) {
+ PropertyData revisionInfoTimestampData) {
this.revisionInfoEntityName = revisionInfoEntityName;
this.revisionInfoClass = revisionInfoClass;
- revisionTimestampSetter = ReflectionTools.getSetter(revisionInfoClass, revisionInfoTimestampName);
+ revisionTimestampSetter = ReflectionTools.getSetter(revisionInfoClass, revisionInfoTimestampData);
if (!listenerClass.equals(RevisionListener.class)) {
// This is not the default value.
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/revisioninfo/RevisionInfoNumberReader.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/revisioninfo/RevisionInfoNumberReader.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/revisioninfo/RevisionInfoNumberReader.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -24,6 +24,7 @@
package org.hibernate.envers.revisioninfo;
import org.hibernate.envers.tools.reflection.ReflectionTools;
+import org.hibernate.envers.entities.PropertyData;
import org.hibernate.property.Getter;
@@ -33,8 +34,8 @@
*/
public class RevisionInfoNumberReader {
private final Getter revisionIdGetter;
- public RevisionInfoNumberReader(Class<?> revisionInfoClass, String revisionInfoIdName) {
- revisionIdGetter = ReflectionTools.getGetter(revisionInfoClass, revisionInfoIdName);
+ public RevisionInfoNumberReader(Class<?> revisionInfoClass, PropertyData revisionInfoIdData) {
+ revisionIdGetter = ReflectionTools.getGetter(revisionInfoClass, revisionInfoIdData);
}
public Number getRevisionNumber(Object revision) {
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/AbstractAuditWorkUnit.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/AbstractAuditWorkUnit.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/AbstractAuditWorkUnit.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -51,7 +51,7 @@
}
protected void fillDataWithId(Map<String, Object> data, Object revision, RevisionType revisionType) {
- AuditEntitiesConfiguration entitiesCfg = verCfg.getVerEntCfg();
+ AuditEntitiesConfiguration entitiesCfg = verCfg.getAuditEntCfg();
Map<String, Object> originalId = new HashMap<String, Object>();
originalId.put(entitiesCfg.getRevisionPropName(), revision);
@@ -79,7 +79,7 @@
public void undo(Session session) {
if (isPerformed()) {
- session.delete(verCfg.getVerEntCfg().getVersionsEntityName(getEntityName()), performedData);
+ session.delete(verCfg.getAuditEntCfg().getVersionsEntityName(getEntityName()), performedData);
session.flush();
}
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/AddWorkUnit.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/AddWorkUnit.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/AddWorkUnit.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -58,7 +58,7 @@
verCfg.getEntCfg().get(getEntityName()).getPropertyMapper().map(data, propertyNames, state, null);
- session.save(verCfg.getVerEntCfg().getVersionsEntityName(getEntityName()), data);
+ session.save(verCfg.getAuditEntCfg().getVersionsEntityName(getEntityName()), data);
setPerformed(data);
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/CollectionChangeWorkUnit.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/CollectionChangeWorkUnit.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/CollectionChangeWorkUnit.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -54,7 +54,7 @@
verCfg.getEntCfg().get(getEntityName()).getPropertyMapper().mapToMapFromEntity(data, entity, null);
- session.save(verCfg.getVerEntCfg().getVersionsEntityName(getEntityName()), data);
+ session.save(verCfg.getAuditEntCfg().getVersionsEntityName(getEntityName()), data);
setPerformed(data);
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/DelWorkUnit.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/DelWorkUnit.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/DelWorkUnit.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -48,7 +48,7 @@
Map<String, Object> data = new HashMap<String, Object>();
fillDataWithId(data, revisionData, RevisionType.DEL);
- session.save(verCfg.getVerEntCfg().getVersionsEntityName(getEntityName()), data);
+ session.save(verCfg.getAuditEntCfg().getVersionsEntityName(getEntityName()), data);
setPerformed(data);
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/ModWorkUnit.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/ModWorkUnit.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/ModWorkUnit.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -56,7 +56,7 @@
public void perform(Session session, Object revisionData) {
fillDataWithId(data, revisionData, RevisionType.MOD);
- session.save(verCfg.getVerEntCfg().getVersionsEntityName(getEntityName()), data);
+ session.save(verCfg.getAuditEntCfg().getVersionsEntityName(getEntityName()), data);
setPerformed(data);
}
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/PersistentCollectionChangeWorkUnit.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/PersistentCollectionChangeWorkUnit.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/synchronization/work/PersistentCollectionChangeWorkUnit.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -58,7 +58,7 @@
@SuppressWarnings({"unchecked"})
public void perform(Session session, Object revisionData) {
- AuditEntitiesConfiguration entitiesCfg = verCfg.getVerEntCfg();
+ AuditEntitiesConfiguration entitiesCfg = verCfg.getAuditEntCfg();
for (PersistentCollectionChangeData persistentCollectionChangeData : collectionChanges) {
// Setting the revision number
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/tools/Tools.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/tools/Tools.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/tools/Tools.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -23,11 +23,7 @@
*/
package org.hibernate.envers.tools;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* @author Adam Warski (adam at warski dot org)
@@ -37,6 +33,14 @@
return new HashMap<K,V>();
}
+ public static <E> Set<E> newHashSet() {
+ return new HashSet<E>();
+ }
+
+ public static <K,V> Map<K,V> newLinkedHashMap() {
+ return new LinkedHashMap<K,V>();
+ }
+
public static boolean objectsEqual(Object obj1, Object obj2) {
if (obj1 == null) {
return obj2 == null;
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/tools/reflection/ReflectionTools.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/tools/reflection/ReflectionTools.java 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/tools/reflection/ReflectionTools.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -29,12 +29,9 @@
import org.hibernate.envers.tools.ConcurrentReferenceHashMap;
import org.hibernate.envers.tools.Pair;
import static org.hibernate.envers.tools.Pair.make;
+import org.hibernate.envers.entities.PropertyData;
-import org.hibernate.property.BasicPropertyAccessor;
-import org.hibernate.property.Getter;
-import org.hibernate.property.PropertyAccessor;
-import org.hibernate.property.Setter;
-import org.hibernate.util.ReflectHelper;
+import org.hibernate.property.*;
/**
* @author Adam Warski (adam at warski dot org)
@@ -49,8 +46,6 @@
ConcurrentReferenceHashMap.ReferenceType.SOFT,
ConcurrentReferenceHashMap.ReferenceType.SOFT);
- private static final PropertyAccessor BASIC_PROPERTY_ACCESSOR = new BasicPropertyAccessor();
-
public static Class<?> loadClass(String name) {
try {
return Thread.currentThread().getContextClassLoader().loadClass(name);
@@ -59,11 +54,19 @@
}
}
- public static Getter getGetter(Class cls, String propertyName) {
+ private static PropertyAccessor getAccessor(String accessorType) {
+ return PropertyAccessorFactory.getPropertyAccessor(accessorType);
+ }
+
+ public static Getter getGetter(Class cls, PropertyData propertyData) {
+ return getGetter(cls, propertyData.getName(), propertyData.getAccessType());
+ }
+
+ public static Getter getGetter(Class cls, String propertyName, String accessorType) {
Pair<Class, String> key = make(cls, propertyName);
Getter value = getterCache.get(key);
if (value == null) {
- value = ReflectHelper.getGetter(cls, propertyName);
+ value = getAccessor(accessorType).getGetter(cls, propertyName);
// It's ok if two getters are generated concurrently
getterCache.put(key, value);
}
@@ -71,11 +74,15 @@
return value;
}
- public static Setter getSetter(Class cls, String propertyName) {
+ public static Setter getSetter(Class cls, PropertyData propertyData) {
+ return getSetter(cls, propertyData.getName(), propertyData.getAccessType());
+ }
+
+ public static Setter getSetter(Class cls, String propertyName, String accessorType) {
Pair<Class, String> key = make(cls, propertyName);
Setter value = setterCache.get(key);
if (value == null) {
- value = BASIC_PROPERTY_ACCESSOR.getSetter(cls, propertyName);
+ value = getAccessor(accessorType).getSetter(cls, propertyName);
// It's ok if two setters are generated concurrently
setterCache.put(key, value);
}
Copied: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/FieldAccessType.java (from rev 15478, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/Dates.java)
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/FieldAccessType.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/FieldAccessType.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -0,0 +1,74 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+
+package org.hibernate.envers.test.integration.accesstype;
+
+import java.util.Arrays;
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.ejb.Ejb3Configuration;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+public class FieldAccessType extends AbstractEntityTest {
+ private Integer id1;
+
+ public void configure(Ejb3Configuration cfg) {
+ cfg.addAnnotatedClass(FieldAccessTypeEntity.class);
+ }
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ EntityManager em = getEntityManager();
+ em.getTransaction().begin();
+ FieldAccessTypeEntity fate = new FieldAccessTypeEntity("data");
+ em.persist(fate);
+ id1 = fate.readId();
+ em.getTransaction().commit();
+
+ em.getTransaction().begin();
+ fate = em.find(FieldAccessTypeEntity.class, id1);
+ fate.writeData("data2");
+ em.getTransaction().commit();
+ }
+
+ @Test
+ public void testRevisionsCounts() {
+ assert Arrays.asList(1, 2).equals(getVersionsReader().getRevisions(FieldAccessTypeEntity.class, id1));
+ }
+
+ @Test
+ public void testHistoryOfId1() {
+ FieldAccessTypeEntity ver1 = new FieldAccessTypeEntity(id1, "data");
+ FieldAccessTypeEntity ver2 = new FieldAccessTypeEntity(id1, "data2");
+
+ assert getVersionsReader().find(FieldAccessTypeEntity.class, id1, 1).equals(ver1);
+ assert getVersionsReader().find(FieldAccessTypeEntity.class, id1, 2).equals(ver2);
+ }
+}
\ No newline at end of file
Property changes on: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/FieldAccessType.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/FieldAccessTypeEntity.java (from rev 15478, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/data/DateTestEntity.java)
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/FieldAccessTypeEntity.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/FieldAccessTypeEntity.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -0,0 +1,99 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+
+package org.hibernate.envers.test.integration.accesstype;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+@Entity
+public class FieldAccessTypeEntity {
+ @Id
+ @GeneratedValue
+ private Integer id;
+
+ @Audited
+ private String data;
+
+ public FieldAccessTypeEntity() {
+ }
+
+ public FieldAccessTypeEntity(String data) {
+ this.data = data;
+ }
+
+ public FieldAccessTypeEntity(Integer id, String data) {
+ this.id = id;
+ this.data = data;
+ }
+
+ public Integer getId() {
+ throw new RuntimeException();
+ }
+
+ public void setId(Integer id) {
+ throw new RuntimeException();
+ }
+
+ public String getData() {
+ throw new RuntimeException();
+ }
+
+ public void setData(String data) {
+ throw new RuntimeException();
+ }
+
+ public Integer readId() {
+ return id;
+ }
+
+ public void writeData(String data) {
+ this.data = data;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof FieldAccessTypeEntity)) return false;
+
+ FieldAccessTypeEntity that = (FieldAccessTypeEntity) o;
+
+ if (data != null ? !data.equals(that.data) : that.data != null) return false;
+ if (id != null ? !id.equals(that.id) : that.id != null) return false;
+
+ return true;
+ }
+
+ public int hashCode() {
+ int result;
+ result = (id != null ? id.hashCode() : 0);
+ result = 31 * result + (data != null ? data.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
Property changes on: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/FieldAccessTypeEntity.java
___________________________________________________________________
Name: svn:mergeinfo
+
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/MixedAccessType.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/MixedAccessType.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/MixedAccessType.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -0,0 +1,79 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+package org.hibernate.envers.test.integration.accesstype;
+
+import java.util.Arrays;
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.ejb.Ejb3Configuration;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+public class MixedAccessType extends AbstractEntityTest {
+ private Integer id1;
+
+ public void configure(Ejb3Configuration cfg) {
+ cfg.addAnnotatedClass(MixedAccessTypeEntity.class);
+ }
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ EntityManager em = getEntityManager();
+ em.getTransaction().begin();
+ MixedAccessTypeEntity mate = new MixedAccessTypeEntity("data");
+ em.persist(mate);
+ id1 = mate.readId();
+ em.getTransaction().commit();
+
+ em.getTransaction().begin();
+ mate = em.find(MixedAccessTypeEntity.class, id1);
+ mate.writeData("data2");
+ em.getTransaction().commit();
+ }
+
+ @Test
+ public void testRevisionsCounts() {
+ assert Arrays.asList(1, 2).equals(getVersionsReader().getRevisions(MixedAccessTypeEntity.class, id1));
+ }
+
+ @Test
+ public void testHistoryOfId1() {
+ MixedAccessTypeEntity ver1 = new MixedAccessTypeEntity(id1, "data");
+ MixedAccessTypeEntity ver2 = new MixedAccessTypeEntity(id1, "data2");
+
+ MixedAccessTypeEntity rev1 = getVersionsReader().find(MixedAccessTypeEntity.class, id1, 1);
+ MixedAccessTypeEntity rev2 = getVersionsReader().find(MixedAccessTypeEntity.class, id1, 2);
+
+ assert rev1.isDataSet();
+ assert rev2.isDataSet();
+
+ assert rev1.equals(ver1);
+ assert rev2.equals(ver2);
+ }
+}
\ No newline at end of file
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/MixedAccessTypeEntity.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/MixedAccessTypeEntity.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/MixedAccessTypeEntity.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -0,0 +1,111 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+package org.hibernate.envers.test.integration.accesstype;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Transient;
+
+import org.hibernate.envers.Audited;
+import org.hibernate.annotations.AccessType;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+@Entity
+public class MixedAccessTypeEntity {
+ @Id
+ @GeneratedValue
+ private Integer id;
+
+ @AccessType("property")
+ private String data;
+
+ @Transient
+ private boolean dataSet;
+
+ public MixedAccessTypeEntity() {
+ }
+
+ public MixedAccessTypeEntity(String data) {
+ this.data = data;
+ }
+
+ public MixedAccessTypeEntity(Integer id, String data) {
+ this.id = id;
+ this.data = data;
+ }
+
+ public Integer getId() {
+ throw new RuntimeException();
+ }
+
+ public void setId(Integer id) {
+ throw new RuntimeException();
+ }
+
+ // TODO: this should be on the property. But how to discover in AnnotationsMetadataReader that the
+ // we should read annotations from fields, even though the access type is "property"?
+ @Audited
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ dataSet = true;
+ }
+
+ public boolean isDataSet() {
+ return dataSet;
+ }
+
+ public Integer readId() {
+ return id;
+ }
+
+ public void writeData(String data) {
+ this.data = data;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof MixedAccessTypeEntity)) return false;
+
+ MixedAccessTypeEntity that = (MixedAccessTypeEntity) o;
+
+ if (data != null ? !data.equals(that.data) : that.data != null) return false;
+ if (id != null ? !id.equals(that.id) : that.id != null) return false;
+
+ return true;
+ }
+
+ public int hashCode() {
+ int result;
+ result = (id != null ? id.hashCode() : 0);
+ result = 31 * result + (data != null ? data.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/PropertyAccessType.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/PropertyAccessType.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/PropertyAccessType.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -0,0 +1,82 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+package org.hibernate.envers.test.integration.accesstype;
+
+import java.util.Arrays;
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.ejb.Ejb3Configuration;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+public class PropertyAccessType extends AbstractEntityTest {
+ private Integer id1;
+
+ public void configure(Ejb3Configuration cfg) {
+ cfg.addAnnotatedClass(PropertyAccessTypeEntity.class);
+ }
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ EntityManager em = getEntityManager();
+ em.getTransaction().begin();
+ PropertyAccessTypeEntity pate = new PropertyAccessTypeEntity("data");
+ em.persist(pate);
+ id1 = pate.getId();
+ em.getTransaction().commit();
+
+ em.getTransaction().begin();
+ pate = em.find(PropertyAccessTypeEntity.class, id1);
+ pate.writeData("data2");
+ em.getTransaction().commit();
+ }
+
+ @Test
+ public void testRevisionsCounts() {
+ assert Arrays.asList(1, 2).equals(getVersionsReader().getRevisions(PropertyAccessTypeEntity.class, id1));
+ }
+
+ @Test
+ public void testHistoryOfId1() {
+ PropertyAccessTypeEntity ver1 = new PropertyAccessTypeEntity(id1, "data");
+ PropertyAccessTypeEntity ver2 = new PropertyAccessTypeEntity(id1, "data2");
+
+ PropertyAccessTypeEntity rev1 = getVersionsReader().find(PropertyAccessTypeEntity.class, id1, 1);
+ PropertyAccessTypeEntity rev2 = getVersionsReader().find(PropertyAccessTypeEntity.class, id1, 2);
+
+ assert rev1.isIdSet();
+ assert rev2.isIdSet();
+
+ assert rev1.isDataSet();
+ assert rev2.isDataSet();
+
+ assert rev1.equals(ver1);
+ assert rev2.equals(ver2);
+ }
+}
\ No newline at end of file
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/PropertyAccessTypeEntity.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/PropertyAccessTypeEntity.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/accesstype/PropertyAccessTypeEntity.java 2008-11-03 11:24:30 UTC (rev 15481)
@@ -0,0 +1,110 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+
+package org.hibernate.envers.test.integration.accesstype;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Transient;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+@Entity
+public class PropertyAccessTypeEntity {
+ private Integer id;
+ private String data;
+
+ private boolean idSet;
+ private boolean dataSet;
+
+ public PropertyAccessTypeEntity() {
+ }
+
+ public PropertyAccessTypeEntity(String data) {
+ this.data = data;
+ }
+
+ public PropertyAccessTypeEntity(Integer id, String data) {
+ this.id = id;
+ this.data = data;
+ }
+
+ @Id
+ @GeneratedValue
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ idSet = true;
+ }
+
+ @Audited
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ dataSet = true;
+ }
+
+ @Transient
+ public boolean isIdSet() {
+ return idSet;
+ }
+
+ @Transient
+ public boolean isDataSet() {
+ return dataSet;
+ }
+
+ public void writeData(String data) {
+ this.data = data;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof PropertyAccessTypeEntity)) return false;
+
+ PropertyAccessTypeEntity that = (PropertyAccessTypeEntity) o;
+
+ if (data != null ? !data.equals(that.data) : that.data != null) return false;
+ if (id != null ? !id.equals(that.id) : that.id != null) return false;
+
+ return true;
+ }
+
+ public int hashCode() {
+ int result;
+ result = (id != null ? id.hashCode() : 0);
+ result = 31 * result + (data != null ? data.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
Modified: core/trunk/envers/src/test/resources/hibernate.test.cfg.xml
===================================================================
--- core/trunk/envers/src/test/resources/hibernate.test.cfg.xml 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/test/resources/hibernate.test.cfg.xml 2008-11-03 11:24:30 UTC (rev 15481)
@@ -17,6 +17,12 @@
<property name="connection.username">sa</property>
<property name="connection.password"></property>
+ <!--<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
+ <property name="connection.url">jdbc:mysql:///hibernate_tests?useUnicode=true&characterEncoding=UTF-8</property>
+ <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
+ <property name="connection.username">root</property>
+ <property name="connection.password"></property>-->
+
<event type="post-insert">
<listener class="org.hibernate.envers.event.VersionsEventListener" />
</event>
Modified: core/trunk/envers/src/test/resources/testng.xml
===================================================================
--- core/trunk/envers/src/test/resources/testng.xml 2008-11-03 10:26:13 UTC (rev 15480)
+++ core/trunk/envers/src/test/resources/testng.xml 2008-11-03 11:24:30 UTC (rev 15481)
@@ -3,6 +3,7 @@
<suite name="Envers">
<test name="All">
<packages>
+ <package name="org.hibernate.envers.test.integration.accesstype" />
<package name="org.hibernate.envers.test.integration.basic" />
<package name="org.hibernate.envers.test.integration.cache" />
<package name="org.hibernate.envers.test.integration.collection" />
16 years, 2 months
Hibernate SVN: r15480 - in core/trunk/entitymanager: doc/api and 2 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2008-11-03 05:26:13 -0500 (Mon, 03 Nov 2008)
New Revision: 15480
Added:
core/trunk/entitymanager/src/main/javadoc/
core/trunk/entitymanager/src/main/javadoc/jdstyle.css
core/trunk/entitymanager/src/main/javadoc/package.html
Removed:
core/trunk/entitymanager/doc/api/jdstyle.css
core/trunk/entitymanager/doc/api/package.html
core/trunk/entitymanager/ivy.xml
core/trunk/entitymanager/lib/
Log:
HHH-3580 - moved some resources around and deleted obsolete ones
Deleted: core/trunk/entitymanager/doc/api/jdstyle.css
===================================================================
--- core/trunk/entitymanager/doc/api/jdstyle.css 2008-11-03 10:22:12 UTC (rev 15479)
+++ core/trunk/entitymanager/doc/api/jdstyle.css 2008-11-03 10:26:13 UTC (rev 15480)
@@ -1,117 +0,0 @@
-/* Javadoc style sheet */
-
-/* Define colors, fonts and other style attributes here to override the defaults */
-
-/* Page background color */
-body { font-family: Arial;
- background-color: white;
- font-size: 10pt;
- }
-td { font-family: Arial;
- font-size: 10pt;
- }
-/* Table colors */
-.TableHeadingColor { background: #F4F4F4 }
-.TableSubHeadingColor { background: #F4F4F4 }
-.TableRowColor { background: #FFFFFF }
-
-/* Font used in left-hand frame lists */
-.FrameTitleFont { font-size: normal; font-family: Arial }
-.FrameHeadingFont { font-size: normal; font-family: Arial }
-.FrameItemFont { font-size: normal; font-family: Arial }
-
-/* Example of smaller, sans-serif font in frames */
-/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
-
-/* Navigation bar fonts and colors */
-.NavBarCell1 { background-color:#F4F4F4;}
-.NavBarCell1Rev { background-color:silver;}
-
-.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
-.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
-
-.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
-.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
-
-A {
- color: #003399;
-}
-
-A:active {
- color: #003399;
-}
-
-A:visited {
- color: #888888;
-}
-
-P, OL, UL, LI, DL, DT, DD, BLOCKQUOTE {
- color: #000000;
-}
-
-TD, TH, SPAN {
- color: #000000;
-}
-
-BLOCKQUOTE {
- margin-right: 0px;
-}
-
-
-/*H1, H2, H3, H4, H5, H6 {
- color: #000000;
- font-weight:500;
- margin-top:10px;
- padding-top:15px;
-}
-
-H1 { font-size: 150%; }
-H2 { font-size: 140%; }
-H3 { font-size: 110%; font-weight: bold; }
-H4 { font-size: 110%; font-weight: bold;}
-H5 { font-size: 100%; font-style: italic; }
-H6 { font-size: 100%; font-style: italic; }*/
-
-TT {
-font-size: 90%;
- font-family: "Courier New", Courier, monospace;
- color: #000000;
-}
-
-PRE {
-font-size: 90%;
- padding: 5px;
- border-style: solid;
- border-width: 1px;
- border-color: #CCCCCC;
- background-color: #F4F4F4;
-}
-
-UL, OL, LI {
- list-style: disc;
-}
-
-HR {
- width: 100%;
- height: 1px;
- background-color: #CCCCCC;
- border-width: 0px;
- padding: 0px;
- color: #CCCCCC;
-}
-
-.variablelist {
- padding-top: 10;
- padding-bottom:10;
- margin:0;
-}
-
-.itemizedlist, UL {
- padding-top: 0;
- padding-bottom:0;
- margin:0;
-}
-
-.term {
- font-weight:bold;
-}
Deleted: core/trunk/entitymanager/doc/api/package.html
===================================================================
--- core/trunk/entitymanager/doc/api/package.html 2008-11-03 10:22:12 UTC (rev 15479)
+++ core/trunk/entitymanager/doc/api/package.html 2008-11-03 10:26:13 UTC (rev 15480)
@@ -1 +0,0 @@
-<body></body>
Deleted: core/trunk/entitymanager/ivy.xml
===================================================================
--- core/trunk/entitymanager/ivy.xml 2008-11-03 10:22:12 UTC (rev 15479)
+++ core/trunk/entitymanager/ivy.xml 2008-11-03 10:26:13 UTC (rev 15480)
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ivy-module version="1.3"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation=
- "http://www.jayasoft.org/misc/ivy/ivy.xsd">
- <info organisation="org.hibernate" module="entitymanager"/>
- <configurations>
- <conf name="default" description="Core module dependencies"/>
- <conf name="test" visibility="private" description="Dependencies needed for testing purposes"/>
- </configurations>
- <publications>
- <artifact name="hibernate-entitymanager" conf="default"/>
- </publications>
- <dependencies>
- <!-- compile time dependencies -->
- <dependency name="ejb3-persistence" rev="1.0.2.GA" conf="default->default"/>
- <dependency name="commons-annotations" rev="3.1.0.GA" conf="default->default"/>
- <dependency name="annotations" rev="3.4.0.GA" conf="default->default"/>
- <dependency org="org.hibernate" name="hibernate-core" rev="3.3.0.SP1" conf="default->default"/>
- <dependency org="dom4j" name="dom4j" rev="1.6.1" conf="default->default"/>
- <dependency org="javax.transaction" name="jta" rev="1.1" conf="default->default"/>
- <dependency org="javassist" name="javassist" rev="3.4.GA" conf="default->default"/>
- <dependency org="org.slf4j" name="slf4j-api" rev="1.4.2" conf="default->default"/>
-
- <!-- transitive dependencies -->
- <dependency org="antlr" name="antlr" rev="2.7.6" conf="test->default"/>
- <dependency org="commons-collections" name="commons-collections" rev="3.1" conf="test->default"/>
-
- <!-- test deps -->
- <dependency org="cglib" name="cglib" rev="2.1_3" conf="test->default"/>
- <dependency org="asm" name="asm" rev="1.5.3" conf="test->default"/>
- <dependency org="asm" name="asm-attrs" rev="1.5.3" conf="test->default"/>
- <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.4.2" conf="test->default"/>
- <dependency org="log4j" name="log4j" rev="1.2.14" conf="test->default"/>
- <dependency org="junit" name="junit" rev="3.8.1" conf="test->default"/>
- </dependencies>
-</ivy-module>
\ No newline at end of file
Copied: core/trunk/entitymanager/src/main/javadoc/jdstyle.css (from rev 15478, core/trunk/entitymanager/doc/api/jdstyle.css)
===================================================================
--- core/trunk/entitymanager/src/main/javadoc/jdstyle.css (rev 0)
+++ core/trunk/entitymanager/src/main/javadoc/jdstyle.css 2008-11-03 10:26:13 UTC (rev 15480)
@@ -0,0 +1,117 @@
+/* Javadoc style sheet */
+
+/* Define colors, fonts and other style attributes here to override the defaults */
+
+/* Page background color */
+body { font-family: Arial;
+ background-color: white;
+ font-size: 10pt;
+ }
+td { font-family: Arial;
+ font-size: 10pt;
+ }
+/* Table colors */
+.TableHeadingColor { background: #F4F4F4 }
+.TableSubHeadingColor { background: #F4F4F4 }
+.TableRowColor { background: #FFFFFF }
+
+/* Font used in left-hand frame lists */
+.FrameTitleFont { font-size: normal; font-family: Arial }
+.FrameHeadingFont { font-size: normal; font-family: Arial }
+.FrameItemFont { font-size: normal; font-family: Arial }
+
+/* Example of smaller, sans-serif font in frames */
+/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
+
+/* Navigation bar fonts and colors */
+.NavBarCell1 { background-color:#F4F4F4;}
+.NavBarCell1Rev { background-color:silver;}
+
+.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
+.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
+
+.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
+.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
+
+A {
+ color: #003399;
+}
+
+A:active {
+ color: #003399;
+}
+
+A:visited {
+ color: #888888;
+}
+
+P, OL, UL, LI, DL, DT, DD, BLOCKQUOTE {
+ color: #000000;
+}
+
+TD, TH, SPAN {
+ color: #000000;
+}
+
+BLOCKQUOTE {
+ margin-right: 0px;
+}
+
+
+/*H1, H2, H3, H4, H5, H6 {
+ color: #000000;
+ font-weight:500;
+ margin-top:10px;
+ padding-top:15px;
+}
+
+H1 { font-size: 150%; }
+H2 { font-size: 140%; }
+H3 { font-size: 110%; font-weight: bold; }
+H4 { font-size: 110%; font-weight: bold;}
+H5 { font-size: 100%; font-style: italic; }
+H6 { font-size: 100%; font-style: italic; }*/
+
+TT {
+font-size: 90%;
+ font-family: "Courier New", Courier, monospace;
+ color: #000000;
+}
+
+PRE {
+font-size: 90%;
+ padding: 5px;
+ border-style: solid;
+ border-width: 1px;
+ border-color: #CCCCCC;
+ background-color: #F4F4F4;
+}
+
+UL, OL, LI {
+ list-style: disc;
+}
+
+HR {
+ width: 100%;
+ height: 1px;
+ background-color: #CCCCCC;
+ border-width: 0px;
+ padding: 0px;
+ color: #CCCCCC;
+}
+
+.variablelist {
+ padding-top: 10;
+ padding-bottom:10;
+ margin:0;
+}
+
+.itemizedlist, UL {
+ padding-top: 0;
+ padding-bottom:0;
+ margin:0;
+}
+
+.term {
+ font-weight:bold;
+}
Property changes on: core/trunk/entitymanager/src/main/javadoc/jdstyle.css
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: core/trunk/entitymanager/src/main/javadoc/package.html (from rev 15478, core/trunk/entitymanager/doc/api/package.html)
===================================================================
--- core/trunk/entitymanager/src/main/javadoc/package.html (rev 0)
+++ core/trunk/entitymanager/src/main/javadoc/package.html 2008-11-03 10:26:13 UTC (rev 15480)
@@ -0,0 +1 @@
+<body></body>
Property changes on: core/trunk/entitymanager/src/main/javadoc/package.html
___________________________________________________________________
Name: svn:mergeinfo
+
16 years, 2 months
Hibernate SVN: r15479 - in core/trunk/entitymanager: doc/reference and 5 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2008-11-03 05:22:12 -0500 (Mon, 03 Nov 2008)
New Revision: 15479
Added:
core/trunk/entitymanager/src/main/docbook/
core/trunk/entitymanager/src/main/docbook/en/
Removed:
core/trunk/entitymanager/build.properties.dist
core/trunk/entitymanager/build.xml
core/trunk/entitymanager/common-build.xml
core/trunk/entitymanager/doc/reference/en/
core/trunk/entitymanager/ivy/
core/trunk/entitymanager/jdbc/
core/trunk/entitymanager/lgpl.txt
core/trunk/entitymanager/readme.txt
core/trunk/entitymanager/src/filters/
Modified:
core/trunk/entitymanager/pom.xml
core/trunk/entitymanager/src/test/resources/hibernate.properties
Log:
HHH-3580 - get sources compile and most tests working
Deleted: core/trunk/entitymanager/build.properties.dist
===================================================================
--- core/trunk/entitymanager/build.properties.dist 2008-10-31 20:40:42 UTC (rev 15478)
+++ core/trunk/entitymanager/build.properties.dist 2008-11-03 10:22:12 UTC (rev 15479)
@@ -1,5 +0,0 @@
-common.dir=.
-src.dir=src
-test.dir=test
-resources.dir=resources
-testresources.dir=test-resources
\ No newline at end of file
Deleted: core/trunk/entitymanager/build.xml
===================================================================
--- core/trunk/entitymanager/build.xml 2008-10-31 20:40:42 UTC (rev 15478)
+++ core/trunk/entitymanager/build.xml 2008-11-03 10:22:12 UTC (rev 15479)
@@ -1,460 +0,0 @@
-<!-- $Id$ -->
-<!--
-
- Hibernate Entity Manager ANT build script.
-
- You need JDK 5.0 installed to build Hibernate EntityManager.
-
--->
-
-<project name="HibernateEntityManager" default="dist" basedir="."
- xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
-
- <!-- Give user a chance to override without editing this file
- (and without typing -D each time it compiles it) -->
- <property file="build.properties"/>
- <property file="${user.home}/.ant.properties"/>
-
- <!-- Name of project and version, used to create filenames -->
- <property name="Name" value="Hibernate EntityManager"/>
- <property name="name" value="hibernate-entitymanager"/>
- <property name="version" value="3.4.0.GA"/>
- <property name="javadoc.packagenames" value="org.hibernate.ejb.*"/>
- <property name="jdbc.dir" value="jdbc"/>
- <property name="copy.test" value="true"/>
- <property name="javac.source" value="1.5"/>
- <property name="javac.target" value="1.5"/>
- <property name="common.dir" value="${basedir}"/>
-
- <available property="jpa-present" file="${basedir}/../jpa-api" type="dir"/>
- <property name="ivy.dep.dir" value="${basedir}/build/lib"/>
-
- <import file="${common.dir}/common-build.xml"/>
- <property name="jpa-javadoc.dir" value="${dist.doc.dir}/jpa-api"/>
-
- <property name="resources.dir" value="src/resources"/>
- <property name="testresources.dir" value="src/test-resources"/>
- <property name="build.testresources.dir" value="${build.dir}/testresources"/>
- <property name="build.temp.dir" value="${build.dir}/temp"/>
-
- <path id="lib.moduleclass.path">
- <fileset dir="${ivy.dep.dir}/core">
- <include name="*.jar"/>
- </fileset>
- </path>
- <path id="junit.moduleclasspath">
- <pathelement location="${src.dir}"/>
- <pathelement location="${test.dir}"/>
- <fileset dir="${jdbc.dir}">
- <include name="*.jar"/>
- <include name="*.zip"/>
- </fileset>
- <fileset dir="${lib.dir}/test">
- <include name="*.jar"/>
- <include name="*.zip"/>
- </fileset>
- <fileset dir="${ivy.dep.dir}/test">
- <include name="*.jar"/>
- </fileset>
- </path>
-
- <!-- ivy load -->
- <property name="ivy.jar.dir" value="${basedir}/ivy"/>
- <property name="ivy.conf.dir" value="${basedir}"/>
- <path id="ivy.lib.path">
- <fileset dir="${ivy.jar.dir}" includes="*.jar"/>
- </path>
- <taskdef resource="fr/jayasoft/ivy/ant/antlib.xml"
- uri="antlib:fr.jayasoft.ivy.ant" classpathref="ivy.lib.path"/>
-
- <target name="init">
- <antcall target="common-build.init"/>
- <tstamp>
- <format property="now" pattern="yyyyMMddhhmmss"/>
- </tstamp>
- <mkdir dir="${lib.dir}/test"/>
- <mkdir dir="${ivy.dep.dir}/core"/>
- <mkdir dir="${ivy.dep.dir}/test"/>
- <ivy:configure file="${ivy.jar.dir}/ivyconf.xml"/>
- </target>
-
- <target name="get.deps.core" depends="init"
- description="retrieve the core dependencies">
- <ivy:resolve conf="default"/>
- <ivy:retrieve pattern="${ivy.dep.dir}/core/[artifact].[ext]"
- conf="default"/>
- </target>
-
- <target name="compile" depends="init,get.deps.core"
- description="Compile the Java source code">
- <available classname="org.eclipse.core.launcher.Main"
- property="build.compiler"
- value="org.eclipse.jdt.core.JDTCompilerAdapter"
- classpath="${java.class.path}"/>
- <javac srcdir="${src.dir}" destdir="${classes.dir}"
- classpathref="lib.class.path" debug="${javac.debug}"
- optimize="${javac.optimize}" nowarn="on" source="${javac.source}"
- target="${javac.target}">
- </javac>
- </target>
-
- <target name="packjar">
- <property name="extension" value="jar"/>
- <property name="packagename" value="${jarname}"/>
- <property name="headerdirectory" value="."/>
- <!-- property name="jarname"/ -->
- <mkdir dir="${build.testresources.dir}"/>
- <mkdir dir="${build.temp.dir}/${headerdirectory}"/>
- <copy todir="${build.temp.dir}/${headerdirectory}">
- <fileset dir="${classes.dir}">
- <include name="**/test/pack/${packagename}/**.*"/>
- </fileset>
- </copy>
- <jar destfile="${build.testresources.dir}/${jarname}.${extension}">
- <!-- fileset dir="${classes.dir}" >
- <include name="**/test/pack/${packagename}/**.*"/>
- </fileset -->
- <fileset dir="${build.temp.dir}">
- <include name="**/*.*"/>
- </fileset>
- <fileset dir="${testresources.dir}/${jarname}">
- <include name="**/*.*"/>
- </fileset>
- </jar>
- <delete dir="${build.temp.dir}"/>
- </target>
-
- <target name="packexploded">
- <property name="extension" value="jar"/>
- <!-- property name="jarname"/ -->
- <mkdir dir="${build.testresources.dir}/${jarname}.${extension}"/>
- <copy todir="${build.testresources.dir}/${jarname}.${extension}">
- <!-- fileset dir="${build.temp.dir}"/ -->
- <fileset dir="${classes.dir}">
- <include name="**/test/pack/${jarname}/**.*"/>
- </fileset>
- <fileset dir="${testresources.dir}/${jarname}">
- <include name="**/*.*"/>
- </fileset>
- </copy>
- <!-- delete dir="${build.temp.dir}"/ -->
- </target>
-
- <target name="test-resources" description="Prepare all needed jars and pars">
- <antcall target="packjar" inheritall="true">
- <param name="extension" value="par"/>
- <param name="jarname" value="defaultpar"/>
- </antcall>
- <antcall target="packjar" inheritall="true">
- <param name="extension" value="par"/>
- <param name="jarname" value="space par"/>
- <param name="packagename" value="spacepar"/>
- </antcall>
- <antcall target="packjar" inheritall="true">
- <param name="extension" value="par"/>
- <param name="jarname" value="explicitpar"/>
- </antcall>
- <antcall target="packjar" inheritall="true">
- <param name="extension" value="par"/>
- <param name="jarname" value="excludehbmpar"/>
- </antcall>
- <antcall target="packjar" inheritall="true">
- <param name="extension" value="jar"/>
- <param name="jarname" value="externaljar"/>
- </antcall>
- <antcall target="packjar" inheritall="true">
- <param name="extension" value="par"/>
- <param name="jarname" value="cfgxmlpar"/>
- </antcall>
- <antcall target="packjar" inheritall="true">
- <param name="extension" value="jar"/>
- <param name="jarname" value="overridenpar"/>
- </antcall>
-
- <!-- nested jar -->
- <jar destfile="${build.testresources.dir}/nestedjar.ear">
- <fileset dir="${build.testresources.dir}">
- <include name="defaultpar.par"/>
- </fileset>
- </jar>
- <copy todir="${build.testresources.dir}/nesteddir.ear">
- <fileset dir="${build.testresources.dir}">
- <include name="defaultpar.par"/>
- </fileset>
- </copy>
-
- <antcall target="packjar" inheritall="true">
- <param name="extension" value="war"/>
- <param name="jarname" value="war"/>
- <param name="headerdirectory" value="WEB-INF/classes"/>
- </antcall>
-
- <antcall target="packexploded" inheritall="true">
- <param name="extension" value="par"/>
- <param name="jarname" value="explodedpar"/>
- </antcall>
- </target>
-
- <target name="get.deps.test" depends="init"
- description="retrieve the test dependencies">
- <ivy:resolve conf="test"/>
- <ivy:retrieve pattern="${ivy.dep.dir}/test/[artifact].[ext]" conf="test"/>
- </target>
-
- <target name="compiletest" depends="compile,get.deps.test"
- description="Compile the tests">
- <available classname="org.eclipse.core.launcher.Main"
- property="build.compiler"
- value="org.eclipse.jdt.core.JDTCompilerAdapter"
- classpath="${java.class.path}"/>
- <javac srcdir="${test.dir}" destdir="${classes.dir}" debug="${javac.debug}"
- optimize="${javac.optimize}" nowarn="on" source="${javac.source}"
- target="${javac.target}">
- <classpath>
- <path refid="junit.classpath"/>
- </classpath>
- </javac>
- </target>
-
- <target name="junit" depends="compiletest,test-resources">
- <for list="${targetdb}" param="db">
- <sequential>
- <antcall target="common-build.test-resources">
- <param name="db" value="@{db}"/>
- </antcall>
- <mkdir dir="${testreports.dir}/@{db}"/>
- <mkdir dir="${classes.dir}/META-INF/services"/>
- <copy todir="${classes.dir}">
- <fileset dir="${resources.dir}">
- <include name="**/*.*"/>
- </fileset>
- </copy>
- <echo>Running against db: @{db}</echo>
- <junit fork="once" printsummary="yes" haltonfailure="yes">
- <classpath>
- <fileset dir="${jdbc.dir}">
- <include name="**/*.jar"/>
- <include name="**/*.zip"/>
- </fileset>
- <dirset dir="${build.testresources.dir}">
- <include name="**/*.jar"/>
- <include name="**/*.par"/>
- </dirset>
- <fileset dir="${build.testresources.dir}">
- <include name="**/*.jar"/>
- <include name="**/*.par"/>
- </fileset>
- <path refid="junit.classpath"/>
- <!-- pathelement path="${classes.dir}"/ -->
- <dirset dir="${classes.dir}">
- <exclude name="**/pack/**.*"/>
- </dirset>
- <!-- pathelement path="build/test.par"/ -->
- <pathelement path="${src.dir}"/>
- <!-- pick up properties from here -->
- <pathelement path="${test.dir}"/>
- <!-- pick up mappings from here -->
- </classpath>
- <formatter type="plain"/>
- <formatter type="xml"/>
- <batchtest fork="yes" todir="${testreports.dir}/@{db}" haltonfailure="no">
- <fileset dir="${classes.dir}">
- <include name="**/*Test.class"/>
- </fileset>
- </batchtest>
- </junit>
- </sequential>
- </for>
- </target>
-
- <!-- Run a single unit test. -->
- <target name="junitsingle" depends="compiletest"
- description="Run a single test suite (requires testname and jdbc.driver properties)">
- <for list="${targetdb}" param="db">
- <sequential>
- <antcall target="test-resources">
- <param name="db" value="@{db}"/>
- </antcall>
- <mkdir dir="${testreports.dir}/@{db}"/>
- <echo>Running against db: @{db}</echo>
- <junit printsummary="yes" fork="yes" haltonfailure="yes">
- <classpath>
- <fileset dir="${jdbc.dir}">
- <include name="**/*.jar"/>
- <include name="**/*.zip"/>
- </fileset>
- <dirset dir="${build.testresources.dir}">
- <include name="**/*.jar"/>
- <include name="**/*.par"/>
- </dirset>
- <fileset dir="${build.testresources.dir}">
- <include name="**/*.jar"/>
- <include name="**/*.par"/>
- </fileset>
- <path refid="junit.classpath"/>
- <!-- pathelement path="${classes.dir}"/ -->
- <dirset dir="${classes.dir}">
- <exclude name="**/pack/**.*"/>
- </dirset>
- <!-- pathelement path="build/test.par"/ -->
- <pathelement path="${src.dir}"/>
- <!-- pick up properties from here -->
- <pathelement path="${test.dir}"/>
- <!-- pick up mappings from here -->
- </classpath>
- <formatter type="plain"/>
- <formatter type="xml"/>
- <test fork="yes" todir="${testreports.dir}/@{db}" haltonfailure="no"
- name="${testname}"/>
- </junit>
- </sequential>
- </for>
- </target>
-
- <target name="jar" depends="compile"
- description="Build the distribution .jar file">
- <mkdir dir="${classes.dir}/META-INF/services"/>
- <copy todir="${classes.dir}">
- <fileset dir="${resources.dir}">
- <include name="**/*.*"/>
- </fileset>
- </copy>
- <manifest file="${classes.dir}/META-INF/MANIFEST.MF">
- <attribute name="Implementation-Title" value="${Name}"/>
- <attribute name="Implementation-Version" value="${version}"/>
- <attribute name="Implementation-Vendor" value="hibernate.org"/>
- <attribute name="Implementation-Vendor-Id" value="hibernate.org"/>
- <attribute name="Implementation-URL"
- value="http://entitymanager.hibernate.org"/>
- <attribute name="Specification-Title" value="Java Persistence"/>
- <attribute name="Specification-Version" value="1.0"/>
- <attribute name="Specification-Vendor" value="jcp.org"/>
- </manifest>
- <antcall target="common-build.jar"/>
- <ivy:resolve conf="default"/>
- <delete file="${dist.dir}/ivy.xml"/> <!-- delete last produced ivy file to be sure a new one will be generated -->
- <ivy:publish artifactspattern="${dist.dir}/[artifact].[ext]"
- resolver="local" pubrevision="latest" pubdate="${now}"
- status="integration"/>
- </target>
-
- <target name="jpa-javadoc" if="jpa-present">
- <mkdir dir="${jpa-javadoc.dir}"/>
- <ant dir="../jpa-api" target="javadoc" inheritAll="false"/>
- <copy todir="${jpa-javadoc.dir}">
- <fileset dir="${basedir}/../jpa-api/build/api">
- <include name="**/*.*"/>
- </fileset>
- </copy>
- </target>
-
- <!-- Some of this can probably be moved to common-build... -->
- <target name="dist"
- depends="get.deps.core,get.deps.test,jar,javadoc,jpa-javadoc,copysource,copytest,copylib,extras"
- description="Build everything">
-
- <ant inheritall="false" dir="${basedir}/doc/reference"/>
- <copy todir="${dist.dir}/doc/reference" failonerror="false">
- <fileset dir="${basedir}/doc/reference/build">
- <include name="**/*.*"/>
- </fileset>
- </copy>
-
- <copy todir="${dist.dir}/resources" failonerror="false">
- <fileset dir="${resources.dir}">
- <include name="**/*.*"/>
- </fileset>
- </copy>
- <copy todir="${dist.dir}/test-resources" failonerror="false">
- <fileset dir="${testresources.dir}">
- <include name="**/*.*"/>
- </fileset>
- </copy>
- <copy todir="${dist.dir}" failonerror="false">
- <fileset dir="${common.dir}">
- <include name="common-build.xml"/>
- </fileset>
- </copy>
- <copy todir="${dist.dir}/ivy" failonerror="false">
- <fileset dir="${ivy.jar.dir}">
- <include name="**/*.*"/>
- </fileset>
- </copy>
-
- <!-- copy dependencies -->
- <copy todir="${dist.lib.dir}" failonerror="false">
- <!-- fileset file="${jpa-api.jar}"/>
- <fileset file="${commons-annotations.jar}"/ -->
- <fileset dir="${ivy.dep.dir}/core">
- <include name="*.jar"/>
- </fileset>
- </copy>
- <mkdir dir="${dist.lib.dir}/test"/>
- <copy todir="${dist.lib.dir}/test" failonerror="false">
- <fileset dir="${ivy.dep.dir}/test">
- <include name="*.jar"/>
- </fileset>
- </copy>
- <copy todir="${dist.lib.dir}/test" failonerror="false">
- <fileset file="${lib.dir}/test/*.jar"/>
- </copy>
-
- <mkdir dir="${dist.lib.dir}/build"/>
- <copy todir="${dist.lib.dir}/build" failonerror="false">
- <fileset file="${lib.dir}/build/*.jar"/>
- </copy>
-
-
- <!-- ivy uses the module name without hibernate- (to mimic the directory names). Revert the situation -->
- <move file="${dist.lib.dir}/commons-annotations.jar"
- tofile="${dist.lib.dir}/hibernate-commons-annotations.jar"
- failonerror="false"/>
- <move file="${dist.lib.dir}/annotations.jar"
- tofile="${dist.lib.dir}/hibernate-annotations.jar"
- failonerror="false"/>
-
- <copy file="${basedir}/build.properties.dist"
- tofile="${dist.dir}/build.properties" failonerror="false">
- </copy>
- <antcall target="common-build.dist"/>
- </target>
-
- <target name="zip-dist" description="zip the dist">
- <zip zipfile="${dist.dir}-${version}.zip">
- <zipfileset prefix="${name}-${version}" dir="${dist.dir}"/>
- </zip>
- <tar compression="gzip" tarfile="${dist.dir}-${version}.tar.gz">
- <tarfileset prefix="${name}-${version}" dir="${dist.dir}"/>
- </tar>
- </target>
-
- <target name="profile" depends="compiletest">
- <java classname="org.hibernate.ejb.test.Profile" fork="true">
- <jvmarg
- value="-XrunjbossInspector:c:\profiler\data,include=org.hibernate.ejb,ignore=*,wakeupOnStartup=true"/>
- <classpath>
- <fileset dir="${jdbc.dir}">
- <include name="**/*.jar"/>
- <include name="**/*.zip"/>
- </fileset>
- <dirset dir="${build.testresources.dir}">
- <include name="**/*.jar"/>
- <include name="**/*.par"/>
- </dirset>
-
- <fileset dir="${build.testresources.dir}">
- <include name="**/*.jar"/>
- <include name="**/*.par"/>
- </fileset>
- <path refid="lib.class.path"/>
- <pathelement path="${classes.dir}"/>
- <!-- pathelement path="build/test.par"/ -->
- <pathelement path="${src.dir}"/>
- <!-- pick up properties from here -->
- <pathelement path="${test.dir}"/>
- <!-- pick up mappings from here -->
- </classpath>
- </java>
- </target>
-
-</project>
Deleted: core/trunk/entitymanager/common-build.xml
===================================================================
--- core/trunk/entitymanager/common-build.xml 2008-10-31 20:40:42 UTC (rev 15478)
+++ core/trunk/entitymanager/common-build.xml 2008-11-03 10:22:12 UTC (rev 15479)
@@ -1,455 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="common-build" default="dist"
- xmlns:artifact="urn:maven-artifact-ant" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
- <description>Common properties and targets for the HibernateExt
- project</description>
-
-
- <!-- my.basedir property can be used to refer to files/directories relatively to the common-build.xml file -->
- <dirname property="common-build.basedir" file="${ant.file.common-build}"/>
-
- <!-- Give user a chance to override without editing this file
- (and without typing -D each time it compiles it) -->
- <property file="${common-build.basedir}/build.properties"/>
- <property file="${user.home}/.ant.properties"/>
-
- <property name="src.dir" location="src/java"/>
- <property name="test.dir" location="src/test"/>
- <property name="test.resources.dir" location="src/test-resources"/>
- <property name="filter.dir" location="src/filters"/>
- <property name="lib.dir" location="lib"/>
- <property name="build.dir" location="build"/>
- <property name="classes.dir" location="${build.dir}/classes"/>
- <property name="testclasses.dir" location="${build.dir}/testclasses"/>
- <property name="testreports.dir" location="${build.dir}/test-reports"/>
- <property name="dist.target.dir" location="target"/>
- <property name="dist.dir" location="${dist.target.dir}/${name}"/>
- <property name="instrumenttest.out.dir" value="${build.dir}/test-reports/instrument"/>
- <property name="doc.dir" location="doc"/>
- <property name="doc.api.dir" location="${doc.dir}/api"/>
- <property name="doc.reference.dir" location="${doc.dir}/reference"/>
-
- <property name="dist.doc.dir" location="${dist.dir}/doc"/>
- <property name="dist.api.dir" location="${dist.dir}/doc/api"/>
-
- <property name="dist.src.dir" location="${dist.dir}/src"/>
- <property name="dist.test.dir" location="${dist.dir}/test"/>
- <property name="dist.lib.dir" location="${dist.dir}/lib"/>
- <property name="jar.name" value="${name}"/>
- <property name="jar.file.name" value="${dist.dir}/${jar.name}.jar"/>
- <property name="jartest.file.name" value="${dist.dir}/${jar.name}-tests.jar"/>
-
- <property name="javadoc" value="http://java.sun.com/j2se/1.4/docs/api"/>
- <property name="javac.debug" value="on"/>
- <property name="javac.optimize" value="off"/>
- <property name="javac.source" value="1.4"/>
- <property name="javac.target" value="1.4"/>
-
- <property name="pom.file" value="${build.dir}/pom.xml"/>
- <property name="src.jar" value="${build.dir}/src.jar"/>
-
- <taskdef name="junit"
- classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
- <classpath>
- <fileset dir="${common-build.basedir}/lib/build">
- <!-- ${build.lib.dir} fails in reference doc build -->
- <include name="junit-*.jar"/>
- <include name="ant-junit-*.jar"/>
- </fileset>
- </classpath>
- </taskdef>
-
- <taskdef name="junitreport"
- classname="org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator">
- <classpath>
- <fileset dir="${common-build.basedir}/lib/build">
- <!-- ${build.lib.dir} fails in reference doc build -->
- <include name="junit-*.jar"/>
- <include name="ant-junit-*.jar"/>
- </fileset>
- </classpath>
- </taskdef>
-
- <taskdef resource="net/sf/antcontrib/antlib.xml">
- <classpath>
- <fileset dir="${common-build.basedir}/lib/build">
- <!-- ${build.lib.dir} fails in reference doc build -->
- <include name="ant-contrib-*.jar"/>
- </fileset>
- </classpath>
- </taskdef>
-
- <!-- ivy load -->
- <property name="ivy.jar.dir" value="${common-build.basedir}/ivy"/>
- <property name="ivy.conf.dir" value="${common-build.basedir}"/>
- <path id="ivy.lib.path">
- <fileset dir="${ivy.jar.dir}" includes="*.jar"/>
- </path>
- <taskdef resource="fr/jayasoft/ivy/ant/antlib.xml"
- uri="antlib:fr.jayasoft.ivy.ant" classpathref="ivy.lib.path"/>
-
- <!-- maven task load -->
- <path id="maven-ant-tasks.path" path="${ivy.jar.dir}/maven-ant-tasks.jar"/>
- <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
- uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.path"/>
-
- <artifact:remoteRepository id="offline.repository.jboss.org"
- url="file://${offline.repository.jboss.org}"/>
-
- <path id="lib.class.path">
- <path refid="lib.moduleclass.path"/>
- <pathelement path="${clover.jar}"/>
- </path>
-
- <!-- overridable in modules -->
- <path id="lib.moduleclass.path"/>
-
- <patternset id="support.files">
- <include name="**/*.jpg"/>
- <include name="**/*.gif"/>
- <include name="**/*.dtd"/>
- <include name="**/*.xsd"/>
- <include name="**/*.xml"/>
- <include name="**/*.xslt"/>
-
- <!-- exclude everything we don't want in the jar -->
- <exclude name="${build.dir}/**/*"/>
- <exclude name="${doc.dir}/**/*"/>
- <exclude name="classes/**/*"/>
- <exclude name="build.xml"/>
- <exclude name="**/*.properties"/>
- <exclude name="**/*.ccf"/>
- <exclude name="**/*.cfg.xml"/>
- <exclude name="**/ehcache.xml"/>
- </patternset>
-
- <patternset id="source.files">
- <include name="**/*.java"/>
- <include name="**/*.properties"/>
- </patternset>
-
- <!-- junit paths/filesets -->
- <fileset dir="${testclasses.dir}" id="junit.batchtestset">
- <include name="**/*Test.class"/>
- </fileset>
-
- <path id="testsrc.path">
- <pathelement location="${test.dir}"/>
- </path>
-
- <path id="junit.classpath">
- <pathelement path="${classes.dir}"/>
- <pathelement path="${testclasses.dir}"/>
- <path refid="lib.class.path"/>
- <path refid="junit.moduleclasspath"/>
- <path location="${clover.jar}"/>
- </path>
-
- <!-- Determine the database against which to run tests-->
- <if>
- <equals arg1="${targetdb}" arg2="$${targetdb}"/>
- <then>
- <echo message="No target database specified using default HSQLDB"/>
- <property name="targetdb" value="hsqldb"/>
- </then>
- </if>
-
- <!-- Clover tasks -->
- <target name="with.clover">
- <clover-setup initString="clover_coverage.db"/>
- </target>
-
- <target name="cloverreport.html" depends="with.clover"
- description="Generate a clover report from the current clover database.">
- <clover-report>
- <current outfile="${clover.out.dir}">
- <format type="html"/>
- </current>
- </clover-report>
- </target>
-
- <target name="cloverreport"
- depends="with.clover,junitreport,cloverreport.html"
- description="Run the tests and generate a clover report">
- </target>
-
- <!-- Tasks -->
- <target name="clean" description="Cleans up build and dist directories">
- <delete dir="${build.dir}"/>
- <delete dir="${dist.target.dir}"/>
- <delete dir="${clover.out.dir}"/>
- </target>
-
- <target name="init" description="Initialize the build">
- <tstamp>
- <format property="subversion" pattern="yyyy-MM-dd hh:mm:ss"/>
- </tstamp>
- <tstamp>
- <format property="releasedate" pattern="dd-MM-yyyy"/>
- </tstamp>
- <echo message="Build ${Name}-${version} (${subversion})"/>
- <mkdir dir="${classes.dir}"/>
- <mkdir dir="${testclasses.dir}"/>
- <copy todir="${classes.dir}">
- <fileset dir="${src.dir}">
- <patternset refid="support.files"/>
- </fileset>
- </copy>
- <filter token="version" value="${version}"/>
- <filter token="releasedate" value="${releasedate}"/>
- <copy todir="${build.dir}" filtering="true">
- <fileset dir=".">
- <include name="readme.txt"/>
- <include name="lgpl.txt"/>
- <include name="pom.xml"/>
- </fileset>
- </copy>
- </target>
-
- <target name="get.deps.core" depends="init"
- description="retrieve the core dependencies">
- <ivy:resolve conf="default"/>
- <ivy:retrieve pattern="${ivy.dep.dir}/core/[artifact].[ext]"
- conf="default"/>
- </target>
-
- <target name="get.deps.test" depends="init"
- description="retrieve the test dependencies">
- <ivy:resolve conf="test"/>
- <ivy:retrieve pattern="${ivy.dep.dir}/test/[artifact].[ext]" conf="test"/>
- </target>
-
- <target name="copytest" description="Copy tests to dist dir" if="copy.test">
- <mkdir dir="${dist.test.dir}"/>
- <copy todir="${dist.test.dir}">
- <fileset dir="${test.dir}"/>
- </copy>
- </target>
-
- <target name="copysource" depends="copytest"
- description="Copy sources to dist dir">
- <mkdir dir="${dist.src.dir}"/>
- <copy todir="${dist.src.dir}">
- <fileset dir="${src.dir}">
- <patternset refid="source.files"/>
- </fileset>
- <fileset dir="${src.dir}">
- <patternset refid="support.files"/>
- </fileset>
- </copy>
- <mkdir dir="${dist.src.dir}"/>
- <copy todir="${dist.src.dir}">
- <fileset dir="${src.dir}">
- <patternset refid="source.files"/>
- </fileset>
- <fileset dir="${src.dir}">
- <patternset refid="support.files"/>
- </fileset>
- </copy>
- </target>
-
- <target name="copylib" description="Copy jars to lib dir">
- <mkdir dir="${dist.lib.dir}"/>
- <copy todir="${dist.lib.dir}" verbose="true">
- <fileset dir="${lib.dir}">
- <include name="**/*.jar"/>
- <exclude name="log4j.jar"/>
- <exclude name="checkstyle*.jar"/>
- <include name="*.txt"/>
- </fileset>
- </copy>
- </target>
-
- <target name="copydoc" description="Copy doc to dist dir" if="copy.doc">
- <mkdir dir="${dist.doc.dir}"/>
- <copy todir="${dist.doc.dir}">
- <fileset dir="${doc.dir}">
- <include name="**/*.html"/>
- </fileset>
- </copy>
- </target>
-
- <target name="jar" depends="compile"
- description="Build the distribution .jar file">
- <mkdir dir="${dist.dir}"/>
- <jar filesetmanifest="merge" jarfile="${jar.file.name}"
- basedir="${classes.dir}"/>
- </target>
-
- <target name="jartest" depends="compiletest"
- description="Build the distribution .jar file">
- <mkdir dir="${dist.dir}"/>
- <jar filesetmanifest="merge" jarfile="${jartest.file.name}"
- basedir="${testclasses.dir}"/>
- </target>
-
- <!-- DOCUMENTATION -->
-
- <target name="javadoc"
- description="Compile the Javadoc API documentation to dist dir">
- <mkdir dir="${dist.api.dir}"/>
- <javadoc packagenames="${javadoc.packagenames}"
- classpathref="lib.class.path" destdir="${dist.api.dir}" use="true"
- protected="true" version="true"
- windowtitle="${Name} API Documentation"
- Overview="${doc.api.dir}/package.html"
- doctitle="${Name} API Documentation"
- stylesheetfile="${doc.api.dir}/jdstyle.css" link="${javadoc}">
- <packageset dir="${src.dir}" defaultexcludes="yes">
- <include name="**/*"/>
- </packageset>
- </javadoc>
- </target>
-
- <target name="extras" description="Copies miscellaneous files to root dir">
- <copy todir="${dist.dir}/bin" failonerror="false">
- <fileset dir="bin">
- <include name="*.bat"/>
- </fileset>
- </copy>
- <copy file="${build.dir}/readme.txt" todir="${dist.dir}"/>
- <copy file="lgpl.txt" todir="${dist.dir}"/>
- <copy file="changelog.txt" todir="${dist.dir}"/>
- <copy file="build.xml" todir="${dist.dir}"/>
- <replace file="${dist.dir}/build.xml">
- <replacetoken><![CDATA[../${name}-${version}]]>
- </replacetoken>
- <replacevalue><![CDATA[../${name}]]>
- </replacevalue>
- </replace>
- </target>
-
- <target name="dist" depends="jar,javadoc,copysource,copydoc,extras"
- description="Build everything">
- <zip zipfile="${dist.dir}-${version}.zip">
- <zipfileset prefix="${name}-${version}" dir="${dist.dir}"/>
- </zip>
- <tar compression="gzip" tarfile="${dist.dir}-${version}.tar.gz">
- <tarfileset prefix="${name}-${version}" dir="${dist.dir}"/>
- </tar>
- </target>
-
- <target name="info" description="Echoes useful system properties">
- <echo message="java.vm.info=${java.vm.info}"/>
- <echo message="java.vm.name=${java.vm.name}"/>
- <echo message="java.vm.vendor=${java.vm.vendor}"/>
- <echo message="java.vm.version=${java.vm.version}"/>
- <echo message="os.arch=${os.arch}"/>
- <echo message="os.name=${os.name}"/>
- <echo message="os.version=${os.version}"/>
- <echo message="java.home = ${java.home}"/>
- <echo message="java.class.path = ${java.class.path}"/>
- <echo message="build.compiler = ${build.compiler}"/>
- <echo message="file.encoding=${file.encoding}"/>
- <echo message="user.home = ${user.home}"/>
- <echo message="user.language=${user.language}"/>
- </target>
-
- <target name="test-resources" description="Copies and filters test resources">
- <filter filtersfile="${filter.dir}/${db}.filter"/>
- <mkdir dir="${testclasses.dir}"/>
- <copy todir="${testclasses.dir}" filtering="true" overwrite="true">
- <fileset dir="${test.resources.dir}">
- <include name="*.properties"/>
- <include name="*.xml"/>
- </fileset>
- </copy>
- </target>
-
- <target name="instrument" depends="compiletest"
- description="Instrument the persistent classes"> <!-- depends="jar" -->
-
- <taskdef name="instrument"
- classname="org.hibernate.tool.instrument.javassist.InstrumentTask">
- <classpath refid="junit.classpath"/>
- </taskdef>
-
- <instrument verbose="true">
- <fileset dir="${testclasses.dir}/org/hibernate/test">
- <include name="**/*.class"/>
- <exclude name="**/*Test$*.class"/>
- <exclude name="**/*Test.class"/>
- <exclude name="**/*Tests.class"/>
- </fileset>
- </instrument>
- </target>
-
- <target name="junitinstrument" depends="compiletest,instrument"
- description="Run the instrument test suite">
- <for list="${targetdb}" param="db">
- <sequential>
- <antcall target="test-resources">
- <param name="db" value="@{db}"/>
- </antcall>
- <mkdir dir="${instrumenttest.out.dir}/@{db}"/>
- <echo>Running against db: @{db}</echo>
- <junit printsummary="yes" haltonfailure="yes" dir="${basedir}"
- maxmemory="256M" fork="yes" forkmode="perBatch">
- <classpath refid="junit.classpath"/>
- <formatter type="plain"/>
- <formatter type="xml"/>
- <batchtest todir="${instrumenttest.out.dir}/@{db}" haltonfailure="no">
- <fileset refid="junit.batchtestset"/>
- </batchtest>
- </junit>
- </sequential>
- </for>
- </target>
-
- <target name="junitreport" depends="">
- <junitreport todir="${testreports.dir}">
- <fileset dir="${testreports.dir}">
- <include name="TEST-*.xml"/>
- </fileset>
- <report format="frames" todir="${testreports.dir}"/>
- </junitreport>
- </target>
-
- <target name="checkstyle" description="Check coding style">
- <taskdef resource="checkstyletask.properties">
- <classpath>
- <path refid="lib.class.path"/>
- <fileset dir="${common-build.basedir}/lib">
- <include name="checkstyle*.jar"/>
- </fileset>
- </classpath>
- </taskdef>
-
- <checkstyle config="${common-build.basedir}/checkstyle_checks.xml">
- <fileset dir="${src.dir}">
- <include name="**/*.java"/>
- </fileset>
- <formatter type="plain"/>
- </checkstyle>
- </target>
-
- <target name="patch" depends="checkstyle" description="Create a patch">
- <cvs command="-q diff -u -N" output="patch.txt"/>
- </target>
-
- <!-- maven deploy: to be used by the subbuild and delcare deps on jar -->
- <target name="deploy" depends="jar">
- <fail unless="offline.repository.jboss.org"
- message="offline.repository.jboss.org must be defined"/>
- <jar jarfile="${src.jar}" basedir="${src.dir}">
- <include name="**/*.java"/>
- <exclude name="**/test/*.java"/>
- <!-- patternset refid="meta.files" / -->
- </jar>
-
- <artifact:pom id="maven.project" file="${pom.file}"/>
-
- <artifact:install file="${jar.file.name}">
- <pom refid="maven.project"/>
- </artifact:install>
-
- <artifact:deploy file="${jar.file.name}">
- <pom refid="maven.project"/>
- <remoteRepository refId="offline.repository.jboss.org">
- </remoteRepository>
- <attach file="${src.jar}" classifier="sources"/>
- <attach file="${jar.file.name}" classifier=""/>
- </artifact:deploy>
- </target>
-
-</project>
\ No newline at end of file
Deleted: core/trunk/entitymanager/lgpl.txt
===================================================================
--- core/trunk/entitymanager/lgpl.txt 2008-10-31 20:40:42 UTC (rev 15478)
+++ core/trunk/entitymanager/lgpl.txt 2008-11-03 10:22:12 UTC (rev 15479)
@@ -1,504 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
Modified: core/trunk/entitymanager/pom.xml
===================================================================
--- core/trunk/entitymanager/pom.xml 2008-10-31 20:40:42 UTC (rev 15478)
+++ core/trunk/entitymanager/pom.xml 2008-11-03 10:22:12 UTC (rev 15479)
@@ -1,66 +1,427 @@
+ <?xml version="1.0"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.4.0-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<packaging>jar</packaging>
- <version>@version@</version>
<name>Hibernate Entitity Manager</name>
<description>Hibernate Entitity Manager</description>
- <url>http://hibernate.org</url>
- <licenses>
- <license>
- <name>GNU LESSER GENERAL PUBLIC LICENSE</name>
- <url>http://www.gnu.org/licenses/lgpl.txt</url>
- </license>
- </licenses>
+ <!-- Annotations and Commons-Annotations both use the ANN JIRA key -->
+ <issueManagement>
+ <system>jira</system>
+ <url>http://opensource.atlassian.com/projects/hibernate/browse/ANN</url>
+ </issueManagement>
<dependencies>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>ejb3-persistence</artifactId>
- <version>1.0.2.GA</version>
- </dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </dependency>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-commons-annotations</artifactId>
- <version>3.1.0.GA</version>
- </dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-commons-annotations</artifactId>
+ </dependency>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-annotations</artifactId>
- <version>3.4.0.GA</version>
- </dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ </dependency>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>3.3.0.SP1</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.4.2</version>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
</dependency>
- <dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <version>1.6.1</version>
- </dependency>
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>3.4.GA</version>
- </dependency>
- </dependencies>
+ </dependencies>
-</project>
\ No newline at end of file
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-commons-annotations</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.4.GA</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <testResources>
+ <testResource>
+ <filtering>false</filtering>
+ <directory>src/test/java</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <filtering>true</filtering>
+ <directory>src/test/resources</directory>
+ </testResource>
+ </testResources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-test-ext-plugin</artifactId>
+ <version>1.1.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>extend</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+
+ <profiles>
+ <profile>
+ <id>doc</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <version>2.1.0</version>
+ <extensions>true</extensions>
+ <dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-jdocbook-style</artifactId>
+ <version>1.0.2</version>
+ <type>jdocbook-style</type>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <sourceDocumentName>master.xml</sourceDocumentName>
+ <sourceDirectory>${basedir}/src/main/docbook/en</sourceDirectory>
+ <masterTranslation>en-US</masterTranslation>
+ <imageResource>
+ <directory>${basedir}/src/main/docbook/en/images</directory>
+ </imageResource>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>classpath:/xslt/hibernate/pdf/main-pdf.xsl</stylesheetResource>
+ <finalName>hibernate-validator-legacy-guide.pdf</finalName>
+ </format>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>classpath:/xslt/hibernate/html/main-single.xsl
+ </stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>classpath:/xslt/hibernate/html/main-chunk.xsl
+ </stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+ <options>
+ <xincludeSupported>true</xincludeSupported>
+ <localeSeparator>-</localeSeparator>
+ <useRelativeImageUris>true</useRelativeImageUris>
+ </options>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-doc</id>
+ <phase>package</phase>
+ <goals>
+ <goal>resources</goal>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!-- HSQLDB is the default (eventually move to H2) -->
+ <profile>
+ <id>hsqldb</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.2</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.HSQLDialect</db.dialect>
+ <jdbc.driver>org.hsqldb.jdbcDriver</jdbc.driver>
+ <jdbc.url>jdbc:hsqldb:target/test/db/hsqldb/hibernate</jdbc.url>
+ <jdbc.user>sa</jdbc.user>
+ <jdbc.pass />
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The H2 test envionment -->
+ <profile>
+ <id>h2</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.h2database</groupId>
+ <artifactId>h2database</artifactId>
+ <version>1.0.20061217</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.H2Dialect</db.dialect>
+ <jdbc.driver>org.h2.Driver</jdbc.driver>
+ <jdbc.url>jdbc:h2:mem:target/test/db/h2/hibernate</jdbc.url>
+ <jdbc.user>sa</jdbc.user>
+ <jdbc.pass />
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!--
+ ###################################################################
+ Profiles naming db instances in the Red Hat QA/QE lab
+
+ First, those with OSS drivers
+ ###################################################################
+ -->
+
+ <!-- The MySQL5 test envionment -->
+ <profile>
+ <id>mysql5</id>
+ <dependencies>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.0.5</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.MySQL5InnoDBDialect</db.dialect>
+ <jdbc.driver>com.mysql.jdbc.Driver</jdbc.driver>
+ <jdbc.url>jdbc:mysql://dev02.qa.atl.jboss.com/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The PostgreSQL test envionment -->
+ <profile>
+ <id>pgsql8</id>
+ <dependencies>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>8.2-504</version>
+ <classifier>jdbc3</classifier>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.PostgreSQLDialect</db.dialect>
+ <jdbc.driver>org.postgresql.Driver</jdbc.driver>
+ <jdbc.url>jdbc:postgresql://dev01.qa.atl.jboss.com:5432:cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!--
+ ###################################################################
+ Then, those with commercial drivers
+ ###################################################################
+ -->
+
+ <!-- The Oracle9i test envionment -->
+ <profile>
+ <id>oracle9i</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>ojdbc14</artifactId>
+ <!-- use the 10g drivers which are surprisingly largely bug free -->
+ <version>10.0.2.0</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.Oracle9iDialect</db.dialect>
+ <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
+ <jdbc.url>jdbc:oracle:thin:@dev20.qa.atl.jboss.com:1521:qa</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The Oracle10g test envionment -->
+ <profile>
+ <id>oracle10g</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>ojdbc14</artifactId>
+ <!-- use the 10g drivers which are surprisingly largely bug free -->
+ <version>10.0.2.0</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.Oracle10gDialect</db.dialect>
+ <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
+ <jdbc.url>jdbc:oracle:thin:@dev01.qa.atl.jboss.com:1521:qadb01</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The DB2 8.x test envionment (using 9x drivers)-->
+ <profile>
+ <id>db2-8</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.ibm</groupId>
+ <artifactId>db2jcc</artifactId>
+ <version>3.1.57</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ibm</groupId>
+ <artifactId>db2jcc_license_cu</artifactId>
+ <version>3.1.57</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.DB2Dialect</db.dialect>
+ <jdbc.driver>com.ibm.db2.jcc.DB2Driver</jdbc.driver>
+ <jdbc.url>jdbc:db2://dev32.qa.atl.jboss.com:50000/jbossqa</jdbc.url>
+ <jdbc.user>hiber</jdbc.user>
+ <jdbc.pass>hiber</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The Sybase 12 test envionment -->
+ <profile>
+ <id>sybase12</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.sybase</groupId>
+ <artifactId>jconnect</artifactId>
+ <version>6.0.5</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SybaseDialect</db.dialect>
+ <jdbc.driver>com.sybase.jdbc3.jdbc.SybDriver</jdbc.driver>
+ <jdbc.url>jdbc:sybase:Tds:dev01.qa.atl.jboss.com:4100/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The SQLServer2005 (jTDS) test envionment -->
+ <profile>
+ <id>sqlserver-jtds</id>
+ <dependencies>
+ <dependency>
+ <groupId>net.sourceforge.jtds</groupId>
+ <artifactId>jtds</artifactId>
+ <version>1.2</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SQLServerDialect</db.dialect>
+ <jdbc.driver>net.sourceforge.jtds.jdbc.Driver</jdbc.driver>
+ <jdbc.url>jdbc:jtds:sqlserver://dev30.qa.atl.jboss.com:3918/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The SQLServer2005 (MS JDBC) test envionment -->
+ <profile>
+ <id>sqlserver-msjdbc</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.microsoft.sqlserver</groupId>
+ <artifactId>msjdbc</artifactId>
+ <version>1.1</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SQLServerDialect</db.dialect>
+ <jdbc.driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</jdbc.driver>
+ <jdbc.url>jdbc:sqlserver://dev30.qa.atl.jboss.com:3918</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation>4096</jdbc.isolation>
+ </properties>
+ </profile>
+
+ </profiles>
+
+</project>
Deleted: core/trunk/entitymanager/readme.txt
===================================================================
--- core/trunk/entitymanager/readme.txt 2008-10-31 20:40:42 UTC (rev 15478)
+++ core/trunk/entitymanager/readme.txt 2008-11-03 10:22:12 UTC (rev 15479)
@@ -1,56 +0,0 @@
-Hibernate EntityManager
-==================================================
-Version: @version@, @releasedate@
-
-THIS RELEASE OF HIBERNATE ENTITYMANAGER REQUIRES HIBERNATE CORE 3.3 (and above)
-
-
-Description
------------
-
-The EJB3 specification recognizes the interest and the success of
-the transparent object/relational mapping paradigm. The EJB3 specification
-standardizes the basic APIs and the metadata needed for any object/relational
-persistence mechanism.
-
-Hibernate EntityManager implements the programming interfaces and lifecycle rules
-as defined by the EJB3 persistence specification. Together with Hibernate Annotations
-this wrapper implements a complete (and standalone) EJB3 persistence solution on
-top of the mature Hibernate core. You may use a combination of all three together,
-annotations without EJB3 programming interfaces and lifecycle, or even pure native
-Hibernate, depending on the business and technical needs of your project. You can
-at all times fall back to Hibernate native APIs, or if required, even to native
-JDBC and SQL.
-
-
-Instructions
-------------
-
-Unzip to installation directory, read doc/reference
-
-
-Contact
-------------
-
-Latest Documentation:
-
- http://hibernate.org
- http://annotations.hibernate.org
-
-Bug Reports:
-
- Hibernate JIRA (preferred)
- hibernate-devel(a)lists.sourceforge.net
-
-Free Technical Support:
-
- http://forum.hibernate.org
-
-
-Notes
------------
-
-If you want to contribute, go to http://www.hibernate.org/
-
-This software and its documentation are distributed under the terms of the
-FSF Lesser Gnu Public License (see lgpl.txt).
\ No newline at end of file
Copied: core/trunk/entitymanager/src/main/docbook/en (from rev 15478, core/trunk/entitymanager/doc/reference/en)
Property changes on: core/trunk/entitymanager/src/main/docbook/en
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: core/trunk/entitymanager/src/test/resources/hibernate.properties
===================================================================
--- core/trunk/entitymanager/src/test/resources/hibernate.properties 2008-10-31 20:40:42 UTC (rev 15478)
+++ core/trunk/entitymanager/src/test/resources/hibernate.properties 2008-11-03 10:22:12 UTC (rev 15479)
@@ -1,327 +1,43 @@
-###############
-### EJB 3.0 ###
-###############
+#
+# Hibernate, Relational Persistence for Idiomatic Java
+#
+# Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+# indicated by the @author tags or express copyright attribution
+# statements applied by the authors. All third-party contributions are
+# distributed under license by Red Hat Middleware LLC.
+#
+# This copyrighted material is made available to anyone wishing to use, modify,
+# copy, or redistribute it subject to the terms and conditions of the GNU
+# Lesser General Public License, as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+# for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this distribution; if not, write to:
+# Free Software Foundation, Inc.
+# 51 Franklin Street, Fifth Floor
+# Boston, MA 02110-1301 USA
+#
+hibernate.dialect ${db.dialect}
+hibernate.connection.driver_class ${jdbc.driver}
+hibernate.connection.url ${jdbc.url}
+hibernate.connection.username ${jdbc.user}
+hibernate.connection.password ${jdbc.pass}
+hibernate.connection.isolation ${jdbc.isolation}
-## select Hibernate persistence provider
+hibernate.connection.pool_size 5
-javax.persistence.provider org.hibernate.ejb.HibernatePersistence
-javax.persistence.transactionType=RESOURCE_LOCAL
+hibernate.show_sql true
+hibernate.format_sql true
-## entity bean class name (comma separated)
+hibernate.max_fetch_depth 5
-#hibernate.ejb.classes org.hibernate.ejb.test.Item, org.hibernate.ejb.test.Distributor
-
-## entity caching (strategy, optional region name)
-#hibernate.ejb.classcache.org.hibernate.ejb.test.Item read-write, RegionName
-#hibernate.ejb.classcache.org.hibernate.ejb.test.Item read-write
-
-## collection caching (role, optional region name)
-#hibernate.ejb.collectioncache.org.hibernate.ejb.test.Item.distributors read-write, RegionName
-
-######################
-### Query Language ###
-######################
-
-## define query language constants / function names
-
-hibernate.query.substitutions true 1, false 0, yes 'Y', no 'N'
-
-
-## select the classic query parser
-
-#hibernate.query.factory_class org.hibernate.hql.classic.ClassicQueryTranslatorFactory
-
-
-
-#################
-### Platforms ###
-#################
-
-## JNDI Datasource
-
-#hibernate.connection.datasource jdbc/test
-#hibernate.connection.username db2
-#hibernate.connection.password db2
-
-hibernate.dialect @hibernate.dialect@
-hibernate.connection.driver_class @hibernate.connection.driver_class@
-hibernate.connection.username @hibernate.connection.username@
-hibernate.connection.password @hibernate.connection.password@
-hibernate.connection.url @hibernate.connection.url@
-
-#################################
-### Hibernate Connection Pool ###
-#################################
-
-hibernate.connection.pool_size 1
-
-###########################
-### C3P0 Connection Pool###
-###########################
-
-#hibernate.c3p0.max_size 2
-#hibernate.c3p0.min_size 2
-#hibernate.c3p0.timeout 5000
-#hibernate.c3p0.max_statements 100
-#hibernate.c3p0.idle_test_period 3000
-#hibernate.c3p0.acquire_increment 2
-#hibernate.c3p0.validate false
-
-
-
-##############################
-### Proxool Connection Pool###
-##############################
-
-## Properties for external configuration of Proxool
-
-hibernate.proxool.pool_alias pool1
-
-## Only need one of the following
-
-#hibernate.proxool.existing_pool true
-#hibernate.proxool.xml proxool.xml
-#hibernate.proxool.properties proxool.properties
-
-
-
-#################################
-### Plugin ConnectionProvider ###
-#################################
-
-## use a custom ConnectionProvider (if not set, Hibernate will choose a built-in ConnectionProvider using hueristics)
-
-#hibernate.connection.provider_class org.hibernate.connection.DriverManagerConnectionProvider
-#hibernate.connection.provider_class org.hibernate.connection.DatasourceConnectionProvider
-#hibernate.connection.provider_class org.hibernate.connection.C3P0ConnectionProvider
-#hibernate.connection.provider_class org.hibernate.connection.DBCPConnectionProvider
-#hibernate.connection.provider_class org.hibernate.connection.ProxoolConnectionProvider
-
-
-
-#######################
-### Transaction API ###
-#######################
-
-## Enable automatic flush during the JTA beforeCompletion() callback
-## (This setting is relevant with or without the Transaction API)
-
-#hibernate.transaction.flush_before_completion
-
-
-## Enable automatic session close at the end of transaction
-## (This setting is relevant with or without the Transaction API)
-
-#hibernate.transaction.auto_close_session
-
-
-## the Transaction API abstracts application code from the underlying JTA or JDBC transactions
-
-#hibernate.transaction.factory_class org.hibernate.transaction.JTATransactionFactory
-#hibernate.transaction.factory_class org.hibernate.transaction.JDBCTransactionFactory
-
-
-## to use JTATransactionFactory, Hibernate must be able to locate the UserTransaction in JNDI
-## default is java:comp/UserTransaction
-## you do NOT need this setting if you specify hibernate.transaction.manager_lookup_class
-
-#jta.UserTransaction jta/usertransaction
-#jta.UserTransaction javax.transaction.UserTransaction
-#jta.UserTransaction UserTransaction
-
-
-## to use the second-level cache with JTA, Hibernate must be able to obtain the JTA TransactionManager
-
-#hibernate.transaction.manager_lookup_class org.hibernate.transaction.JBossTransactionManagerLookup
-#hibernate.transaction.manager_lookup_class org.hibernate.transaction.WeblogicTransactionManagerLookup
-#hibernate.transaction.manager_lookup_class org.hibernate.transaction.WebSphereTransactionManagerLookup
-#hibernate.transaction.manager_lookup_class org.hibernate.transaction.OrionTransactionManagerLookup
-#hibernate.transaction.manager_lookup_class org.hibernate.transaction.ResinTransactionManagerLookup
-
-
-
-##############################
-### Miscellaneous Settings ###
-##############################
-
-## print all generated SQL to the console
-
-#hibernate.show_sql true
-
-
-## add comments to the generated SQL
-
-#hibernate.use_sql_comments true
-
-
-## generate statistics
-
-#hibernate.generate_statistics true
-
-
-## auto schema export
-
-hibernate.hbm2ddl.auto create-drop
-#hibernate.hbm2ddl.auto create
-#hibernate.hbm2ddl.auto update
-
-
-## specify a default schema and catalog for unqualified tablenames
-
-#hibernate.default_schema test
-#hibernate.default_catalog test
-
-
-## enable ordering of SQL UPDATEs by primary key
-
-hibernate.order_updates true
-
-
-## set the maximum depth of the outer join fetch tree
-
-hibernate.max_fetch_depth 1
-
-
-## set the default batch size for batch fetching
-
-hibernate.default_batch_fetch_size 8
-
-
-## rollback generated identifier values of deleted entities to default values
-
-#hibernate.use_identifer_rollback true
-
-
-## enable CGLIB reflection optimizer (enabled by default)
-
-#hibernate.cglib.use_reflection_optimizer false
-
-
-
-#####################
-### JDBC Settings ###
-#####################
-
-## specify a JDBC isolation level
-
-#hibernate.connection.isolation 4
-
-
-## enable JDBC autocommit (not recommended!)
-
-#hibernate.connection.autocommit true
-
-
-## set the JDBC fetch size
-
-#hibernate.jdbc.fetch_size 25
-
-
-## set the maximum JDBC 2 batch size (a nonzero value enables batching)
-
-#hibernate.jdbc.batch_size 5
-
-
-## enable batch updates even for versioned data
-
-hibernate.jdbc.batch_versioned_data true
-
-
-## enable use of JDBC 2 scrollable ResultSets (specifying a Dialect will cause Hibernate to use a sensible default)
-
-#hibernate.jdbc.use_scrollable_resultset true
-
-
-## use streams when writing binary types to / from JDBC
-
-hibernate.jdbc.use_streams_for_binary true
-
-
-## use JDBC 3 PreparedStatement.getGeneratedKeys() to get the identifier of an inserted row
-
-#hibernate.jdbc.use_get_generated_keys false
-
-
-## choose a custom JDBC batcher
-
-# hibernate.jdbc.factory_class
-
-
-## enable JDBC result set column alias caching
-## (minor performance enhancement for broken JDBC drivers)
-
-# hibernate.jdbc.wrap_result_sets
-
-
-## choose a custom SQL exception converter
-
-#hibernate.jdbc.sql_exception_converter
-
-
-
-##########################
-### Second-level Cache ###
-##########################
-
-## optimize chache for minimal "puts" instead of minimal "gets" (good for clustered cache)
-
-#hibernate.cache.use_minimal_puts true
-
-
-## set a prefix for cache region names
-
hibernate.cache.region_prefix hibernate.test
-
-
-## disable the second-level cache
-
-#hibernate.cache.use_second_level_cache false
-
-
-## enable the query cache
-
-#hibernate.cache.use_query_cache true
-
-
-## store the second-level cache entries in a more human-friendly format
-
-#hibernate.cache.use_structured_entries true
-
-
-## choose a cache implementation
-
-#hibernate.cache.provider_class org.hibernate.cache.EhCacheProvider
-#hibernate.cache.provider_class org.hibernate.cache.EmptyCacheProvider
hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
-#hibernate.cache.provider_class org.hibernate.cache.TreeCacheProvider
-#hibernate.cache.provider_class org.hibernate.cache.OSCacheProvider
-#hibernate.cache.provider_class org.hibernate.cache.SwarmCacheProvider
+hibernate.cache.use_query_cache true
-## choose a custom query cache implementation
-
-#hibernate.cache.query_cache_factory
-
-
-
-############
-### JNDI ###
-############
-
-## specify a JNDI name for the SessionFactory
-
-#hibernate.session_factory_name hibernate/session_factory
-
-
-## Hibernate uses JNDI to bind a name to a SessionFactory and to look up the JTA UserTransaction;
-## if hibernate.jndi.* are not specified, Hibernate will use the default InitialContext() which
-## is the best approach in an application server
-
-#file system
-#hibernate.jndi.class com.sun.jndi.fscontext.RefFSContextFactory
-#hibernate.jndi.url file:/
-
-#WebSphere
-#hibernate.jndi.class com.ibm.websphere.naming.WsnInitialContextFactory
-#hibernate.jndi.url iiop://localhost:900/
-
+# hibernate.jdbc.batch_size 0
16 years, 2 months