Revision eec2d79d
Added by Andreas Müller over 8 years ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/hibernate/Level2ValidationEventListener.java | ||
---|---|---|
1 |
// $Id$ |
|
2 |
/** |
|
3 |
* Copyright (C) 2007 EDIT |
|
4 |
* European Distributed Institute of Taxonomy |
|
5 |
* http://www.e-taxonomy.eu |
|
6 |
* |
|
7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
9 |
*/ |
|
10 |
package eu.etaxonomy.cdm.persistence.hibernate; |
|
11 |
|
|
12 |
import org.apache.log4j.Logger; |
|
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 = Logger.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 |
} |
|
1 |
// $Id$ |
|
2 |
/** |
|
3 |
* Copyright (C) 2007 EDIT |
|
4 |
* European Distributed Institute of Taxonomy |
|
5 |
* http://www.e-taxonomy.eu |
|
6 |
* |
|
7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
9 |
*/ |
|
10 |
package eu.etaxonomy.cdm.persistence.hibernate; |
|
11 |
|
|
12 |
import org.apache.log4j.Logger; |
|
13 |
import org.hibernate.persister.entity.EntityPersister; |
|
14 |
|
|
15 |
import eu.etaxonomy.cdm.model.common.ICdmBase; |
|
16 |
import eu.etaxonomy.cdm.model.validation.CRUDEventType; |
|
17 |
import eu.etaxonomy.cdm.persistence.dao.validation.IEntityValidationCrud; |
|
18 |
import eu.etaxonomy.cdm.persistence.validation.EntityValidationTaskBase; |
|
19 |
import eu.etaxonomy.cdm.persistence.validation.Level2ValidationTask; |
|
20 |
|
|
21 |
@SuppressWarnings("serial") |
|
22 |
public class Level2ValidationEventListener extends ValidationEventListenerBase { |
|
23 |
|
|
24 |
@SuppressWarnings("unused") |
|
25 |
private static final Logger logger = Logger.getLogger(Level2ValidationEventListener.class); |
|
26 |
|
|
27 |
public Level2ValidationEventListener(IEntityValidationCrud dao){ |
|
28 |
super(dao); |
|
29 |
} |
|
30 |
|
|
31 |
@Override |
|
32 |
protected EntityValidationTaskBase createValidationTask(ICdmBase entity, CRUDEventType trigger) { |
|
33 |
return new Level2ValidationTask(entity, trigger, getDao()); |
|
34 |
} |
|
35 |
|
|
36 |
@Override |
|
37 |
protected final String levelString() { |
|
38 |
return "Level-2"; |
|
39 |
} |
|
40 |
|
|
41 |
@Override |
|
42 |
public boolean requiresPostCommitHanding(EntityPersister persister) { |
|
43 |
return false; |
|
44 |
} |
|
45 |
|
|
46 |
} |
Also available in: Unified diff
Fix issues after rebase #4716