private static void createSegments(PersistenceManager pm, Trader trader, Order order, SegmentTypeID[] segmentTypeIDs)
{
pm.getExtent(SegmentType.class);
for (int i = 0; i < segmentTypeIDs.length; ++i) {
SegmentTypeID segmentTypeID = segmentTypeIDs[i];
SegmentType segmentType = null;
if (segmentTypeID != null) {
segmentType = (SegmentType) pm.getObjectById(segmentTypeID);
}
trader.createSegment(order, segmentType);