Package se.conciliate.extensions.store
Interface MTCompleteEdge
- All Superinterfaces:
Comparable<MTNamedObject>
,MTEdge
,MTEdgeHeader
,MTHistoryEnabled
,MTNamedObject
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 Summary
Modifier and TypeMethodDescriptioncopy
(MTCompleteModel model, MTCompleteVertex from, MTCompleteVertex to) Copies this edge and returns the result.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.getFrom()
Retruns the vertex that starts the edge.getModel()
getTo()
Returns the vertex that ends the edge.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.void
remove()
Removes this edge.Methods inherited from interface se.conciliate.extensions.store.MTEdge
getBreakdownUUIDs, getEdgeRouter, getEdgeRouterID, getLabelBounds, getLabelBounds, getLabelColor, getLabelFont, getLanguages, getPath, getUserData, isLabelAlongLine, isVisible, prepareSave, queueSave, removeUserData, reverse, save, setBreakdownUUIDs, setDefaultLabelBounds, setEdgeRouter, setHideArrows, setLabelAlongLine, setLabelBounds, setLabelBounds, setLabelColor, setLabelFont, setStroke, setStrokeColor, setTitle, setTitle, setTranslated, setType, setUserData
Methods inherited from interface se.conciliate.extensions.store.MTEdgeHeader
expand, findBreakdownHeaders, findBreakdowns, getFromSymbolID, getModelID, getRawTitle, getRawTitle, getStroke, getStrokeColor, getToSymbolID, getType, getTypeID, isHideArrows, isTranslated, isTranslated
Methods inherited from interface se.conciliate.extensions.store.MTHistoryEnabled
getHistory, getID, getUUID
Methods inherited from interface se.conciliate.extensions.store.MTNamedObject
compareTo, getID, getParentRevisionID, getTitle, getTitle, getUUID
-
Method Details
-
getModel
MTCompleteModel getModel() -
getFrom
MTCompleteVertex getFrom()Description copied from interface:MTEdge
Retruns the vertex that starts the edge. -
getTo
MTCompleteVertex getTo()Description copied from interface:MTEdge
Returns the vertex that ends the edge. -
copy
MTCompleteEdge copy(MTCompleteModel model, MTCompleteVertex from, MTCompleteVertex to) throws IllegalArgumentException, NullPointerException 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
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
-