Interface MTCompleteEdge

All Superinterfaces:
Comparable<MTNamedObject>, MTEdge, MTEdgeHeader, MTHistoryEnabled, MTNamedObject

public interface MTCompleteEdge extends MTEdge
Part of a MTCompleteModel, which can be obtained by calling loadCompleteModel() on a MTModelHeader. Note that the interface extends MTEdge and that using the "find" methods in this interface will still access the database.
  • Method Details

    • getModel

      MTCompleteModel getModel()
    • getFrom

      MTCompleteVertex getFrom()
      Description copied from interface: MTEdge
      Retruns the vertex that starts the edge.
      Specified by:
      getFrom in interface MTEdge
      Returns:
      The edge's start vertex.
    • getTo

      Description copied from interface: MTEdge
      Returns the vertex that ends the edge.
      Specified by:
      getTo in interface MTEdge
      Returns:
      The edge's end vertex.
    • copy

      Copies this edge and returns the result. The copy will have it's model reference set to the model parameter.

      The resulting copy will be added to the model parameter. The sent in from and to parameters will be set as this edges from and to respectively.

      NOTE: This method will not persist the edge to storage. The returned value must be saved in a separate call. Implementations that create other persistable entities must however make sure that these are persisted asynchronously or persisted by the next call to #save(). Callers must thus always persist the returned value by calling save on the returned value, but should never have to figure out what other possible things that might need a #save(). NOTE: The copy will be a new, unique, copy of this edge. It will not have the same identity in storage (new id, new uuid). This means that the returned value will NOT be equal to this. It is thus NOT a clone.
      Parameters:
      model - The model that the copy should be a part of. May be the same model as this edge's model.
      from - The vertex that the edge should go from.
      to - The vertex that the edge should go to.
      Returns:
      a new unique copy of this edge.
      Throws:
      IllegalArgumentException - if the from and/or to parameters are not part of the model parameter.
      NullPointerException - if any of the parameters are null
    • copy

      MTCompleteEdge copy(MTCompleteModel model, MTCompleteVertex from, MTCompleteVertex to, boolean keepIdentity)
      Copies the edge to another model in the same way as copy(model, from, to), but keeping the identity (UUID) and history of the edge. This should generally only be used for revision management where the same edge exists in different revisions of the model. In all other cases different edges should have different UUID:s.
      Parameters:
      model - A model.
      from - A from vertex.
      to - A to vertex.
      keepIdentity - True to keep identity, false otherwise.
      Returns:
      The copy.
    • queueRemove

      void queueRemove(MTRemoteChangeHandler exceptionHandler)
      Puts this edge up for removal at some future point in time, making this call safe to do from the event dispatch thread.
      Parameters:
      exceptionHandler - an exception handler that is called if an exception is raised during remove, or null to let the saving thread's own exception handler deal with an uncaught (wrapping) runtime exception.
    • remove

      Removes this edge.
      Throws:
      MTAccessException - If an MTAccessException occurs.
      MTRemoteChangeException
      Since:
      3.0