Coverage Report - org.trails.descriptor.annotation.Collection
 
Classes in this File Line Coverage Branch Coverage Complexity
Collection
N/A 
N/A 
0
 
 1  
 package org.trails.descriptor.annotation;
 2  
 
 3  
 import java.lang.annotation.ElementType;
 4  
 import java.lang.annotation.Retention;
 5  
 import java.lang.annotation.RetentionPolicy;
 6  
 import java.lang.annotation.Target;
 7  
 
 8  
 @Retention(RetentionPolicy.RUNTIME)
 9  
 @Target({ElementType.FIELD, ElementType.METHOD})
 10  
 @DescriptorAnnotation(CollectionDescriptorAnnotationHandler.class)
 11  
 public @interface Collection
 12  
 {
 13  
 
 14  
         public static final String DEFAULT_inverse = "";
 15  
         public static final String DEFAULT_addExpression = "";
 16  
         public static final String DEFAULT_removeExpression = "";
 17  
         public static final String DEFAULT_swapExpression = "";
 18  
 
 19  
         /**
 20  
          * The field in the other end of the realtionship. Required for @OneToMany @Collection(child=false)
 21  
          *
 22  
          * @return
 23  
          */
 24  
         public String inverse() default "";
 25  
 
 26  
         /**
 27  
          * Child collections will not allow you to choose from all possible instances of the element type, only to create new
 28  
          * instances and remove instances from the collection.
 29  
          *
 30  
          * @return
 31  
          */
 32  
         public boolean child() default false;
 33  
 
 34  
         public String addExpression() default "";
 35  
 
 36  
         public String removeExpression() default "";
 37  
 
 38  
         public String swapExpression() default "";
 39  
 
 40  
         public boolean allowRemove() default true;
 41  
 
 42  
 }