Rev 1310 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
336 | jmachado | 1 | package pt.estgp.estgweb.services.data; |
2 | |||
3 | import jomm.dao.impl.AbstractDao; |
||
1830 | jmachado | 4 | import org.apache.log4j.Logger; |
336 | jmachado | 5 | import pt.estgp.estgweb.domain.RepositoryFileVersion; |
6 | import pt.estgp.estgweb.domain.RepositoryFileVersionImpl; |
||
7 | |||
8 | import java.util.List; |
||
9 | |||
10 | /** |
||
11 | * @author Jorge Machado |
||
12 | * @date 23/Out/2008 |
||
13 | * @see pt.estgp.estgweb.services.data |
||
14 | */ |
||
15 | public class CreateDescriptionsXML |
||
16 | { |
||
17 | private static final 1.5.0/docs/api/java/util/logging/Logger.html">Logger logger = 1.5.0/docs/api/java/util/logging/Logger.html">Logger.getLogger(CreateDescriptionsXML.class); |
||
18 | public static void main(1.5.0/docs/api/java/lang/String.html">String[]args) |
||
19 | { |
||
20 | AbstractDao.getCurrentSession().beginTransaction(); |
||
21 | List<RepositoryFileVersion> repoList = AbstractDao.getCurrentSession().createCriteria(RepositoryFileVersion.class).list(); |
||
22 | for(RepositoryFileVersion repositoryFileVersion: repoList) |
||
23 | { |
||
24 | logger.info("Creating description for file:" + repositoryFileVersion.getId() + ":" + repositoryFileVersion.getName()); |
||
1830 | jmachado | 25 | RepositoryServiceTier3.createXMLdescription((RepositoryFileVersionImpl) repositoryFileVersion); |
336 | jmachado | 26 | } |
27 | AbstractDao.getCurrentSession().getTransaction().commit(); |
||
28 | } |
||
29 | } |