Set networkId as a join parameter in DomainRouterDaoImpl as networkId was moved to the helper table

This commit is contained in:
Alena Prokharchyk 2012-05-18 18:20:29 -07:00
parent 998cf66e6c
commit afd2d0331f
3 changed files with 6 additions and 7 deletions

View File

@ -183,7 +183,7 @@ public class DomainRouterDaoImpl extends GenericDaoBase<DomainRouterVO, Long> im
@Override
public List<DomainRouterVO> findByNetwork(long networkId) {
SearchCriteria<DomainRouterVO> sc = AllFieldsSearch.create();
sc.setParameters("networkId", networkId);
sc.setJoinParameters("networkRouter", "networkId", networkId);
return listBy(sc);
}
@ -198,7 +198,7 @@ public class DomainRouterDaoImpl extends GenericDaoBase<DomainRouterVO, Long> im
@Override
public List<DomainRouterVO> listActive(long networkId) {
SearchCriteria<DomainRouterVO> sc = IdNetworkIdStatesSearch.create();
sc.setParameters("networkId", networkId);
sc.setJoinParameters("networkRouter", "networkId", networkId);
sc.setParameters("states", State.Running, State.Migrating, State.Stopping, State.Starting);
return listBy(sc);
}
@ -215,7 +215,7 @@ public class DomainRouterDaoImpl extends GenericDaoBase<DomainRouterVO, Long> im
@Override
public List<DomainRouterVO> findByNetworkOutsideThePod(long networkId, long podId, State state, Role role) {
SearchCriteria<DomainRouterVO> sc = OutsidePodSearch.create();
sc.setParameters("networkId", networkId);
sc.setJoinParameters("networkRouter", "networkId", networkId);
sc.setParameters("podId", podId);
sc.setParameters("state", state);
sc.setParameters("role", role);
@ -225,7 +225,7 @@ public class DomainRouterDaoImpl extends GenericDaoBase<DomainRouterVO, Long> im
@Override
public List<DomainRouterVO> listByNetworkAndPodAndRole(long networkId, long podId, Role role) {
SearchCriteria<DomainRouterVO> sc = AllFieldsSearch.create();
sc.setParameters("networkId", networkId);
sc.setJoinParameters("networkRouter", "networkId", networkId);
sc.setParameters("podId", podId);
sc.setParameters("role", role);
return listBy(sc);
@ -234,7 +234,7 @@ public class DomainRouterDaoImpl extends GenericDaoBase<DomainRouterVO, Long> im
@Override
public List<DomainRouterVO> listByNetworkAndRole(long networkId, Role role) {
SearchCriteria<DomainRouterVO> sc = AllFieldsSearch.create();
sc.setParameters("networkId", networkId);
sc.setJoinParameters("networkRouter", "networkId", networkId);
sc.setParameters("role", role);
return listBy(sc);
}

View File

@ -1071,7 +1071,6 @@ CREATE TABLE `cloud`.`domain_router` (
`public_netmask` varchar(15) COMMENT 'netmask used for the domR',
`guest_netmask` varchar(15) COMMENT 'netmask used for the guest network',
`guest_ip_address` char(40) COMMENT ' ip address in the guest network',
`network_id` bigint unsigned NOT NULL COMMENT 'network configuration that this domain router belongs to',
`is_redundant_router` int(1) unsigned NOT NULL COMMENT 'if in redundant router mode',
`priority` int(4) unsigned COMMENT 'priority of router in the redundant router mode',
`is_priority_bumpup` int(1) unsigned NOT NULL COMMENT 'if the priority has been bumped up',

View File

@ -3,7 +3,7 @@
# the following two variables are used by the target "waf dist"
# if you change 'em here, you need to change it also in cloud.spec, add a %changelog entry there, and add an entry in debian/changelog
VERSION = '3.0.3.2012-05-19T00:20:25Z'
VERSION = '3.0.3.2012-05-19T01:23:44Z'
APPNAME = 'cloud'
import shutil,os