示例#1
0
  /**
   * Flushes the associations.
   *
   * @param connection the connection
   * @param removals true if the removals should be flushed and false for the additions
   * @param force true to force, effective only for insertions and for new entities.
   * @throws SQLException thrown if there is an underlying SQL Exception
   * @since 2.0.0
   */
  public void flushAssociations(Connection connection, boolean removals, boolean force)
      throws SQLException {
    if (!removals || (this.status != Status.NEW)) {
      ManagedInstance.LOG.debug("Flushing associations for instance {0}", this);

      for (final JoinedMapping<?, ?, ?> collection : this.type.getMappingsJoined()) {
        collection.flush(connection, this, removals, force);
      }
    }
  }
示例#2
0
 /**
  * Sets the association as loaded.
  *
  * @param mapping the association
  * @since 2.0.0
  */
 public void setJoinLoaded(JoinedMapping<?, ?, ?> mapping) {
   this.joinsLoaded.add(mapping.getPath());
 }