Examples of unitName()


Examples of javax.persistence.PersistenceUnit.unitName()

      {
         encName = "env/" + encName;
      }
      if (!container.getEncInjectors().containsKey(encName))
      {
         container.getEncInjectors().put(encName, new PuEncInjector(encName, method.getParameterTypes()[0], ref.unitName(), "@PersistenceUnit"));
         try
         {
            if (!method.isAnnotationPresent(IgnoreDependency.class)) addPUDependency(ref.unitName(), container);
         }
         catch (NameNotFoundException e)
View Full Code Here

Examples of javax.persistence.PersistenceUnit.unitName()

      if (!container.getEncInjectors().containsKey(encName))
      {
         container.getEncInjectors().put(encName, new PuEncInjector(encName, method.getParameterTypes()[0], ref.unitName(), "@PersistenceUnit"));
         try
         {
            if (!method.isAnnotationPresent(IgnoreDependency.class)) addPUDependency(ref.unitName(), container);
         }
         catch (NameNotFoundException e)
         {
            throw new RuntimeException("Illegal @PersistenceUnit on " + method + " :" + e.getMessage());
         }
View Full Code Here

Examples of javax.persistence.PersistenceUnit.unitName()

      {
         encName = "env/" + encName;
      }
      if (!container.getEncInjectors().containsKey(encName))
      {
         container.getEncInjectors().put(encName, new PuEncInjector(encName, field.getType(), ref.unitName(), "@PersistenceUnit"));
         try
         {
            if (!field.isAnnotationPresent(IgnoreDependency.class)) addPUDependency(ref.unitName(), container);
         }
         catch (NameNotFoundException e)
View Full Code Here

Examples of javax.persistence.PersistenceUnit.unitName()

      if (!container.getEncInjectors().containsKey(encName))
      {
         container.getEncInjectors().put(encName, new PuEncInjector(encName, field.getType(), ref.unitName(), "@PersistenceUnit"));
         try
         {
            if (!field.isAnnotationPresent(IgnoreDependency.class)) addPUDependency(ref.unitName(), container);
         }
         catch (NameNotFoundException e)
         {
            throw new RuntimeException("Illegal @PersistenceUnit on " + field + " :" + e.getMessage());
         }
View Full Code Here

Examples of javax.persistence.PersistenceUnit.unitName()

        Object ret = null;
        Annotation annot = AnnotationUtil.getAnnotation(annotations, PersistenceUnit.class);
        if (annot != null)
        {
            PersistenceUnit pu = (PersistenceUnit) annot;
            String unitName = pu.unitName();
           
            //X TODO what if the EntityManagerFactory is null?
            return JPAUtil.getPersistenceUnit(unitName);
        }
       
View Full Code Here

Examples of javax.persistence.PersistenceUnit.unitName()

       
        Annotation annot = AnnotationUtil.getAnnotation(annotations, PersistenceUnit.class);
        if (annot != null)
        {
            PersistenceUnit pu = (PersistenceUnit) annot;
            String unitName = pu.unitName();
           
            //X TODO what if the EntityManagerFactory is null?
            return getJPAService().getPersistenceUnit(unitName);
        }
       
View Full Code Here

Examples of javax.persistence.PersistenceUnit.unitName()

        this.type = pc.type();
        this.properties = properties;
      }
      else {
        resourceType = EntityManagerFactory.class;
        this.unitName = pu.unitName();
      }
      checkResourceType(resourceType);
    }

    /**
 
View Full Code Here

Examples of javax.persistence.PersistenceUnit.unitName()

            resource = lookupFieldResource(context, name, resourceReference.getResourceType());
        }
        else if(resourceReference.supports(PersistenceUnit.class))
        {
            PersistenceUnit annotation = resourceReference.getAnnotation(PersistenceUnit.class);
            resource = getPersistenceUnit(context, annotation.unitName(), resourceReference.getResourceType());
        }
        else if(resourceReference.supports(PersistenceContext.class))
        {
            PersistenceContext annotation = resourceReference.getAnnotation(PersistenceContext.class);
            resource = getPersistenceContext(context, annotation.unitName(), resourceReference.getResourceType());
View Full Code Here

Examples of javax.persistence.PersistenceUnit.unitName()

            resource = getPersistenceUnit(context, annotation.unitName(), resourceReference.getResourceType());
        }
        else if(resourceReference.supports(PersistenceContext.class))
        {
            PersistenceContext annotation = resourceReference.getAnnotation(PersistenceContext.class);
            resource = getPersistenceContext(context, annotation.unitName(), resourceReference.getResourceType());
        }
       
        return resource;
    }
View Full Code Here

Examples of javax.persistence.PersistenceUnit.unitName()

        this.type = pc.type();
        this.properties = properties;
      }
      else {
        resourceType = EntityManagerFactory.class;
        this.unitName = pu.unitName();
      }
      checkResourceType(resourceType);
    }

    /**
 
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.