@Override public String convertToDatabaseColumn(DataType value) { return value != null ? value.getTypeName() : null; }
@Override public DataType convertToEntityAttribute(String value) { return DataType.fromName(value); } }
public static DataType fromName(String typeName) { for (DataType dataType: DataType.values()) { if (dataType.typeName.equalsIgnoreCase(typeName)) { return dataType; } } throw new IllegalArgumentException("Unknown data type: " + typeName); }
String type = attribute.getDataType().getTypeName(); if (!attribute.isRequestContext() && attribute.getDataType().getImportClass() != null) { if (!importedTypes.containsKey(attribute.getDataType().getTypeName())) { importedTypes.put(attribute.getDataType().getTypeName(), attribute.getDataType().getImportClass());
sb.append("null"); } else { sb.append(dataType.getTypeName());