internal VertexType(TypeId aTypeId, string aTypeName, VertexType baseType, Graph graph) { this.graph = graph; this.baseType = baseType; subType = new VelocityDbList<VertexType>(); if (baseType != null) baseType.subType.Add(this); typeId = (TypeId)aTypeId; typeName = aTypeName; vertecis = new VelocityDbList<Range<VertexId>>(); stringToPropertyType = new BTreeMap<string, PropertyType>(null, graph.Session); edgeTypes = new BTreeSet<EdgeType>(null, graph.Session); tailToHeadEdges = new BTreeMap<EdgeType, BTreeMap<VertexType, BTreeMap<VertexId, BTreeSet<EdgeIdVertexId>>>>(null, graph.Session); headToTailEdges = new BTreeMap<EdgeType, BTreeMap<VertexType, BTreeMap<VertexId, BTreeSet<EdgeIdVertexId>>>>(null, graph.Session); }
internal VertexType(TypeId aTypeId, string aTypeName, VertexType baseType, Graph graph) { m_graph = new WeakIOptimizedPersistableReference<Graph>(graph); m_baseType = baseType; m_subTypes = new List<VertexType>(); if (baseType != null) { baseType.Update(); baseType.m_subTypes.Add(this); } m_typeId = (TypeId)aTypeId; m_typeName = aTypeName; var vertices = new VelocityDbList<Range<VertexId>>(); graph.Session.Persist(vertices); m_vertices = new WeakIOptimizedPersistableReference<VelocityDbList<Range<VertexId>>>(vertices); m_stringToPropertyType = new BTreeMap<string, PropertyType>(null, graph.Session); m_edgeTypes = new BTreeSet<EdgeType>(null, graph.Session); m_tailToHeadEdges = new BTreeMap<EdgeType, BTreeMap<VertexType, BTreeMap<VertexId, BTreeSet<EdgeIdVertexId>>>>(null, graph.Session); m_headToTailEdges = new BTreeMap<EdgeType, BTreeMap<VertexType, BTreeMap<VertexId, BTreeSet<EdgeIdVertexId>>>>(null, graph.Session); graph.Session.Persist(this); }