/** * INTERNAL: * Create a row that contains source relation fields with values extracted from the source row * and target relation fields with values extracted from the target object. */ public AbstractRecord buildRelationTableSourceAndTargetRow(AbstractRecord sourceRow, Object targetObject, AbstractSession session, ForeignReferenceMapping mapping) { AbstractRecord databaseRow = buildRelationTableSourceRow(sourceRow); databaseRow = addRelationTableTargetRow(targetObject, session, databaseRow, mapping); return databaseRow; } }
/** * INTERNAL: * Create a row that contains source relation fields with values extracted from the source object * and target relation fields with values extracted from the target object. */ public AbstractRecord buildRelationTableSourceAndTargetRow(Object sourceObject, Object targetObject, AbstractSession session, ForeignReferenceMapping mapping) { AbstractRecord databaseRow = buildRelationTableSourceRow(sourceObject, session, mapping); databaseRow = addRelationTableTargetRow(targetObject, session, databaseRow, mapping); return databaseRow; }
/** * INTERNAL: * Create a row that contains source relation fields with values extracted from the source object * and target relation fields with values extracted from the target object. */ public AbstractRecord buildRelationTableSourceAndTargetRow(Object sourceObject, Object targetObject, AbstractSession session, ForeignReferenceMapping mapping) { AbstractRecord databaseRow = buildRelationTableSourceRow(sourceObject, session, mapping); databaseRow = addRelationTableTargetRow(targetObject, session, databaseRow, mapping); return databaseRow; }
/** * INTERNAL: * Create a row that contains source relation fields with values extracted from the source object * and target relation fields with values extracted from the target object. */ public AbstractRecord buildRelationTableSourceAndTargetRow(Object sourceObject, Object targetObject, AbstractSession session, ForeignReferenceMapping mapping) { AbstractRecord databaseRow = buildRelationTableSourceRow(sourceObject, session, mapping); databaseRow = addRelationTableTargetRow(targetObject, session, databaseRow, mapping); return databaseRow; }
/** * INTERNAL: * Create a row that contains source relation fields with values extracted from the source row * and target relation fields with values extracted from the target object. */ public AbstractRecord buildRelationTableSourceAndTargetRow(AbstractRecord sourceRow, Object targetObject, AbstractSession session, ForeignReferenceMapping mapping) { AbstractRecord databaseRow = buildRelationTableSourceRow(sourceRow); databaseRow = addRelationTableTargetRow(targetObject, session, databaseRow, mapping); return databaseRow; } }
/** * INTERNAL: * Create a row that contains source relation fields with values extracted from the source row * and target relation fields with values extracted from the target object. */ public AbstractRecord buildRelationTableSourceAndTargetRow(AbstractRecord sourceRow, Object targetObject, AbstractSession session, ForeignReferenceMapping mapping) { AbstractRecord databaseRow = buildRelationTableSourceRow(sourceRow); databaseRow = addRelationTableTargetRow(targetObject, session, databaseRow, mapping); return databaseRow; } }
/** * INTERNAL: * Perform the commit event. * This is used in the uow to delay data modifications. */ public void performDataModificationEvent(Object[] event, AbstractSession session) throws DatabaseException, DescriptorException { // Hey I might actually want to use an inner class here... ok array for now. if (event[0] == setObject) { AbstractRecord sourceAndTargetRow = this.mechanism.addRelationTableTargetRow(event[2], session, (AbstractRecord)event[1], this); session.executeQuery(this.mechanism.insertQuery, sourceAndTargetRow); } else { throw DescriptorException.invalidDataModificationEventCode(event[0], this); } }
/** * INTERNAL: * Perform the commit event. * This is used in the uow to delay data modifications. */ @Override public void performDataModificationEvent(Object[] event, AbstractSession session) throws DatabaseException, DescriptorException { // Hey I might actually want to use an inner class here... ok array for now. if (event[0] == setObject) { AbstractRecord sourceAndTargetRow = this.mechanism.addRelationTableTargetRow(event[2], session, (AbstractRecord)event[1], this); session.executeQuery(this.mechanism.insertQuery, sourceAndTargetRow); } else { throw DescriptorException.invalidDataModificationEventCode(event[0], this); } }
/** * INTERNAL: * Perform the commit event. * This is used in the uow to delay data modifications. */ @Override public void performDataModificationEvent(Object[] event, AbstractSession session) throws DatabaseException, DescriptorException { // Hey I might actually want to use an inner class here... ok array for now. if (event[0] == setObject) { AbstractRecord sourceAndTargetRow = this.mechanism.addRelationTableTargetRow(event[2], session, (AbstractRecord)event[1], this); session.executeQuery(this.mechanism.insertQuery, sourceAndTargetRow); } else { throw DescriptorException.invalidDataModificationEventCode(event[0], this); } }
query.getSession().getCommitManager().addDataModificationEvent(this, event); } else { AbstractRecord sourceAndTargetRow = this.mechanism.addRelationTableTargetRow(targetObject, query.getExecutionSession(), sourceRow, this); query.getSession().executeQuery(this.mechanism.insertQuery, sourceAndTargetRow);
query.getSession().getCommitManager().addDataModificationEvent(this, event); } else { AbstractRecord sourceAndTargetRow = this.mechanism.addRelationTableTargetRow(targetObject, query.getSession(), sourceRow, this); query.getSession().executeQuery(this.mechanism.insertQuery, sourceAndTargetRow);
query.getSession().getCommitManager().addDataModificationEvent(this, event); } else { AbstractRecord sourceAndTargetRow = this.mechanism.addRelationTableTargetRow(targetObject, query.getExecutionSession(), sourceRow, this); query.getSession().executeQuery(this.mechanism.insertQuery, sourceAndTargetRow);
Object wrappedObject = cp.nextEntry(iter, query.getSession()); Object object = cp.unwrapIteratorResult(wrappedObject); databaseRow = this.mechanism.addRelationTableTargetRow(object, query.getSession(), databaseRow, this);
Object wrappedObject = cp.nextEntry(iter, query.getSession()); Object object = cp.unwrapIteratorResult(wrappedObject); databaseRow = this.mechanism.addRelationTableTargetRow(object, query.getExecutionSession(), databaseRow, this);
Object wrappedObject = cp.nextEntry(iter, query.getSession()); Object object = cp.unwrapIteratorResult(wrappedObject); databaseRow = this.mechanism.addRelationTableTargetRow(object, query.getExecutionSession(), databaseRow, this);