/** * PUBLIC: * Used for table creation. Most databases do not create an index automatically for * foreign key columns. Normally it is recommended to index foreign key columns. * This allows for foreign key indexes to be configured, by default foreign keys are not indexed. * * @return whether an index should be created explicitly for foreign key constraints */ public boolean shouldCreateIndicesOnForeignKeys() { return getPlatform().shouldCreateIndicesOnForeignKeys(); }
/** * ADVANCED: * Return the code for preparing cursored output * parameters in a stored procedure */ public int getCursorCode() { return getPlatform().getCursorCode(); }
/** * PUBLIC: * Used to help bean introspection. */ public boolean getUsesStringBinding() { return getPlatform().usesStringBinding(); }
/** * ADVANCED: * Set the code for preparing cursored output * parameters in a stored procedure */ public void setCursorCode(int cursorCode) { getPlatform().setCursorCode(cursorCode); }
/** * PUBLIC: * Set whether to bind all arguments to any SQL statement. */ public void setShouldBindAllParameters(boolean shouldBindAllParameters) { getPlatform().setShouldBindAllParameters(shouldBindAllParameters); }
/** * PUBLIC: * By default CHAR field values have trailing blanks trimmed, this can be configured. */ public boolean shouldTrimStrings() { return getPlatform().shouldTrimStrings(); }
/** * PUBLIC: * Allow for the max batch writing size to be set. * This allows for the batch size to be limited as most database have strict limits. * If set to 0 then default value is used. * The size is in characters, the default is 32000 but the real value depends on the database configuration. */ public void setMaxBatchWritingSize(int maxBatchWritingSize) { getPlatform().setMaxBatchWritingSize(maxBatchWritingSize); }
/** * PUBLIC: * Set whether to bind all arguments to any SQL statement. */ public void setShouldBindAllParameters(boolean shouldBindAllParameters) { getPlatform().setShouldBindAllParameters(shouldBindAllParameters); }
/** * PUBLIC: * If prepared statement caching is used this configures the cache size. * The default is 50. */ public void setStatementCacheSize(int size) { getPlatform().setStatementCacheSize(size); }
/** * PUBLIC: * Get the String used on all table creation statements generated from the DefaultTableGenerator * with a session using this project (DDL generation). This value will be appended to CreationSuffix strings * stored on the DatabaseTable or TableDefinition. * ie setTableCreationSuffix("engine=InnoDB"); */ public void setTableCreationSuffix(String tableCreationSuffix){ this.getPlatform().setTableCreationSuffix(tableCreationSuffix); }
/** * PUBLIC: * Bind all arguments to any SQL statement. */ public boolean shouldBindAllParameters() { return getPlatform().shouldBindAllParameters(); }
/** * PUBLIC: * EclipseLink can be configured to use database-specific SQL grammar, * as opposed to the JDBC standard grammar. * This is because, unfortunately, some drivers to not support the full JDBC standard. * By default EclipseLink uses the JDBC SQL grammar. */ public boolean shouldUseNativeSQL() { return getPlatform().usesNativeSQL(); }
/** * PUBLIC: * Set the database platform to be Cloudscape. */ public void useCloudscape() { if (getPlatform().isCloudscape()) { return; } DatabasePlatform newPlatform = new CloudscapePlatform(); getPlatform().copyInto(newPlatform); setPlatform(newPlatform); }
/** * PUBLIC: * Set the database platform to be Sybase. */ public void useSybase() { if (getPlatform().isSybase()) { return; } DatabasePlatform newPlatform = new SybasePlatform(); getPlatform().copyInto(newPlatform); setPlatform(newPlatform); }
/** * PUBLIC: * Set the database platform to be Access. */ public void useAccess() { if (getPlatform().isAccess()) { return; } DatabasePlatform newPlatform = new AccessPlatform(); getPlatform().copyInto(newPlatform); setPlatform(newPlatform); }
/** * PUBLIC: * Set the database platform to be Oracle. */ public void useOracle() { if (getPlatform().isOracle()) { return; } DatabasePlatform newPlatform = new OraclePlatform(); getPlatform().copyInto(newPlatform); setPlatform(newPlatform); }
/** * PUBLIC: * Set the database platform to be DB2. */ public void useDB2() { if (getPlatform().isDB2()) { return; } DatabasePlatform newPlatform = new DB2Platform(); getPlatform().copyInto(newPlatform); setPlatform(newPlatform); }
/** * PUBLIC: * Set the database platform to be DBase. */ public void useDBase() { if (getPlatform().isDBase()) { return; } DatabasePlatform newPlatform = new DBasePlatform(); getPlatform().copyInto(newPlatform); setPlatform(newPlatform); }
/** * This method indicates if Strings are being bound */ public Boolean getUsesStringBinding() { if (!(getSession().getDatasourceLogin() instanceof DatabaseLogin)) { return Boolean.FALSE; } return Boolean.valueOf(((DatabaseLogin)getSession().getDatasourceLogin()).getPlatform().usesStringBinding()); }
/** * This method indicates if Strings are being bound */ public boolean getUsesStringBinding() { if (!(getSession().getDatasourceLogin() instanceof DatabaseLogin)) { return false; } return ((DatabaseLogin)getSession().getDatasourceLogin()).getPlatform().usesStringBinding(); }