/** * INTERNAL: * return the original field name based on the argument name. */ protected String getFieldName(String argumentName) { if (getSession().getPlatform().isOracle()) { return argumentName.substring(getSession().getPlatform().getStoredProcedureParameterPrefix().length()); } else { return argumentName; } }
/** * INTERNAL: * return the original field name based on the argument name. */ protected String getFieldName(String argumentName) { if (getSession().getPlatform().isOracle()) { return argumentName.substring(getSession().getPlatform().getStoredProcedureParameterPrefix().length()); } else { return argumentName; } }
/** * INTERNAL: * return the original field name based on the argument name. */ protected String getFieldName(String argumentName) { if (getSession().getPlatform().isOracle()) { return argumentName.substring(getSession().getPlatform().getStoredProcedureParameterPrefix().length()); } else { return argumentName; } }
/** * INTERNAL: Generates the mapping stored procedures for this descriptor. * currently only 1:1 and 1:M are supported */ protected Hashtable generateMappingStoredProcedures(ClassDescriptor descriptor) { Vector mappings = descriptor.getMappings(); Hashtable mappingSP = new Hashtable(); Hashtable mappingTable; for (Enumeration enumtr = mappings.elements(); enumtr.hasMoreElements();) { mappingTable = new Hashtable(); DatabaseMapping mapping = (DatabaseMapping)enumtr.nextElement(); if (mapping.isOneToManyMapping()) { if (!getSession().getPlatform().isOracle()) { //reads not supported in oracle mappingTable.put("1MREAD", generateOneToManyMappingReadProcedure((OneToManyMapping)mapping)); } if (mapping.isPrivateOwned()) { //generate delete all for 1:M query mappingTable.put("1MDALL", generateOneToManyMappingDeleteAllProcedure((OneToManyMapping)mapping)); } mappingSP.put(mapping.getAttributeName(), mappingTable); } } return mappingSP; }
/** * INTERNAL: Generates the mapping stored procedures for this descriptor. * currently only 1:1 and 1:M are supported */ protected Hashtable generateMappingStoredProcedures(ClassDescriptor descriptor) { Vector mappings = descriptor.getMappings(); Hashtable mappingSP = new Hashtable(); Hashtable mappingTable; for (Enumeration enumtr = mappings.elements(); enumtr.hasMoreElements();) { mappingTable = new Hashtable(); DatabaseMapping mapping = (DatabaseMapping)enumtr.nextElement(); if (mapping.isOneToManyMapping()) { if (!getSession().getPlatform().isOracle()) { //reads not supported in oracle mappingTable.put("1MREAD", generateOneToManyMappingReadProcedure((OneToManyMapping)mapping)); } if (mapping.isPrivateOwned()) { //generate delete all for 1:M query mappingTable.put("1MDALL", generateOneToManyMappingDeleteAllProcedure((OneToManyMapping)mapping)); } mappingSP.put(mapping.getAttributeName(), mappingTable); } } return mappingSP; }
/** * INTERNAL: Generates the mapping stored procedures for this descriptor. * currently only 1:1 and 1:M are supported */ protected Hashtable generateMappingStoredProcedures(ClassDescriptor descriptor) { Vector mappings = descriptor.getMappings(); Hashtable mappingSP = new Hashtable(); Hashtable mappingTable; for (Enumeration enumtr = mappings.elements(); enumtr.hasMoreElements();) { mappingTable = new Hashtable(); DatabaseMapping mapping = (DatabaseMapping)enumtr.nextElement(); if (mapping.isOneToManyMapping()) { if (!getSession().getPlatform().isOracle()) { //reads not supported in oracle mappingTable.put("1MREAD", generateOneToManyMappingReadProcedure((OneToManyMapping)mapping)); } if (mapping.isPrivateOwned()) { //generate delete all for 1:M query mappingTable.put("1MDALL", generateOneToManyMappingDeleteAllProcedure((OneToManyMapping)mapping)); } mappingSP.put(mapping.getAttributeName(), mappingTable); } } return mappingSP; }
/** * 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 Oracle. */ public void useOracle() { if (getPlatform().isOracle()) { return; } DatabasePlatform newPlatform = new OraclePlatform(); 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); }
Enumeration fieldsEnum = fieldNames.keys(); String prefixArgToken; if (getSession().getPlatform().isOracle()) { prefixArgToken = getSession().getPlatform().getStoredProcedureParameterPrefix(); } else {
} else if (platform.isOracle()) { dbms = "oracle"; } else if (platform.isSQLServer()) {
/** * INTERNAL: * Constructs a HistoricalSession given a valid AsOfClause. */ public org.eclipse.persistence.sessions.Session acquireHistoricalSession(AsOfClause clause) throws ValidationException { if ((clause == null) || (clause.getValue() == null)) { throw ValidationException.cannotAcquireHistoricalSession(); } if (!getProject().hasGenericHistorySupport() && !hasBroker() && ((getPlatform() == null) || !getPlatform().isOracle())) { throw ValidationException.historicalSessionOnlySupportedOnOracle(); } return new HistoricalSession(this, clause); }
/** * INTERNAL: * Constructs a HistoricalSession given a valid AsOfClause. */ @Override public org.eclipse.persistence.sessions.Session acquireHistoricalSession(AsOfClause clause) throws ValidationException { if ((clause == null) || (clause.getValue() == null)) { throw ValidationException.cannotAcquireHistoricalSession(); } if (!getProject().hasGenericHistorySupport() && !hasBroker() && ((getPlatform() == null) || !getPlatform().isOracle())) { throw ValidationException.historicalSessionOnlySupportedOnOracle(); } return new HistoricalSession(this, clause); }
/** * INTERNAL: * Constructs a HistoricalSession given a valid AsOfClause. */ public org.eclipse.persistence.sessions.Session acquireHistoricalSession(AsOfClause clause) throws ValidationException { if ((clause == null) || (clause.getValue() == null)) { throw ValidationException.cannotAcquireHistoricalSession(); } if (!getProject().hasGenericHistorySupport() && !hasBroker() && ((getPlatform() == null) || !getPlatform().isOracle())) { throw ValidationException.historicalSessionOnlySupportedOnOracle(); } return new HistoricalSession(this, clause); }
protected void prepareUpdateAllUsingTempStorage(HashMap tables_databaseFieldsToValues, HashMap<DatabaseTable, List<DatabaseField>> tablesToPrimaryKeyFields) { if(getExecutionSession().getPlatform().supportsTempTables()) { prepareUpdateAllUsingTempTables(tables_databaseFieldsToValues, tablesToPrimaryKeyFields); } else if(getExecutionSession().getPlatform().isOracle()) { prepareUpdateAllUsingOracleAnonymousBlock(tables_databaseFieldsToValues, tablesToPrimaryKeyFields); } else { throw QueryException.tempTablesNotSupported(getQuery(), Helper.getShortClassName(getExecutionSession().getPlatform())); } }
protected void prepareUpdateAllUsingTempStorage(HashMap tables_databaseFieldsToValues, HashMap tablesToPrimaryKeyFields) { if(getSession().getPlatform().supportsTempTables()) { prepareUpdateAllUsingTempTables(tables_databaseFieldsToValues, tablesToPrimaryKeyFields); } else if(getSession().getPlatform().isOracle()) { prepareUpdateAllUsingOracleAnonymousBlock(tables_databaseFieldsToValues, tablesToPrimaryKeyFields); } else { throw QueryException.tempTablesNotSupported(getQuery(), Helper.getShortClassName(getSession().getPlatform())); } }
protected void prepareUpdateAllUsingTempStorage(HashMap tables_databaseFieldsToValues, HashMap<DatabaseTable, List<DatabaseField>> tablesToPrimaryKeyFields) { if(getExecutionSession().getPlatform().supportsTempTables()) { prepareUpdateAllUsingTempTables(tables_databaseFieldsToValues, tablesToPrimaryKeyFields); } else if(getExecutionSession().getPlatform().isOracle()) { prepareUpdateAllUsingOracleAnonymousBlock(tables_databaseFieldsToValues, tablesToPrimaryKeyFields); } else { throw QueryException.tempTablesNotSupported(getQuery(), Helper.getShortClassName(getExecutionSession().getPlatform())); } }
if (!getSession().getPlatform().isOracle()) {
if (!getSession().getPlatform().isOracle()) {
if (!getSession().getPlatform().isOracle()) {