org.opencrx.kernel.backend
Class Accounts

java.lang.Object
  extended by org.opencrx.kernel.backend.AbstractImpl
      extended by org.opencrx.kernel.backend.Accounts

public class Accounts
extends AbstractImpl


Field Summary
static int FAX_BUSINESS
           
static int FAX_HOME
           
static int MAIL_BUSINESS
           
static int MAIL_HOME
           
static short MEMBER_QUALITY_NORMAL
           
static short MEMBER_ROLE_ASSISTANT
           
static short MEMBER_ROLE_EMPLOYEE
           
static int MOBILE
           
static int PHONE_BUSINESS
           
static int PHONE_HOME
           
static int PHONE_OTHER
           
static int POSTAL_BUSINESS
           
static int POSTAL_HOME
           
static int WEB_BUSINESS
           
static int WEB_HOME
           
 
Constructor Summary
protected Accounts()
           
 
Method Summary
 int countFilteredAccount(AbstractFilterAccount accountFilter)
           
 int countFilteredAddress(AbstractFilterAddress addressFilter)
           
 Invoice createInvoice(Account account, String name, String description, Invoice basedOn)
          Deprecated. use contract creators instead
 Lead createLead(Account account, String name, String description, String nextStep, Lead basedOn)
          Deprecated. use contract creators instead
 Opportunity createOpportunity(Account account, String name, String description, String nextStep, Opportunity basedOn)
          Deprecated. use contract creators instead
 Quote createQuote(Account account, String name, String description, Quote basedOn)
          Deprecated. use contract creators instead
 SalesOrder createSalesOrder(Account account, String name, String description, SalesOrder basedOn)
          Deprecated. use contract creators instead
 Segment getAccountSegment(javax.jdo.PersistenceManager pm, String providerName, String segmentName)
           
 AccountAddressQuery getFilteredAddressQuery(AbstractFilterAddress addressFilter, boolean forCounting)
           
static Accounts getInstance()
           
 AccountAddress[] getMainAddresses(Account account)
          Return main home and business addresses of given account.
 String getPrimaryBusinessEMail(Account account, String hint)
           
 String getPrimaryBusinessPhone(Account account)
           
 void initContract(SalesContract contract, Account account, String name, String description)
          Deprecated. use contract creators instead.
 List<EMailAddress> lookupEmailAddress(javax.jdo.PersistenceManager pm, String providerName, String segmentName, String emailAddress)
          Search accounts containing the given email address.
 List<EMailAddress> lookupEmailAddress(javax.jdo.PersistenceManager pm, String providerName, String segmentName, String email, boolean forceCreate)
           
 void markAccountAsDirty(Account account)
           
 int moveAddress(AccountAddress source, AccountAddress target, Date updateRelationshipsSince, Date updateRelationshipsBefore)
           
 int moveAddressToAccount(AccountAddress source, Account targetAccount, Date updateRelationshipsSince, Date updateRelationshipsBefore)
           
static void register()
           
 void removeAccount(Account account, boolean preDelete)
           
 void removeAddress(AccountAddress address, boolean preDelete)
           
 void updateAccount(Account account)
           
 void updateAddress(AccountAddress address)
           
 void updateFullName(Account account)
           
 void updateMember(Member member)
           
 void updateVcard(Account account)
           
 
Methods inherited from class org.opencrx.kernel.backend.AbstractImpl
getInstance, getUidAsString, registerImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAIL_BUSINESS

public static final int MAIL_BUSINESS
See Also:
Constant Field Values

MAIL_HOME

public static final int MAIL_HOME
See Also:
Constant Field Values

PHONE_BUSINESS

public static final int PHONE_BUSINESS
See Also:
Constant Field Values

PHONE_HOME

public static final int PHONE_HOME
See Also:
Constant Field Values

FAX_BUSINESS

public static final int FAX_BUSINESS
See Also:
Constant Field Values

FAX_HOME

public static final int FAX_HOME
See Also:
Constant Field Values

POSTAL_BUSINESS

public static final int POSTAL_BUSINESS
See Also:
Constant Field Values

WEB_BUSINESS

public static final int WEB_BUSINESS
See Also:
Constant Field Values

POSTAL_HOME

public static final int POSTAL_HOME
See Also:
Constant Field Values

WEB_HOME

public static final int WEB_HOME
See Also:
Constant Field Values

MOBILE

public static final int MOBILE
See Also:
Constant Field Values

PHONE_OTHER

public static final int PHONE_OTHER
See Also:
Constant Field Values

MEMBER_ROLE_EMPLOYEE

public static final short MEMBER_ROLE_EMPLOYEE
See Also:
Constant Field Values

MEMBER_ROLE_ASSISTANT

public static final short MEMBER_ROLE_ASSISTANT
See Also:
Constant Field Values

