protected DataModifyQuery getInsertQuery() { return this.mechanism.getInsertQuery(); }
protected DataModifyQuery getInsertQuery() { return this.mechanism.getInsertQuery(); }
protected DataModifyQuery getInsertQuery() { return this.mechanism.getInsertQuery(); }
/** * PUBLIC: * Set the name of the session to execute the mapping's queries under. * This can be used by the session broker to override the default session * to be used for the target class. */ public void setSessionName(String name) { getInsertQuery().setSessionName(name); getDeleteQuery().setSessionName(name); }
/** * PUBLIC: * Set the name of the session to execute the mapping's queries under. * This can be used by the session broker to override the default session * to be used for the target class. */ public void setSessionName(String name) { getInsertQuery().setSessionName(name); getDeleteQuery().setSessionName(name); }
/** * PUBLIC: * Set the name of the session to execute the mapping's queries under. * This can be used by the session broker to override the default session * to be used for the target class. */ public void setSessionName(String name) { getInsertQuery().setSessionName(name); getDeleteQuery().setSessionName(name); }
if (!getInsertQuery().hasSessionName()) { getInsertQuery().setSessionName(session.getName()); getInsertQuery().setSQLStatement(statement); getInsertQuery().setModifyRow(joinRow);
if (!getInsertQuery().hasSessionName()) { getInsertQuery().setSessionName(session.getName()); if (getInsertQuery().getPartitioningPolicy() == null) { getInsertQuery().setPartitioningPolicy(mapping.getPartitioningPolicy()); getInsertQuery().setName(mapping.getAttributeName()); if (hasCustomInsertQuery()) { return; getInsertQuery().setSQLStatement(statement); getInsertQuery().setModifyRow(joinRow);
if (!getInsertQuery().hasSessionName()) { getInsertQuery().setSessionName(session.getName()); if (getInsertQuery().getPartitioningPolicy() == null) { getInsertQuery().setPartitioningPolicy(mapping.getPartitioningPolicy()); getInsertQuery().setName(mapping.getAttributeName()); if (hasCustomInsertQuery()) { return; getInsertQuery().setSQLStatement(statement); getInsertQuery().setModifyRow(joinRow);
/** * INTERNAL: * An object was added to the collection during an update, insert it. */ protected void insertAddedObjectEntry(ObjectLevelModifyQuery query, Object objectAdded, Map extraData) throws DatabaseException, OptimisticLockException { //cr 3819 added the line below to fix the translationtable to ensure that it // contains the required values prepareTranslationRow(query.getTranslationRow(), query.getObject(), query.getSession()); AbstractRecord databaseRow = this.mechanism.buildRelationTableSourceAndTargetRow(query.getTranslationRow(), containerPolicy.unwrapIteratorResult(objectAdded), query.getSession(), this); ContainerPolicy.copyMapDataToRow(getContainerPolicy().getKeyMappingDataForWriteQuery(objectAdded, query.getSession()), databaseRow); if(listOrderField != null && extraData != null) { databaseRow.put(listOrderField, extraData.get(listOrderField)); } query.getSession().executeQuery(this.mechanism.getInsertQuery(), databaseRow); if ((getHistoryPolicy() != null) && getHistoryPolicy().shouldHandleWrites()) { getHistoryPolicy().mappingLogicalInsert(this.mechanism.getInsertQuery(), databaseRow, query.getSession()); } }
/** * INTERNAL: * An object was added to the collection during an update, insert it. */ protected void insertAddedObjectEntry(ObjectLevelModifyQuery query, Object objectAdded, Map extraData) throws DatabaseException, OptimisticLockException { //cr 3819 added the line below to fix the translationtable to ensure that it // contains the required values prepareTranslationRow(query.getTranslationRow(), query.getObject(), query.getDescriptor(), query.getSession()); AbstractRecord databaseRow = this.mechanism.buildRelationTableSourceAndTargetRow(query.getTranslationRow(), containerPolicy.unwrapIteratorResult(objectAdded), query.getSession(), this); ContainerPolicy.copyMapDataToRow(getContainerPolicy().getKeyMappingDataForWriteQuery(objectAdded, query.getSession()), databaseRow); if(listOrderField != null && extraData != null) { databaseRow.put(listOrderField, extraData.get(listOrderField)); } query.getExecutionSession().executeQuery(this.mechanism.getInsertQuery(), databaseRow); if ((getHistoryPolicy() != null) && getHistoryPolicy().shouldHandleWrites()) { getHistoryPolicy().mappingLogicalInsert(this.mechanism.getInsertQuery(), databaseRow, query.getSession()); } }
/** * INTERNAL: * An object was added to the collection during an update, insert it. */ protected void insertAddedObjectEntry(ObjectLevelModifyQuery query, Object objectAdded, Map extraData) throws DatabaseException, OptimisticLockException { //cr 3819 added the line below to fix the translationtable to ensure that it // contains the required values prepareTranslationRow(query.getTranslationRow(), query.getObject(), query.getDescriptor(), query.getSession()); AbstractRecord databaseRow = this.mechanism.buildRelationTableSourceAndTargetRow(query.getTranslationRow(), containerPolicy.unwrapIteratorResult(objectAdded), query.getSession(), this); ContainerPolicy.copyMapDataToRow(getContainerPolicy().getKeyMappingDataForWriteQuery(objectAdded, query.getSession()), databaseRow); if(listOrderField != null && extraData != null) { databaseRow.put(listOrderField, extraData.get(listOrderField)); } query.getExecutionSession().executeQuery(this.mechanism.getInsertQuery(), databaseRow); if ((getHistoryPolicy() != null) && getHistoryPolicy().shouldHandleWrites()) { getHistoryPolicy().mappingLogicalInsert(this.mechanism.getInsertQuery(), databaseRow, query.getSession()); } }
query.getSession().executeQuery(this.mechanism.getInsertQuery(), databaseRow); if ((getHistoryPolicy() != null) && getHistoryPolicy().shouldHandleWrites()) { getHistoryPolicy().mappingLogicalInsert(this.mechanism.getInsertQuery(), databaseRow, query.getSession());
query.getExecutionSession().executeQuery(this.mechanism.getInsertQuery(), databaseRow); if ((getHistoryPolicy() != null) && getHistoryPolicy().shouldHandleWrites()) { getHistoryPolicy().mappingLogicalInsert(this.mechanism.getInsertQuery(), databaseRow, query.getSession());
query.getExecutionSession().executeQuery(this.mechanism.getInsertQuery(), databaseRow); if ((getHistoryPolicy() != null) && getHistoryPolicy().shouldHandleWrites()) { getHistoryPolicy().mappingLogicalInsert(this.mechanism.getInsertQuery(), databaseRow, query.getSession());
getDeleteQuery().setPartitioningPolicy(mapping.getPartitioningPolicy()); getInsertQuery().setName(mapping.getAttributeName()); if (hasCustomDeleteQuery()) { return;
getDeleteQuery().setPartitioningPolicy(mapping.getPartitioningPolicy()); getInsertQuery().setName(mapping.getAttributeName()); if (hasCustomDeleteQuery()) { return;