Quintiq file version 2.0
|
#parent: #root
|
Method DeleteEntityFromBroker (
|
String dataSource
|
)
|
{
|
Description: 'Method to remove various objects from the broker.'
|
TextBody:
|
[*
|
//remove units from the broker if derived via DB or excel
|
traverse( this.MPSync(), IOUnit, e,
|
e.IsSoftDeleted()
|
and e.DataSource() = dataSource
|
and ( e.DataSource() <> MPSyncUtility::ID_Source_Message() )
|
)
|
{
|
e.Delete();
|
}
|
//remove stocking points from the broker if derived via DB or excel
|
traverse( this.MPSync(), IOStockingPoint_MP, e,
|
e.IsSoftDeleted()
|
and e.DataSource() = dataSource
|
and ( e.DataSource() <> MPSyncUtility::ID_Source_Message() )
|
)
|
{
|
e.Delete();
|
}
|
//remove sales segment from the broker if derived via DB or excel
|
traverse( this.MPSync(), IOSalesSegment_MP, e,
|
e.IsSoftDeleted()
|
and e.DataSource() = dataSource
|
and ( e.DataSource() <> MPSyncUtility::ID_Source_Message() )
|
)
|
{
|
e.Delete();
|
}
|
//remove groups from the broker if derived via DB or excel
|
traverse( this.MPSync(), IOGroup, e,
|
e.IsSoftDeleted()
|
and e.DataSource() = dataSource
|
and ( e.DataSource() <> MPSyncUtility::ID_Source_Message() )
|
)
|
{
|
e.Delete();
|
}
|
//remove sales level from the broker if derived via DB or excel
|
traverse( this.MPSync(), IOSalesLevel_MP, e,
|
e.IsSoftDeleted()
|
and e.DataSource() = dataSource
|
and ( e.DataSource() <> MPSyncUtility::ID_Source_Message() )
|
)
|
{
|
e.Delete();
|
}
|
*]
|
}
|