예제 #1
0
  public String saveDB() {
    //  Look for columns of type: {foo}_id
    //  For each of those, introspect for 'm{Foo}'.
    //  For each non-null of those, call 'saveDB' on it.
    //  Store the result of that call as '{foo}_id'.
    if (mSeller != null) {
      String seller_id = mSeller.saveDB();
      if (seller_id != null) set("seller_id", seller_id);
    }

    return super.saveDB();
  }
예제 #2
0
  protected void setSellerName(String sellerName) {
    if (sellerName == null || sellerName.length() == 0) return;

    if (mSeller == null) {
      mSeller = Seller.makeSeller(sellerName.trim());
    } else {
      mSeller = mSeller.makeSeller(sellerName, mSeller);
    }
    Integer seller_id = mSeller.getId();
    if (seller_id == null || seller_id == 0) {
      String raw_id = mSeller.saveDB();
      if (raw_id != null && raw_id.length() != 0) seller_id = Integer.parseInt(raw_id);
    }
    setInteger("seller_id", seller_id);
  }
예제 #3
0
 public void fromXML(XMLElement inXML) {
   super.fromXML(inXML);
   if (mSeller != null) mSeller.saveDB();
 }