/** * Assign the fields in the row back into the object. * This is used by returning, as well as events and version locking. */ public void assignReturnRow(Object object, AbstractSession writeSession, AbstractRecord row) throws DatabaseException { writeSession.log(SessionLog.FINEST, SessionLog.QUERY, "assign_return_row", row); // Require a query context to read into an object. ReadObjectQuery query = new ReadObjectQuery(); query.setSession(writeSession); // To avoid processing the same mapping twice, // maintain Collection of mappings already used. HashSet handledMappings = null; int size = row.size(); if (size > 1) { handledMappings = new HashSet(size); } List fields = row.getFields(); for (int index = 0; index < size; index++) { DatabaseField field = (DatabaseField)fields.get(index); assignReturnValueForField(object, query, row, field, handledMappings); } }
/** * Assign the fields in the row back into the object. * This is used by returning, as well as events and version locking. * If not null changeSet must correspond to object. changeSet is updated with all of the field values in the row. */ public void assignReturnRow(Object object, AbstractSession writeSession, AbstractRecord row, ObjectChangeSet changeSet) throws DatabaseException { writeSession.log(SessionLog.FINEST, SessionLog.QUERY, "assign_return_row", row); // Require a query context to read into an object. ReadObjectQuery query = new ReadObjectQuery(); query.setSession(writeSession); // To avoid processing the same mapping twice, // maintain Collection of mappings already used. HashSet handledMappings = null; int size = row.size(); if (size > 1) { handledMappings = new HashSet(size); } List fields = row.getFields(); for (int index = 0; index < size; index++) { DatabaseField field = (DatabaseField)fields.get(index); assignReturnValueForField(object, query, row, field, handledMappings, changeSet); } }
/** * Assign the fields in the row back into the object. * This is used by returning, as well as events and version locking. * If not null changeSet must correspond to object. changeSet is updated with all of the field values in the row. */ public void assignReturnRow(Object object, AbstractSession writeSession, AbstractRecord row, ObjectChangeSet changeSet) throws DatabaseException { writeSession.log(SessionLog.FINEST, SessionLog.QUERY, "assign_return_row", row); // Require a query context to read into an object. ReadObjectQuery query = new ReadObjectQuery(); query.setSession(writeSession); // To avoid processing the same mapping twice, // maintain Collection of mappings already used. HashSet handledMappings = null; int size = row.size(); if (size > 1) { handledMappings = new HashSet(size); } List fields = row.getFields(); for (int index = 0; index < size; index++) { DatabaseField field = (DatabaseField)fields.get(index); assignReturnValueForField(object, query, row, field, handledMappings, changeSet); } }
DatabaseField field = getReferenceFields().elementAt(i); if (row.containsKey(field)) { getObjectBuilder(aggregate, query.getSession()).assignReturnValueForField(aggregate, query, row, field, handledMappings);