KickJava   Java API By Example, From Geeks To Geeks.

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


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_Val_Rule
9  ** @version $Id: X_AD_Val_Rule.java,v 1.27 2003/10/31 05:30:53 jjanke Exp $ **/

10 public class X_AD_Val_Rule extends PO
11 {
12 /** Standard Constructor **/
13 public X_AD_Val_Rule (Properties ctx, int AD_Val_Rule_ID)
14 {
15 super (ctx, AD_Val_Rule_ID);
16 /** if (AD_Val_Rule_ID == 0)
17 {
18 setAD_Val_Rule_ID (0);
19 setEntityType (null);
20 setName (null);
21 setType (null);
22 }
23  **/

24 }
25 /** Load Constructor **/
26 public X_AD_Val_Rule (Properties ctx, ResultSet rs)
27 {
28 super (ctx, rs);
29 }
30 /** Load Meta Data **/
31 protected POInfo initPO (Properties ctx)
32 {
33 int AD_Table_ID = 108;
34 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
35 return poi;
36 }
37 public String JavaDoc toString()
38 {
39 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_AD_Val_Rule[").append(getID()).append("]");
40 return sb.toString();
41 }
42 void setAD_Val_Rule_ID (int AD_Val_Rule_ID)
43 {
44 setValueNoCheck ("AD_Val_Rule_ID", new Integer JavaDoc(AD_Val_Rule_ID));
45 }
46 public int getAD_Val_Rule_ID()
47 {
48 Integer JavaDoc ii = (Integer JavaDoc)getValue("AD_Val_Rule_ID");
49 if (ii == null) return 0;
50 return ii.intValue();
51 }
52 public void setCode (String JavaDoc Code)
53 {
54 setValue ("Code", Code);
55 }
56 public String JavaDoc getCode()
57 {
58 return (String JavaDoc)getValue("Code");
59 }
60 public void setDescription (String JavaDoc Description)
61 {
62 setValue ("Description", Description);
63 }
64 public String JavaDoc getDescription()
65 {
66 return (String JavaDoc)getValue("Description");
67 }
68 public static final String JavaDoc ENTITYTYPE_Dictionary = "D";
69 public static final String JavaDoc ENTITYTYPE_Compiere = "C";
70 public static final String JavaDoc ENTITYTYPE_UserMaintained = "U";
71 public static final String JavaDoc ENTITYTYPE_Applications = "A";
72 public void setEntityType (String JavaDoc EntityType)
73 {
74 if (EntityType.equals("D") || EntityType.equals("C") || EntityType.equals("U") || EntityType.equals("A"));
75  else throw new IllegalArgumentException JavaDoc ("EntityType Invalid value - Reference_ID=245 - D - C - U - A");
76 if (EntityType == null) throw new IllegalArgumentException JavaDoc ("EntityType is mandatory");
77 setValue ("EntityType", EntityType);
78 }
79 public String JavaDoc getEntityType()
80 {
81 return (String JavaDoc)getValue("EntityType");
82 }
83 public void setName (String JavaDoc Name)
84 {
85 if (Name == null) throw new IllegalArgumentException JavaDoc ("Name is mandatory");
86 setValue ("Name", Name);
87 }
88 public String JavaDoc getName()
89 {
90 return (String JavaDoc)getValue("Name");
91 }
92 public static final String JavaDoc TYPE_SQL = "S";
93 public static final String JavaDoc TYPE_JavaLanguage = "J";
94 public static final String JavaDoc TYPE_JavaScript = "E";
95 public void setType (String JavaDoc Type)
96 {
97 if (Type.equals("S") || Type.equals("J") || Type.equals("E"));
98  else throw new IllegalArgumentException JavaDoc ("Type Invalid value - Reference_ID=101 - S - J - E");
99 if (Type == null) throw new IllegalArgumentException JavaDoc ("Type is mandatory");
100 setValue ("Type", Type);
101 }
102 public String JavaDoc getType()
103 {
104 return (String JavaDoc)getValue("Type");
105 }
106 }
107
Popular Tags