Fix camelcasing inconsistency causing an assertion error.

java.lang.AssertionError: Searching for a field that's not there: serviceName
	at com.cloud.utils.db.SearchBase.set(SearchBase.java:219)
	at com.cloud.utils.db.SearchBase$Interceptor.intercept(SearchBase.java:475)
	at com.cloud.network.dao.MonitoringServiceVO$$EnhancerByCGLIB$$84195222.getServiceName(<generated>)
	at com.cloud.network.dao.MonitoringServiceDaoImpl.<init>(MonitoringServiceDaoImpl.java:41)
This commit is contained in:
Hugo Trippaers 2014-02-05 14:55:02 +01:00
parent 6523c06869
commit 8a9d9798d9
3 changed files with 16 additions and 18 deletions

View File

@ -39,7 +39,7 @@ public interface MonitoringService extends ControlledEntity, Identity, InternalI
String getServiceName();
String getPidFile();
String getServicePidFile();
String getServicePath();
}

View File

@ -37,10 +37,10 @@ public class MonitoringServiceDaoImpl extends GenericDaoBase<MonitoringServiceVO
AllFieldsSearch = createSearchBuilder();
AllFieldsSearch.and("isDefault", AllFieldsSearch.entity().isDefaultService(), SearchCriteria.Op.EQ);
AllFieldsSearch.and("service", AllFieldsSearch.entity().getService(), SearchCriteria.Op.EQ);
AllFieldsSearch.and("processname", AllFieldsSearch.entity().getProcessname(), SearchCriteria.Op.EQ);
AllFieldsSearch.and("processname", AllFieldsSearch.entity().getProcessName(), SearchCriteria.Op.EQ);
AllFieldsSearch.and("servicename", AllFieldsSearch.entity().getServiceName(), SearchCriteria.Op.EQ);
AllFieldsSearch.and("servicepath", AllFieldsSearch.entity().getServicePath(), SearchCriteria.Op.EQ);
AllFieldsSearch.and("servicePidFile", AllFieldsSearch.entity().getPidFile(), SearchCriteria.Op.EQ);
AllFieldsSearch.and("servicePidFile", AllFieldsSearch.entity().getServicePidFile(), SearchCriteria.Op.EQ);
AllFieldsSearch.done();
}

View File

@ -31,14 +31,13 @@ import com.cloud.network.MonitoringService;
@Table(name = "monitoring_services")
public class MonitoringServiceVO implements MonitoringService {
public MonitoringServiceVO(String service, String processname, String serviceName, String servicePath, String pidFile, boolean defaultService) {
public MonitoringServiceVO(String service, String processName, String serviceName, String servicePath, String servicePidFile, boolean defaultService) {
this.service = service;
this.processname = processname;
this.servicename = serviceName;
this.processName = processName;
this.serviceName = serviceName;
this.servicePath = servicePath;
this.servicePidFile = pidFile;
this.servicePidFile = servicePidFile;
this.defaultService = defaultService;
}
protected MonitoringServiceVO() {
@ -53,10 +52,10 @@ public class MonitoringServiceVO implements MonitoringService {
String service;
@Column(name = "process_name", updatable = false)
String processname;
String processName;
@Column(name = "service_name", updatable = false)
String servicename;
String serviceName;
@Column(name = "service_path", updatable = false)
private String servicePath;
@ -77,23 +76,22 @@ public class MonitoringServiceVO implements MonitoringService {
@Override
public String getService() {
return this.service;
return service;
}
@Override
public String getServiceName() {
return this.servicename; //To change body of implemented methods use File | Settings | File Templates.
return serviceName; //To change body of implemented methods use File | Settings | File Templates.
}
@Override
public String getPidFile() {
return this.servicePidFile;
public String getServicePidFile() {
return servicePidFile;
}
@Override
public String getServicePath() {
return this.servicePidFile;
return servicePidFile;
}
@Override
@ -115,7 +113,7 @@ public class MonitoringServiceVO implements MonitoringService {
return defaultService;
}
public String getProcessname() {
return processname;
public String getProcessName() {
return processName;
}
}