1 2 package org.compiere.model; 3 import java.util.*; 4 import java.sql.*; 5 import java.math.*; 6 import java.io.Serializable ; 7 import org.compiere.util.*; 8 10 public class X_AD_Menu extends PO 11 { 12 13 public X_AD_Menu (Properties ctx, int AD_Menu_ID) 14 { 15 super (ctx, AD_Menu_ID); 16 26 } 27 28 public X_AD_Menu (Properties ctx, ResultSet rs) 29 { 30 super (ctx, rs); 31 } 32 33 protected POInfo initPO (Properties ctx) 34 { 35 int AD_Table_ID = 116; 36 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 37 return poi; 38 } 39 public String toString() 40 { 41 StringBuffer sb = new StringBuffer ("X_AD_Menu[").append(getID()).append("]"); 42 return sb.toString(); 43 } 44 public void setAD_Form_ID (int AD_Form_ID) 45 { 46 if (AD_Form_ID == 0) setValue ("AD_Form_ID", null); 47 else 48 setValue ("AD_Form_ID", new Integer (AD_Form_ID)); 49 } 50 public int getAD_Form_ID() 51 { 52 Integer ii = (Integer )getValue("AD_Form_ID"); 53 if (ii == null) return 0; 54 return ii.intValue(); 55 } 56 void setAD_Menu_ID (int AD_Menu_ID) 57 { 58 setValueNoCheck ("AD_Menu_ID", new Integer (AD_Menu_ID)); 59 } 60 public int getAD_Menu_ID() 61 { 62 Integer ii = (Integer )getValue("AD_Menu_ID"); 63 if (ii == null) return 0; 64 return ii.intValue(); 65 } 66 public void setAD_Process_ID (int AD_Process_ID) 67 { 68 if (AD_Process_ID == 0) setValue ("AD_Process_ID", null); 69 else 70 setValue ("AD_Process_ID", new Integer (AD_Process_ID)); 71 } 72 public int getAD_Process_ID() 73 { 74 Integer ii = (Integer )getValue("AD_Process_ID"); 75 if (ii == null) return 0; 76 return ii.intValue(); 77 } 78 public void setAD_Task_ID (int AD_Task_ID) 79 { 80 if (AD_Task_ID == 0) setValue ("AD_Task_ID", null); 81 else 82 setValue ("AD_Task_ID", new Integer (AD_Task_ID)); 83 } 84 public int getAD_Task_ID() 85 { 86 Integer ii = (Integer )getValue("AD_Task_ID"); 87 if (ii == null) return 0; 88 return ii.intValue(); 89 } 90 public void setAD_Window_ID (int AD_Window_ID) 91 { 92 if (AD_Window_ID == 0) setValue ("AD_Window_ID", null); 93 else 94 setValue ("AD_Window_ID", new Integer (AD_Window_ID)); 95 } 96 public int getAD_Window_ID() 97 { 98 Integer ii = (Integer )getValue("AD_Window_ID"); 99 if (ii == null) return 0; 100 return ii.intValue(); 101 } 102 public void setAD_Workbench_ID (int AD_Workbench_ID) 103 { 104 if (AD_Workbench_ID == 0) setValue ("AD_Workbench_ID", null); 105 else 106 setValue ("AD_Workbench_ID", new Integer (AD_Workbench_ID)); 107 } 108 public int getAD_Workbench_ID() 109 { 110 Integer ii = (Integer )getValue("AD_Workbench_ID"); 111 if (ii == null) return 0; 112 return ii.intValue(); 113 } 114 public void setAD_Workflow_ID (int AD_Workflow_ID) 115 { 116 if (AD_Workflow_ID == 0) setValue ("AD_Workflow_ID", null); 117 else 118 setValue ("AD_Workflow_ID", new Integer (AD_Workflow_ID)); 119 } 120 public int getAD_Workflow_ID() 121 { 122 Integer ii = (Integer )getValue("AD_Workflow_ID"); 123 if (ii == null) return 0; 124 return ii.intValue(); 125 } 126 public static final String ACTION_Form = "X"; 127 public static final String ACTION_Report = "R"; 128 public static final String ACTION_Workbench = "B"; 129 public static final String ACTION_Window = "W"; 130 public static final String ACTION_Task = "T"; 131 public static final String ACTION_WorkFlow = "F"; 132 public static final String ACTION_Process = "P"; 133 public void setAction (String Action) 134 { 135 if (Action.equals("X") || Action.equals("R") || Action.equals("B") || Action.equals("W") || Action.equals("T") || Action.equals("F") || Action.equals("P")); 136 else throw new IllegalArgumentException ("Action Invalid value - Reference_ID=104 - X - R - B - W - T - F - P"); 137 setValue ("Action", Action); 138 } 139 public String getAction() 140 { 141 return (String )getValue("Action"); 142 } 143 public void setDescription (String Description) 144 { 145 setValue ("Description", Description); 146 } 147 public String getDescription() 148 { 149 return (String )getValue("Description"); 150 } 151 public static final String ENTITYTYPE_Dictionary = "D"; 152 public static final String ENTITYTYPE_Compiere = "C"; 153 public static final String ENTITYTYPE_UserMaintained = "U"; 154 public static final String ENTITYTYPE_Applications = "A"; 155 public void setEntityType (String EntityType) 156 { 157 if (EntityType.equals("D") || EntityType.equals("C") || EntityType.equals("U") || EntityType.equals("A")); 158 else throw new IllegalArgumentException ("EntityType Invalid value - Reference_ID=245 - D - C - U - A"); 159 if (EntityType == null) throw new IllegalArgumentException ("EntityType is mandatory"); 160 setValue ("EntityType", EntityType); 161 } 162 public String getEntityType() 163 { 164 return (String )getValue("EntityType"); 165 } 166 public void setIsReadOnly (boolean IsReadOnly) 167 { 168 setValue ("IsReadOnly", new Boolean (IsReadOnly)); 169 } 170 public boolean isReadOnly() 171 { 172 Boolean bb = (Boolean )getValue("IsReadOnly"); 173 if (bb != null) return bb.booleanValue(); 174 return false; 175 } 176 public void setIsSOTrx (boolean IsSOTrx) 177 { 178 setValue ("IsSOTrx", new Boolean (IsSOTrx)); 179 } 180 public boolean isSOTrx() 181 { 182 Boolean bb = (Boolean )getValue("IsSOTrx"); 183 if (bb != null) return bb.booleanValue(); 184 return false; 185 } 186 public void setIsSummary (boolean IsSummary) 187 { 188 setValue ("IsSummary", new Boolean (IsSummary)); 189 } 190 public boolean isSummary() 191 { 192 Boolean bb = (Boolean )getValue("IsSummary"); 193 if (bb != null) return bb.booleanValue(); 194 return false; 195 } 196 public void setName (String Name) 197 { 198 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 199 setValue ("Name", Name); 200 } 201 public String getName() 202 { 203 return (String )getValue("Name"); 204 } 205 } 206 | Popular Tags |