Package org.jboss.forge.parser.java

Examples of org.jboss.forge.parser.java.JavaClass.addImport()


         manyField.addAnnotation(ManyToOne.class);
         Refactory.createGetterAndSetter(many, manyField);

         if ((inverseFieldName != null) && !inverseFieldName.isEmpty())
         {
            one.addImport(Set.class);
            one.addImport(HashSet.class);
            one.addImport(many.getQualifiedName());
            Field<JavaClass> oneField = one.addField("private Set<" + many.getName() + "> " + inverseFieldName
                     + "= new HashSet<"
                     + many.getName() + ">();");
View Full Code Here


         Refactory.createGetterAndSetter(many, manyField);

         if ((inverseFieldName != null) && !inverseFieldName.isEmpty())
         {
            one.addImport(Set.class);
            one.addImport(HashSet.class);
            one.addImport(many.getQualifiedName());
            Field<JavaClass> oneField = one.addField("private Set<" + many.getName() + "> " + inverseFieldName
                     + "= new HashSet<"
                     + many.getName() + ">();");
            Annotation<JavaClass> oneAnnotation = oneField.addAnnotation(OneToMany.class).setStringValue("mappedBy",
View Full Code Here

         if ((inverseFieldName != null) && !inverseFieldName.isEmpty())
         {
            one.addImport(Set.class);
            one.addImport(HashSet.class);
            one.addImport(many.getQualifiedName());
            Field<JavaClass> oneField = one.addField("private Set<" + many.getName() + "> " + inverseFieldName
                     + "= new HashSet<"
                     + many.getName() + ">();");
            Annotation<JavaClass> oneAnnotation = oneField.addAnnotation(OneToMany.class).setStringValue("mappedBy",
                     fieldName);
View Full Code Here

         if ((inverseFieldName != null) && !inverseFieldName.isEmpty())
         {
            annotation.setStringValue("mappedBy", inverseFieldName);

            otherEntity.addImport(Set.class);
            otherEntity.addImport(HashSet.class);
            otherEntity.addImport(entity.getQualifiedName());
            Field<JavaClass> otherField = otherEntity.addField("private Set<" + entity.getName() + "> "
                     + inverseFieldName
                     + "= new HashSet<" + entity.getName() + ">();");
View Full Code Here

         if ((inverseFieldName != null) && !inverseFieldName.isEmpty())
         {
            annotation.setStringValue("mappedBy", inverseFieldName);

            otherEntity.addImport(Set.class);
            otherEntity.addImport(HashSet.class);
            otherEntity.addImport(entity.getQualifiedName());
            Field<JavaClass> otherField = otherEntity.addField("private Set<" + entity.getName() + "> "
                     + inverseFieldName
                     + "= new HashSet<" + entity.getName() + ">();");
            otherField.addAnnotation(ManyToMany.class);
View Full Code Here

         {
            annotation.setStringValue("mappedBy", inverseFieldName);

            otherEntity.addImport(Set.class);
            otherEntity.addImport(HashSet.class);
            otherEntity.addImport(entity.getQualifiedName());
            Field<JavaClass> otherField = otherEntity.addField("private Set<" + entity.getName() + "> "
                     + inverseFieldName
                     + "= new HashSet<" + entity.getName() + ">();");
            otherField.addAnnotation(ManyToMany.class);
            Refactory.createGetterAndSetter(otherEntity, otherField);
View Full Code Here

            annotation.setStringValue("mappedBy", inverseFieldName);
            annotation.setLiteralValue("cascade", "CascadeType.ALL");
            annotation.getOrigin().addImport(CascadeType.class);
            annotation.setLiteralValue("orphanRemoval", "true");

            many.addImport(one);
            Field<JavaClass> manyField = many.addField("private " + one.getName() + " " + inverseFieldName + ";");
            manyField.addAnnotation(ManyToOne.class);
            Refactory.createGetterAndSetter(many, manyField);
            java.saveJavaSource(many);
         }
View Full Code Here

      if (targetPackage != null && !targetPackage.isEmpty())
         command.setPackage(targetPackage);

      command.setSuperType(AbstractUICommand.class);
      command.addImport(UIBuilder.class);
      command.addImport(UIContext.class);
      command.addImport(UIExecutionContext.class);
      command.addImport(UICommandMetadata.class);
      command.addImport(Metadata.class);
      command.addImport(Categories.class);
View Full Code Here

      if (targetPackage != null && !targetPackage.isEmpty())
         command.setPackage(targetPackage);

      command.setSuperType(AbstractUICommand.class);
      command.addImport(UIBuilder.class);
      command.addImport(UIContext.class);
      command.addImport(UIExecutionContext.class);
      command.addImport(UICommandMetadata.class);
      command.addImport(Metadata.class);
      command.addImport(Categories.class);
      command.addImport(Result.class);
View Full Code Here

         command.setPackage(targetPackage);

      command.setSuperType(AbstractUICommand.class);
      command.addImport(UIBuilder.class);
      command.addImport(UIContext.class);
      command.addImport(UIExecutionContext.class);
      command.addImport(UICommandMetadata.class);
      command.addImport(Metadata.class);
      command.addImport(Categories.class);
      command.addImport(Result.class);
      command.addImport(Results.class);
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.