Project

General

Profile

Download (1.46 KB) Statistics
| Branch: | Tag: | Revision:
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.persistence.hibernate;
10

    
11
import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;
12
import org.hibernate.persister.entity.EntityPersister;
13

    
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.validation.EntityValidationTaskBase;
18
import eu.etaxonomy.cdm.persistence.validation.Level2ValidationTask;
19

    
20
@SuppressWarnings("serial")
21
public class Level2ValidationEventListener extends ValidationEventListenerBase {
22

    
23
	@SuppressWarnings("unused")
24
    private static final Logger logger = LogManager.getLogger(Level2ValidationEventListener.class);
25

    
26
	public Level2ValidationEventListener(IEntityValidationCrud dao){
27
	    super(dao);
28
	}
29

    
30
    @Override
31
    protected EntityValidationTaskBase createValidationTask(ICdmBase entity, CRUDEventType trigger) {
32
        return new Level2ValidationTask(entity, trigger, getDao());
33
    }
34

    
35
    @Override
36
    protected final String levelString() {
37
        return "Level-2";
38
    }
39

    
40
    @Override
41
    public boolean requiresPostCommitHanding(EntityPersister persister) {
42
        return false;
43
    }
44

    
45
}
(14-14/21)