Package javax.persistence

Examples of javax.persistence.PersistenceContextType


/*  74 */     if (name.length() == 0)
/*  75 */       name = ProcessorUtils.getName(element);
/*  76 */     ref.setPersistenceContextRefName(name);
/*  77 */     if (annotation.unitName().length() > 0)
/*  78 */       ref.setPersistenceUnitName(annotation.unitName());
/*  79 */     PersistenceContextType type = annotation.type();
/*  80 */     ref.setPersistenceContextType(type);
/*     */
/*  82 */     PersistenceProperty[] properties = annotation.properties();
/*  83 */     if (properties.length > 0)
/*     */     {
View Full Code Here


                    if (properties != null) {
                        for (PropertyMetaData prop : properties) {
                            map.put(prop.getKey(), prop.getValue());
                        }
                    }
                    PersistenceContextType type = puRef.getPersistenceContextType() == null ? PersistenceContextType.TRANSACTION : puRef.getPersistenceContextType();
                    InjectionSource pcBindingSource = this.getPersistenceContextBindingSource(deploymentUnit, persistenceUnitName, type, map);
                    bindingConfiguration = new BindingConfiguration(name, pcBindingSource);
                } else {
                    throw new RuntimeException("Support for persistence-context-ref without a lookup or persistence-unit-name, isn't yet implemented");
                }
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

            if(pu.getTransactionType() == PersistenceUnitTransactionType.RESOURCE_LOCAL) {
                classDescription.setInvalid("Cannot inject RESOURCE_LOCAL container manged EntityManager's using @PersistenceContext");
                return null;
            }
            AnnotationValue pcType = annotation.value("type");
            PersistenceContextType type = (pcType == null || PersistenceContextType.TRANSACTION.name().equals(pcType.asString()))
                    ? PersistenceContextType.TRANSACTION : PersistenceContextType.EXTENDED;

            Map properties;
            AnnotationValue value = annotation.value("properties");
            AnnotationInstance[] props = value != null ? value.asNestedArray() : null;
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

Related Classes of javax.persistence.PersistenceContextType

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.