public boolean add(int i, EntityReference entityReference) { if (references.contains(entityReference)) { return false; } references.add(i, entityReference); unitOfWork.addManyAssociation(identity, stateName, i, entityReference); return true; }