ElementFactory factory = new ElementFactory( designHandle.module );
ElementFactory factory = new ElementFactory( design );
	public void testSortAndFilterHandle( ) throws SemanticException	{		createDesign( );		ElementFactory factory = new ElementFactory( designHandle.module );		TableHandle tableHandle = factory.newTableItem( "table 1" ); //$NON-NLS-1$		PropertyHandle propHandle = tableHandle				.getPropertyHandle( ListingElement.SORT_PROP );		SortKey sortKey = StructureFactory.createSortKey( );		sortKey.setKey( "expression" ); //$NON-NLS-1$		propHandle.addItem( sortKey );		Iterator iter = propHandle.iterator( );		SortKeyHandle sortHandle = (SortKeyHandle) iter.next( );		sortHandle.setKey( "new column" ); //$NON-NLS-1$		sortHandle.setDirection( DesignChoiceConstants.SORT_DIRECTION_DESC );		assertEquals( "new column", sortHandle.getKey( ) ); //$NON-NLS-1$		assertEquals( DesignChoiceConstants.SORT_DIRECTION_DESC, sortHandle				.getDirection( ) );		propHandle = tableHandle.getPropertyHandle( ListingElement.FILTER_PROP );		FilterCondition filter = StructureFactory.createFilterCond( );		filter.setExpr( "expression" ); //$NON-NLS-1$		filter.setOperator( DesignChoiceConstants.MAP_OPERATOR_BETWEEN );		propHandle.addItem( filter );		iter = propHandle.iterator( );		FilterConditionHandle filterHandle = (FilterConditionHandle) iter				.next( );		filterHandle.setExpr( "new expression" ); //$NON-NLS-1$		filterHandle.setOperator( DesignChoiceConstants.FILTER_OPERATOR_FALSE );		filterHandle.setValue1( "new value 1" ); //$NON-NLS-1$		filterHandle.setValue2( "new value 2" ); //$NON-NLS-1$		assertEquals( "new expression", filterHandle.getExpr( ) ); //$NON-NLS-1$		assertEquals( DesignChoiceConstants.FILTER_OPERATOR_FALSE, filterHandle				.getOperator( ) );		assertEquals( "new value 1", filterHandle.getValue1( ) ); //$NON-NLS-1$		assertEquals( "new value 2", filterHandle.getValue2( ) ); //$NON-NLS-1$		filterHandle				.setOperator( DesignChoiceConstants.FILTER_OPERATOR_BETWEEN );		assertEquals( "new value 1", filterHandle.getValue1( ) ); //$NON-NLS-1$		assertEquals( "new value 2", filterHandle.getValue2( ) ); //$NON-NLS-1$		filterHandle.setOperator( DesignChoiceConstants.FILTER_OPERATOR_EQ );		assertEquals( "new value 1", filterHandle.getValue1( ) ); //$NON-NLS-1$		assertNull( filterHandle.getValue2( ) );		filterHandle.setOperator( DesignChoiceConstants.FILTER_OPERATOR_FALSE );		assertNull( filterHandle.getValue1( ) );		assertNull( filterHandle.getValue2( ) );	}