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_Role extends PO 11 { 12 13 public X_AD_Role (Properties ctx, int AD_Role_ID) 14 { 15 super (ctx, AD_Role_ID); 16 31 } 32 33 public X_AD_Role (Properties ctx, ResultSet rs) 34 { 35 super (ctx, rs); 36 } 37 38 protected POInfo initPO (Properties ctx) 39 { 40 int AD_Table_ID = 156; 41 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 42 return poi; 43 } 44 public String toString() 45 { 46 StringBuffer sb = new StringBuffer ("X_AD_Role[").append(getID()).append("]"); 47 return sb.toString(); 48 } 49 void setAD_Role_ID (int AD_Role_ID) 50 { 51 setValueNoCheck ("AD_Role_ID", new Integer (AD_Role_ID)); 52 } 53 public int getAD_Role_ID() 54 { 55 Integer ii = (Integer )getValue("AD_Role_ID"); 56 if (ii == null) return 0; 57 return ii.intValue(); 58 } 59 public void setAD_Tree_Menu_ID (int AD_Tree_Menu_ID) 60 { 61 if (AD_Tree_Menu_ID == 0) setValue ("AD_Tree_Menu_ID", null); 62 else 63 setValue ("AD_Tree_Menu_ID", new Integer (AD_Tree_Menu_ID)); 64 } 65 public int getAD_Tree_Menu_ID() 66 { 67 Integer ii = (Integer )getValue("AD_Tree_Menu_ID"); 68 if (ii == null) return 0; 69 return ii.intValue(); 70 } 71 public void setAmtApproval (BigDecimal AmtApproval) 72 { 73 setValue ("AmtApproval", AmtApproval); 74 } 75 public BigDecimal getAmtApproval() 76 { 77 BigDecimal bd = (BigDecimal)getValue("AmtApproval"); 78 if (bd == null) return Env.ZERO; 79 return bd; 80 } 81 public void setC_Currency_ID (int C_Currency_ID) 82 { 83 if (C_Currency_ID == 0) setValue ("C_Currency_ID", null); 84 else 85 setValue ("C_Currency_ID", new Integer (C_Currency_ID)); 86 } 87 public int getC_Currency_ID() 88 { 89 Integer ii = (Integer )getValue("C_Currency_ID"); 90 if (ii == null) return 0; 91 return ii.intValue(); 92 } 93 void setClientList (String ClientList) 94 { 95 if (ClientList == null) throw new IllegalArgumentException ("ClientList is mandatory"); 96 setValueNoCheck ("ClientList", ClientList); 97 } 98 public String getClientList() 99 { 100 return (String )getValue("ClientList"); 101 } 102 public void setDescription (String Description) 103 { 104 setValue ("Description", Description); 105 } 106 public String getDescription() 107 { 108 return (String )getValue("Description"); 109 } 110 public void setIsCanExport (boolean IsCanExport) 111 { 112 setValue ("IsCanExport", new Boolean (IsCanExport)); 113 } 114 public boolean isCanExport() 115 { 116 Boolean bb = (Boolean )getValue("IsCanExport"); 117 if (bb != null) return bb.booleanValue(); 118 return false; 119 } 120 public void setIsCanReport (boolean IsCanReport) 121 { 122 setValue ("IsCanReport", new Boolean (IsCanReport)); 123 } 124 public boolean isCanReport() 125 { 126 Boolean bb = (Boolean )getValue("IsCanReport"); 127 if (bb != null) return bb.booleanValue(); 128 return false; 129 } 130 public void setIsManual (boolean IsManual) 131 { 132 setValue ("IsManual", new Boolean (IsManual)); 133 } 134 public boolean isManual() 135 { 136 Boolean bb = (Boolean )getValue("IsManual"); 137 if (bb != null) return bb.booleanValue(); 138 return false; 139 } 140 public void setIsPersonalAccess (boolean IsPersonalAccess) 141 { 142 setValue ("IsPersonalAccess", new Boolean (IsPersonalAccess)); 143 } 144 public boolean isPersonalAccess() 145 { 146 Boolean bb = (Boolean )getValue("IsPersonalAccess"); 147 if (bb != null) return bb.booleanValue(); 148 return false; 149 } 150 public void setIsPersonalLock (boolean IsPersonalLock) 151 { 152 setValue ("IsPersonalLock", new Boolean (IsPersonalLock)); 153 } 154 public boolean isPersonalLock() 155 { 156 Boolean bb = (Boolean )getValue("IsPersonalLock"); 157 if (bb != null) return bb.booleanValue(); 158 return false; 159 } 160 public void setIsShowAcct (boolean IsShowAcct) 161 { 162 setValue ("IsShowAcct", new Boolean (IsShowAcct)); 163 } 164 public boolean isShowAcct() 165 { 166 Boolean bb = (Boolean )getValue("IsShowAcct"); 167 if (bb != null) return bb.booleanValue(); 168 return false; 169 } 170 public void setName (String Name) 171 { 172 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 173 setValue ("Name", Name); 174 } 175 public String getName() 176 { 177 return (String )getValue("Name"); 178 } 179 void setOrgList (String OrgList) 180 { 181 if (OrgList == null) throw new IllegalArgumentException ("OrgList is mandatory"); 182 setValueNoCheck ("OrgList", OrgList); 183 } 184 public String getOrgList() 185 { 186 return (String )getValue("OrgList"); 187 } 188 public static final String USERLEVEL_System = "S "; 189 public static final String USERLEVEL_Client = " C "; 190 public static final String USERLEVEL_Organization = " O"; 191 public static final String USERLEVEL_ClientPlusOrganization = " CO"; 192 public void setUserLevel (String UserLevel) 193 { 194 if (UserLevel.equals("S ") || UserLevel.equals(" C ") || UserLevel.equals(" O") || UserLevel.equals(" CO")); 195 else throw new IllegalArgumentException ("UserLevel Invalid value - Reference_ID=226 - S - C - O - CO"); 196 if (UserLevel == null) throw new IllegalArgumentException ("UserLevel is mandatory"); 197 setValue ("UserLevel", UserLevel); 198 } 199 public String getUserLevel() 200 { 201 return (String )getValue("UserLevel"); 202 } 203 } 204 | Popular Tags |