add some models

This commit is contained in:
coderfengyun 2013-07-17 15:27:57 +08:00
parent cf14a5e5ca
commit fce8c1f45b
3 changed files with 199 additions and 0 deletions

View File

@ -0,0 +1,25 @@
package org.bench4q.master.api.model;
import java.util.UUID;
import java.util.Vector;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class RunTestPlanResultModel {
private Vector<UUID> runIds;
@XmlElementWrapper
@XmlElement
public Vector<UUID> getRunIds() {
return runIds;
}
public void setRunIds(Vector<UUID> runIds) {
this.runIds = runIds;
}
}

View File

@ -0,0 +1,80 @@
package org.bench4q.master.api.model;
import java.util.Date;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "testDetail")
public class TestDetailModel {
private String pluginId;
private String pluginName;
private String behaviorName;
private Date startDate;
private Date endDate;
private long responseTime;
private boolean success;
@XmlElement
public String getPluginId() {
return pluginId;
}
public void setPluginId(String pluginId) {
this.pluginId = pluginId;
}
@XmlElement
public String getPluginName() {
return pluginName;
}
public void setPluginName(String pluginName) {
this.pluginName = pluginName;
}
@XmlElement
public String getBehaviorName() {
return behaviorName;
}
public void setBehaviorName(String behaviorName) {
this.behaviorName = behaviorName;
}
@XmlElement
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
@XmlElement
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
@XmlElement
public long getResponseTime() {
return responseTime;
}
public void setResponseTime(long responseTime) {
this.responseTime = responseTime;
}
@XmlElement
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
}

View File

@ -0,0 +1,94 @@
package org.bench4q.master.api.model;
import java.util.Date;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "testDetailStatus")
public class TestDetailStatusModel {
private Date startDate;
private long elapsedTime;
private int successCount;
private int failCount;
private int finishedCount;
private int totalCount;
private double averageResponseTime;
private List<TestDetailModel> testDetailModels;
@XmlElement
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
@XmlElement
public long getElapsedTime() {
return elapsedTime;
}
public void setElapsedTime(long elapsedTime) {
this.elapsedTime = elapsedTime;
}
@XmlElement
public int getSuccessCount() {
return successCount;
}
public void setSuccessCount(int successCount) {
this.successCount = successCount;
}
@XmlElement
public int getFailCount() {
return failCount;
}
public void setFailCount(int failCount) {
this.failCount = failCount;
}
@XmlElement
public int getFinishedCount() {
return finishedCount;
}
public void setFinishedCount(int finishedCount) {
this.finishedCount = finishedCount;
}
@XmlElement
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
@XmlElement
public double getAverageResponseTime() {
return averageResponseTime;
}
public void setAverageResponseTime(double averageResponseTime) {
this.averageResponseTime = averageResponseTime;
}
@XmlElementWrapper(name = "testDetails")
@XmlElement(name = "testDetail")
public List<TestDetailModel> getTestDetailModels() {
return testDetailModels;
}
public void setTestDetailModels(List<TestDetailModel> testDetailModels) {
this.testDetailModels = testDetailModels;
}
}