Package javax.persistence

Examples of javax.persistence.PersistenceContext.type()


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


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

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

                {
                    throw new WebBeansConfigurationException("@PersistenceContext must only be injected into field/method with type EntityManager! class : " 
                                                             + clazz.getName() + " in field/method : " + name);
                }
            
                if (pc.type().equals(PersistenceContextType.EXTENDED))
                {
                    throw new WebBeansConfigurationException("type of @PersistenceContext must not be 'EXTENDED'! class : " 
                            + clazz.getName() + " in field/method : " + name);
                   
                }
View Full Code Here

          for (PersistenceProperty pp : pps) {
            properties.setProperty(pp.name(), pp.value());
          }
        }
        this.unitName = pc.unitName();
        this.type = pc.type();
        this.synchronizedWithTransaction = (synchronizationAttribute == null ||
            "SYNCHRONIZED".equals(ReflectionUtils.invokeMethod(synchronizationAttribute, pc).toString()));
        this.properties = properties;
      }
      else {
View Full Code Here

                {
                    throw new WebBeansConfigurationException("@PersistenceContext must only be injected into field with type EntityManager! class : " 
                                                             + clazz.getName() + " in field/method : " + name);
                }
            
                if (pc.type().equals(PersistenceContextType.EXTENDED))
                {
                    throw new WebBeansConfigurationException("type of @PersistenceContext must not be 'EXTENDED'! class : " 
                            + clazz.getName() + " in field/method : " + name);
                   
                }
View Full Code Here

         }
         String error = "@PersistenceContext(name='" + encName
                 + "',unitName='" + ref.unitName() + "') on EJB: "
                 + container.getIdentifier() + " failed to inject on method "
                 + method.toString();
         container.getEncInjectors().put(encName, new PcEncInjector(encName, ref.unitName(), ref.type(), method.getParameterTypes()[0], error));
      }
      injectors.put(method, new JndiMethodInjector(method,
              encName, container.getEnc()));
   }
View Full Code Here

         }
         String error = "@PersistenceContext(name='" + encName
                 + "',unitName='" + ref.unitName() + "') on EJB: "
                 + container.getIdentifier() + " failed to inject on field "
                 + field.toString();
         container.getEncInjectors().put(encName, new PcEncInjector(encName, ref.unitName(), ref.type(), field.getType(), error));
      }
      injectors.put(field, new JndiFieldInjector(field,
              encName, container.getEnc()));
   }
}
View Full Code Here

                if (!type.equals(EntityManager.class))
                {
                    throw new WebBeansConfigurationException("@PersistenceContext must only be injected into field/method with type EntityManager! class : " + clazz.getName() + " in field/method : " + name);
                }

                if (pc.type().equals(PersistenceContextType.EXTENDED))
                {
                    throw new WebBeansConfigurationException("type of @PersistenceContext must not be 'EXTENDED'! class : " + clazz.getName() + " in field/method : " + name);

                }
            }
View Full Code Here

/*     */       {
/* 153 */         throw new RuntimeException("Illegal @PersistenceUnit on " + method + " :" + e.getMessage());
/*     */       }
/* 155 */       String error = "@PersistenceContext(name='" + encName + "',unitName='" + ref.unitName() + "') on EJB: " + container.getIdentifier() + " failed to inject on method " + method.toString();
/*     */
/* 159 */       container.getEncInjectors().put(encName, new PcEncInjector(encName, ref.unitName(), ref.type(), method.getParameterTypes()[0], error));
/*     */     }
/* 161 */     injectors.put(method, new JndiMethodInjector(method, encName, container.getEnc()));
/*     */   }
/*     */
/*     */   public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
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.