Merge branch 'hotfix/5.18.2'
[taxeditor.git] / eu.etaxonomy.taxeditor.bulkeditor / src / main / java / eu / etaxonomy / taxeditor / bulkeditor / input / sortprovider / CdmBaseSortProvider.java
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
10 package eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider;
11
12 import org.joda.time.DateTime;
13
14 import eu.etaxonomy.cdm.model.common.ICdmBase;
15
16 /**
17 * @author n.hoffmann
18 * @created Dec 14, 2010
19 * @version 1.0
20 */
21 public class CdmBaseSortProvider<T extends ICdmBase> extends AbstractSortProvider<T> {
22
23 /**
24 *
25 */
26 public CdmBaseSortProvider() {
27 comparators.put("Created When", new CreatedDateComparator());
28 }
29
30 private class CreatedDateComparator extends AbstractDateComparator<T>{
31
32 /* (non-Javadoc)
33 * @see eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.AbstractDateComparator#getDate(eu.etaxonomy.cdm.model.common.ICdmBase)
34 */
35 @Override
36 protected DateTime getDate(T object) {
37 return object.getCreated();
38 }
39
40 }
41 }