Codota Logo
DataStructuresCoreService
Code IndexAdd Codota to your IDE (free)

How to use
DataStructuresCoreService
in
org.eclipse.dirigible.database.ds.service

Best Java code snippets using org.eclipse.dirigible.database.ds.service.DataStructuresCoreService (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: org.eclipse.dirigible/dirigible-database-data-structures

/**
 * Synchronize append.
 *
 * @param dataModel
 *            the data model
 * @throws SynchronizationException
 *             the synchronization exception
 */
private void synchronizeAppend(DataStructureDataAppendModel dataModel) throws SynchronizationException {
  try {
    if (!dataStructuresCoreService.existsAppend(dataModel.getLocation())) {
      dataStructuresCoreService.createAppend(dataModel.getLocation(), dataModel.getName(), dataModel.getHash());
      DATA_STRUCTURE_APPEND_MODELS.put(dataModel.getName(), dataModel);
      logger.info("Synchronized a new Append Data file [{}] from location: {}", dataModel.getName(), dataModel.getLocation());
    } else {
      DataStructureDataAppendModel existing = dataStructuresCoreService.getAppend(dataModel.getLocation());
      if (!dataModel.equals(existing)) {
        dataStructuresCoreService.updateAppend(dataModel.getLocation(), dataModel.getName(), dataModel.getHash());
        DATA_STRUCTURE_APPEND_MODELS.put(dataModel.getName(), dataModel);
        logger.info("Synchronized a modified Append Data file [{}] from location: {}", dataModel.getName(), dataModel.getLocation());
      }
    }
    APPEND_SYNCHRONIZED.add(dataModel.getLocation());
  } catch (DataStructuresException e) {
    throw new SynchronizationException(e);
  }
}
origin: org.eclipse.dirigible/dirigible-database-data-structures

/**
 * Synchronize delete.
 *
 * @param dataModel
 *            the data model
 * @throws SynchronizationException
 *             the synchronization exception
 */
private void synchronizeDelete(DataStructureDataDeleteModel dataModel) throws SynchronizationException {
  try {
    if (!dataStructuresCoreService.existsDelete(dataModel.getLocation())) {
      dataStructuresCoreService.createDelete(dataModel.getLocation(), dataModel.getName(), dataModel.getHash());
      DATA_STRUCTURE_DELETE_MODELS.put(dataModel.getName(), dataModel);
      logger.info("Synchronized a new Delete Data file [{}] from location: {}", dataModel.getName(), dataModel.getLocation());
    } else {
      DataStructureDataDeleteModel existing = dataStructuresCoreService.getDelete(dataModel.getLocation());
      if (!dataModel.equals(existing)) {
        dataStructuresCoreService.updateDelete(dataModel.getLocation(), dataModel.getName(), dataModel.getHash());
        DATA_STRUCTURE_DELETE_MODELS.put(dataModel.getName(), dataModel);
        logger.info("Synchronized a modified Delete Data file [{}] from location: {}", dataModel.getName(), dataModel.getLocation());
      }
    }
    DELETE_SYNCHRONIZED.add(dataModel.getLocation());
  } catch (DataStructuresException e) {
    throw new SynchronizationException(e);
  }
}
origin: org.eclipse.dirigible/dirigible-database-data-structures

/**
 * Synchronize replace.
 *
 * @param dataModel
 *            the data model
 * @throws SynchronizationException
 *             the synchronization exception
 */
private void synchronizeReplace(DataStructureDataReplaceModel dataModel) throws SynchronizationException {
  try {
    if (!dataStructuresCoreService.existsReplace(dataModel.getLocation())) {
      dataStructuresCoreService.createReplace(dataModel.getLocation(), dataModel.getName(), dataModel.getHash());
      DATA_STRUCTURE_REPLACE_MODELS.put(dataModel.getName(), dataModel);
      logger.info("Synchronized a new Replace Data file [{}] from location: {}", dataModel.getName(), dataModel.getLocation());
    } else {
      DataStructureDataReplaceModel existing = dataStructuresCoreService.getReplace(dataModel.getLocation());
      if (!dataModel.equals(existing)) {
        dataStructuresCoreService.updateReplace(dataModel.getLocation(), dataModel.getName(), dataModel.getHash());
        DATA_STRUCTURE_REPLACE_MODELS.put(dataModel.getName(), dataModel);
        logger.info("Synchronized a modified Replace Data file [{}] from location: {}", dataModel.getName(), dataModel.getLocation());
      }
    }
    REPLACE_SYNCHRONIZED.add(dataModel.getLocation());
  } catch (DataStructuresException e) {
    throw new SynchronizationException(e);
  }
}
origin: org.eclipse.dirigible/dirigible-database-data-structures

/**
 * Synchronize update.
 *
 * @param dataModel
 *            the data model
 * @throws SynchronizationException
 *             the synchronization exception
 */
private void synchronizeUpdate(DataStructureDataUpdateModel dataModel) throws SynchronizationException {
  try {
    if (!dataStructuresCoreService.existsUpdate(dataModel.getLocation())) {
      dataStructuresCoreService.createUpdate(dataModel.getLocation(), dataModel.getName(), dataModel.getHash());
      DATA_STRUCTURE_UPDATE_MODELS.put(dataModel.getName(), dataModel);
      logger.info("Synchronized a new Update Data file [{}] from location: {}", dataModel.getName(), dataModel.getLocation());
    } else {
      DataStructureDataUpdateModel existing = dataStructuresCoreService.getUpdate(dataModel.getLocation());
      if (!dataModel.equals(existing)) {
        dataStructuresCoreService.updateUpdate(dataModel.getLocation(), dataModel.getName(), dataModel.getHash());
        DATA_STRUCTURE_UPDATE_MODELS.put(dataModel.getName(), dataModel);
        logger.info("Synchronized a modified Update Data file [{}] from location: {}", dataModel.getName(), dataModel.getLocation());
      }
    }
    UPDATE_SYNCHRONIZED.add(dataModel.getLocation());
  } catch (DataStructuresException e) {
    throw new SynchronizationException(e);
  }
}

origin: org.eclipse.dirigible/dirigible-database-data-structures

if (!dataStructuresCoreService.existsTable(tableModel.getLocation())) {
  DataStructureTableModel duplicated = dataStructuresCoreService.getTableByName(tableModel.getName());
  if (duplicated != null) {
    throw new SynchronizationException(
            tableModel.getLocation(), duplicated.getLocation()));
  dataStructuresCoreService.createTable(tableModel.getLocation(), tableModel.getName(), tableModel.getHash());
  DATA_STRUCTURE_MODELS.put(tableModel.getName(), tableModel);
  logger.info("Synchronized a new Table [{}] from location: {}", tableModel.getName(), tableModel.getLocation());
} else {
  DataStructureTableModel existing = dataStructuresCoreService.getTable(tableModel.getLocation());
  if (!tableModel.equals(existing)) {
    dataStructuresCoreService.updateTable(tableModel.getLocation(), tableModel.getName(), tableModel.getHash());
    DATA_STRUCTURE_MODELS.put(tableModel.getName(), tableModel);
    logger.info("Synchronized a modified Table [{}] from location: {}", tableModel.getName(), tableModel.getLocation());
origin: org.eclipse.dirigible/dirigible-database-data-structures

if (!dataStructuresCoreService.existsView(viewModel.getLocation())) {
  DataStructureViewModel duplicated = dataStructuresCoreService.getViewByName(viewModel.getName());
  if (duplicated != null) {
    throw new SynchronizationException(
            viewModel.getLocation(), duplicated.getLocation()));
  dataStructuresCoreService.createView(viewModel.getLocation(), viewModel.getName(), viewModel.getHash());
  DATA_STRUCTURE_MODELS.put(viewModel.getName(), viewModel);
  logger.info("Synchronized a new View [{}] from location: {}", viewModel.getName(), viewModel.getLocation());
} else {
  DataStructureViewModel existing = dataStructuresCoreService.getView(viewModel.getLocation());
  if (!viewModel.equals(existing)) {
    dataStructuresCoreService.updateView(viewModel.getLocation(), viewModel.getName(), viewModel.getHash());
    DATA_STRUCTURE_MODELS.put(viewModel.getName(), viewModel);
    logger.info("Synchronized a modified View [{}] from location: {}", viewModel.getName(), viewModel.getLocation());
origin: org.eclipse.dirigible/dirigible-database-data-structures

/**
 * Synchronize schema.
 *
 * @param schemaModel
 *            the schema model
 * @throws SynchronizationException
 *             the synchronization exception
 */
private void synchronizeSchema(DataStructureSchemaModel schemaModel) throws SynchronizationException {
  try {
    if (!dataStructuresCoreService.existsSchema(schemaModel.getLocation())) {
      dataStructuresCoreService.createSchema(schemaModel.getLocation(), schemaModel.getName(), schemaModel.getHash());
      DATA_STRUCTURE_SCHEMA_MODELS.put(schemaModel.getName(), schemaModel);
      addDataStructureModelsFromSchema(schemaModel);
      logger.info("Synchronized a new Schema file [{}] from location: {}", schemaModel.getName(), schemaModel.getLocation());
    } else {
      DataStructureSchemaModel existing = dataStructuresCoreService.getSchema(schemaModel.getLocation());
      if (!schemaModel.equals(existing)) {
        dataStructuresCoreService.updateSchema(schemaModel.getLocation(), schemaModel.getName(), schemaModel.getHash());
        DATA_STRUCTURE_SCHEMA_MODELS.put(schemaModel.getName(), schemaModel);
        addDataStructureModelsFromSchema(schemaModel);
        logger.info("Synchronized a modified Schema file [{}] from location: {}", schemaModel.getName(), schemaModel.getLocation());
      }
    }
    SCHEMA_SYNCHRONIZED.add(schemaModel.getLocation());
  } catch (DataStructuresException e) {
    throw new SynchronizationException(e);
  }
}
org.eclipse.dirigible.database.ds.serviceDataStructuresCoreService

Javadoc

The Data Structure Core Service.

Most used methods

  • createAppend
  • createDelete
  • createReplace
  • createSchema
  • createTable
  • createUpdate
  • createView
  • existsAppend
  • existsDelete
  • existsReplace
  • existsSchema
  • existsTable
  • existsSchema,
  • existsTable,
  • existsUpdate,
  • existsView,
  • getAppend,
  • getAppends,
  • getDataStructures,
  • getDelete,
  • getDeletes,
  • getReplace

Popular in Java

  • Updating database using SQL prepared statement
  • setContentView (Activity)
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now