private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { in.defaultReadObject(); Class type = (Class) in.readObject(); pcSubclassInstance = PCRegistry.newInstance(type, null, false); ImplHelper.registerPersistenceCapable(this); } }
private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { in.defaultReadObject(); Class type = (Class) in.readObject(); pcSubclassInstance = PCRegistry.newInstance(type, null, false); ImplHelper.registerPersistenceCapable(this); } }
private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { in.defaultReadObject(); Class type = (Class) in.readObject(); pcSubclassInstance = PCRegistry.newInstance(type, null, false); ImplHelper.registerPersistenceCapable(this); } }
private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { in.defaultReadObject(); Class type = (Class) in.readObject(); pcSubclassInstance = PCRegistry.newInstance(type, null, false); ImplHelper.registerPersistenceCapable(this); } }
private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException { in.defaultReadObject(); Class type = (Class) in.readObject(); pcSubclassInstance = PCRegistry.newInstance(type, null, false); ImplHelper.registerPersistenceCapable(this); } }
public ReflectingPersistenceCapable(Object o, OpenJPAConfiguration conf) { this.o = o; Class type = o.getClass(); pcSubclassInstance = PCRegistry.newInstance(type, null, false); meta = conf.getMetaDataRepositoryInstance() .getMetaData(type, null, true); }
public ReflectingPersistenceCapable(Object o, OpenJPAConfiguration conf) { this.o = o; Class type = o.getClass(); pcSubclassInstance = PCRegistry.newInstance(type, null, false); meta = conf.getMetaDataRepositoryInstance() .getMetaData(type, null, true); }
public ReflectingPersistenceCapable(Object o, OpenJPAConfiguration conf) { this.o = o; Class type = o.getClass(); pcSubclassInstance = PCRegistry.newInstance(type, null, false); meta = conf.getMetaDataRepositoryInstance() .getMetaData(type, null, true); }
public ReflectingPersistenceCapable(Object o, OpenJPAConfiguration conf) { this.o = o; Class type = o.getClass(); pcSubclassInstance = PCRegistry.newInstance(type, null, false); meta = conf.getMetaDataRepositoryInstance() .getMetaData(type, null, true); }
public ReflectingPersistenceCapable(Object o, OpenJPAConfiguration conf) { this.o = o; Class type = o.getClass(); pcSubclassInstance = PCRegistry.newInstance(type, null, false); meta = conf.getMetaDataRepositoryInstance() .getMetaData(type, null, true); }
public Object newInstance(Class cls) { assertOpen(); if (!cls.isInterface() && Modifier.isAbstract(cls.getModifiers())) throw new UnsupportedOperationException(_loc.get ("new-abstract", cls).getMessage()); // 1.5 doesn't initialize classes without a true Class.forName if (!PCRegistry.isRegistered(cls)) { try { Class.forName(cls.getName(), true, AccessController.doPrivileged( J2DoPrivHelper.getClassLoaderAction(cls))); } catch (Throwable t) { } } if (_repo.getMetaData(cls, getClassLoader(), false) == null) throw new IllegalArgumentException( _loc.get("no-interface-metadata", cls.getName()).getMessage()); try { return PCRegistry.newInstance(cls, null, false); } catch (IllegalStateException ise) { IllegalArgumentException iae = new IllegalArgumentException(ise.getMessage()); iae.setStackTrace(ise.getStackTrace()); throw iae; } }
public Object newInstance(Class cls) { assertOpen(); if (!cls.isInterface() && Modifier.isAbstract(cls.getModifiers())) throw new UnsupportedOperationException(_loc.get ("new-abstract", cls).getMessage()); // 1.5 doesn't initialize classes without a true Class.forName if (!PCRegistry.isRegistered(cls)) { try { Class.forName(cls.getName(), true, (ClassLoader) AccessController.doPrivileged( J2DoPrivHelper.getClassLoaderAction(cls))); } catch (Throwable t) { } } if (_conf.getMetaDataRepositoryInstance().getMetaData(cls, getClassLoader(), false) == null) throw new IllegalArgumentException( _loc.get("no-interface-metadata", cls.getName()).getMessage()); try { return PCRegistry.newInstance(cls, null, false); } catch (IllegalStateException ise) { IllegalArgumentException iae = new IllegalArgumentException(ise.getMessage()); iae.setStackTrace(ise.getStackTrace()); throw iae; } }
public Object newInstance(Class cls) { assertOpen(); if (!cls.isInterface() && Modifier.isAbstract(cls.getModifiers())) throw new UnsupportedOperationException(_loc.get ("new-abstract", cls).getMessage()); // 1.5 doesn't initialize classes without a true Class.forName if (!PCRegistry.isRegistered(cls)) { try { Class.forName(cls.getName(), true, AccessController.doPrivileged( J2DoPrivHelper.getClassLoaderAction(cls))); } catch (Throwable t) { } } if (_repo.getMetaData(cls, getClassLoader(), false) == null) throw new IllegalArgumentException( _loc.get("no-interface-metadata", cls.getName()).getMessage()); try { return PCRegistry.newInstance(cls, null, false); } catch (IllegalStateException ise) { IllegalArgumentException iae = new IllegalArgumentException(ise.getMessage()); iae.setStackTrace(ise.getStackTrace()); throw iae; } }
public Object newInstance(Class cls) { assertOpen(); if (!cls.isInterface() && Modifier.isAbstract(cls.getModifiers())) throw new UnsupportedOperationException(_loc.get ("new-abstract", cls).getMessage()); // 1.5 doesn't initialize classes without a true Class.forName if (!PCRegistry.isRegistered(cls)) { try { Class.forName(cls.getName(), true, AccessController.doPrivileged( J2DoPrivHelper.getClassLoaderAction(cls))); } catch (Throwable t) { } } if (_repo.getMetaData(cls, getClassLoader(), false) == null) throw new IllegalArgumentException( _loc.get("no-interface-metadata", cls.getName()).getMessage()); try { return PCRegistry.newInstance(cls, null, false); } catch (IllegalStateException ise) { IllegalArgumentException iae = new IllegalArgumentException(ise.getMessage()); iae.setStackTrace(ise.getStackTrace()); throw iae; } }
public Object newInstance(Class cls) { assertOpen(); if (!cls.isInterface() && Modifier.isAbstract(cls.getModifiers())) throw new UnsupportedOperationException(_loc.get ("new-abstract", cls).getMessage()); // 1.5 doesn't initialize classes without a true Class.forName if (!PCRegistry.isRegistered(cls)) { try { Class.forName(cls.getName(), true, AccessController.doPrivileged( J2DoPrivHelper.getClassLoaderAction(cls))); } catch (Throwable t) { } } if (_repo.getMetaData(cls, getClassLoader(), false) == null) throw new IllegalArgumentException( _loc.get("no-interface-metadata", cls.getName()).getMessage()); try { return PCRegistry.newInstance(cls, null, false); } catch (IllegalStateException ise) { IllegalArgumentException iae = new IllegalArgumentException(ise.getMessage()); iae.setStackTrace(ise.getStackTrace()); throw iae; } }
/** * This static public worker method detects and logs any Entities that may have been enhanced at build time by * a version of the enhancer that is older than the current version. * * @param cls * - A non-null Class implementing org.apache.openjpa.enhance.PersistenceCapable. * @param log * - A non-null org.apache.openjpa.lib.log.Log. * * @throws - IllegalStateException if cls doesn't implement org.apache.openjpa.enhance.PersistenceCapable. * * @return true if the provided Class is down level from the current PCEnhancer.ENHANCER_VERSION. False * otherwise. */ public static boolean checkEnhancementLevel(Class<?> cls, Log log) { if (cls == null || log == null) { return false; } PersistenceCapable pc = PCRegistry.newInstance(cls, null, false); if (pc == null) { return false; } if (pc.pcGetEnhancementContractVersion() < PCEnhancer.ENHANCER_VERSION) { log.info(_loc.get("down-level-enhanced-entity", new Object[] { cls.getName(), pc.pcGetEnhancementContractVersion(), PCEnhancer.ENHANCER_VERSION })); return true; } return false; }
/** * This static public worker method detects and logs any Entities that may have been enhanced at build time by * a version of the enhancer that is older than the current version. * * @param cls * - A non-null Class implementing org.apache.openjpa.enhance.PersistenceCapable. * @param log * - A non-null org.apache.openjpa.lib.log.Log. * * @throws - IllegalStateException if cls doesn't implement org.apache.openjpa.enhance.PersistenceCapable. * * @return true if the provided Class is down level from the current PCEnhancer.ENHANCER_VERSION. False * otherwise. */ public static boolean checkEnhancementLevel(Class<?> cls, Log log) { if (cls == null || log == null) { return false; } PersistenceCapable pc = PCRegistry.newInstance(cls, null, false); if (pc == null) { return false; } if (pc.pcGetEnhancementContractVersion() < PCEnhancer.ENHANCER_VERSION) { log.info(_loc.get("down-level-enhanced-entity", new Object[] { cls.getName(), pc.pcGetEnhancementContractVersion(), PCEnhancer.ENHANCER_VERSION })); return true; } return false; }
/** * This static public worker method detects and logs any Entities that may have been enhanced at build time by * a version of the enhancer that is older than the current version. * * @param cls * - A non-null Class implementing org.apache.openjpa.enhance.PersistenceCapable. * @param log * - A non-null org.apache.openjpa.lib.log.Log. * * @throws - IllegalStateException if cls doesn't implement org.apache.openjpa.enhance.PersistenceCapable. * * @return true if the provided Class is down level from the current PCEnhancer.ENHANCER_VERSION. False * otherwise. */ public static boolean checkEnhancementLevel(Class<?> cls, Log log) { if (cls == null || log == null) { return false; } PersistenceCapable pc = PCRegistry.newInstance(cls, null, false); if (pc == null) { return false; } if (pc.pcGetEnhancementContractVersion() < PCEnhancer.ENHANCER_VERSION) { log.info(_loc.get("down-level-enhanced-entity", new Object[] { cls.getName(), pc.pcGetEnhancementContractVersion(), PCEnhancer.ENHANCER_VERSION })); return true; } return false; }
PersistenceCapable inst = PCRegistry.newInstance(cls, this, _oid, true); if (inst == null) {
PersistenceCapable inst = PCRegistry.newInstance(cls, this, _oid, true); if (inst == null) {