MEMBER_QUALITY_NORMAL

public static final short MEMBER_QUALITY_NORMAL
See Also:
Constant Field Values
Constructor Detail

Accounts

protected Accounts()
Method Detail

register

public static void register()

getInstance

public static Accounts getInstance()
                            throws ServiceException
Throws:
ServiceException

markAccountAsDirty

public void markAccountAsDirty(Account account)
                        throws ServiceException
Throws:
ServiceException

initContract

public void initContract(SalesContract contract,
                         Account account,
                         String name,
                         String description)
                  throws ServiceException
Deprecated. use contract creators instead.

Throws:
ServiceException

createLead

public Lead createLead(Account account,
                       String name,
                       String description,
                       String nextStep,
                       Lead basedOn)
                throws ServiceException
Deprecated. use contract creators instead

Throws:
ServiceException

createOpportunity

public Opportunity createOpportunity(Account account,
                                     String name,
                                     String description,
                                     String nextStep,
                                     Opportunity basedOn)
                              throws ServiceException
Deprecated. use contract creators instead

Throws:
ServiceException

createQuote

public Quote createQuote(Account account,
                         String name,
                         String description,
                         Quote basedOn)
                  throws ServiceException
Deprecated. use contract creators instead

Throws:
ServiceException

createSalesOrder

public SalesOrder createSalesOrder(Account account,
                                   String name,
                                   String description,
                                   SalesOrder basedOn)
                            throws ServiceException
Deprecated. use contract creators instead

Throws:
ServiceException

createInvoice

public Invoice createInvoice(Account account,
                             String name,
                             String description,
                             Invoice basedOn)
                      throws ServiceException
Deprecated. use contract creators instead

Throws:
ServiceException

updateFullName

public void updateFullName(Account account)
                    throws ServiceException
Throws:
ServiceException

updateAccount

public void updateAccount(Account account)
                   throws ServiceException
Throws:
ServiceException

updateAddress

public void updateAddress(AccountAddress address)
                   throws ServiceException
Throws:
ServiceException

removeAddress

public void removeAddress(AccountAddress address,
                          boolean preDelete)
                   throws ServiceException
Throws:
ServiceException

countFilteredAccount

public int countFilteredAccount(AbstractFilterAccount accountFilter)
                         throws ServiceException
Throws:
ServiceException

getAccountSegment

public Segment getAccountSegment(javax.jdo.PersistenceManager pm,
                                 String providerName,
                                 String segmentName)
Returns:
Returns the account segment.

lookupEmailAddress

public List<EMailAddress> lookupEmailAddress(javax.jdo.PersistenceManager pm,
                                             String providerName,
                                             String segmentName,
                                             String emailAddress)
Search accounts containing the given email address.


lookupEmailAddress

public List<EMailAddress> lookupEmailAddress(javax.jdo.PersistenceManager pm,
                                             String providerName,
                                             String segmentName,
                                             String email,
                                             boolean forceCreate)
                                      throws ServiceException
Throws:
ServiceException

getPrimaryBusinessEMail

public String getPrimaryBusinessEMail(Account account,
                                      String hint)
                               throws ServiceException
Throws:
ServiceException

getPrimaryBusinessPhone

public String getPrimaryBusinessPhone(Account account)
                               throws ServiceException
Throws:
ServiceException

getMainAddresses

public AccountAddress[] getMainAddresses(Account account)
Return main home and business addresses of given account.

Returns:
array with elements {web home, web business, phone home, phone business, fax home, fax, business, postal home, postal business, mail home, mail business, mobile, phone other}

updateVcard

public void updateVcard(Account account)
                 throws ServiceException
Throws:
ServiceException

updateMember

public void updateMember(Member member)
                  throws ServiceException
Throws:
ServiceException

getFilteredAddressQuery

public AccountAddressQuery getFilteredAddressQuery(AbstractFilterAddress addressFilter,
                                                   boolean forCounting)
                                            throws ServiceException
Throws:
ServiceException

countFilteredAddress

public int countFilteredAddress(AbstractFilterAddress addressFilter)
                         throws ServiceException
Throws:
ServiceException

moveAddressToAccount

public int moveAddressToAccount(AccountAddress source,
                                Account targetAccount,
                                Date updateRelationshipsSince,
                                Date updateRelationshipsBefore)
                         throws ServiceException
Throws:
ServiceException

moveAddress

public int moveAddress(AccountAddress source,
                       AccountAddress target,
                       Date updateRelationshipsSince,
                       Date updateRelationshipsBefore)
                throws ServiceException
Throws:
ServiceException

removeAccount

public void removeAccount(Account account,
                          boolean preDelete)
                   throws ServiceException
Throws:
ServiceException


This software is published under the BSD license. Copyright © 2003-2012, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.