Package org.objectstyle.wolips.eomodeler.core.model

Examples of org.objectstyle.wolips.eomodeler.core.model.EODatabaseConfig


      text = argument.getName();
    } else if (_element instanceof EOStoredProcedure) {
      EOStoredProcedure storedProcedure = (EOStoredProcedure) _element;
      text = storedProcedure.getName();
    } else if (_element instanceof EODatabaseConfig) {
      EODatabaseConfig databaseConfig = (EODatabaseConfig) _element;
      text = databaseConfig.getName();
    } else if (_element instanceof EOEntityIndex) {
      EOEntityIndex entityIndex = (EOEntityIndex) _element;
      text = entityIndex.getName();
    } else {
      text = null;
View Full Code Here


      EOEntity entity = (EOEntity) element;
      if (BooleanUtils.isTrue(entity.isAbstractEntity())) {
        font = getInheritedFont();
      }
    } else if (element instanceof EODatabaseConfig) {
      EODatabaseConfig databaseConfig = (EODatabaseConfig) element;
      if (databaseConfig.isActive()) {
        font = getActiveFont();
      }
    } else {
      IEOAttribute attribute = null;
      if (element instanceof IEOAttribute) {
View Full Code Here

      extraInfoData.horizontalSpan = 2;
      _databaseConfigComboViewer.setContentProvider(new DatabaseConfigContentProvider());
      _databaseConfigComboViewer.setLabelProvider(new DatabaseConfigLabelProvider());
      _databaseConfigComboViewer.setInput(_databaseConfigs);
      _databaseConfigComboViewer.getCombo().setLayoutData(extraInfoData);
      EODatabaseConfig activeDatabaseConfig = _model.getActiveDatabaseConfig();
      if (activeDatabaseConfig != null) {
        _databaseConfigComboViewer.setSelection(new StructuredSelection(activeDatabaseConfig));
      } else {
        _databaseConfigComboViewer.setSelection(new StructuredSelection(_databaseConfigs.iterator().next()));
      }
View Full Code Here

  protected Text getSqlText() {
    return _sqlText;
  }

  protected EODatabaseConfig getSelectedDatabaseConfig() {
    EODatabaseConfig selectedDatabaseConfig = null;
    if (_databaseConfigComboViewer != null) {
      IStructuredSelection selection = (IStructuredSelection) _databaseConfigComboViewer.getSelection();
      selectedDatabaseConfig = (EODatabaseConfig) selection.getFirstElement();
    } else {
      selectedDatabaseConfig = _model.getActiveDatabaseConfig();
View Full Code Here

    flags.put("foreignKeyConstraints", yesNo(_createForeignKeyConstraintsButton));
    flags.put("createDatabase", yesNo(_createDatabaseButton));
    flags.put("dropDatabase", yesNo(_dropDatabaseButton));
    flags.put("createIndexes", yesNo(_createIndexesButton));
    flags.put("dropIndexes", yesNo(_dropIndexesButton));
    final EODatabaseConfig selectedDatabaseConfig = getSelectedDatabaseConfig();
    final boolean runInEntityModeler = _runInEntityModelerButton.getSelection();
    Thread generateSqlThread = new Thread(new Runnable() {
      public void run() {
        generateSql(flags, selectedDatabaseConfig, runInEntityModeler);
      }
View Full Code Here

  public void executeSqlInThread() {
    _createOnlySelectedEntities = _createSelectedEntitiesButton.getSelection();
    boolean confirmed = MessageDialog.openConfirm(getShell(), "Execute SQL", "Are you sure you want to execute this SQL?");
    if (confirmed) {
      final String sqlString = getSqlString();
      final EODatabaseConfig selectedDatabaseConfig = getSelectedDatabaseConfig();
      final boolean runInEntityModeler = _runInEntityModelerButton.getSelection();
      Thread executeSqlThread = new Thread(new Runnable() {
        public void run() {
          executeSql(sqlString, selectedDatabaseConfig, runInEntityModeler);
        }
View Full Code Here

    public Image getImage(Object element) {
      return null;
    }

    public String getText(Object element) {
      EODatabaseConfig config = (EODatabaseConfig) element;
      StringBuffer text = new StringBuffer();
      text.append(config.getName());
      text.append(" (");
      text.append(config.getUsername());
      text.append(" @ ");
      text.append(config.getURL());
      text.append(")");
      return text.toString();
    }
View Full Code Here

      Object selectedObject = getSelectedObject();
      EOModel model = EOModelUtils.getRelatedModel(selectedObject);
      if (model == null) {
        MessageDialog.openError(getWindow().getShell(), "Select a Model", "Select a model to reverse engineer into.");
      } else {
        EODatabaseConfig activeDatabaseConfig = model.getActiveDatabaseConfig();
        ClassLoader eomodelClassLoader = IEOClassLoaderFactory.Utility.createClassLoader(model);
        IEOSQLReverseEngineer reverseEngineer = IEOSQLReverseEngineerFactory.Utility.reverseEngineerFactory().reverseEngineer(activeDatabaseConfig, eomodelClassLoader);
        List<String> tableNames = reverseEngineer.reverseEngineerTableNames();

        ListSelectionDialog dlg = new ListSelectionDialog(getWindow().getShell(), tableNames, new StringContentProvider(), new StringLabelProvider(), "Select the tables to reverse engineer:");
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.eomodeler.core.model.EODatabaseConfig

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.