use of io.github.ihongs.serv.matrix.Data in project HongsCORE by ihongs.
the class DataAction method getEntity.
/**
* 获取模型对象
* 注意:
* 对象 Action 注解的命名必须为 "模型路径/实体名称"
* 方法 Action 注解的命名只能是 "动作名称", 不得含子级实体名称
* @param helper
* @return
* @throws HongsException
*/
@Override
public IEntity getEntity(ActionHelper helper) throws HongsException {
ActionRunner runner = (ActionRunner) helper.getAttribute(ActionRunner.class.getName());
Data entity = Data.getInstance(runner.getModule(), runner.getEntity());
String userId = (String) helper.getSessibute(Cnst.UID_SES);
// if ( userId == null ) userId = Cnst.ADM_GID; // 禁止匿名
entity.setUserId(userId);
return entity;
}
Aggregations