List<GrantSubsidy> subsidiesList = grantContract.getAssociatedGrantSubsidies();  for (GrantSubsidy grantSubsidy : subsidiesList) { persistentObject.deleteByOID(GrantSubsidy.class, grantSubsidy.getIdInternal());  List<GrantPart> partsList = grantSubsidy.getAssociatedGrantParts(); for (GrantPart grantPart : partsList) { persistentObject.deleteByOID(GrantPart.class, grantPart.getIdInternal()); }
for (GrantSubsidy grantSubsidy : grantContract.getAssociatedGrantSubsidies()) { grantSubsidy.delete();
    private void deleteAssociatedSubsidiesAndParts(GrantContract grantContract) throws ExcepcaoPersistencia {        List<GrantSubsidy> subsidiesList = grantContract.getAssociatedGrantSubsidies();                for (GrantSubsidy grantSubsidy : subsidiesList) {            persistentObject.deleteByOID(GrantSubsidy.class, grantSubsidy.getIdInternal());                        List<GrantPart> partsList = grantSubsidy.getAssociatedGrantParts();            for (GrantPart grantPart : partsList) {                persistentObject.deleteByOID(GrantPart.class, grantPart.getIdInternal());            }        }    }