public class AICustomer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private long |
accountCreatedMs
accountCreatedMs.
|
private java.lang.String |
addressCity
addressCity.
|
private java.lang.String |
addressCountry
addressCity.
|
private java.lang.String |
addressPostcode
addressCity.
|
private java.lang.String |
addressState
addressState.
|
private int |
ageRangeCode
ageRangeCode (0 = 0-9, 10 = 10-19, 20 = 20-29, 30 = 30-39 etc - 90 is the maximum for those
older than 90).
|
private java.lang.String |
basketProducts
Basket products.
|
private java.lang.String |
custom1
custom1.
|
private java.lang.String |
custom2
custom2.
|
private java.lang.String |
custom3
custom3.
|
private java.lang.String |
custom4
custom4.
|
private java.lang.String |
custom5
custom5.
|
private java.lang.String |
dummyTimeStamp
Use this as a dummy timestamp if we don't have a real timestamp
|
private java.lang.String |
gender
gender - Normally set to "m" or "f".
|
private int |
id
id
|
private java.lang.String |
lastOrderedProducts
last ordered productsIds - a colon-separated list of the most-recently ordered products with
productId and timestamp separated by a space (eg.
|
private java.lang.String |
lastViewedProducts
last viewed productsIds .
|
private java.lang.String |
newsletter
newsletter.
|
private int |
numberOfLogons
numberOfLogons
|
private java.lang.String |
productNotifications
productNotifications.
|
private int |
type
Type of customer.
|
private java.lang.String |
wishlistProducts
Wish list products.
|
Constructor and Description |
---|
AICustomer()
Constructor
|
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
addTimes(java.lang.String tagName,
AdminCustomerTag[] custTags) |
AICustomer |
createCustomer(AdminCustomer adminCustomer,
AdminCustomerTag[] custTags,
AdminOrderSearchResult aosr,
AdminProduct[] prods,
boolean randomize)
Create a Customer for export from an AdminCustomer
|
AICustomer |
createCustomer(int custId,
AdminProduct[] prods)
Create a completely random Customer for export.
|
long |
getAccountCreatedMs() |
private long |
getAccountCreatedTimestamp(AdminCustomer adminCustomer,
boolean randomize) |
java.lang.String |
getAddressCity() |
java.lang.String |
getAddressCountry() |
java.lang.String |
getAddressPostcode() |
java.lang.String |
getAddressState() |
private int |
getAgeRange(java.util.Date birthDate,
boolean randomize) |
int |
getAgeRangeCode() |
java.lang.String |
getBasketProducts() |
private java.lang.String |
getBasketProducts(AdminCustomerTag[] custTags) |
private java.lang.String |
getCleanGender(java.lang.String adminGender,
boolean randomize) |
java.lang.String |
getCustom1() |
java.lang.String |
getCustom2() |
java.lang.String |
getCustom3() |
java.lang.String |
getCustom4() |
java.lang.String |
getCustom5() |
private java.lang.String |
getCustomerTag(java.lang.String tagName,
AdminCustomerTag[] custTags) |
private int |
getCustomerType(boolean randomize) |
java.lang.String |
getDummyTimeStamp() |
java.lang.String |
getGender() |
int |
getId() |
java.lang.String |
getLastOrderedProducts() |
java.lang.String |
getLastViewedProducts() |
java.lang.String |
getNewsletter() |
int |
getNumberOfLogons() |
private int |
getNumbOfLogons(boolean randomize) |
private java.lang.String |
getOrderedProducts(AdminOrderSearchResult aosr) |
private java.lang.String |
getProdNotifications(AdminCustomer adminCustomer,
AdminProduct[] prods,
boolean randomize) |
java.lang.String |
getProductNotifications() |
private java.lang.String |
getRandomBasketProducts(AdminProduct[] prods,
long sinceMs) |
private java.lang.String |
getRandomOrderedProducts(AdminProduct[] prods,
long sinceMs) |
private java.lang.String |
getRandomViewedProducts(AdminProduct[] prods,
long sinceMs) |
private java.lang.String |
getRandomWishlistProducts(AdminProduct[] prods,
long sinceMs) |
int |
getType() |
private java.lang.String |
getViewedProducts(AdminCustomerTag[] custTags,
AICustomer me) |
java.lang.String |
getWishlistProducts() |
private java.lang.String |
getWishlistProducts(AdminCustomerTag[] custTags) |
void |
setAccountCreatedMs(long accountCreatedMs) |
void |
setAddressCity(java.lang.String addressCity) |
void |
setAddressCountry(java.lang.String addressCountry) |
void |
setAddressPostcode(java.lang.String addressPostcode) |
void |
setAddressState(java.lang.String addressState) |
void |
setAgeRangeCode(int ageRangeCode) |
void |
setBasketProducts(java.lang.String basketProducts) |
void |
setCustom1(java.lang.String custom1) |
void |
setCustom2(java.lang.String custom2) |
void |
setCustom3(java.lang.String custom3) |
void |
setCustom4(java.lang.String custom4) |
void |
setCustom5(java.lang.String custom5) |
void |
setGender(java.lang.String gender) |
void |
setId(int id) |
void |
setLastOrderedProducts(java.lang.String lastOrderedProducts) |
void |
setLastViewedProducts(java.lang.String lastViewedProducts) |
void |
setNewsletter(java.lang.String newsletter) |
void |
setNumberOfLogons(int numberOfLogons) |
void |
setProductNotifications(java.lang.String productNotifications) |
void |
setType(int type) |
void |
setWishlistProducts(java.lang.String wishlistProducts) |
java.lang.String |
toString() |
private java.lang.String |
valueOrDef(java.lang.String value,
java.lang.String def) |
private int id
private java.lang.String gender
private int ageRangeCode
private java.lang.String lastOrderedProducts
private java.lang.String lastViewedProducts
private java.lang.String wishlistProducts
private java.lang.String basketProducts
private int numberOfLogons
private int type
private long accountCreatedMs
private java.lang.String newsletter
private java.lang.String productNotifications
private java.lang.String addressCity
private java.lang.String addressPostcode
private java.lang.String addressState
private java.lang.String addressCountry
private java.lang.String custom1
private java.lang.String custom2
private java.lang.String custom3
private java.lang.String custom4
private java.lang.String custom5
private final java.lang.String dummyTimeStamp
public java.lang.String toString()
toString
in class java.lang.Object
public AICustomer createCustomer(AdminCustomer adminCustomer, AdminCustomerTag[] custTags, AdminOrderSearchResult aosr, AdminProduct[] prods, boolean randomize)
adminCustomer
- the customercustTags
- array of customer tagsaosr
- order search result objectprods
- array of productsrandomize
- whether or not to randomizeprivate java.lang.String valueOrDef(java.lang.String value, java.lang.String def)
public AICustomer createCustomer(int custId, AdminProduct[] prods)
custId
- customer Idprods
- array of productsprivate java.lang.String getRandomWishlistProducts(AdminProduct[] prods, long sinceMs)
private java.lang.String getRandomBasketProducts(AdminProduct[] prods, long sinceMs)
private java.lang.String getRandomViewedProducts(AdminProduct[] prods, long sinceMs)
private java.lang.String getRandomOrderedProducts(AdminProduct[] prods, long sinceMs)
private long getAccountCreatedTimestamp(AdminCustomer adminCustomer, boolean randomize)
private java.lang.String getProdNotifications(AdminCustomer adminCustomer, AdminProduct[] prods, boolean randomize)
private int getCustomerType(boolean randomize)
private int getNumbOfLogons(boolean randomize)
private java.lang.String getOrderedProducts(AdminOrderSearchResult aosr)
private java.lang.String getViewedProducts(AdminCustomerTag[] custTags, AICustomer me)
private java.lang.String getWishlistProducts(AdminCustomerTag[] custTags)
private java.lang.String getBasketProducts(AdminCustomerTag[] custTags)
private java.lang.String addTimes(java.lang.String tagName, AdminCustomerTag[] custTags)
private java.lang.String getCustomerTag(java.lang.String tagName, AdminCustomerTag[] custTags)
private java.lang.String getCleanGender(java.lang.String adminGender, boolean randomize)
private int getAgeRange(java.util.Date birthDate, boolean randomize)
public int getId()
public void setId(int id)
id
- the id to setpublic java.lang.String getGender()
public void setGender(java.lang.String gender)
gender
- the gender to setpublic int getAgeRangeCode()
public void setAgeRangeCode(int ageRangeCode)
ageRangeCode
- the ageRangeCode to setpublic java.lang.String getLastOrderedProducts()
public void setLastOrderedProducts(java.lang.String lastOrderedProducts)
lastOrderedProducts
- the lastOrderedProducts to setpublic java.lang.String getLastViewedProducts()
public void setLastViewedProducts(java.lang.String lastViewedProducts)
lastViewedProducts
- the lastViewedProducts to setpublic int getNumberOfLogons()
public void setNumberOfLogons(int numberOfLogons)
numberOfLogons
- the numberOfLogons to setpublic int getType()
public void setType(int type)
type
- the type to setpublic long getAccountCreatedMs()
public void setAccountCreatedMs(long accountCreatedMs)
accountCreatedMs
- the accountCreatedMs to setpublic java.lang.String getNewsletter()
public void setNewsletter(java.lang.String newsletter)
newsletter
- the newsletter to setpublic java.lang.String getProductNotifications()
public void setProductNotifications(java.lang.String productNotifications)
productNotifications
- the productNotifications to setpublic java.lang.String getAddressCity()
public void setAddressCity(java.lang.String addressCity)
addressCity
- the addressCity to setpublic java.lang.String getAddressPostcode()
public void setAddressPostcode(java.lang.String addressPostcode)
addressPostcode
- the addressPostcode to setpublic java.lang.String getAddressCountry()
public void setAddressCountry(java.lang.String addressCountry)
addressCountry
- the addressCountry to setpublic java.lang.String getAddressState()
public void setAddressState(java.lang.String addressState)
addressState
- the addressState to setpublic java.lang.String getWishlistProducts()
public void setWishlistProducts(java.lang.String wishlistProducts)
wishlistProducts
- the wishlistProducts to setpublic java.lang.String getBasketProducts()
public void setBasketProducts(java.lang.String basketProducts)
basketProducts
- the basketProducts to setpublic java.lang.String getDummyTimeStamp()
public java.lang.String getCustom1()
public void setCustom1(java.lang.String custom1)
custom1
- the custom1 to setpublic java.lang.String getCustom2()
public void setCustom2(java.lang.String custom2)
custom2
- the custom2 to setpublic java.lang.String getCustom3()
public void setCustom3(java.lang.String custom3)
custom3
- the custom3 to setpublic java.lang.String getCustom4()
public void setCustom4(java.lang.String custom4)
custom4
- the custom4 to setpublic java.lang.String getCustom5()
public void setCustom5(java.lang.String custom5)
custom5
- the custom5 to setCopyright © 2018 DS Data Systems UK Ltd.