Package net.officefloor.model
Class RemoveConnectionsAction<M extends Model>
- java.lang.Object
-
- net.officefloor.model.RemoveConnectionsAction<M>
-
public class RemoveConnectionsAction<M extends Model> extends java.lang.Object
Action containing the details of a delete.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REMOVE_CONNECTIONS_METHOD_NAME
Method name on the models to remove the connections.
-
Constructor Summary
Constructors Constructor Description RemoveConnectionsAction(M model)
Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R extends Model>
voidaddCascadeModel(RemoveConnectionsAction<R> child)
Adds a cascadeModel
.<C extends ConnectionModel>
voiddisconnect(java.util.Collection<C> connectionModels)
Removes theConnectionModel
instances within the inputCollection
.void
disconnect(ConnectionModel connectionModel)
Removes theConnectionModel
and holds reference to it for undo action.M
getModel()
Obtains theModel
for whichConnectionModel
instances are being removed.void
reconnect()
Reconnects all theConnectionModel
instances.
-
-
-
Field Detail
-
REMOVE_CONNECTIONS_METHOD_NAME
public static final java.lang.String REMOVE_CONNECTIONS_METHOD_NAME
Method name on the models to remove the connections.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RemoveConnectionsAction
public RemoveConnectionsAction(M model)
Initiate.- Parameters:
model
-Model
for whichConnectionModel
instances are being removed.
-
-
Method Detail
-
getModel
public M getModel()
Obtains theModel
for whichConnectionModel
instances are being removed.- Returns:
Model
for whichConnectionModel
instances are being removed.
-
disconnect
public void disconnect(ConnectionModel connectionModel)
Removes theConnectionModel
and holds reference to it for undo action.- Parameters:
connectionModel
-ConnectionModel
and may benull
for easier coding.
-
disconnect
public <C extends ConnectionModel> void disconnect(java.util.Collection<C> connectionModels)
Removes theConnectionModel
instances within the inputCollection
.- Type Parameters:
C
-ConnectionModel
type.- Parameters:
connectionModels
-ConnectionModel
instances.
-
addCascadeModel
public <R extends Model> void addCascadeModel(RemoveConnectionsAction<R> child)
- Type Parameters:
R
- Model type.- Parameters:
child
- CascadeModel
.
-
reconnect
public void reconnect()
Reconnects all theConnectionModel
instances.
-
-