Search in sources :

Example 6 with TableMasterDVO

use of kyj.Fx.dao.wizard.core.model.vo.TableMasterDVO in project Gargoyle by callakrsos.

the class VoWizardUtil method listTable.

/**
	 * 테이블모델생성
	 *
	 * @param tableName
	 * @return
	 * @throws Exception
	 */
public static List<TableMasterDVO> listTable(String tableName) throws Exception {
    return DbUtil.tables(tableName, rs -> {
        TableMasterDVO tableMasterDVO = new TableMasterDVO();
        try {
            String _schemaName = rs.getString("TABLE_SCHEM");
            tableMasterDVO.setSchemaName(_schemaName);
            String _tableName = rs.getString("TABLE_NAME");
            tableMasterDVO.setTableName(_tableName);
            String className = ValueUtil.toDVOName(_tableName);
            tableMasterDVO.setClassName(className);
            tableMasterDVO.setDescription(rs.getString("REMARKS"));
        } catch (Exception e) {
            LOGGER.error(ValueUtil.toString(e));
            tableMasterDVO = null;
        }
        return tableMasterDVO;
    });
}
Also used : TableMasterDVO(kyj.Fx.dao.wizard.core.model.vo.TableMasterDVO) GargoyleFileAlreadyExistException(com.kyj.fx.voeditor.visual.exceptions.GargoyleFileAlreadyExistException) SQLException(java.sql.SQLException)

Aggregations

TableMasterDVO (kyj.Fx.dao.wizard.core.model.vo.TableMasterDVO)6 SQLException (java.sql.SQLException)3 FXML (javafx.fxml.FXML)3 TableDVO (kyj.Fx.dao.wizard.core.model.vo.TableDVO)3 TableModelDVO (kyj.Fx.dao.wizard.core.model.vo.TableModelDVO)3 DatabaseTableView (com.kyj.fx.voeditor.visual.component.popup.DatabaseTableView)2 ClassTypeCheckBoxCellFactory (com.kyj.fx.voeditor.visual.component.ClassTypeCheckBoxCellFactory)1 CommonContextMenuEvent (com.kyj.fx.voeditor.visual.events.CommonContextMenuEvent)1 GargoyleFileAlreadyExistException (com.kyj.fx.voeditor.visual.exceptions.GargoyleFileAlreadyExistException)1 File (java.io.File)1 ResultSet (java.sql.ResultSet)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 ObservableList (javafx.collections.ObservableList)1 ContextMenu (javafx.scene.control.ContextMenu)1 MenuItem (javafx.scene.control.MenuItem)1 KeyCode (javafx.scene.input.KeyCode)1 MouseEvent (javafx.scene.input.MouseEvent)1