use of com.cloud.offerings.NetworkOfferingServiceMapVO in project cloudstack by apache.
the class NetworkOfferingServiceMapDaoImpl method persist.
@Override
public NetworkOfferingServiceMapVO persist(NetworkOfferingServiceMapVO entity) {
SearchCriteria<NetworkOfferingServiceMapVO> sc = AllFieldsSearch.create();
sc.setParameters("networkOfferingId", entity.getNetworkOfferingId());
sc.setParameters("service", entity.getService());
sc.setParameters("provider", entity.getProvider());
NetworkOfferingServiceMapVO mappingInDb = findOneBy(sc);
return mappingInDb != null ? mappingInDb : super.persist(entity);
}
Aggregations