KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > compiere > model > X_AD_Color


1 /** Generated Model - DO NOT CHANGE - Copyright (C) 1999-2003 Jorg Janke **/
2 package org.compiere.model;
3 import java.util.*;
4 import java.sql.*;
5 import java.math.*;
6 import java.io.Serializable JavaDoc;
7 import org.compiere.util.*;
8 /** Generated Model for AD_Color
9  ** @version $Id: X_AD_Color.java,v 1.27 2003/10/31 05:30:53 jjanke Exp $ **/

10 public class X_AD_Color extends PO
11 {
12 /** Standard Constructor **/
13 public X_AD_Color (Properties ctx, int AD_Color_ID)
14 {
15 super (ctx, AD_Color_ID);
16 /** if (AD_Color_ID == 0)
17 {
18 setAD_Color_ID (0);
19 setAlpha (0);
20 setBlue (0);
21 setColorType (null);
22 setGreen (0);
23 setImageAlpha (Env.ZERO);
24 setIsDefault (false);
25 setName (null);
26 setRed (0);
27 }
28  **/

29 }
30 /** Load Constructor **/
31 public X_AD_Color (Properties ctx, ResultSet rs)
32 {
33 super (ctx, rs);
34 }
35 /** Load Meta Data **/
36 protected POInfo initPO (Properties ctx)
37 {
38 int AD_Table_ID = 457;
39 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
40 return poi;
41 }
42 public String JavaDoc toString()
43 {
44 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_AD_Color[").append(getID()).append("]");
45 return sb.toString();
46 }
47 void setAD_Color_ID (int AD_Color_ID)
48 {
49 setValueNoCheck ("AD_Color_ID", new Integer JavaDoc(AD_Color_ID));
50 }
51 public int getAD_Color_ID()
52 {
53 Integer JavaDoc ii = (Integer JavaDoc)getValue("AD_Color_ID");
54 if (ii == null) return 0;
55 return ii.intValue();
56 }
57 public void setAD_Image_ID (int AD_Image_ID)
58 {
59 if (AD_Image_ID == 0) setValue ("AD_Image_ID", null);
60  else
61 setValue ("AD_Image_ID", new Integer JavaDoc(AD_Image_ID));
62 }
63 public int getAD_Image_ID()
64 {
65 Integer JavaDoc ii = (Integer JavaDoc)getValue("AD_Image_ID");
66 if (ii == null) return 0;
67 return ii.intValue();
68 }
69 public void setAlpha (int Alpha)
70 {
71 setValue ("Alpha", new Integer JavaDoc(Alpha));
72 }
73 public int getAlpha()
74 {
75 Integer JavaDoc ii = (Integer JavaDoc)getValue("Alpha");
76 if (ii == null) return 0;
77 return ii.intValue();
78 }
79 public void setAlpha_1 (int Alpha_1)
80 {
81 setValue ("Alpha_1", new Integer JavaDoc(Alpha_1));
82 }
83 public int getAlpha_1()
84 {
85 Integer JavaDoc ii = (Integer JavaDoc)getValue("Alpha_1");
86 if (ii == null) return 0;
87 return ii.intValue();
88 }
89 public void setBlue (int Blue)
90 {
91 setValue ("Blue", new Integer JavaDoc(Blue));
92 }
93 public int getBlue()
94 {
95 Integer JavaDoc ii = (Integer JavaDoc)getValue("Blue");
96 if (ii == null) return 0;
97 return ii.intValue();
98 }
99 public void setBlue_1 (int Blue_1)
100 {
101 setValue ("Blue_1", new Integer JavaDoc(Blue_1));
102 }
103 public int getBlue_1()
104 {
105 Integer JavaDoc ii = (Integer JavaDoc)getValue("Blue_1");
106 if (ii == null) return 0;
107 return ii.intValue();
108 }
109 public static final String JavaDoc COLORTYPE_NormalFlat = "F";
110 public static final String JavaDoc COLORTYPE_Gradient = "G";
111 public static final String JavaDoc COLORTYPE_Line = "L";
112 public static final String JavaDoc COLORTYPE_TexturePicture = "T";
113 public void setColorType (Object JavaDoc ColorType)
114 {
115 if (ColorType.equals("F") || ColorType.equals("G") || ColorType.equals("L") || ColorType.equals("T"));
116  else throw new IllegalArgumentException JavaDoc ("ColorType Invalid value - Reference_ID=243 - F - G - L - T");
117 if (ColorType == null) throw new IllegalArgumentException JavaDoc ("ColorType is mandatory");
118 setValue ("ColorType", ColorType);
119 }
120 public Object JavaDoc getColorType()
121 {
122 return getValue("ColorType");
123 }
124 public void setGreen (int Green)
125 {
126 setValue ("Green", new Integer JavaDoc(Green));
127 }
128 public int getGreen()
129 {
130 Integer JavaDoc ii = (Integer JavaDoc)getValue("Green");
131 if (ii == null) return 0;
132 return ii.intValue();
133 }
134 public void setGreen_1 (int Green_1)
135 {
136 setValue ("Green_1", new Integer JavaDoc(Green_1));
137 }
138 public int getGreen_1()
139 {
140 Integer JavaDoc ii = (Integer JavaDoc)getValue("Green_1");
141 if (ii == null) return 0;
142 return ii.intValue();
143 }
144 public void setImageAlpha (BigDecimal ImageAlpha)
145 {
146 if (ImageAlpha == null) throw new IllegalArgumentException JavaDoc ("ImageAlpha is mandatory");
147 setValue ("ImageAlpha", ImageAlpha);
148 }
149 public BigDecimal getImageAlpha()
150 {
151 BigDecimal bd = (BigDecimal)getValue("ImageAlpha");
152 if (bd == null) return Env.ZERO;
153 return bd;
154 }
155 public void setIsDefault (boolean IsDefault)
156 {
157 setValue ("IsDefault", new Boolean JavaDoc(IsDefault));
158 }
159 public boolean isDefault()
160 {
161 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsDefault");
162 if (bb != null) return bb.booleanValue();
163 return false;
164 }
165 public void setLineDistance (int LineDistance)
166 {
167 setValue ("LineDistance", new Integer JavaDoc(LineDistance));
168 }
169 public int getLineDistance()
170 {
171 Integer JavaDoc ii = (Integer JavaDoc)getValue("LineDistance");
172 if (ii == null) return 0;
173 return ii.intValue();
174 }
175 public void setLineWidth (int LineWidth)
176 {
177 setValue ("LineWidth", new Integer JavaDoc(LineWidth));
178 }
179 public int getLineWidth()
180 {
181 Integer JavaDoc ii = (Integer JavaDoc)getValue("LineWidth");
182 if (ii == null) return 0;
183 return ii.intValue();
184 }
185 public void setName (String JavaDoc Name)
186 {
187 if (Name == null) throw new IllegalArgumentException JavaDoc ("Name is mandatory");
188 setValue ("Name", Name);
189 }
190 public String JavaDoc getName()
191 {
192 return (String JavaDoc)getValue("Name");
193 }
194 public void setRed (int Red)
195 {
196 setValue ("Red", new Integer JavaDoc(Red));
197 }
198 public int getRed()
199 {
200 Integer JavaDoc ii = (Integer JavaDoc)getValue("Red");
201 if (ii == null) return 0;
202 return ii.intValue();
203 }
204 public void setRed_1 (int Red_1)
205 {
206 setValue ("Red_1", new Integer JavaDoc(Red_1));
207 }
208 public int getRed_1()
209 {
210 Integer JavaDoc ii = (Integer JavaDoc)getValue("Red_1");
211 if (ii == null) return 0;
212 return ii.intValue();
213 }
214 public void setRepeatDistance (int RepeatDistance)
215 {
216 setValue ("RepeatDistance", new Integer JavaDoc(RepeatDistance));
217 }
218 public int getRepeatDistance()
219 {
220 Integer JavaDoc ii = (Integer JavaDoc)getValue("RepeatDistance");
221 if (ii == null) return 0;
222 return ii.intValue();
223 }
224 public static final String JavaDoc STARTPOINT_North = "1";
225 public static final String JavaDoc STARTPOINT_NorthEast = "2";
226 public static final String JavaDoc STARTPOINT_East = "3";
227 public static final String JavaDoc STARTPOINT_SouthEast = "4";
228 public static final String JavaDoc STARTPOINT_South = "5";
229 public static final String JavaDoc STARTPOINT_SouthWest = "6";
230 public static final String JavaDoc STARTPOINT_West = "7";
231 public static final String JavaDoc STARTPOINT_NorthWest = "8";
232 public void setStartPoint (String JavaDoc StartPoint)
233 {
234 if (StartPoint.equals("1") || StartPoint.equals("2") || StartPoint.equals("3") || StartPoint.equals("4") || StartPoint.equals("5") || StartPoint.equals("6") || StartPoint.equals("7") || StartPoint.equals("8"));
235  else throw new IllegalArgumentException JavaDoc ("StartPoint Invalid value - Reference_ID=248 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8");
236 setValue ("StartPoint", StartPoint);
237 }
238 public String JavaDoc getStartPoint()
239 {
240 return (String JavaDoc)getValue("StartPoint");
241 }
242 }
243
Popular Tags