} else {
// lets remove this object
map1.remove(mid);
if (!map1.containsKey(mid)) {
System.out.printf(
"\nUserProfile object with the MID '%s' has been REMOVED AS REQUISTED from "
+ "\nHost/port: '%s'" + "\nGrid : '%s'"
+ "\nMap : '%s'\n", mid,
connectionString, grid.getName(), map1.getName());
} else {
System.out.printf(
"\nERROR: Cannot remove object with the MID '%s' from "
+ "\nHost/port: '%s'" + "\nGrid : '%s'"
+ "\nMap : '%s'\n", mid,
connectionString, grid.getName(), map1.getName());
}
}
}
}
private static UserProfile getUserProfile(String uniqueId, int numTags) {
UserProfile up = new UserProfile();
up.setUniqueId(uniqueId);
up.setCustomerType("C");
up.setRealmName("PI");
up.setSegmentName("AO");
for (int i = 0; i < numTags; i++) {
TagProfileData tpd = getTagProfileData(i);
up.getTagProfileDataList().add(tpd);
}
return up;
}
private static TagProfileData getTagProfileData(int i) {
TagProfileData tpd = new TagProfileData();
tpd.setCategoryName("Sales");
tpd.setCustInterest(7);
tpd.setLastEventDate(new java.util.Date());
tpd.setLastMaintenanceDate(new java.util.Date());
tpd.setSuppressionExpDate(new java.util.Date());
tpd.setSuppressionInd(0);
tpd.setTagCreationDate(new java.util.Date());
tpd.setType("Action");
if (i == 0) {
tpd.setTagId("30");
tpd.setTagName("AbandonedBundleEBNA");
tpd.setSubCategory("Brokerage");
}
if (i == 1) {
tpd.setTagId("28");
tpd.setTagName("AOAbandonedEBNA");
tpd.setSubCategory("Brokerage");
}
if (i == 2) {
tpd.setTagId("29");
tpd.setTagName("AOAbandoned529");
tpd.setSubCategory("Education");
}
if (i == 3) {
tpd.setTagId("31");
tpd.setTagName("AOAbandonedRetirement");
tpd.setSubCategory("Retirement");
}
if (i >= 4) {
tpd.setTagId("32");
tpd.setTagName("AOAbandonedRollover");
tpd.setSubCategory("Retirement");
}
tpd.setTagPriority(4/* tagPriority */);
tpd.setTagScore(12345.67F/* tagScore */);
tpd.setTagSource("eDB");
return tpd;
}
private static String dumpUserProfile(UserProfile up) {
if (up == null)
return "UserProfile is null";
StringBuilder sb = new StringBuilder();
// ("UserProfile \n");
sb.append("Customer Type :["
+ (up.getCustomerType() != null up.getCustomerType() : "null")
+ "]\n");
sb.append("Realm Name :[" + up.getRealmName() + "]\n");
sb.append("SegmentName :[" + up.getSegmentName() + "]\n");
//sb.append("Reason