" *****************************************************************************************************
*
*  orb2.txt
*
*   This examples shows how to use an orb to retrieve types using search values
*
*
******************************************************************************************************"


| aModel aTextDisplay anOrb courses algebra|
aTextDisplay := TextWindow  windowLabeled: 'LPC Brokers - retrieving a type by search values'
                           frame: (0 @ 0 corner: 500 @ 500).
aTextDisplay cr. 
 
aModel := LPCModel getName: #LpcSample.
courseType :=aModel typeNamed: #Course.

anOrb := LPCObjectRequestBroker new.
anOrb driverConnectWindow: aTextDisplay.
courses := anOrb lookUpList: #( 'hours' 'credit') withValue: #( 2 1.0)  withType: courseType.
courses do: [ :course | aTextDisplay nextPutAll: course asString ; cr ].
 
anOrb disconnect.
 
