Add dates to the wrapper where needed
parent
9a237042f0
commit
a98eac75dc
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2013 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
* TheMovieDB API is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* TheMovieDB API is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.omertron.themoviedbapi.wrapper;
|
||||
|
||||
public interface IWrapperDates {
|
||||
|
||||
ResultDates getDates();
|
||||
|
||||
void setDates(ResultDates dates);
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2013 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
* TheMovieDB API is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* TheMovieDB API is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.omertron.themoviedbapi.wrapper;
|
||||
|
||||
import com.omertron.themoviedbapi.model.*;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import java.io.Serializable;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Stuart
|
||||
*/
|
||||
public class ResultDates implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ResultDates.class);
|
||||
/*
|
||||
* Properties
|
||||
*/
|
||||
@JsonProperty("minimum")
|
||||
private String minimum = "";
|
||||
@JsonProperty("maximum")
|
||||
private String maximum = "";
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="Getter methods">
|
||||
public String getMinimum() {
|
||||
return minimum;
|
||||
}
|
||||
|
||||
public String getMaximum() {
|
||||
return maximum;
|
||||
}
|
||||
// </editor-fold>
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="Setter methods">
|
||||
public void setMinimum(String minimum) {
|
||||
this.minimum = minimum;
|
||||
}
|
||||
|
||||
public void setMaximum(String maximum) {
|
||||
this.maximum = maximum;
|
||||
}
|
||||
// </editor-fold>
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public void handleUnknown(String key, Object value) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Unknown property: '").append(key);
|
||||
sb.append("' value: '").append(value).append("'");
|
||||
LOG.trace(sb.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this, ToStringStyle.SIMPLE_STYLE);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue