cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1037207 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne: annotation/ map/
Date Sat, 20 Nov 2010 13:49:41 GMT
Author: aadamchik
Date: Sat Nov 20 13:49:40 2010
New Revision: 1037207

URL: http://svn.apache.org/viewvc?rev=1037207&view=rev
Log:
CAY-1509 Lifecycle event annotations support

javadocs

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostAdd.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostLoad.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostPersist.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostRemove.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostUpdate.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PrePersist.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PreRemove.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PreUpdate.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/LifecycleEvent.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostAdd.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostAdd.java?rev=1037207&r1=1037206&r2=1037207&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostAdd.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostAdd.java
Sat Nov 20 13:49:40 2010
@@ -40,7 +40,14 @@ import org.apache.cayenne.map.LifecycleE
 @Inherited
 public @interface PostAdd {
 
+    /**
+     * An array of entity classes that a listener method should be associated with.
+     */
     Class<?>[] value() default {};
 
+    /**
+     * An array of custom annotation types. When such annotation is used on an entity
+     * class, such entity will be associated with the annotated listener method.
+     */
     Class<? extends Annotation>[] entityAnnotations() default {};
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostLoad.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostLoad.java?rev=1037207&r1=1037206&r2=1037207&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostLoad.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostLoad.java
Sat Nov 20 13:49:40 2010
@@ -30,7 +30,7 @@ import org.apache.cayenne.map.LifecycleE
 
 /**
  * An annotation to place on the entity event listener method to receive
- * {@link LifecycleEvent#POST_ADD} events.
+ * {@link LifecycleEvent#POST_LOAD} events.
  * 
  * @since 3.1
  */
@@ -40,7 +40,14 @@ import org.apache.cayenne.map.LifecycleE
 @Inherited
 public @interface PostLoad {
 
+    /**
+     * An array of entity classes that a listener method should be associated with.
+     */
     Class<?>[] value() default {};
 
+    /**
+     * An array of custom annotation types. When such annotation is used on an entity
+     * class, such entity will be associated with the annotated listener method.
+     */
     Class<? extends Annotation>[] entityAnnotations() default {};
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostPersist.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostPersist.java?rev=1037207&r1=1037206&r2=1037207&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostPersist.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostPersist.java
Sat Nov 20 13:49:40 2010
@@ -26,7 +26,12 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.cayenne.map.LifecycleEvent;
+
 /**
+ * An annotation to place on the entity event listener method to receive
+ * {@link LifecycleEvent#POST_PERSIST} events.
+ * 
  * @since 3.1
  */
 @Target(ElementType.METHOD)
@@ -35,7 +40,14 @@ import java.lang.annotation.Target;
 @Inherited
 public @interface PostPersist {
 
+    /**
+     * An array of entity classes that a listener method should be associated with.
+     */
     Class<?>[] value() default {};
 
+    /**
+     * An array of custom annotation types. When such annotation is used on an entity
+     * class, such entity will be associated with the annotated listener method.
+     */
     Class<? extends Annotation>[] entityAnnotations() default {};
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostRemove.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostRemove.java?rev=1037207&r1=1037206&r2=1037207&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostRemove.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostRemove.java
Sat Nov 20 13:49:40 2010
@@ -26,7 +26,12 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.cayenne.map.LifecycleEvent;
+
 /**
+ * An annotation to place on the entity event listener method to receive
+ * {@link LifecycleEvent#POST_REMOVE} events.
+ * 
  * @since 3.1
  */
 @Target(ElementType.METHOD)
@@ -35,7 +40,14 @@ import java.lang.annotation.Target;
 @Inherited
 public @interface PostRemove {
 
+    /**
+     * An array of entity classes that a listener method should be associated with.
+     */
     Class<?>[] value() default {};
 
+    /**
+     * An array of custom annotation types. When such annotation is used on an entity
+     * class, such entity will be associated with the annotated listener method.
+     */
     Class<? extends Annotation>[] entityAnnotations() default {};
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostUpdate.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostUpdate.java?rev=1037207&r1=1037206&r2=1037207&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostUpdate.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PostUpdate.java
Sat Nov 20 13:49:40 2010
@@ -26,7 +26,12 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.cayenne.map.LifecycleEvent;
+
 /**
+ * An annotation to place on the entity event listener method to receive
+ * {@link LifecycleEvent#POST_UPDATE} events.
+ * 
  * @since 3.1
  */
 @Target(ElementType.METHOD)
@@ -35,7 +40,14 @@ import java.lang.annotation.Target;
 @Inherited
 public @interface PostUpdate {
 
+    /**
+     * An array of entity classes that a listener method should be associated with.
+     */
     Class<?>[] value() default {};
 
+    /**
+     * An array of custom annotation types. When such annotation is used on an entity
+     * class, such entity will be associated with the annotated listener method.
+     */
     Class<? extends Annotation>[] entityAnnotations() default {};
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PrePersist.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PrePersist.java?rev=1037207&r1=1037206&r2=1037207&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PrePersist.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PrePersist.java
Sat Nov 20 13:49:40 2010
@@ -30,7 +30,7 @@ import org.apache.cayenne.map.LifecycleE
 
 /**
  * An annotation to place on the entity event listener method to receive
- * {@link LifecycleEvent#POST_ADD} events.
+ * {@link LifecycleEvent#PRE_PERSIST} events.
  * 
  * @since 3.1
  */
@@ -39,8 +39,14 @@ import org.apache.cayenne.map.LifecycleE
 @Documented
 @Inherited
 public @interface PrePersist {
-
+    /**
+     * An array of entity classes that a listener method should be associated with.
+     */
     Class<?>[] value() default {};
 
+    /**
+     * An array of custom annotation types. When such annotation is used on an entity
+     * class, such entity will be associated with the annotated listener method.
+     */
     Class<? extends Annotation>[] entityAnnotations() default {};
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PreRemove.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PreRemove.java?rev=1037207&r1=1037206&r2=1037207&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PreRemove.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PreRemove.java
Sat Nov 20 13:49:40 2010
@@ -26,7 +26,12 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.cayenne.map.LifecycleEvent;
+
 /**
+ * An annotation to place on the entity event listener method to receive
+ * {@link LifecycleEvent#PRE_REMOVE} events.
+ * 
  * @since 3.1
  */
 @Target(ElementType.METHOD)
@@ -35,7 +40,14 @@ import java.lang.annotation.Target;
 @Inherited
 public @interface PreRemove {
 
+    /**
+     * An array of entity classes that a listener method should be associated with.
+     */
     Class<?>[] value() default {};
 
+    /**
+     * An array of custom annotation types. When such annotation is used on an entity
+     * class, such entity will be associated with the annotated listener method.
+     */
     Class<? extends Annotation>[] entityAnnotations() default {};
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PreUpdate.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PreUpdate.java?rev=1037207&r1=1037206&r2=1037207&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PreUpdate.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/annotation/PreUpdate.java
Sat Nov 20 13:49:40 2010
@@ -26,7 +26,12 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.cayenne.map.LifecycleEvent;
+
 /**
+ * An annotation to place on the entity event listener method to receive
+ * {@link LifecycleEvent#PRE_UPDATE} events.
+ * 
  * @since 3.1
  */
 @Target(ElementType.METHOD)
@@ -35,7 +40,14 @@ import java.lang.annotation.Target;
 @Inherited
 public @interface PreUpdate {
 
+    /**
+     * An array of entity classes that a listener method should be associated with.
+     */
     Class<?>[] value() default {};
 
+    /**
+     * An array of custom annotation types. When such annotation is used on an entity
+     * class, such entity will be associated with the annotated listener method.
+     */
     Class<? extends Annotation>[] entityAnnotations() default {};
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/LifecycleEvent.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/LifecycleEvent.java?rev=1037207&r1=1037206&r2=1037207&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/LifecycleEvent.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/LifecycleEvent.java
Sat Nov 20 13:49:40 2010
@@ -19,7 +19,8 @@
 package org.apache.cayenne.map;
 
 /**
- * Defines possible object lifecycle events for which callbacks are supported.
+ * Defines possible entity object lifecycle events. Cayenne notifies registered listeners
+ * and entity callback methods when such events occur during the object lifecycle.
  * 
  * @since 3.0
  */



Mime
View raw message