Package org.opentransactions.otapi

Examples of org.opentransactions.otapi.ContactAcct


            if (contact == null) {
                continue;
            }
            if (contactID.equals(contact.getContact_id())) {
                System.out.println("createContactAccount - contactID matches, index="+index);
                ContactAcct contactAcct = null;
                if (index == -1) {
                    System.out.println("createContactAccount new obj");
                    Storable storable = otapi.CreateObject(StoredObjectType.STORED_OBJ_CONTACT_ACCT);
                    if (storable != null) {
                        contactAcct = ContactAcct.ot_dynamic_cast(storable);
                    }
                } else {
                    contactAcct = contact.GetContactAcct(index);
                    System.out.println("createContactAccount old obj, contactAcct :"+contactAcct);
                }
                if (contactAcct != null) {
                    contactAcct.setGui_label(label);
                    contactAcct.setMemo(memo);
                    contactAcct.setNym_id(nymID);
                    contactAcct.setAcct_id(acctID);
                    contactAcct.setAsset_type_id(assetID);
                    contactAcct.setPublic_key(publickey);
                    contactAcct.setServer_id(serverID);
                    contactAcct.setServer_type(serverType);
                    contact.AddContactAcct(contactAcct);
                    status = otapi.StoreObject(addressBook, "moneychanger", "gui_contacts.dat");
                    System.out.println("createContactAccount status addressBook otapi.StoreObject:" + status);
                    // Set other values here
                }
View Full Code Here


                break;
            }
        }
        ContactAcctDetails data = new ContactAcctDetails();
           if(contact!=null && index>-1){
            ContactAcct contactAcct = contact.GetContactAcct(index);
            if(contactAcct==null){
                System.out.println("getContactNymDetails contact.getContactAccDetails(index) returned null");
                return null;
            }
            data.setLabel(contactAcct.getGui_label());
            data.setMemo(contactAcct.getMemo());
            data.setNymID(contactAcct.getNym_id());
            data.setAcctID(contactAcct.getAcct_id());
            data.setAssetID(contactAcct.getAsset_type_id());
            data.setServerID(contactAcct.getServer_id());
            data.setServerType(contactAcct.getServer_type());
            data.setPublicKey(contactAcct.getPublic_key());

        }
        return data;
    }
View Full Code Here

TOP

Related Classes of org.opentransactions.otapi.ContactAcct

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.