Search in sources :

Example 1 with ERVirtualDatabaseInfo

use of com.cubrid.common.ui.er.model.ERVirtualDatabaseInfo in project cubrid-manager by CUBRID.

the class ERSchemaEditor method initCollections.

/**
	 * Get collections from database, and add a empty collection
	 * 
	 * @param databaseInfo
	 */
private void initCollections(final DatabaseInfo databaseInfo) {
    if (databaseInfo instanceof ERVirtualDatabaseInfo) {
        ERVirtualDatabaseInfo db = (ERVirtualDatabaseInfo) databaseInfo;
        erSchema.setCollections(db.getCollections());
        return;
    }
    new Thread(new Runnable() {

        public void run() {
            GetCollations collationTask = new GetCollations(databaseInfo);
            collationTask.execute();
            List<Collation> collationList = collationTask.getCollations();
            Collation emptyCollation = new Collation();
            emptyCollation.setCharset("");
            emptyCollation.setName("");
            collationList.add(0, emptyCollation);
            erSchema.setCollections(collationList);
        }
    }).start();
}
Also used : ERVirtualDatabaseInfo(com.cubrid.common.ui.er.model.ERVirtualDatabaseInfo) GetCollations(com.cubrid.cubridmanager.core.cubrid.table.task.GetCollations) Collation(com.cubrid.cubridmanager.core.cubrid.database.model.Collation)

Aggregations

ERVirtualDatabaseInfo (com.cubrid.common.ui.er.model.ERVirtualDatabaseInfo)1 Collation (com.cubrid.cubridmanager.core.cubrid.database.model.Collation)1 GetCollations (com.cubrid.cubridmanager.core.cubrid.table.task.GetCollations)1