Bug 320462 Refactor script data set related pages' codes[29044]
Build Identifier: 20100719 Refactor script functions related codes. Reproducible: Always
UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/dataset/OutputColumnDefnPage.java
* Check the alias names whether is valid. The invalid situation may be the
	 * same name of alias or the same name between column name and alias name.
	 *  
	 */
	private boolean isValid( )
	{
		boolean validate = true;
		String newColumnNameOrAlias;
		if ( columnHints == null )
		{
			columnHints = ( (DataSetHandle) getContainer( ).getModel( ) ).getPropertyHandle( DataSetHandle.COLUMN_HINTS_PROP );
		}
		Iterator iterator1 = columnHints.iterator( );
		for ( int i = 0; iterator1.hasNext( ) && validate; i++ )
		{
			ColumnHintHandle columnHint = (ColumnHintHandle) iterator1.next( );
			newColumnNameOrAlias = columnHint.getAlias( );
			Iterator iterator2 = columnHints.iterator( );
			if ( newColumnNameOrAlias != null
					&& newColumnNameOrAlias.length( ) > 0 )
			{
				for ( int n = 0; iterator2.hasNext( ); n++ )
				{
					ColumnHintHandle columnHint2 = (ColumnHintHandle) iterator2.next( );
					if ( i == n )
						continue;
					if ( ( columnHint2.getColumnName( ) != null && columnHint2.getColumnName( )
							.equals( newColumnNameOrAlias ) )
							|| ( columnHint2.getAlias( ) != null && columnHint2.getAlias( )
									.equals( newColumnNameOrAlias ) ) )