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