1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.api.validation;
|
10
|
|
11
|
import org.apache.log4j.Logger;
|
12
|
|
13
|
import eu.etaxonomy.cdm.api.application.ICdmRepository;
|
14
|
import eu.etaxonomy.cdm.model.common.ICdmBase;
|
15
|
import eu.etaxonomy.cdm.model.validation.CRUDEventType;
|
16
|
import eu.etaxonomy.cdm.persistence.dao.validation.IEntityValidationCrud;
|
17
|
import eu.etaxonomy.cdm.persistence.hibernate.Level3ValidationEventListener;
|
18
|
import eu.etaxonomy.cdm.persistence.validation.EntityValidationTaskBase;
|
19
|
|
20
|
@SuppressWarnings("serial")
|
21
|
class Level3TransactionalValidationEventListener extends Level3ValidationEventListener{
|
22
|
|
23
|
@SuppressWarnings("unused")
|
24
|
private static final Logger logger = Logger.getLogger(Level3TransactionalValidationEventListener.class);
|
25
|
|
26
|
private final ICdmRepository repository;
|
27
|
|
28
|
public Level3TransactionalValidationEventListener(ICdmRepository repository, IEntityValidationCrud dao){
|
29
|
super(dao);
|
30
|
this.repository = repository;
|
31
|
}
|
32
|
|
33
|
|
34
|
@Override
|
35
|
protected EntityValidationTaskBase createValidationTask(ICdmBase entity, CRUDEventType trigger) {
|
36
|
return new Level3TransactionalValidationTask(entity, trigger, getDao(), repository);
|
37
|
}
|
38
|
|
39
|
}
|