Revision ad7201d3
Added by Andreas Müller over 3 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/sortprovider/CdmBaseSortProvider.java | ||
---|---|---|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 |
|
|
10 | 9 |
package eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider; |
11 | 10 |
|
12 | 11 |
import org.joda.time.DateTime; |
... | ... | |
16 | 15 |
/** |
17 | 16 |
* @author n.hoffmann |
18 | 17 |
* @created Dec 14, 2010 |
19 |
* @version 1.0 |
|
20 | 18 |
*/ |
21 | 19 |
public class CdmBaseSortProvider<T extends ICdmBase> extends AbstractSortProvider<T> { |
22 | 20 |
|
23 |
/** |
|
24 |
* |
|
25 |
*/ |
|
26 | 21 |
public CdmBaseSortProvider() { |
27 | 22 |
comparators.put("Created When", new CreatedDateComparator()); |
28 | 23 |
} |
29 | 24 |
|
30 | 25 |
private class CreatedDateComparator extends AbstractDateComparator<T>{ |
31 | 26 |
|
32 |
/* (non-Javadoc) |
|
33 |
* @see eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.AbstractDateComparator#getDate(eu.etaxonomy.cdm.model.common.ICdmBase) |
|
34 |
*/ |
|
35 | 27 |
@Override |
36 | 28 |
protected DateTime getDate(T object) { |
37 | 29 |
return object.getCreated(); |
38 |
} |
|
39 |
|
|
30 |
} |
|
40 | 31 |
} |
41 |
} |
|
32 |
} |
Also available in: Unified diff
cleanup and generics for ICdmEntitySessionEnabled