/ Published in: Java
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
ProfileInfoValueObject profileInfo = ((ProfileInfoValueObject) ((Session) slaveApiEntityManager.getDelegate()) .createCriteria(Nick.class, "n") .createAlias("n.member", "m") .createAlias("n.profileDescription", "d", Criteria.LEFT_JOIN) .createAlias("n.profileImage", "i", Criteria.LEFT_JOIN) .setProjection(Projections.projectionList() .add(Projections.property("m.city"), "cityCode") .add(Projections.property("n.registerDate"), "registerDate") .add(Projections.property("n.sml"), "processCount") .add(Projections.property("i.imageName"), "imageName") .add(Projections.property("i.status"), "imageStatus") .add(Projections.property("d.about"), "description") .add(Projections.property("d.status"), "descriptionStatus") ) .add(Restrictions.eq("n.memberId", memberId)) .setResultTransformer(Transformers.aliasToBean(ProfileInfoValueObject.class)) .uniqueResult()); return profileInfo; }