protected Location copyInto(Location copyObj) throws TorqueException { copyObj.setLocationId(location_id); copyObj.setLocationCode(location_code); copyObj.setStatus(status); copyObj.setLocationName1(location_name_1); copyObj.setLocationName2(location_name_2); copyObj.setLocationDisplay(location_display); copyObj.setSalesDistrictId(sales_district_id); copyObj.setLocationType(location_type); copyObj.setGender(gender); copyObj.setLocationCatId(location_cat_id); copyObj.setDistributorId(distributor_id); copyObj.setAddress1(address_1); copyObj.setAddress2(address_2); copyObj.setCity(city); copyObj.setZip(zip); copyObj.setState(state); copyObj.setCountryId(country_id); copyObj.setRegionId(region_id); copyObj.setPhone1(phone_1); copyObj.setPhone2(phone_2); copyObj.setFax(fax); copyObj.setCustom1(custom_1); copyObj.setCustom2(custom_2); copyObj.setCustom3(custom_3); copyObj.setCustom4(custom_4); copyObj.setCustom5(custom_5); copyObj.setCustom6(custom_6); copyObj.setNotes(notes); copyObj.setCreated(created); copyObj.setModified(modified); copyObj.setCreatedBy(created_by); copyObj.setModifiedBy(modified_by); copyObj.setNew(false); List v = getDorderItems(); for (int i = 0; i < v.size(); i++) { DorderItem obj = (DorderItem) v.get(i); copyObj.addDorderItem(obj.copy()); ((Persistent) v.get(i)).setNew(true); } copyObj.setNew(true); copyObj.setLocationId(0); return copyObj; }
/** * Method called to associate a DorderItem object to this object through the DorderItem foreign * key attribute * * @param l DorderItem * @throws TorqueException */ public void addDorderItem(DorderItem l) throws TorqueException { getDorderItems().add(l); l.setLocation((Location) this); }