APISonar


org.jkiss.dbeaver.model.data.DBDDisplayFormat.UI

> org > jkiss > dbeaver > model > data > DBDDisplayFormat > UI
org APIs jkiss APIs dbeaver APIs model APIs data APIs DBDDisplayFormat APIs UI APIs

Example 1
public String toString()
    {
        String displayString = getDisplayString(DBDDisplayFormat.UI);
        return displayString == null ? DBConstants.NULL_VALUE_LABEL : displayString;
    }
Example 2
protected List<String> getSetValues(IValueController valueController, Object value) {
        String setString = DBValueFormatting.getDefaultValueDisplayString(value, DBDDisplayFormat.UI);
        List<String> setValues = new ArrayList<String>();
        if (!CommonUtils.isEmpty(setString)) {
            StringTokenizer st = new StringTokenizer(setString, ",");
            while (st.hasMoreTokens()) {
                setValues.add(st.nextToken());
            }
        }
        return setValues;
    }
Example 3
protected List<String> getEnumValues(IValueController valueController) {
        final PostgreAttribute attribute = (PostgreAttribute) valueController.getValueType();
        if (attribute.getDataType() == null) {
            return null;
        }
        final Object[] values = attribute.getDataType().getEnumValues();
        if (values == null) {
            return null;
        }
        List<String> strValues = new ArrayList<>(values.length);
        for (Object value : values) {
            strValues.add(DBValueFormatting.getDefaultValueDisplayString(value, DBDDisplayFormat.UI));
        }
        return strValues;
    }
Example 4
public synchronized String getValueDisplayString(@NotNull DBSTypedObject column, Object value, @NotNull DBDDisplayFormat format)
    {
        if (value instanceof JDBCComposite) {
            if (DBUtils.isNullValue(value)) {
                return DBValueFormatting.getDefaultValueDisplayString(value, format);
            }
            if (format == DBDDisplayFormat.UI) {

            }
            return ((JDBCComposite) value).getStringRepresentation();
        } else {
            return DBValueFormatting.getDefaultValueDisplayString(value, format);
        }
    }
Example 5
public void bindValueObject(
        @NotNull DBCSession session,
        @NotNull DBCStatement statement,
        @NotNull DBSTypedObject type,
        int index,
        Object value) throws DBCException
    {
        throw new DBCException("Object parameter [" + DBValueFormatting.getDefaultValueDisplayString(value, DBDDisplayFormat.UI) + "] binding not supported");
    }
Example 6
public void primeEditorValue(@Nullable Object value) throws DBException
    {
        if (value != null) {
            control.setText(valueController.getValueHandler().getValueDisplayString(valueController.getValueType(), value, DBDDisplayFormat.UI));
        } else {
            control.setText("");
        }
        if (valueController.getEditType() == IValueController.EditType.INLINE) {
            control.selectAll();
        }
    }
Example 7
public void refreshData(boolean refreshMetadata, boolean append) {
        table.removeAll();

        ResultSetRow row = controller.getModel().getRow(0);
        java.util.List<DBDAttributeBinding> visibleAttributes = controller.getModel().getVisibleAttributes();
        for (int i = 0; i < visibleAttributes.size(); i++) {
            DBDAttributeBinding attr = visibleAttributes.get(i);
            Object value = row.getValues()[i];
            TableItem item = new TableItem(table, SWT.LEFT);
            item.setText(0, attr.getName());
            item.setText(1, DBUtils.getDefaultValueDisplayString(value, DBDDisplayFormat.UI));
        }

        UIUtils.packColumns(table);
    }