-
Notifications
You must be signed in to change notification settings - Fork 4
DBObjectFactory
Paul Lefebvre edited this page Aug 29, 2014
·
4 revisions
The DBObjectFactory is used by the framework to instantiate classes for you. In particular it is used by the GetAll method. In your application initialization you will want to add each of your DBObject subclasses to the factory.
Use this method to add a class to the Factory. The dbo parameter must be a non-Nil class instance:
Dim t As New Team
Storm.DBObject.Factory.AddClassToMap(t)
Use this method to add a class to the Factory:
Storm.DBObject.Factory.AddClassToMap(GetTypeInfo(Team))
Creates a new instance of a class by supplying the class name as a string and the primary key as an integer:
Dim dbo As Storm.DBObject
dbo = DBObject.Factory.CreateNewInstance(“team”, 1)