34 lines
758 B
Java
34 lines
758 B
Java
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;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|