/** * Recurse on this reference sub-field during a copy between transactions. Copies all objects referred to by * this sub-field in the given object from {@code srcTx} to {@code dstTx}. * * <p> * This method assumes that this indexed field is a reference field. * * @param copyState copy state * @param srcTx source transaction * @param dstTx destination transaction * @param id ID of the object containing the complex field and sub-field in {@code srcTx} * @param fieldIndex next index into {@code fieldIds} * @param fields fields to follow in the reference path */ public void copyRecurse(CopyState copyState, JTransaction srcTx, JTransaction dstTx, ObjId id, int fieldIndex, int[] fields) { assert this.getFieldType() instanceof ReferenceFieldType; for (Object obj : this.iterateReferences(srcTx.tx, id)) { if (obj != null) srcTx.copyTo(copyState, dstTx, (ObjId)obj, false, fieldIndex, fields); } }