use of org.entando.entando.aps.system.services.userprofile.model.UserProfileRecord in project entando-core by entando.
the class UserProfileDAO method createEntityRecord.
@Override
protected ApsEntityRecord createEntityRecord(ResultSet res) throws Throwable {
UserProfileRecord profile = new UserProfileRecord();
profile.setId(res.getString("username"));
profile.setTypeCode(res.getString("profiletype"));
profile.setXml(res.getString("profilexml"));
profile.setPublicProfile(res.getInt("publicprofile") == 1);
return profile;
}
use of org.entando.entando.aps.system.services.userprofile.model.UserProfileRecord in project entando-core by entando.
the class UserProfileManager method getProfile.
@Override
@CachePut(value = ICacheInfoManager.DEFAULT_CACHE_NAME, key = "'UserProfile_'.concat(#username)")
@CacheableInfo(groups = "'UserProfileTypes_cacheGroup'")
public IUserProfile getProfile(String username) throws ApsSystemException {
IUserProfile profile = null;
try {
UserProfileRecord profileVO = (UserProfileRecord) this.getProfileDAO().loadEntityRecord(username);
if (profileVO != null) {
profile = (IUserProfile) this.createEntityFromXml(profileVO.getTypeCode(), profileVO.getXml());
profile.setPublicProfile(profileVO.isPublicProfile());
}
} catch (Throwable t) {
logger.error("Error loading profile. user: {} ", username, t);
throw new ApsSystemException("Error loading profile", t);
}
return profile;
}
use of org.entando.entando.aps.system.services.userprofile.model.UserProfileRecord in project entando-core by entando.
the class UserProfileSearcherDAO method createRecord.
@Override
protected ApsEntityRecord createRecord(ResultSet result) throws Throwable {
UserProfileRecord record = new UserProfileRecord();
record.setId(result.getString("username"));
record.setXml(result.getString("profilexml"));
record.setTypeCode(result.getString("profiletype"));
record.setPublicProfile(result.getInt("publicprofile") == 1);
return record;
}
Aggregations