Bug Fix in AD [ 1759181 ] AD_Color.ColorType is defined as Color and must be List

minor fix in DisplayType.java - fix a wrong a comment
This commit is contained in:
Carlos Ruiz 2007-07-23 20:59:48 +00:00
parent 25b50c76e3
commit 8af7b0e003
4 changed files with 31 additions and 8 deletions

View File

@ -42,7 +42,7 @@ super (ctx, AD_Color_ID, trxName);
setAD_Color_ID (0); setAD_Color_ID (0);
setAlpha (0); setAlpha (0);
setBlue (0); setBlue (0);
setColorType (0); setColorType (null);
setGreen (0); setGreen (0);
setImageAlpha (Env.ZERO); setImageAlpha (Env.ZERO);
setIsDefault (false); setIsDefault (false);
@ -205,20 +205,23 @@ public static final String COLORTYPE_Line = "L";
public static final String COLORTYPE_TexturePicture = "T"; public static final String COLORTYPE_TexturePicture = "T";
/** Set Color Type. /** Set Color Type.
@param ColorType Color presentation for this color */ @param ColorType Color presentation for this color */
public void setColorType (int ColorType) public void setColorType (String ColorType)
{ {
if (ColorType == null) throw new IllegalArgumentException ("ColorType is mandatory"); if (ColorType == null) throw new IllegalArgumentException ("ColorType is mandatory");
if (ColorType.equals("F") || ColorType.equals("G") || ColorType.equals("L") || ColorType.equals("T")); if (ColorType.equals("F") || ColorType.equals("G") || ColorType.equals("L") || ColorType.equals("T"));
else throw new IllegalArgumentException ("ColorType Invalid value - " + ColorType + " - Reference_ID=243 - F - G - L - T"); else throw new IllegalArgumentException ("ColorType Invalid value - " + ColorType + " - Reference_ID=243 - F - G - L - T");
set_Value ("ColorType", Integer.valueOf(ColorType)); if (ColorType.length() > 1)
{
log.warning("Length > 1 - truncated");
ColorType = ColorType.substring(0,0);
}
set_Value ("ColorType", ColorType);
} }
/** Get Color Type. /** Get Color Type.
@return Color presentation for this color */ @return Color presentation for this color */
public int getColorType() public String getColorType()
{ {
Integer ii = (Integer)get_Value("ColorType"); return (String)get_Value("ColorType");
if (ii == null) return 0;
return ii.intValue();
} }
/** Column name ColorType */ /** Column name ColorType */
public static final String COLUMNNAME_ColorType = "ColorType"; public static final String COLUMNNAME_ColorType = "ColorType";

View File

@ -85,7 +85,7 @@ public final class DisplayType
public static final int TextLong = 36; public static final int TextLong = 36;
/** Display Type 37 CostPrice */ /** Display Type 37 CostPrice */
public static final int CostPrice = 37; public static final int CostPrice = 37;
/** Display Type 36 File Path */ /** Display Type 38 File Path */
public static final int FilePath = 38; public static final int FilePath = 38;
/** Display Type 39 File Name */ /** Display Type 39 File Name */
public static final int FileName = 39; public static final int FileName = 39;

View File

@ -0,0 +1,10 @@
/*
Fix bug in Application Dictionary
[ 1759181 ] AD_Color.ColorType is defined as Color and must be List
*/
UPDATE AD_COLUMN
SET ad_reference_id = 17
WHERE ad_column_id = 6232 AND ad_reference_id = 27;
COMMIT;

View File

@ -0,0 +1,10 @@
/*
Fix bug in Application Dictionary
[ 1759181 ] AD_Color.ColorType is defined as Color and must be List
*/
UPDATE AD_COLUMN
SET ad_reference_id = 17
WHERE ad_column_id = 6232 AND ad_reference_id = 27;
COMMIT;