/** * INTERNAL: * Return the database platform currently connected to. * The platform is used for database specific behavior. */ public Platform getDatasourcePlatform() { // PERF: Cache the platform. if (platform == null) { platform = getDatasourceLogin().getDatasourcePlatform(); } return platform; }
/** * Default construcotr */ public DefaultTableGenerator(Project project) { this.project = project; if (project.getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform){ databasePlatform = (DatabasePlatform)project.getDatasourceLogin().getDatasourcePlatform(); } tableMap = new HashMap(); fieldMap = new HashMap(); databaseFields = new HashMap(); }
/** * INTERNAL: * Return the database platform currently connected to. * The platform is used for database specific behavior. */ @Override public Platform getDatasourcePlatform() { // PERF: Cache the platform. if (platform == null) { platform = getDatasourceLogin().getDatasourcePlatform(); } return platform; }
public CustomObjectInputStream(InputStream stream, Session session) throws IOException { super(stream); m_conversionManager = session.getDatasourceLogin().getDatasourcePlatform().getConversionManager(); }
public CustomObjectInputStream(InputStream stream, Session session) throws IOException { super(stream); m_conversionManager = session.getDatasourceLogin().getDatasourcePlatform().getConversionManager(); }
private void initialize(Map<String, Boolean> parserFeatures) { DatabaseSession session = xmlContext.getSession(0); XMLPlatform xmlPlatform = (XMLPlatform)session.getDatasourceLogin().getDatasourcePlatform(); platformUnmarshaller = xmlPlatform.newPlatformUnmarshaller(this, parserFeatures); platformUnmarshaller.setWhitespacePreserving(false); unmarshalProperties = new Properties(); // Waiting on XDK to fix bug #3697940 to enable this code //initializeSchemas(); setValidationMode(NONVALIDATING); }
/** * This method indicates if streams are being used for binding */ public Boolean getUsesStreamsForBinding() { if (!(getSession().getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform)) { return Boolean.FALSE; } return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesStreamsForBinding()); }
/** * Shows if native SQL is being used */ public Boolean getUsesNativeSQL() { if (!(getSession().getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform)) { return Boolean.FALSE; } return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesNativeSQL()); }
/** * This method will return if batchWriting is in use or not. */ public Boolean getUsesJDBCBatchWriting() { if (!(getSession().getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform)) { return Boolean.FALSE; } return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesJDBCBatchWriting()); }
/** * Shows if Byte Array Binding is turned on or not */ public Boolean getUsesByteArrayBinding() { if (!(getSession().getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform)) { return Boolean.FALSE; } return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesByteArrayBinding()); }
/** * This method indicates if streams are being used for binding */ public Boolean getUsesStreamsForBinding() { if (!(getSession().getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform)) { return Boolean.FALSE; } return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesStreamsForBinding()); }
/** * This method will return if batchWriting is in use or not. */ public Boolean getUsesJDBCBatchWriting() { if (!(getSession().getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform)) { return Boolean.FALSE; } return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesJDBCBatchWriting()); }
/** * Shows if Byte Array Binding is turned on or not */ public Boolean getUsesByteArrayBinding() { if (!(getSession().getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform)) { return Boolean.FALSE; } return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesByteArrayBinding()); }
/** * Shows if native SQL is being used */ public Boolean getUsesNativeSQL() { if (!(getSession().getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform)) { return Boolean.FALSE; } return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesNativeSQL()); }
/** * INTERNAL: This method is used to unwrap the oracle connection wrapped by * the application server. TopLink needs this unwrapped connection for certain * Oracle Specific support. (ie TIMESTAMPTZ) */ public java.sql.Connection unwrapConnection(java.sql.Connection connection){ Platform platform = getDatabaseSession().getDatasourceLogin().getDatasourcePlatform(); if(platform.isOracle() && ((OraclePlatform)platform).canUnwrapOracleConnection()) { return ((OraclePlatform)platform).unwrapOracleConnection(connection); } else { return super.unwrapConnection(connection); } }
/** * INTERNAL: * Handler for the descriptor post build event. * Convert the key and values to their appropriate type. */ public void postBuild(org.eclipse.persistence.descriptors.DescriptorEvent event) { setKey(event.getSession().getDatasourceLogin().getDatasourcePlatform().getConversionManager().convertObject(getKey(), getKeyType())); setValue(event.getSession().getDatasourceLogin().getDatasourcePlatform().getConversionManager().convertObject(getValue(), getValueType())); }
@Override protected void preLogin(Project project, ClassLoader classLoader) { if ((project.getDatasourceLogin() == null) || !(project.getDatasourceLogin().getDatasourcePlatform() instanceof XMLPlatform)) { XMLPlatform platform = new SAXPlatform(); platform.getConversionManager().setLoader(classLoader); project.setLogin(new XMLLogin(platform)); } }
@Override protected void preLogin(Project project, ClassLoader classLoader) { if ((project.getDatasourceLogin() == null) || !(project.getDatasourceLogin().getDatasourcePlatform() instanceof XMLPlatform)) { XMLPlatform platform = new SAXPlatform(); platform.getConversionManager().setLoader(classLoader); project.setLogin(new XMLLogin(platform)); } }
/** * INTERNAL: * Handler for the descriptor post build event. * Convert the key and values to their appropriate type. */ public void postBuild(org.eclipse.persistence.descriptors.DescriptorEvent event) { setKey(event.getSession().getDatasourceLogin().getDatasourcePlatform().getConversionManager().convertObject(getKey(), getKeyType())); setValue(event.getSession().getDatasourceLogin().getDatasourcePlatform().getConversionManager().convertObject(getValue(), getValueType())); }
/** * INTERNAL: * Handler for the descriptor post build event. * Convert the key and values to their appropriate type. */ public void postBuild(org.eclipse.persistence.descriptors.DescriptorEvent event) { setKey(event.getSession().getDatasourceLogin().getDatasourcePlatform().getConversionManager().convertObject(getKey(), getKeyType())); setValue(event.getSession().getDatasourceLogin().getDatasourcePlatform().getConversionManager().convertObject(getValue(), getValueType())); }