Add dates to the wrapper where needed

This commit is contained in:
Stuart Boston
2013-07-24 17:06:30 +01:00
parent 9a237042f0
commit a98eac75dc
3 changed files with 129 additions and 1 deletions
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*
* @author Stuart
*/
public class AbstractWrapperAll extends AbstractWrapperId implements IWrapperId, IWrapperPages {
public class AbstractWrapperAll extends AbstractWrapperId implements IWrapperId, IWrapperPages, IWrapperDates {
/*
* Properties
*/
@@ -37,6 +37,8 @@ public class AbstractWrapperAll extends AbstractWrapperId implements IWrapperId,
private int totalPages;
@JsonProperty("total_results")
private int totalResults;
@JsonProperty("dates")
private ResultDates dates = new ResultDates();
public AbstractWrapperAll(Class classToLog) {
super(classToLog);
@@ -57,6 +59,11 @@ public class AbstractWrapperAll extends AbstractWrapperId implements IWrapperId,
return totalResults;
}
@Override
public ResultDates getDates() {
return dates;
}
@Override
public void setPage(int page) {
this.page = page;
@@ -71,4 +78,9 @@ public class AbstractWrapperAll extends AbstractWrapperId implements IWrapperId,
public void setTotalResults(int totalResults) {
this.totalResults = totalResults;
}
@Override
public void setDates(ResultDates dates) {
this.dates = dates;
}
}