Hi Team,
I am trying to generate unique email from identity attribute with below patterns
- fi.ln
- fi.mi.ln
- fi.ln(uniquecounter)
I have this method below to check the unique email in the system however when i try validating the rule i am receiving the below error. Can you please help me on the same?
public boolean isUnique(String email){
log.debug("UoL_SAPEmailGenerator - Inside isUnique method");
QueryOptions ops = new QueryOptions();
int numberFound = 0;
Filter filter = Filter.ignoreCase( Filter.eq("email", email));
ops.addFilter(filter);
try {
numberFound = context.countObjects(Identity.class, ops);
log.debug("UoL_SAPEmailGenerator - Printing numberFound:"+numberFound);
} catch (GeneralException e) {
// TODO Auto-generated catch block
}
return numberFound == 0;
}
How can I use this method differently so that I do not encounter this error?