1 14 package org.compiere.tools; 15 16 import java.util.*; 17 18 import org.compiere.model.*; 19 import org.compiere.util.*; 20 21 27 public class Country extends PO 28 { 29 34 public Country(Properties ctx, int C_Country_ID) 35 { 36 super (ctx, C_Country_ID); 37 if (C_Country_ID == 0) 39 { 40 setValue("HasRegion", new Boolean (false)); 41 setValue("HasPostal", new Boolean (false)); 42 setValue("IsDefault", new Boolean (false)); 43 } 44 } 46 51 protected POInfo initPO (Properties ctx) 52 { 53 int AD_Table_ID = 170; 54 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 55 return poi; 56 } 58 59 60 65 public static Country create(String Name) 66 { 67 Country c = new Country(Env.getCtx(), 0); 68 c.setValue("Name", Name); 69 c.save(); 70 return c; 71 } 73 } 75 | Popular Tags |