use of org.apache.cloudstack.engine.cloud.entity.api.db.VMNetworkMapVO in project cloudstack by apache.
the class VMNetworkMapDaoImpl method persist.
@Override
public void persist(long vmId, List<Long> networks) {
TransactionLegacy txn = TransactionLegacy.currentTxn();
txn.start();
SearchCriteria<VMNetworkMapVO> sc = VmIdSearch.create();
sc.setParameters("vmId", vmId);
expunge(sc);
for (Long networkId : networks) {
VMNetworkMapVO vo = new VMNetworkMapVO(vmId, networkId);
persist(vo);
}
txn.commit();
}
Aggregations