Coverage Report - org.jtheque.films.persistence.od.impl.AbstractFilm
 
Classes in this File Line Coverage Branch Coverage Complexity
AbstractFilm
0 %
0/48
0 %
0/4
1
 
 1  
 package org.jtheque.films.persistence.od.impl;
 2  
 
 3  
 /*
 4  
  * This file is part of JTheque.
 5  
  *
 6  
  * JTheque is free software: you can redistribute it and/or modify
 7  
  * it under the terms of the GNU General Public License as published by
 8  
  * the Free Software Foundation, either version 3 of the License.
 9  
  *
 10  
  * JTheque is distributed in the hope that it will be useful,
 11  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  
  * GNU General Public License for more details.
 14  
  *
 15  
  * You should have received a copy of the GNU General Public License
 16  
  * along with JTheque.  If not, see <http://www.gnu.org/licenses/>.
 17  
  */
 18  
 
 19  
 import org.jtheque.core.utils.db.Note;
 20  
 import org.jtheque.films.persistence.od.able.Film;
 21  
 import org.jtheque.films.services.able.IActorService;
 22  
 import org.jtheque.primary.od.able.Collection;
 23  
 import org.jtheque.primary.od.able.Kind;
 24  
 import org.jtheque.primary.od.able.Language;
 25  
 import org.jtheque.primary.od.able.Lending;
 26  
 import org.jtheque.primary.od.able.Person;
 27  
 import org.jtheque.primary.od.able.Saga;
 28  
 import org.jtheque.primary.od.able.Type;
 29  
 import org.jtheque.primary.od.impl.abstraction.AbstractData;
 30  
 
 31  
 import java.util.HashSet;
 32  
 import java.util.Set;
 33  
 
 34  
 /**
 35  
  * Represents the abstraction of a film.
 36  
  *
 37  
  * @author Baptiste Wicht
 38  
  */
 39  0
 public abstract class AbstractFilm extends AbstractData implements Film {
 40  
     private Collection collection;
 41  
     private String title;
 42  
     private Type type;
 43  
     private Person realizer;
 44  
     private Language language;
 45  
     private int year;
 46  
     private int duration;
 47  
     private Note note;
 48  
     private Lending lending;
 49  
     private String resume;
 50  
     private String comment;
 51  
     private String image;
 52  
     private String filePath;
 53  0
     private final Set<Person> actors = new HashSet<Person>(10);
 54  0
     private final Set<Kind> kinds = new HashSet<Kind>(5);
 55  
     private Saga theSaga;
 56  
 
 57  
     @Override
 58  
     public final void setTitle(String title) {
 59  0
         this.title = title;
 60  0
     }
 61  
 
 62  
     @Override
 63  
     public final String getTitle() {
 64  0
         return title;
 65  
     }
 66  
 
 67  
     @Override
 68  
     public final void setTheCollection(Collection collection) {
 69  0
         this.collection = collection;
 70  0
     }
 71  
 
 72  
     @Override
 73  
     public final Collection getTheCollection() {
 74  0
         return collection;
 75  
     }
 76  
 
 77  
     @Override
 78  
     public final void setTheType(Type type) {
 79  0
         this.type = type;
 80  0
     }
 81  
 
 82  
     @Override
 83  
     public final Type getTheType() {
 84  0
         return type;
 85  
     }
 86  
 
 87  
     @Override
 88  
     public final void setYear(int year) {
 89  0
         this.year = year;
 90  0
     }
 91  
 
 92  
     @Override
 93  
     public final int getYear() {
 94  0
         return year;
 95  
     }
 96  
 
 97  
     @Override
 98  
     public final void setDuration(int duration) {
 99  0
         this.duration = duration;
 100  0
     }
 101  
 
 102  
     @Override
 103  
     public final int getDuration() {
 104  0
         return duration;
 105  
     }
 106  
 
 107  
     @Override
 108  
     public final void setTheRealizer(Person realizer) {
 109  0
         assert realizer.getType().equals(IActorService.PERSON_TYPE) : "The person must of type Actor";
 110  
 
 111  0
         this.realizer = realizer;
 112  0
     }
 113  
 
 114  
     @Override
 115  
     public final Person getTheRealizer() {
 116  0
         return realizer;
 117  
     }
 118  
 
 119  
     @Override
 120  
     public final void setTheLanguage(Language language) {
 121  0
         this.language = language;
 122  0
     }
 123  
 
 124  
     @Override
 125  
     public final Language getTheLanguage() {
 126  0
         return language;
 127  
     }
 128  
 
 129  
     @Override
 130  
     public final void setNote(Note note) {
 131  0
         this.note = note;
 132  0
     }
 133  
 
 134  
     @Override
 135  
     public final Note getNote() {
 136  0
         return note;
 137  
     }
 138  
 
 139  
     @Override
 140  
     public final void setComment(String comment) {
 141  0
         this.comment = comment;
 142  0
     }
 143  
 
 144  
     @Override
 145  
     public final String getComment() {
 146  0
         return comment;
 147  
     }
 148  
 
 149  
     @Override
 150  
     public final void setResume(String resume) {
 151  0
         this.resume = resume;
 152  0
     }
 153  
 
 154  
     @Override
 155  
     public final String getResume() {
 156  0
         return resume;
 157  
     }
 158  
 
 159  
     @Override
 160  
     public final void setImage(String imagePath) {
 161  0
         image = imagePath;
 162  0
     }
 163  
 
 164  
     @Override
 165  
     public final String getImage() {
 166  0
         return image;
 167  
     }
 168  
 
 169  
     @Override
 170  
     public final String getFilePath() {
 171  0
         return filePath;
 172  
     }
 173  
 
 174  
     @Override
 175  
     public final void setFilePath(String filePath) {
 176  0
         this.filePath = filePath;
 177  0
     }
 178  
 
 179  
     @Override
 180  
     public final Set<Person> getActors() {
 181  0
         return actors;
 182  
     }
 183  
 
 184  
     @Override
 185  
     public final Set<Kind> getKinds() {
 186  0
         return kinds;
 187  
     }
 188  
 
 189  
     @Override
 190  
     public final void setTheLending(Lending lending) {
 191  0
         this.lending = lending;
 192  0
     }
 193  
 
 194  
     @Override
 195  
     public final Lending getTheLending() {
 196  0
         return lending;
 197  
     }
 198  
 
 199  
     @Override
 200  
     public final Saga getTheSaga() {
 201  0
         return theSaga;
 202  
     }
 203  
 
 204  
     @Override
 205  
     public final void setTheSaga(Saga theSaga) {
 206  0
         this.theSaga = theSaga;
 207  0
     }
 208  
 
 209  
     @Override
 210  
     public abstract FilmTemporaryContext getTemporaryContext();
 211  
 }