Package org.jboss.forge.scaffold.faces.util

Examples of org.jboss.forge.scaffold.faces.util.AnnotationLookup


   public ForgeConfigReader(Configuration config, Project project)
   {
      this.config = config;
      this.project = project;
      this.annotationLookup = new AnnotationLookup(project);
   }
View Full Code Here


         attributes.remove(HIDDEN);
         attributes.put(REQUIRED, TRUE);
      }

      if (config != null && config.getAnnotationLookup() != null) {
         final AnnotationLookup annotationLookup = config.getAnnotationLookup();

         if (attributes.containsKey(REVERSE_PRIMARY_KEY_TYPE) && null != annotationLookup) {
            try {
               final String reverseKey = annotationLookup.getFieldName(Id.class, attributes.get(REVERSE_PRIMARY_KEY_TYPE));
               attributes.put(REVERSE_PRIMARY_KEY, reverseKey);
            } catch (Exception e) {
               throw new RuntimeException("cannot resolve reverse primary key", e);
            }
         }
View Full Code Here

      Map<String,String> superMap = super.inspectEntity(declaredClass, actualClass);
      if (superMap != null)
         attributes.putAll(superMap);
     
      if (config != null && config.getAnnotationLookup() != null) {
         final AnnotationLookup annotationLookup = config.getAnnotationLookup();

         try {
            final String primaryKey = annotationLookup.getFieldName(Id.class, declaredClass);
            attributes.put(PRIMARY_KEY, primaryKey);
         } catch (Exception e) {
            log.debug("cannot resolve primary key for class "+declaredClass, e);
         }
      }
View Full Code Here

TOP

Related Classes of org.jboss.forge.scaffold.faces.util.AnnotationLookup

Copyright © 2018 www.massapicom. 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.