Added PeriodType
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widget-common-event@101081 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
09779a8971
commit
07ecf41db3
|
@ -0,0 +1,33 @@
|
||||||
|
package org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author "Giancarlo Panichi" <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class PeriodDataTypeMap {
|
||||||
|
|
||||||
|
public static PeriodDataType map(String id) {
|
||||||
|
if (id.compareTo(PeriodDataType.DAY.toString()) == 0) {
|
||||||
|
return PeriodDataType.DAY;
|
||||||
|
} else {
|
||||||
|
if (id.compareTo(PeriodDataType.MONTH.toString()) == 0) {
|
||||||
|
return PeriodDataType.MONTH;
|
||||||
|
} else {
|
||||||
|
if (id.compareTo(PeriodDataType.QUARTER.toString()) == 0) {
|
||||||
|
return PeriodDataType.QUARTER;
|
||||||
|
} else {
|
||||||
|
if (id.compareTo(PeriodDataType.YEAR.toString()) == 0) {
|
||||||
|
return PeriodDataType.YEAR;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue