final Long portfolioId, final Long portfolioOid, final Long parentNodeId, final Long parentNodeOid,
final AtomicInteger counter, final int depth, final List<DbMapSqlParameterSource> argsList, final List<DbMapSqlParameterSource> posList) {
// need to insert parent before children for referential integrity
final Long nodeId = nextId("prt_master_seq");
final Long nodeOid = (update && node.getUniqueId() != null ? extractOid(node.getUniqueId()) : nodeId);
UniqueId nodeUid = createUniqueId(nodeOid, nodeId);
node.setUniqueId(nodeUid);
node.setParentNodeId(parentNodeUid);
node.setPortfolioId(portfolioUid);
final DbMapSqlParameterSource treeArgs = new DbMapSqlParameterSource()
.addValue("node_id", nodeId)