Search in sources :

Example 1 with CubridSerialFolderLoader

use of com.cubrid.common.ui.spi.model.loader.CubridSerialFolderLoader in project cubrid-manager by CUBRID.

the class CubridDatabaseLoader method addSerialFolder.

/**
	 * Add serial folder
	 * 
	 * @param monitor the IProgressMonitor
	 * @param database the CubridDatabase
	 */
private void addSerialFolder(final IProgressMonitor monitor, CubridDatabase database) {
    String serialFolderId = database.getId() + NODE_SEPARATOR + CubridSerialFolderLoader.SERIAL_FOLDER_ID;
    ICubridNode serialFolder = database.getChild(serialFolderId);
    if (serialFolder == null) {
        serialFolder = new DefaultSchemaNode(serialFolderId, SERIAL_FOLDER_NAME, "icons/navigator/serial_group.png");
        serialFolder.setType(NodeType.SERIAL_FOLDER);
        serialFolder.setContainer(true);
        ICubridNodeLoader loader = new CubridSerialFolderLoader();
        loader.setLevel(getLevel());
        serialFolder.setLoader(loader);
        database.addChild(serialFolder);
        if (getLevel() == DEFINITE_LEVEL) {
            serialFolder.getChildren(monitor);
        }
    } else {
        if (serialFolder.getLoader() != null && serialFolder.getLoader().isLoaded()) {
            serialFolder.getLoader().setLoaded(false);
            serialFolder.getChildren(monitor);
        }
    }
}
Also used : ICubridNodeLoader(com.cubrid.common.ui.spi.model.ICubridNodeLoader) CubridSerialFolderLoader(com.cubrid.common.ui.spi.model.loader.CubridSerialFolderLoader) ICubridNode(com.cubrid.common.ui.spi.model.ICubridNode) DefaultSchemaNode(com.cubrid.common.ui.spi.model.DefaultSchemaNode)

Example 2 with CubridSerialFolderLoader

use of com.cubrid.common.ui.spi.model.loader.CubridSerialFolderLoader in project cubrid-manager by CUBRID.

the class CQBDbConnectionLoader method addSerialFolder.

/**
	 * Add serial folder
	 * 
	 * @param monitor the IProgressMonitor
	 * @param database the CubridDatabase
	 */
private void addSerialFolder(final IProgressMonitor monitor, CubridDatabase database) {
    String serialFolderId = database.getId() + NODE_SEPARATOR + SERIAL_FOLDER_ID;
    ICubridNode serialFolder = database.getChild(serialFolderId);
    if (serialFolder == null) {
        serialFolder = new DefaultSchemaNode(serialFolderId, SERIAL_FOLDER_NAME, "icons/navigator/serial_group.png");
        serialFolder.setType(NodeType.SERIAL_FOLDER);
        serialFolder.setContainer(true);
        ICubridNodeLoader loader = new CubridSerialFolderLoader();
        loader.setLevel(getLevel());
        serialFolder.setLoader(loader);
        database.addChild(serialFolder);
        if (getLevel() == DEFINITE_LEVEL) {
            serialFolder.getChildren(monitor);
        }
    } else {
        if (serialFolder.getLoader() != null && serialFolder.getLoader().isLoaded()) {
            serialFolder.getLoader().setLoaded(false);
            serialFolder.getChildren(monitor);
        }
    }
}
Also used : ICubridNodeLoader(com.cubrid.common.ui.spi.model.ICubridNodeLoader) CubridSerialFolderLoader(com.cubrid.common.ui.spi.model.loader.CubridSerialFolderLoader) ICubridNode(com.cubrid.common.ui.spi.model.ICubridNode) DefaultSchemaNode(com.cubrid.common.ui.spi.model.DefaultSchemaNode)

Aggregations

DefaultSchemaNode (com.cubrid.common.ui.spi.model.DefaultSchemaNode)2 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)2 ICubridNodeLoader (com.cubrid.common.ui.spi.model.ICubridNodeLoader)2 CubridSerialFolderLoader (com.cubrid.common.ui.spi.model.loader.CubridSerialFolderLoader)2