/** * PUBLIC: * The default value to substitute for database NULLs can be configured * on a per-class basis. * Example: login.setDefaultNullValue(long.class, new Long(0)) */ public void setDefaultNullValue(Class type, Object value) { getPlatform().getConversionManager().setDefaultNullValue(type, value); }
/** * PUBLIC: * The default value to substitute for database NULLs can be configured * on a per-class basis. * Example: login.setDefaultNullValue(long.class, new Long(0)) */ public void setDefaultNullValue(Class type, Object value) { getPlatform().getConversionManager().setDefaultNullValue(type, value); }
/** * PUBLIC: * The default value to substitute for database NULLs can be configured * on a per-class basis. * Example: login.setDefaultNullValue(long.class, new Long(0)) */ public void setDefaultNullValue(Class type, Object value) { getPlatform().getConversionManager().setDefaultNullValue(type, value); }
Object proxyTypeValue = session.getProperty(PersistenceUnitProperties.ORACLE_PROXY_TYPE); try { proxyType = ((Integer)session.getPlatform().getConversionManager().convertObject(proxyTypeValue, Integer.class)).intValue(); } catch (ConversionException conversionException) { throw ValidationException.oracleJDBC10_1_0_2ProxyConnectorRequiresIntProxytype();
Object proxyTypeValue = session.getProperty(PersistenceUnitProperties.ORACLE_PROXY_TYPE); try { proxyType = ((Integer)session.getPlatform().getConversionManager().convertObject(proxyTypeValue, Integer.class)).intValue(); } catch (ConversionException conversionException) { throw ValidationException.oracleJDBC10_1_0_2ProxyConnectorRequiresIntProxytype();
project.getLogin().getPlatform().getConversionManager().setLoader(dynamicClassLoader);
project.getLogin().getPlatform().getConversionManager().setLoader(dynamicClassLoader);
public static Project loadDynamicProject(Project project, DatabaseLogin login, DynamicClassLoader dynamicClassLoader) { if (project != null) { if (login == null) { if (project.getLogin() == null) { project.setLogin(new DatabaseLogin()); } } else { project.setLogin(login); } if (project.getLogin().getPlatform() == null) { project.getLogin().setPlatform(new DatabasePlatform()); } project.getLogin().getPlatform().getConversionManager().setLoader(dynamicClassLoader); for (Iterator<?> i = project.getAliasDescriptors().values().iterator(); i.hasNext();) { ClassDescriptor descriptor = (ClassDescriptor) i.next(); if (descriptor.getJavaClass() == null) { createType(dynamicClassLoader, descriptor, project); } } project.convertClassNamesToClasses(dynamicClassLoader); } return project; }
/** * Lookup the DynamicConversionManager for the given session. If the * existing ConversionManager is not an instance of DynamicConversionManager * then create a new one and replace the existing one. * * @param session * @return */ public static DynamicClassLoader lookup(Session session) { ConversionManager cm = null; if (session == null) { cm = ConversionManager.getDefaultManager(); } else { cm = session.getPlatform().getConversionManager(); } if (cm.getLoader() instanceof DynamicClassLoader) { return (DynamicClassLoader) cm.getLoader(); } DynamicClassLoader dcl = new DynamicClassLoader(cm.getLoader()); cm.setLoader(dcl); if (session == null) { ConversionManager.setDefaultLoader(dcl); } return dcl; }
/** * Lookup the DynamicConversionManager for the given session. If the * existing ConversionManager is not an instance of DynamicConversionManager * then create a new one and replace the existing one. * * @param session * @return */ public static DynamicClassLoader lookup(Session session) { ConversionManager cm = null; if (session == null) { cm = ConversionManager.getDefaultManager(); } else { cm = session.getPlatform().getConversionManager(); } if (cm.getLoader() instanceof DynamicClassLoader) { return (DynamicClassLoader) cm.getLoader(); } DynamicClassLoader dcl = new DynamicClassLoader(cm.getLoader()); cm.setLoader(dcl); if (session == null) { ConversionManager.setDefaultLoader(dcl); } return dcl; }
/** * Lookup the DynamicConversionManager for the given session. If the * existing ConversionManager is not an instance of DynamicConversionManager * then create a new one and replace the existing one. * * @param session * @return */ public static DynamicClassLoader lookup(Session session) { ConversionManager cm = null; if (session == null) { cm = ConversionManager.getDefaultManager(); } else { cm = session.getPlatform().getConversionManager(); } if (cm.getLoader() instanceof DynamicClassLoader) { return (DynamicClassLoader) cm.getLoader(); } DynamicClassLoader dcl = new DynamicClassLoader(cm.getLoader()); cm.setLoader(dcl); if (session == null) { ConversionManager.setDefaultLoader(dcl); } return dcl; }
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try { driverClass = AccessController.doPrivileged(new PrivilegedClassForName(this.getDriverClassName(), true, session.getPlatform().getConversionManager().getLoader())); } catch (PrivilegedActionException exception) { throw DatabaseException.configurationErrorClassNotFound(this.getDriverClassName()); driverClass = PrivilegedAccessHelper.getClassForName(this.getDriverClassName(), true, session.getPlatform().getConversionManager().getLoader());
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try { driverClass = AccessController.doPrivileged(new PrivilegedClassForName(this.getDriverClassName(), true, session.getPlatform().getConversionManager().getLoader())); } catch (PrivilegedActionException exception) { throw DatabaseException.configurationErrorClassNotFound(this.getDriverClassName()); driverClass = PrivilegedAccessHelper.getClassForName(this.getDriverClassName(), true, session.getPlatform().getConversionManager().getLoader());
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try { driverClass = (Class)AccessController.doPrivileged(new PrivilegedClassForName(this.getDriverClassName(), true, session.getPlatform().getConversionManager().getLoader())); } catch (PrivilegedActionException exception) { throw DatabaseException.configurationErrorClassNotFound(this.getDriverClassName()); driverClass = org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(this.getDriverClassName(), true, session.getPlatform().getConversionManager().getLoader());