| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| FilmTemporaryContext |
|
| 1.0;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.managers.persistence.context.TemporaryContext; | |
| 20 | ||
| 21 | import java.util.ArrayList; | |
| 22 | import java.util.Collection; | |
| 23 | ||
| 24 | /** | |
| 25 | * Temporary context of film. | |
| 26 | * | |
| 27 | * @author Baptiste Wicht | |
| 28 | */ | |
| 29 | 0 | public final class FilmTemporaryContext extends TemporaryContext { |
| 30 | private int intNote; | |
| 31 | private int lending; | |
| 32 | private int type; | |
| 33 | private int language; | |
| 34 | private int realizer; | |
| 35 | private Collection<Integer> actors; | |
| 36 | private Collection<Integer> kinds; | |
| 37 | ||
| 38 | /** | |
| 39 | * Return the temporary note of the film. | |
| 40 | * | |
| 41 | * @return The temporary note. | |
| 42 | */ | |
| 43 | public int getIntNote() { | |
| 44 | 0 | return intNote; |
| 45 | } | |
| 46 | ||
| 47 | /** | |
| 48 | * Sets the temporary note. The temporary note is used while importation to link note and | |
| 49 | * film when there are not completely loaded. | |
| 50 | * | |
| 51 | * @param intNote The temporary note. | |
| 52 | */ | |
| 53 | public void setTemporaryIntNote(int intNote) { | |
| 54 | 0 | this.intNote = intNote; |
| 55 | 0 | } |
| 56 | ||
| 57 | /** | |
| 58 | * Return the temporary lending id. | |
| 59 | * | |
| 60 | * @return The temporary lending id. | |
| 61 | */ | |
| 62 | public int getLending() { | |
| 63 | 0 | return lending; |
| 64 | } | |
| 65 | ||
| 66 | /** | |
| 67 | * Sets the temporary lending id. | |
| 68 | * | |
| 69 | * @param lending the temporary lending id | |
| 70 | */ | |
| 71 | public void setLending(int lending) { | |
| 72 | 0 | this.lending = lending; |
| 73 | 0 | } |
| 74 | ||
| 75 | /** | |
| 76 | * Return the temporary actors ids. | |
| 77 | * | |
| 78 | * @return The temporary actors ids. | |
| 79 | */ | |
| 80 | public Iterable<Integer> getActors() { | |
| 81 | 0 | return actors; |
| 82 | } | |
| 83 | ||
| 84 | /** | |
| 85 | * Sets the temporary actors ids. | |
| 86 | * | |
| 87 | * @param actors the temporary actors ids | |
| 88 | */ | |
| 89 | public void setActors(Collection<Integer> actors) { | |
| 90 | 0 | this.actors = new ArrayList<Integer>(actors); |
| 91 | 0 | } |
| 92 | ||
| 93 | /** | |
| 94 | * Return the kinds of the temporary context. | |
| 95 | * | |
| 96 | * @return A Collection containing all the kinds of the temporary context. | |
| 97 | */ | |
| 98 | public Iterable<Integer> getKinds() { | |
| 99 | 0 | return kinds; |
| 100 | } | |
| 101 | ||
| 102 | /** | |
| 103 | * Set the kinds of the temporary context. | |
| 104 | * | |
| 105 | * @param kinds The kinds of the temporary context. | |
| 106 | */ | |
| 107 | public void setKinds(Collection<Integer> kinds) { | |
| 108 | 0 | this.kinds = new ArrayList<Integer>(kinds); |
| 109 | 0 | } |
| 110 | ||
| 111 | /** | |
| 112 | * Return the temporary language id. | |
| 113 | * | |
| 114 | * @return The temporary language id. | |
| 115 | */ | |
| 116 | public int getLanguage() { | |
| 117 | 0 | return language; |
| 118 | } | |
| 119 | ||
| 120 | /** | |
| 121 | * Sets the temporary language id. | |
| 122 | * | |
| 123 | * @param language the temporary language id | |
| 124 | */ | |
| 125 | public void setLanguage(int language) { | |
| 126 | 0 | this.language = language; |
| 127 | 0 | } |
| 128 | ||
| 129 | /** | |
| 130 | * Return the temporary realizer id. | |
| 131 | * | |
| 132 | * @return The temporary realizer id. | |
| 133 | */ | |
| 134 | public int getRealizer() { | |
| 135 | 0 | return realizer; |
| 136 | } | |
| 137 | ||
| 138 | /** | |
| 139 | * Sets the temporary lending id. | |
| 140 | * | |
| 141 | * @param realizer the temporary lending id | |
| 142 | */ | |
| 143 | public void setRealizer(int realizer) { | |
| 144 | 0 | this.realizer = realizer; |
| 145 | 0 | } |
| 146 | ||
| 147 | /** | |
| 148 | * Return the temporary type id. | |
| 149 | * | |
| 150 | * @return The temporary type id. | |
| 151 | */ | |
| 152 | public int getType() { | |
| 153 | 0 | return type; |
| 154 | } | |
| 155 | ||
| 156 | /** | |
| 157 | * Sets the temporary type id. | |
| 158 | * | |
| 159 | * @param type the temporary type id | |
| 160 | */ | |
| 161 | public void setType(int type) { | |
| 162 | 0 | this.type = type; |
| 163 | 0 | } |
| 164 | } |