1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.mobility.file.service;
17
18 import java.util.List;
19
20 import org.kuali.mobility.file.dao.FileDao;
21 import org.kuali.mobility.file.entity.File;
22 import org.springframework.beans.factory.annotation.Autowired;
23 import org.springframework.stereotype.Service;
24 import org.springframework.transaction.annotation.Transactional;
25
26 @Service
27 public class FileServiceImpl implements FileService {
28
29 private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(FileServiceImpl.class);
30 private String ME = this.getClass().getName();
31
32 @Autowired
33 private FileDao fileDao;
34
35 @Override
36 @Transactional
37 public Long saveFile(File file){
38 return fileDao.saveFile(file);
39 }
40
41 @Transactional
42 public boolean removeFile(File file){
43 return fileDao.removeFile(file);
44 }
45
46 @Transactional
47 public File findFileById(Long Id){
48 return fileDao.findFileById(Id);
49 }
50
51 @Transactional
52 public List<File> findFilesByName(String name){
53 return fileDao.findFilesByName(name);
54 }
55
56 @Transactional
57 public List<File> findAllFiles(){
58 return fileDao.findAllFiles();
59 }
60
61 @Autowired
62 private FileDao dao;
63 public void setFileDao(FileDao dao){
64 this.dao = dao;
65 }
66 public FileDao getFileDao(){
67 return dao;
68 }
69
70
71 }