com.jgraph.example.adapter
Class JGraphSQLBusinessModel

java.lang.Object
  extended by javax.swing.undo.UndoableEditSupport
      extended by org.jgraph.graph.DefaultGraphModel
          extended by com.jgraph.example.adapter.JGraphAdapterModel
              extended by com.jgraph.example.adapter.JGraphSQLBusinessModel
All Implemented Interfaces:
java.io.Serializable, org.jgraph.graph.GraphModel

public class JGraphSQLBusinessModel
extends JGraphAdapterModel

Allows to set the properties of user objects via the edit method's nested argument. You must add (userObject, Map) pairs to the nested map for each user object's new attributes.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jgraph.example.adapter.JGraphAdapterModel
JGraphAdapterModel.BusinessModelEdit
 
Nested classes/interfaces inherited from class org.jgraph.graph.DefaultGraphModel
org.jgraph.graph.DefaultGraphModel.EmptyIterator, org.jgraph.graph.DefaultGraphModel.GraphModelEdit, org.jgraph.graph.DefaultGraphModel.GraphModelLayerEdit
 
Field Summary
 
Fields inherited from class com.jgraph.example.adapter.JGraphAdapterModel
VERSION
 
Constructor Summary
JGraphSQLBusinessModel()
           
JGraphSQLBusinessModel(java.util.List roots, org.jgraph.graph.AttributeMap attributes)
           
JGraphSQLBusinessModel(java.util.List roots, org.jgraph.graph.AttributeMap attributes, JGraphAdapterBackend backend)
           
 
Method Summary
 void addProperty(java.lang.Object cell, java.lang.Object key, java.lang.Object value)
           
 java.util.Collection findEdges(java.lang.String query, java.lang.Object parent, java.lang.Object source, java.lang.Object target, boolean directed)
           
 java.util.Collection findVertices(java.lang.String query, java.lang.Object parent)
           
 
Methods inherited from class com.jgraph.example.adapter.JGraphAdapterModel
edit, fireAttributesChanged, fireCellRemoved, fireCommit, fireEdgeAdded, fireParentChanged, fireRollback, fireSourceChanged, fireTargetChanged, fireVertexAdded, getBackend, getMapping, getParentUserObject, getSourceVertexUserObject, getTargetVertexUserObject, insert, processInsert, remove, setBackend, valueForCellChanged
 
Methods inherited from class org.jgraph.graph.DefaultGraphModel
acceptsSource, acceptsTarget, addGraphModelListener, beginUpdate, cellsChanged, cloneCell, cloneCell, cloneCells, contains, containsEdgeBetween, edges, edit, endUpdate, execute, getAll, getAttributes, getAttributes, getChild, getChildCount, getConnectionSet, getDescendants, getEdges, getEdges, getEdgesBetween, getGraphModelListeners, getIncomingEdges, getIndexOfChild, getIndexOfRoot, getOpposite, getOutgoingEdges, getParent, getRootAt, getRootCount, getRoots, getRoots, getRoots, getRootsAsCollection, getSource, getSourceVertex, getTarget, getTargetVertex, getTopmostCells, getUpdateLevel, getUserObject, getValue, hasAncestorIn, isEdge, isGroup, isLeaf, isPort, isRemoveEmptyGroups, isVertex, order, removeGraphModelListener, setRemoveEmptyGroups, setSourcePort, setTargetPort, toBack, toFront
 
Methods inherited from class javax.swing.undo.UndoableEditSupport
addUndoableEditListener, getUndoableEditListeners, postEdit, removeUndoableEditListener, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jgraph.graph.GraphModel
addUndoableEditListener, removeUndoableEditListener
 

Constructor Detail

JGraphSQLBusinessModel

public JGraphSQLBusinessModel()

JGraphSQLBusinessModel

public JGraphSQLBusinessModel(java.util.List roots,
                              org.jgraph.graph.AttributeMap attributes)
Parameters:
roots -
attributes -

JGraphSQLBusinessModel

public JGraphSQLBusinessModel(java.util.List roots,
                              org.jgraph.graph.AttributeMap attributes,
                              JGraphAdapterBackend backend)
Parameters:
roots -
attributes -
backend -
Method Detail

addProperty

public void addProperty(java.lang.Object cell,
                        java.lang.Object key,
                        java.lang.Object value)
Overrides:
addProperty in class JGraphAdapterModel

findVertices

public java.util.Collection findVertices(java.lang.String query,
                                         java.lang.Object parent)
                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

findEdges

public java.util.Collection findEdges(java.lang.String query,
                                      java.lang.Object parent,
                                      java.lang.Object source,
                                      java.lang.Object target,
                                      boolean directed)
                               throws java.sql.SQLException
Throws:
java.sql.SQLException