Package com.dci.intellij.dbn.object.common

Examples of com.dci.intellij.dbn.object.common.DBObject


    }

    @Override
    public List<PresentableProperty> getPresentableProperties() {
        List<PresentableProperty> properties = super.getPresentableProperties();
        DBObject underlyingObject = getUnderlyingObject();
        if (underlyingObject != null) {
            properties.add(0, new DBObjectPresentableProperty("Underlying object", underlyingObject, true));
        }
        return properties;
    }
View Full Code Here


        }

        if (objectType.getInheritingTypes().size() > 0) {
            Set<DBObjectType> objectTypes = objectType.getInheritingTypes();
            for (DBObjectType objType : objectTypes) {
                DBObject object = getObject(objType, name);
                if (object != null) {
                    return object;
                }
            }
        }
View Full Code Here

        return null;
    }

    public DBObject getObject(String name) {
        for (DBObjectList objectList : objectLists.values()) {
            DBObject object = objectList.getObject(name);
            if (object != null) {
                return object;
            }
        }
        return null;
View Full Code Here

        return null;
    }

    public DBObject getHiddenObject(String name) {
        for (DBObjectList objectList : hiddenObjectLists.values()) {
            DBObject object = objectList.getObject(name);
            if (object != null) {
                return object;
            }
        }
        return null;
View Full Code Here

    public DBObject getObjectForParentType(DBObjectType parentObjectType, String name, boolean lookupHidden) {
        for (DBObjectList objectList : objectLists.values()) {
            DBObjectType objectType = objectList.getObjectType();
            if (objectType.getParents().contains(parentObjectType)) {
                DBObject object = objectList.getObject(name);
                if (object != null) {
                    return object;
                }
            }
        }

        if (lookupHidden) {
            for (DBObjectList objectList : hiddenObjectLists.values()) {
                DBObjectType objectType = objectList.getObjectType();
                if (objectType.getParents().contains(parentObjectType)) {
                    DBObject object = objectList.getObject(name);
                    if (object != null) {
                        return object;
                    }
                }
            }
View Full Code Here

    }

    public DBObject getObjectNoLoad(String name) {
        for (DBObjectList objectList : objectLists.values()) {
            if (objectList.isLoaded() && !objectList.isDirty()) {
                DBObject object = objectList.getObject(name);
                if (object != null && object.getParentObject().equals(owner)) {
                    return object;
                }
            }
        }
        return null;
View Full Code Here

        return getParent().getProject();
    }

   public String getContentDescription() {
        if (getParent() instanceof DBObject) {
            DBObject object = (DBObject) getParent();
            return getName() + " of " + object.getQualifiedNameWithType();
        }
        return getName() + " from " + getConnectionHandler().getName() ;
    }
View Full Code Here

    /*********************************************************
     *                   LoadableContent                     *
     *********************************************************/
    public String getContentDescription() {
        if (getTreeParent() instanceof DBObject) {
            DBObject object = (DBObject) getTreeParent();
            return getName() + " of " + object.getQualifiedNameWithType();
        }
        ConnectionHandler connectionHandler = getConnectionHandler();
        return connectionHandler == null ?
                getName() :
                getName() + " from " + connectionHandler.getName() ;
View Full Code Here

public class DBObjectListFromRelationListLoader<T extends DynamicContentElement> extends DynamicSubcontentCustomLoader<T> {
    public T resolveElement(DynamicContent<T> dynamicContent, DynamicContentElement sourceElement) {
        DBObjectList objectList = (DBObjectList) dynamicContent;
        DBObjectRelation objectRelation = (DBObjectRelation) sourceElement;
        DBObject object = (DBObject) objectList.getTreeParent();

        if (object.equals(objectRelation.getSourceObject())) {
            return (T) objectRelation.getTargetObject();
        }
        if (object.equals(objectRelation.getTargetObject())) {
            return (T) objectRelation.getSourceObject();
        }

        return null;
    }
View Full Code Here

import javax.swing.JList;
import java.awt.Component;

public class ObjectListCellRenderer extends DefaultListCellRenderer {
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        DBObject object = (DBObject) value;
        JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus );
        label.setIcon(object.getIcon(0));
        label.setText(object.getQualifiedName());
        return label;
    }
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.object.common.DBObject

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.