Package javax.persistence

Examples of javax.persistence.PersistenceContext.type()


/*     */       {
/* 187 */         throw new RuntimeException("Illegal @PersistenceUnit on " + field + " :" + e.getMessage());
/*     */       }
/* 189 */       String error = "@PersistenceContext(name='" + encName + "',unitName='" + ref.unitName() + "') on EJB: " + container.getIdentifier() + " failed to inject on field " + field.toString();
/*     */
/* 193 */       container.getEncInjectors().put(encName, new PcEncInjector(encName, ref.unitName(), ref.type(), field.getType(), error));
/*     */     }
/* 195 */     injectors.put(field, new JndiFieldInjector(field, encName, container.getEnc()));
/*     */   }
/*     */ }

View Full Code Here


  @Override
  public ConfigProgram introspectField(AnnotatedField<?> field)
  {
    PersistenceContext pContext = field.getAnnotation(PersistenceContext.class);
   
    PersistenceContextType type = pContext.type();
    PersistenceProperty []properties = pContext.properties();
   
    Field javaField = field.getJavaMember();
   
    if (! javaField.getType().isAssignableFrom(EntityManager.class)) {
View Full Code Here

          for (PersistenceProperty pp : pps) {
            properties.setProperty(pp.name(), pp.value());
          }
        }
        this.unitName = pc.unitName();
        this.type = pc.type();
        this.properties = properties;
      }
      else {
        resourceType = EntityManagerFactory.class;
        this.unitName = pu.unitName();
View Full Code Here

                {
                    return new PersistenceContextMetaEntry(
                                   currentParamClass,
                                   currentField.getName(),
                                   persistenceContext.unitName(),
                                   PersistenceContextType.EXTENDED.equals(persistenceContext.type()));
                }
            }
            currentParamClass = currentParamClass.getSuperclass();
        }
View Full Code Here

  @Override
  public ConfigProgram introspectField(AnnotatedField<?> field)
  {
    PersistenceContext pContext = field.getAnnotation(PersistenceContext.class);
   
    PersistenceContextType type = pContext.type();
   
    Field javaField = field.getJavaMember();
    String location = getLocation(javaField);
   
    if (! javaField.getType().isAssignableFrom(EntityManager.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.