Package com.dci.intellij.dbn.data.value

Examples of com.dci.intellij.dbn.data.value.LazyLoadedValue


    private void loadContent(boolean initial) {
        String text = "";
        Object userValue = cell.getUserValue();
        if (userValue instanceof LazyLoadedValue) {
            LazyLoadedValue lazyLoadedValue = (LazyLoadedValue) userValue;
            try {
                text = initial ?
                        lazyLoadedValue.loadValue(INITIAL_MAX_SIZE) :
                        lazyLoadedValue.loadValue();
                if (text == null) {
                    text = "";
                }

                long contentSize = lazyLoadedValue.size();
                if (initial && contentSize > INITIAL_MAX_SIZE) {
                    contentInfoText = getNumberOfLines(text) + " lines, " + INITIAL_MAX_SIZE + " characters (partially loaded)";
                    loadContentVisible = true;
                    loadContentCaption = "Load entire content";
                } else {
                    contentInfoText = getNumberOfLines(text) + " lines, " + text.length() + " characters";
                    loadContentVisible = false;
                }
            } catch (SQLException e) {
                contentInfoText = "Could not load " + lazyLoadedValue.getDisplayValue() + " content. Cause: " + e.getMessage();
                loadContentCaption = "Reload content";
            }
        } else {
            text = userValue.toString();
            contentInfoText = getNumberOfLines(text) + " lines, " + text.length() + " characters";
View Full Code Here


            boolean isLargeObject = dataType.getNativeDataType().isLOB();
            try {
                clearError();
                int columnIndex = getColumnInfo().getColumnIndex() + 1;
                if (isLargeObject) {
                    LazyLoadedValue lazyLoadedValue = (LazyLoadedValue) getUserValue();
                    lazyLoadedValue.updateValue(resultSet, columnIndex, (String) userValue);
                } else {
                    dataType.setValueToResultSet(resultSet, columnIndex, userValue);
                }

                if (!row.isInsert()) resultSet.updateRow();
View Full Code Here

    public String readUserValue() throws SQLException {
        Object userValue = userValueHolder.getUserValue();
        if (userValue instanceof String) {
            return (String) userValue;
        } else if (userValue instanceof LazyLoadedValue) {
            LazyLoadedValue lazyLoadedValue = (LazyLoadedValue) userValue;
            return lazyLoadedValue.loadValue();
        }
        return null;
    }
View Full Code Here

        } else {
            Object userValue = getEditorComponent().getUserValueHolder().getUserValue();
            if (userValue instanceof String) {
                text = (String) userValue;
            } else if (userValue instanceof LazyLoadedValue) {
                LazyLoadedValue lazyLoadedValue = (LazyLoadedValue) userValue;
                try {
                    text = lazyLoadedValue.loadValue();
                } catch (SQLException e) {
                    MessageUtil.showErrorDialog(e.getMessage(), e);
                    return null;
                }
            }
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.data.value.LazyLoadedValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.