Package org.hibernate.tool.hbm2x.pojo

Examples of org.hibernate.tool.hbm2x.pojo.AnnotationBuilder.addAttribute()


          .addAttribute("fetch", "singleValue");
   
    assertEquals("@javax.persistence.OneToMany(cascade={val1, val2}, fetch=singleValue)", builder.getResult());
   
    builder = AnnotationBuilder.createAnnotation("javax.persistence.OneToMany");
    builder.addAttribute("cascade", (String[])null);
    builder.addAttribute("fetch", (String)null);
   
    assertEquals("@javax.persistence.OneToMany", builder.getResult());

    builder = AnnotationBuilder.createAnnotation("abc");
View Full Code Here


   
    assertEquals("@javax.persistence.OneToMany(cascade={val1, val2}, fetch=singleValue)", builder.getResult());
   
    builder = AnnotationBuilder.createAnnotation("javax.persistence.OneToMany");
    builder.addAttribute("cascade", (String[])null);
    builder.addAttribute("fetch", (String)null);
   
    assertEquals("@javax.persistence.OneToMany", builder.getResult());

    builder = AnnotationBuilder.createAnnotation("abc");
    ArrayList list = new ArrayList();
View Full Code Here

    constraint.addQuotedAttributes( "columnNames", new IteratorTransformer(columns.iterator()) {
      public Object transform(Object object) {         
        return object.toString();
      }
    });
    constraint.addAttribute( "single", "value" );
   
    String attribute = constraint.getAttributeAsString("columnNames");
    assertEquals("{\"first\", \"second\"}", attribute);
   
    assertEquals("value", constraint.getAttributeAsString( "single" ));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.