Fixes issue 19
Added serialization to model classes
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
@@ -20,7 +21,9 @@ import org.codehaus.jackson.annotate.JsonProperty;
|
||||
*
|
||||
* @author Stuart
|
||||
*/
|
||||
public class AlternativeTitle {
|
||||
public class AlternativeTitle implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
@@ -56,6 +59,7 @@ public class AlternativeTitle {
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
@@ -21,7 +22,9 @@ import org.codehaus.jackson.annotate.JsonProperty;
|
||||
*
|
||||
* @author Stuart
|
||||
*/
|
||||
public class Artwork {
|
||||
public class Artwork implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
@@ -23,8 +24,9 @@ import org.codehaus.jackson.map.annotate.JsonRootName;
|
||||
* @author stuart.boston
|
||||
*/
|
||||
@JsonRootName("collection")
|
||||
public class Collection {
|
||||
public class Collection implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
@@ -105,6 +107,7 @@ public class Collection {
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.apache.log4j.Logger;
|
||||
@@ -22,8 +23,9 @@ import org.codehaus.jackson.annotate.JsonProperty;
|
||||
*
|
||||
* @author Stuart
|
||||
*/
|
||||
public class CollectionInfo {
|
||||
public class CollectionInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
@@ -88,6 +90,7 @@ public class CollectionInfo {
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
@@ -21,9 +22,10 @@ import org.codehaus.jackson.annotate.JsonProperty;
|
||||
*
|
||||
* @author Stuart
|
||||
*/
|
||||
public class Company {
|
||||
// Logger
|
||||
public class Company implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
// Logger
|
||||
private static final Logger LOGGER = Logger.getLogger(Company.class);
|
||||
private static final String DEFAULT_STRING = "";
|
||||
// Properties
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
@@ -22,8 +23,9 @@ import org.codehaus.jackson.map.annotate.JsonRootName;
|
||||
* @author stuart.boston
|
||||
*/
|
||||
@JsonRootName("genre")
|
||||
public class Genre {
|
||||
public class Genre implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
@@ -58,6 +60,7 @@ public class Genre {
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import javax.imageio.spi.ServiceRegistry;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
@@ -22,7 +24,9 @@ import org.codehaus.jackson.map.annotate.JsonRootName;
|
||||
* @author stuart.boston
|
||||
*/
|
||||
@JsonRootName("keyword")
|
||||
public class Keyword {
|
||||
public class Keyword implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
@@ -58,6 +62,7 @@ public class Keyword {
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
@@ -22,8 +23,9 @@ import org.codehaus.jackson.map.annotate.JsonRootName;
|
||||
* @author stuart.boston
|
||||
*/
|
||||
@JsonRootName("spoken_language")
|
||||
public class Language {
|
||||
public class Language implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
@@ -58,6 +60,7 @@ public class Language {
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
@@ -22,8 +23,9 @@ import org.codehaus.jackson.annotate.JsonProperty;
|
||||
*
|
||||
* @author stuart.boston
|
||||
*/
|
||||
public class MovieDb {
|
||||
public class MovieDb implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.apache.log4j.Logger;
|
||||
@@ -22,11 +23,13 @@ import org.codehaus.jackson.annotate.JsonProperty;
|
||||
*
|
||||
* @author stuart.boston
|
||||
*/
|
||||
public class Person {
|
||||
public class Person implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(Person.class);
|
||||
|
||||
/*
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
@@ -20,11 +21,13 @@ import org.codehaus.jackson.annotate.JsonProperty;
|
||||
*
|
||||
* @author Stuart
|
||||
*/
|
||||
public class PersonCast {
|
||||
public class PersonCast implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(PersonCast.class);
|
||||
/*
|
||||
* Properties
|
||||
@@ -86,6 +89,7 @@ public class PersonCast {
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
@@ -20,11 +21,13 @@ import org.codehaus.jackson.annotate.JsonProperty;
|
||||
*
|
||||
* @author stuart.boston
|
||||
*/
|
||||
public class PersonCredit {
|
||||
public class PersonCredit implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(PersonCredit.class);
|
||||
private static final String DEFAULT_STRING = "";
|
||||
/*
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
@@ -20,11 +21,13 @@ import org.codehaus.jackson.annotate.JsonProperty;
|
||||
*
|
||||
* @author Stuart
|
||||
*/
|
||||
public class PersonCrew {
|
||||
public class PersonCrew implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(PersonCrew.class);
|
||||
/*
|
||||
* Properties
|
||||
@@ -86,6 +89,7 @@ public class PersonCrew {
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
|
||||
+6
-2
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
@@ -22,11 +23,13 @@ import org.codehaus.jackson.map.annotate.JsonRootName;
|
||||
* @author stuart.boston
|
||||
*/
|
||||
@JsonRootName("production_company")
|
||||
public class ProductionCompany {
|
||||
public class ProductionCompany implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(ProductionCompany.class);
|
||||
/*
|
||||
* Properties
|
||||
@@ -58,6 +61,7 @@ public class ProductionCompany {
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
|
||||
+6
-2
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
@@ -22,11 +23,13 @@ import org.codehaus.jackson.map.annotate.JsonRootName;
|
||||
* @author stuart.boston
|
||||
*/
|
||||
@JsonRootName("production_country")
|
||||
public class ProductionCountry {
|
||||
public class ProductionCountry implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(ProductionCountry.class);
|
||||
/*
|
||||
* Properties
|
||||
@@ -58,6 +61,7 @@ public class ProductionCountry {
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
@@ -20,11 +21,13 @@ import org.codehaus.jackson.annotate.JsonProperty;
|
||||
*
|
||||
* @author Stuart
|
||||
*/
|
||||
public class ReleaseInfo {
|
||||
public class ReleaseInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(ReleaseInfo.class);
|
||||
/*
|
||||
* Properties
|
||||
@@ -66,6 +69,7 @@ public class ReleaseInfo {
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
@@ -20,11 +21,13 @@ import org.codehaus.jackson.annotate.JsonProperty;
|
||||
*
|
||||
* @author Stuart
|
||||
*/
|
||||
public class StatusCode {
|
||||
public class StatusCode implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(StatusCode.class);
|
||||
/*
|
||||
* Properties
|
||||
@@ -56,6 +59,7 @@ public class StatusCode {
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
|
||||
+15
-13
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
@@ -22,8 +23,9 @@ import org.codehaus.jackson.annotate.JsonProperty;
|
||||
*
|
||||
* @author stuart.boston
|
||||
*/
|
||||
public class TmdbConfiguration {
|
||||
public class TmdbConfiguration implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
@@ -46,19 +48,19 @@ public class TmdbConfiguration {
|
||||
public List<String> getBackdropSizes() {
|
||||
return backdropSizes;
|
||||
}
|
||||
|
||||
|
||||
public String getBaseUrl() {
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
|
||||
public List<String> getPosterSizes() {
|
||||
return posterSizes;
|
||||
}
|
||||
|
||||
|
||||
public List<String> getProfileSizes() {
|
||||
return profileSizes;
|
||||
}
|
||||
|
||||
|
||||
public List<String> getLogoSizes() {
|
||||
return logoSizes;
|
||||
}
|
||||
@@ -68,19 +70,19 @@ public class TmdbConfiguration {
|
||||
public void setBackdropSizes(List<String> backdropSizes) {
|
||||
this.backdropSizes = backdropSizes;
|
||||
}
|
||||
|
||||
|
||||
public void setBaseUrl(String baseUrl) {
|
||||
this.baseUrl = baseUrl;
|
||||
}
|
||||
|
||||
|
||||
public void setPosterSizes(List<String> posterSizes) {
|
||||
this.posterSizes = posterSizes;
|
||||
}
|
||||
|
||||
|
||||
public void setProfileSizes(List<String> profileSizes) {
|
||||
this.profileSizes = profileSizes;
|
||||
}
|
||||
|
||||
|
||||
public void setLogoSizes(List<String> logoSizes) {
|
||||
this.logoSizes = logoSizes;
|
||||
}
|
||||
@@ -158,9 +160,9 @@ public class TmdbConfiguration {
|
||||
* @return
|
||||
*/
|
||||
public boolean isValidSize(String sizeToCheck) {
|
||||
return (isValidPosterSize(sizeToCheck)
|
||||
|| isValidBackdropSize(sizeToCheck)
|
||||
|| isValidProfileSize(sizeToCheck)
|
||||
return (isValidPosterSize(sizeToCheck)
|
||||
|| isValidBackdropSize(sizeToCheck)
|
||||
|| isValidProfileSize(sizeToCheck)
|
||||
|| isValidLogoSize(sizeToCheck));
|
||||
}
|
||||
|
||||
@@ -177,7 +179,7 @@ public class TmdbConfiguration {
|
||||
sb.append("' value: '").append(value).append("'");
|
||||
LOGGER.warn(sb.toString());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("[ImageConfiguration=");
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
|
||||
@@ -19,11 +20,13 @@ import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
*
|
||||
* @author Stuart
|
||||
*/
|
||||
public class Trailer {
|
||||
public class Trailer implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(Trailer.class);
|
||||
/*
|
||||
* Website sources
|
||||
@@ -76,6 +79,7 @@ public class Trailer {
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
package com.moviejukebox.themoviedb.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.codehaus.jackson.annotate.JsonAnySetter;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
@@ -20,11 +21,13 @@ import org.codehaus.jackson.annotate.JsonProperty;
|
||||
*
|
||||
* @author Stuart
|
||||
*/
|
||||
public class Translation {
|
||||
public class Translation implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(Translation.class);
|
||||
/*
|
||||
* Properties
|
||||
@@ -66,6 +69,7 @@ public class Translation {
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user