/** * INTERNAL: */ @Override protected ValueReadQuery buildSelectQuery() { if (this.delegateSequence != null) { return this.delegateSequence.buildSelectQuery(); } else if (shouldAcquireValueAfterInsert()) { return ((DatasourcePlatform)getDatasourcePlatform()).buildSelectQueryForIdentity(); } else { return ((DatasourcePlatform)getDatasourcePlatform()).buildSelectQueryForSequenceObject(); } }
/** * INTERNAL: */ @Override protected ValueReadQuery buildSelectQuery() { if (this.delegateSequence != null) { return this.delegateSequence.buildSelectQuery(); } else if (shouldAcquireValueAfterInsert()) { return ((DatasourcePlatform)getDatasourcePlatform()).buildSelectQueryForIdentity(); } else { return ((DatasourcePlatform)getDatasourcePlatform()).buildSelectQueryForSequenceObject(); } }
/** * INTERNAL: */ @Override protected ValueReadQuery buildSelectQuery(String seqName, Integer size) { if (this.delegateSequence != null) { return this.delegateSequence.buildSelectQuery(seqName, size); } else if (shouldAcquireValueAfterInsert()) { return ((DatabasePlatform)getDatasourcePlatform()).buildSelectQueryForIdentity(getQualified(seqName), size); } else { return ((DatasourcePlatform)getDatasourcePlatform()).buildSelectQueryForSequenceObject(getQualified(seqName), size); } }
/** * INTERNAL: */ @Override protected ValueReadQuery buildSelectQuery(String seqName, Integer size) { if (this.delegateSequence != null) { return this.delegateSequence.buildSelectQuery(seqName, size); } else if (shouldAcquireValueAfterInsert()) { return ((DatabasePlatform)getDatasourcePlatform()).buildSelectQueryForIdentity(getQualified(seqName), size); } else { return ((DatasourcePlatform)getDatasourcePlatform()).buildSelectQueryForSequenceObject(getQualified(seqName), size); } }
/** * INTERNAL: */ public void onConnect() { super.onConnect(); if (getSelectQuery() == null) { setSelectQuery(buildSelectQuery()); wasSelectQueryCreated = getSelectQuery() != null; } if ((getUpdateQuery() == null) && !shouldSkipUpdate()) { setUpdateQuery(buildUpdateQuery()); wasUpdateQueryCreated = getUpdateQuery() != null; } }
/** * INTERNAL: */ protected Object select(Accessor accessor, AbstractSession writeSession, String seqName, Integer size) { ValueReadQuery query = getSelectQuery(); if (query != null) { if (accessor != null) { // PERF: Prepare the query before being cloned. // Also BUG: SQLCall could not be prepared concurrently by different queries. // Setting user define allow custom SQL query to be prepared without translation row. query.setIsUserDefined(true); query.checkPrepare(writeSession, null); query = (ValueReadQuery)query.clone(); query.setAccessor(accessor); } } else { query = buildSelectQuery(seqName, size); if (accessor != null) { query.setAccessor(accessor); } } Vector args = createArguments(query, seqName, size); if (args != null) { return writeSession.executeQuery(query, args); } else { return writeSession.executeQuery(query); } }
/** * INTERNAL: */ protected Object select(Accessor accessor, AbstractSession writeSession, String seqName, Integer size) { ValueReadQuery query = getSelectQuery(); if (query != null) { if (accessor != null) { // PERF: Prepare the query before being cloned. // Also BUG: SQLCall could not be prepared concurrently by different queries. // Setting user define allow custom SQL query to be prepared without translation row. query.setIsUserDefined(true); query.checkPrepare(writeSession, null); query = (ValueReadQuery)query.clone(); query.setAccessor(accessor); } } else { query = buildSelectQuery(seqName, size); if (accessor != null) { query.setAccessor(accessor); } } Vector args = createArguments(query, seqName, size); query.setIsUserDefinedSQLCall(false); if (args != null) { return writeSession.executeQuery(query, args); } else { return writeSession.executeQuery(query); } }
/** * INTERNAL: */ protected Object select(Accessor accessor, AbstractSession writeSession, String seqName, Integer size) { ValueReadQuery query = getSelectQuery(); if (query != null) { if (accessor != null) { // PERF: Prepare the query before being cloned. // Also BUG: SQLCall could not be prepared concurrently by different queries. // Setting user define allow custom SQL query to be prepared without translation row. query.setIsUserDefined(true); query.checkPrepare(writeSession, null); query = (ValueReadQuery)query.clone(); query.setAccessor(accessor); } } else { query = buildSelectQuery(seqName, size); if (accessor != null) { query.setAccessor(accessor); } } Vector args = createArguments(query, seqName, size); query.setIsUserDefinedSQLCall(false); if (args != null) { return writeSession.executeQuery(query, args); } else { return writeSession.executeQuery(query); } }
/** * INTERNAL: */ public void onConnect() { super.onConnect(); if (getSelectQuery() == null) { setSelectQuery(buildSelectQuery()); wasSelectQueryCreated = getSelectQuery() != null; if (wasSelectQueryCreated) { getSelectQuery().setName(getName()); } } if ((getUpdateQuery() == null) && !shouldSkipUpdate()) { setUpdateQuery(buildUpdateQuery()); wasUpdateQueryCreated = getUpdateQuery() != null; if (wasUpdateQueryCreated) { getUpdateQuery().setName(getName()); } } }
/** * INTERNAL: */ public void onConnect() { super.onConnect(); if (getSelectQuery() == null) { setSelectQuery(buildSelectQuery()); wasSelectQueryCreated = getSelectQuery() != null; if (wasSelectQueryCreated) { getSelectQuery().setName(getName()); } } if ((getUpdateQuery() == null) && !shouldSkipUpdate()) { setUpdateQuery(buildUpdateQuery()); wasUpdateQueryCreated = getUpdateQuery() != null; if (wasUpdateQueryCreated) { getUpdateQuery().setName(getName()); } } }