Tabnine Logo
BatchWritingMechanism
Code IndexAdd Tabnine to your IDE (free)

How to use
BatchWritingMechanism
in
org.eclipse.persistence.internal.databaseaccess

Best Java code snippets using org.eclipse.persistence.internal.databaseaccess.BatchWritingMechanism (Showing top 20 results out of 315)

origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Swaps out the Mechanism for the other Mechanism
 */
protected void switchMechanisms(AbstractSession session, DatabaseCall dbCall) {
  this.databaseAccessor.setActiveBatchWritingMechanismToDynamicSQL();
  this.databaseAccessor.getActiveBatchWritingMechanism(session).appendCall(session, dbCall);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Rollback a transaction on the database. This means toggling the auto-commit option.
 */
@Override
public void rollbackTransaction(AbstractSession session) throws DatabaseException {
  getActiveBatchWritingMechanism(session).clear();
  super.rollbackTransaction(session);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

  /**
   * This method will be called after a series of writes have been issued to
   * mark where a particular set of writes has completed.  It will be called
   * from commitTransaction and may be called from writeChanges.   Its main
   * purpose is to ensure that the batched statements have been executed
   */
  @Override
  public void writesCompleted(AbstractSession session) {
    if (isConnected && isInBatchWritingMode(session)) {
      getActiveBatchWritingMechanism(session).executeBatchedStatements(session);
    }
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * This method is used internally to return the active batch writing mechanism to batch the statement
 */
public BatchWritingMechanism getActiveBatchWritingMechanism(AbstractSession session) {
  if (this.activeBatchWritingMechanism == null) {
    // If the platform defines a custom mechanism, then use it.
    if (((DatabasePlatform)this.platform).getBatchWritingMechanism() != null) {
      this.activeBatchWritingMechanism = ((DatabasePlatform)this.platform).getBatchWritingMechanism().clone();
      this.activeBatchWritingMechanism.setAccessor(this, session);
    } else {
      this.activeBatchWritingMechanism = getParameterizedMechanism();
    }
  }
  return this.activeBatchWritingMechanism;
}
origin: com.haulmont.thirdparty/eclipselink

getActiveBatchWritingMechanism(session).appendCall(session, dbCall);
getActiveBatchWritingMechanism(session).executeBatchedStatements(session);
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Clone the accessor.
 */
@Override
public Object clone() {
  DatabaseAccessor accessor = (DatabaseAccessor)super.clone();
  accessor.dynamicSQLMechanism = null;
  if (this.activeBatchWritingMechanism != null) {
    accessor.activeBatchWritingMechanism = this.activeBatchWritingMechanism.clone();
  }
  accessor.parameterizedMechanism = null;
  accessor.statementCache = null;
  return accessor;
}
origin: com.haulmont.thirdparty/eclipselink

getPlatform().getBatchWritingMechanism().initialize(this);
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

&& (!dbCall.shouldBuildOutputRow()) && (getPlatform().usesJDBCBatchWriting() || (!dbCall.hasParameters())) && (!dbCall.isLOBLocatorNeeded())) {
getActiveBatchWritingMechanism().appendCall(session, dbCall);
getActiveBatchWritingMechanism().executeBatchedStatements(session);
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * This method is used internally to return the active batch writing mechanism to batch the statement
 */
public BatchWritingMechanism getActiveBatchWritingMechanism(AbstractSession session) {
  if (this.activeBatchWritingMechanism == null) {
    // If the platform defines a custom mechanism, then use it.
    if (((DatabasePlatform)this.platform).getBatchWritingMechanism() != null) {
      this.activeBatchWritingMechanism = ((DatabasePlatform)this.platform).getBatchWritingMechanism().clone();
      this.activeBatchWritingMechanism.setAccessor(this, session);
    } else {
      this.activeBatchWritingMechanism = getParameterizedMechanism();
    }
  }
  return this.activeBatchWritingMechanism;
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Clone the accessor.
 */
@Override
public Object clone() {
  DatabaseAccessor accessor = (DatabaseAccessor)super.clone();
  accessor.dynamicSQLMechanism = null;
  if (this.activeBatchWritingMechanism != null) {
    accessor.activeBatchWritingMechanism = this.activeBatchWritingMechanism.clone();
  }
  accessor.parameterizedMechanism = null;
  accessor.statementCache = null;
  return accessor;
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

getPlatform().getBatchWritingMechanism().initialize(this);
origin: org.eclipse.persistence/org.eclipse.persistence.core

getActiveBatchWritingMechanism(session).appendCall(session, dbCall);
getActiveBatchWritingMechanism(session).executeBatchedStatements(session);
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * This method is used to switch from this mechanism to the alternate automatically
 */
protected void switchMechanisms(AbstractSession session, DatabaseCall dbCall) {
  this.databaseAccessor.setActiveBatchWritingMechanismToParameterizedSQL();
  this.databaseAccessor.getActiveBatchWritingMechanism(session).appendCall(session, dbCall);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * This method will be called after a series of writes have been issued to
 * mark where a particular set of writes has completed.  It will be called
 * from commitTransaction and may be called from writeChanges.   Its main
 * purpose is to ensure that the batched statements have been executed
 */
public void writesCompleted(AbstractSession session) {
  if (isConnected && isInBatchWritingMode(session)) {
    getActiveBatchWritingMechanism(session).executeBatchedStatements(session);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Rollback a transaction on the database. This means toggling the auto-commit option.
 */
public void rollbackTransaction(AbstractSession session) throws DatabaseException {
  getActiveBatchWritingMechanism().clear();
  super.rollbackTransaction(session);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Swaps out the Mechanism for the other Mechanism
 */
protected void switchMechanisms(AbstractSession session, DatabaseCall dbCall) {
  this.databaseAccessor.setActiveBatchWritingMechanismToDynamicSQL();
  this.databaseAccessor.getActiveBatchWritingMechanism(session).appendCall(session, dbCall);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  /**
   * This method will be called after a series of writes have been issued to
   * mark where a particular set of writes has completed.  It will be called
   * from commitTransaction and may be called from writeChanges.   Its main
   * purpose is to ensure that the batched statements have been executed
   */
  public void writesCompleted(AbstractSession session) {
    if (isInBatchWritingMode(session)) {
      getActiveBatchWritingMechanism().executeBatchedStatements(session);
    }
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Rollback a transaction on the database. This means toggling the auto-commit option.
 */
public void rollbackTransaction(AbstractSession session) throws DatabaseException {
  getActiveBatchWritingMechanism(session).clear();
  super.rollbackTransaction(session);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * This method is used to switch from this mechanism to the alternate automatically
 */
protected void switchMechanisms(AbstractSession session, DatabaseCall dbCall) {
  this.databaseAccessor.setActiveBatchWritingMechanismToParameterizedSQL();
  this.databaseAccessor.getActiveBatchWritingMechanism().appendCall(session, dbCall);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Swaps out the Mechanism for the other Mechanism
 */
protected void switchMechanisms(AbstractSession session, DatabaseCall dbCall) {
  this.databaseAccessor.setActiveBatchWritingMechanismToDynamicSQL();
  this.databaseAccessor.getActiveBatchWritingMechanism().appendCall(session, dbCall);
}
org.eclipse.persistence.internal.databaseaccessBatchWritingMechanism

Javadoc

INTERNAL: BatchWritingMechanism is a private interface, used by the DatabaseAccessor. it provides the required behavior for batching statements, for write.

There are currently two types of the Mechanism implemented, one to handle the tradition dynamic SQL batching and another to handle Parameterized SQL. Depending on what is passed to these mechanisms they may decide to switch the current one out to the alternative type.

In bug# 214910 this interface was switched to an abstract class

Most used methods

  • appendCall
    INTERNAL: This method is called by the DatabaseAccessor to add this statement to the list of stateme
  • clear
    INTERNAL: This method is used to clear the batched statements without the need to execute the statem
  • executeBatchedStatements
    INTERNAL: This method is used by the DatabaseAccessor to clear the batched statements in the case th
  • clone
    INTERNAL: The mechanism will be cloned to be set into each accessor.
  • initialize
    INTERNAL: Allow initialization with the session after login.
  • setAccessor
    INTERNAL: Sets the accessor that this mechanism will use

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • compareTo (BigDecimal)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now