/** * INTERNAL * Return a class loader * @return java.lang.ClassLoader */ public ClassLoader getClassLoader() { if (classLoader == null) { return org.eclipse.persistence.internal.helper.ConversionManager.getDefaultManager().getLoader(); } else { return classLoader; } }
/** * INTERNAL * Return a class loader * @return java.lang.ClassLoader */ public ClassLoader getClassLoader() { if (classLoader == null) { return org.eclipse.persistence.internal.helper.ConversionManager.getDefaultManager().getLoader(); } else { return classLoader; } }
/** * INTERNAL * Return a class loader * @return java.lang.ClassLoader */ public ClassLoader getClassLoader() { if (classLoader == null) { return org.eclipse.persistence.internal.helper.ConversionManager.getDefaultManager().getLoader(); } else { return classLoader; } }
/** * Return the loader for loading the resource bundles. */ public static ClassLoader getLoader() { ClassLoader loader = ExceptionMessageGenerator.class.getClassLoader(); if (loader == null) { loader = ConversionManager.getDefaultManager().getLoader(); } return loader; }
/** * Return the loader for loading the resource bundles. */ public static ClassLoader getLoader() { ClassLoader loader = ExceptionMessageGenerator.class.getClassLoader(); if (loader == null) { loader = ConversionManager.getDefaultManager().getLoader(); } return loader; }
/** * PUBLIC: * This constructor is used when passing in the resource name of the * configuration file that should be parsed */ public XMLSessionConfigLoader(String resourceName) { this.resourceName = resourceName; this.exceptionStore = new Vector<>(); this.entityResolver = new PersistenceEntityResolver(); this.classLoader = ConversionManager.getDefaultManager().getLoader(); }
/** * PUBLIC: * This constructor is used when passing in the resource name of the * configuration file that should be parsed */ public XMLSessionConfigLoader(String resourceName) { this.resourceName = resourceName; this.exceptionStore = new Vector(); this.entityResolver = new PersistenceEntityResolver(); this.classLoader = ConversionManager.getDefaultManager().getLoader(); }
/** * PUBLIC: * This constructor is used when passing in the resource name of the * configuration file that should be parsed */ public XMLSessionConfigLoader(String resourceName) { this.resourceName = resourceName; this.exceptionStore = new Vector<>(); this.entityResolver = new PersistenceEntityResolver(); this.classLoader = ConversionManager.getDefaultManager().getLoader(); }
/** * INTERNAL: * Return the class loader for the session's application. * This loader should be able to load any application or EclipseLink class. */ public ClassLoader getLoader() { return getDatasourcePlatform().getConversionManager().getLoader(); }
/** * INTERNAL: * Return the class loader for the session's application. * This loader should be able to load any application or EclipseLink class. */ public ClassLoader getLoader() { return getDatasourcePlatform().getConversionManager().getLoader(); }
/** * INTERNAL: * Return the class loader for the session's application. * This loader should be able to load any application or EclipseLink class. */ public ClassLoader getLoader() { return getDatasourcePlatform().getConversionManager().getLoader(); }
public void initialize(AbstractSession session) { loader = session.getDatasourcePlatform().getConversionManager().getLoader(); }
/** * Returns the {@link ClassLoader} used by EclipseLink to load the application's classes. * * @return The application's {@link ClassLoader} */ private ClassLoader getClassLoader() { return getSession().getDatasourcePlatform().getConversionManager().getLoader(); }
/** * Build a DatabaseQuery from an jpql string. * * @param jpql * @param session * the session to get the descriptors for this query for. * @return a DatabaseQuery representing the given jpql. */ public static DatabaseQuery buildEJBQLDatabaseQuery(String jpql, AbstractSession session) { return buildEJBQLDatabaseQuery(null, jpql, session, null, null, session.getDatasourcePlatform().getConversionManager().getLoader()); }
/** * Returns the {@link ClassLoader} used by EclipseLink to load the application's classes. * * @return The application's {@link ClassLoader} */ private ClassLoader getClassLoader() { return getSession().getDatasourcePlatform().getConversionManager().getLoader(); }
/** * Builds a {@link JPQLParseTree} based on the given query and associated * {@link AbstractSession}. * * @param jpqlQuery * The JPQL query * @param session * The associated session * @return The {@link JPQLParseTree} */ private JPQLParseTree buildParseTree(CharSequence jpqlQuery, AbstractSession session) { JPQLParseTree parseTree = JPQLParser.buildParseTree(jpqlQuery.toString()); parseTree.setClassLoader(session.getDatasourcePlatform().getConversionManager().getLoader()); return parseTree; }
protected void initialize(){ /** * Set the javaClass on the descriptor for the current classLoader (normally done in MetadataProject.addMetamodelMappedSuperclass). * This will ensure the class is both set and is in the right classLoader - even if the class is already set. * Perform this conversion only for our custom pseudo descriptors for MappedSuperclasses. * The classLoader should be obtained from the ConversionManager so we handle EE deployments using a shared-library */ descriptor.convertClassNamesToClasses(metamodel.getSession().getDatasourcePlatform().getConversionManager().getLoader()); super.initialize(); }
/** * Build a selection query using the given properties. */ protected ReadObjectQuery getReadObjectQuery(Map properties) { ReadObjectQuery query = new ReadObjectQuery(); // Apply the properties if there are some. QueryHintsHandler.apply(properties, query, this.databaseSession.getDatasourcePlatform().getConversionManager().getLoader(), this.databaseSession); query.setIsExecutionClone(true); return query; }
public void initialize(DatabaseMapping mapping, Session session) { this.conversionManager = (XMLConversionManager) session.getDatasourcePlatform().getConversionManager(); this.mapping = (XMLCompositeDirectCollectionMapping) mapping; try { if (getObjectClassName() != null) { ClassLoader loader = session.getDatasourcePlatform().getConversionManager().getLoader(); Class aClass = AccessController.doPrivileged(new PrivilegedClassForName(getObjectClassName(), true, loader)); setObjectClass(aClass); } } catch (PrivilegedActionException pae) { throw ValidationException.classNotFoundWhileConvertingClassNames(getObjectClassName(), pae.getException()); } }
public void initialize(DatabaseMapping mapping, Session session) { this.conversionManager = (XMLConversionManager) session.getDatasourcePlatform().getConversionManager(); this.mapping = (XMLCompositeDirectCollectionMapping) mapping; try { if (getObjectClassName() != null) { ClassLoader loader = session.getDatasourcePlatform().getConversionManager().getLoader(); Class aClass = (Class) AccessController.doPrivileged(new PrivilegedClassForName(getObjectClassName(), true, loader)); setObjectClass(aClass); } } catch (PrivilegedActionException pae) { throw ValidationException.classNotFoundWhileConvertingClassNames(getObjectClassName(), pae.getException()); } }