46 lines
844 B
Java
46 lines
844 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 enum ColumnDataType {
|
|
Boolean("Boolean"), Geometry("Geometry"), Integer("Integer"), Numeric(
|
|
"Numeric"), Date("Date"), Text("Text");
|
|
|
|
/**
|
|
* @param text
|
|
*/
|
|
private ColumnDataType(final String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
private final String id;
|
|
|
|
@Override
|
|
public String toString() {
|
|
return id;
|
|
}
|
|
|
|
public String getColumnDataTypeLabel() {
|
|
return id;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param id
|
|
* @return
|
|
*/
|
|
public static ColumnDataType getColumnDataTypeFromId(String id) {
|
|
for (ColumnDataType columnDataType : values()) {
|
|
if (columnDataType.id.compareToIgnoreCase(id) == 0) {
|
|
return columnDataType;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
}
|