CDAL Object Inheritance
Certain objects in MineMarket inherit from other MineMarket objects. For example, Train, Shipment, Truck and Barge all inherit from the abstract class Despatch. However, there are no corresponding tables for these objects in the database. The class definition for these objects' DataTable attribute uses the name of the base class data table Despatch. CDAL uses the despatch table for all inherited objects and a column called DespatchIDType for the type of despatch.
[DataTable("Despatch")]
[ObjectCategory("Despatching", "Train")]
[LicenseModule(BulkTrakModules.TrainExplorer)]
public sealed class Train : Despatch, IExtendedObject
In the database, there is only one despatch table with multiple despatch types.
select * from Despatch where DespatchIDType like '%Train'
select * from Despatch where DespatchIDType like '%Truck'
select * from Despatch where DespatchIDType like '%Shipment'
select * from Despatch where DespatchIDType like '%Barge'