logger.debug("skip : {}", key);
continue;
}
UserAttr userAttr = userAttrManager.findUnique(
"from UserAttr where userSchema=? and userBase=?",
userSchema, userBase);
if (userAttr == null) {
userAttr = new UserAttr();
userAttr.setUserSchema(userSchema);
userAttr.setUserBase(userBase);
userAttr.setScopeId(ScopeHolder.getScopeId());
}
String type = userSchema.getType();
if ("boolean".equals(type)) {
userAttr.setBooleanValue(Integer.parseInt(value));
} else if ("date".equals(type)) {
try {
userAttr.setDateValue(new SimpleDateFormat("yyyy-MM-dd")
.parse(value));
} catch (ParseException ex) {
logger.info(ex.getMessage(), ex);
}
} else if ("long".equals(type)) {
userAttr.setLongValue(Long.parseLong(value));
} else if ("double".equals(type)) {
userAttr.setDoubleValue(Double.parseDouble(value));
} else if ("string".equals(type)) {
userAttr.setStringValue(value);
} else {
throw new IllegalStateException("illegal type: "
+ userSchema.getType());
}