[ 1777747 ] PO.set_ValueOfColumn should also accept columnName as param

This commit is contained in:
Heng Sin Low 2007-08-20 16:17:25 +00:00
parent f445ee98c7
commit 266ea6aa25
2 changed files with 27 additions and 0 deletions

View File

@ -816,6 +816,19 @@ public abstract class PO
return set_ValueNoCheckE (ColumnName, value);
} // set_ValueNoCheckE
/**
* Set value of Column
* @param columnName
* @param value
*/
public final void set_ValueOfColumn(String columnName, Object value)
{
int AD_Column_ID = p_info.getAD_Column_ID(columnName);
if (AD_Column_ID > 0)
{
set_ValueOfColumn(AD_Column_ID, value);
}
}
/**
* Set Value of Column

View File

@ -265,6 +265,20 @@ public class POInfo implements Serializable
}
return -1;
} // getColumnIndex
/**
* @param columnName
* @return AD_Column_ID if found, -1 if not found
*/
public int getAD_Column_ID(String columnName)
{
for (int i = 0; i < m_columns.length; i++)
{
if (m_columns[i].ColumnName.equals(columnName))
return m_columns[i].AD_Column_ID;
}
return -1;
}
/**
* Get Column