1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package service;
/**
*
* @author doum
*/
import java.util.List;
import model.Adresse;
import model.Annonce;
import model.Categorie;
import model.Client;
import model.Message;
import model.Pays;
import model.Photo;
import model.Ville;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@Repository
public class FacadeImpl implements Facade {
private AnnonceDAO annonceDAO;
private AdresseDAO adresseDAO;
private CategorieDAO categorieDAO;
private ClientDAO clientDAO;
private MessageDAO messageDAO;
private PaysDAO paysDAO;
private VilleDAO villeDAO;
private PhotoDAO photoDAO;
//Injection du dao Adresse
@Autowired
public void setAdresseDAO(AdresseDAO adresseDAO) {
this.adresseDAO = adresseDAO;
}
public AdresseDAO getAdresseDAO() {
return this.adresseDAO;
}
//Injection du dao Annonce
@Autowired
public void setAnnonceDAO(AnnonceDAO annonceDAO) {
this.annonceDAO = annonceDAO;
}
public AnnonceDAO getAnnonceDAO() {
return this.annonceDAO;
}
//Injection du dao Categorie
@Autowired
public void setCategorieDAO(CategorieDAO categorieDAO) {
this.categorieDAO = categorieDAO;
}
public CategorieDAO getCategorieDAO() {
return this.categorieDAO;
}
//Injection du dao Client
@Autowired
public void setClientDAO(ClientDAO clientDAO) {
this.clientDAO = clientDAO;
}
public ClientDAO getClientDAO() {
return this.clientDAO;
}
//Injection du dao Message
@Autowired
public void setMessageDAO(MessageDAO messageDAO) {
this.messageDAO = messageDAO;
}
public MessageDAO getMessageDAO() {
return this.messageDAO;
}
//Injection du dao Pays
@Autowired
public void setPaysDAO(PaysDAO paysDAO) {
this.paysDAO = paysDAO;
}
public PaysDAO getPaysDAO() {
return this.paysDAO;
}
//Injection du dao Ville
@Autowired
public void setVilleDAO(VilleDAO villeDAO) {
this.villeDAO = villeDAO;
}
public VilleDAO getVilleDAO() {
return this.villeDAO;
}
//Injection du dao Photo
@Autowired
public void setPhotoDAO(PhotoDAO photoDAO) {
this.photoDAO = photoDAO;
}
public PhotoDAO getPhotoDAO() {
return this.photoDAO;
}
//FIN DE LA PARTIE INJECTION
//ADRESSE
public Adresse getAdresse(String adresseID) {
return adresseDAO.getAdresse(adresseID);
}
public int getAdresseCount() {
return adresseDAO.getAdresseCount();
}
public List<Adresse> getAdresses(int firstAdresse, int batchSize) {
return adresseDAO.getAdresses(firstAdresse, batchSize);
}
//ANNONCE
public Annonce getAnnonce(String annonceID) {
return annonceDAO.getAnnonce(annonceID);
}
public int getAnnonceCount() {
return annonceDAO.getAnnonceCount();
}
public List<Annonce> getAnnonces(int firstAnnonce, int batchSize) {
return annonceDAO.getAnnonces(firstAnnonce, batchSize);
}
//CATEGORIE
public Categorie getCategorie(String categorieID) {
return categorieDAO.getCategorie(categorieID);
}
public int getCategorieCount() {
return categorieDAO.getCategorieCount();
}
public List<Categorie> getCategories(int firstCategorie, int batchSize) {
return categorieDAO.getCategories(firstCategorie, batchSize);
}
//CLIENT
public Client getClient(String clientID) {
return clientDAO.getClient(clientID);
}
public int getClientCount() {
return clientDAO.getClientCount();
}
public List<Client> getClients(int firstClient, int batchSize) {
return clientDAO.getClients(firstClient, batchSize);
}
//MESSAGE
public Message getMessage(String messageID) {
return messageDAO.getMessage(messageID);
}
public int getMessageCount() {
return messageDAO.getMessageCount();
}
public List<Message> getMessages(int firstMessage, int batchSize) {
return messageDAO.getMessages(firstMessage, batchSize);
}
//PAYS
public Pays getPays(String paysID) {
return paysDAO.getPays(paysID);
}
public int getPaysCount() {
return paysDAO.getPaysCount();
}
public List<Pays> getPayss(int firstPays, int batchSize) {
return paysDAO.getPayss(firstPays, batchSize);
}
//PHOTO
public Photo getPhoto(String photoID) {
return photoDAO.getPhoto(photoID);
}
public int getPhotoCount() {
return photoDAO.getPhotoCount();
}
public List<Photo> getPhotos(int firstPhoto, int batchSize) {
return photoDAO.getPhotos(firstPhoto, batchSize);
}
//VILLE
public Ville getVille(String villeID) {
return villeDAO.getVille(villeID);
}
public int getVilleCount() {
return villeDAO.getVilleCount();
}
public List<Ville> getVilles(int firstVille, int batchSize) {
return villeDAO.getVilles(firstVille, batchSize);
}
} |
Partager