private void checkSupportedTimestampTypes(Class type) { try { AttributeUtils.getTimestampMapType(type); } catch (Exception e) { throw new IllegalArgumentException("Unsupported dynamic type " + type.getName()); } }
private void checkSupportedTimestampTypes(Class type) { try { AttributeUtils.getTimestampMapType(type); } catch (Exception e) { throw new IllegalArgumentException("Unsupported dynamic type " + type.getName()); } }
valueSet = AttributeUtils.getIntervalMapType(value.getClass()).newInstance(); } else { valueSet = AttributeUtils.getTimestampMapType(value.getClass()).newInstance();
valueSet = AttributeUtils.getIntervalMapType(value.getClass()).newInstance(); } else { valueSet = AttributeUtils.getTimestampMapType(value.getClass()).newInstance();
@Override public boolean canConvertColumnToDynamic(Column column) { if (column.isReadOnly() || AttributeUtils.isDynamicType(column.getTypeClass())) { return false; } try { //Make sure the simple type can actually be part of a dynamic type of intervals/timestamps //For example array types cannot be converted to dynamic AttributeUtils.getIntervalMapType(column.getTypeClass()); AttributeUtils.getTimestampMapType(column.getTypeClass()); } catch (Exception e) { return false; } if (isNodeColumn(column) || isEdgeColumn(column)) { return !column.getTitle().equalsIgnoreCase("Label"); } else { return true; } }
Class<?> newType; if (timeRepresentation == TimeRepresentation.TIMESTAMP) { newType = AttributeUtils.getTimestampMapType(oldType); } else { newType = AttributeUtils.getIntervalMapType(oldType);