com.haoxuer.discover.activiti.data.service.ext.ActGroupEntityService Maven / Gradle / Ivy
The newest version!
/**
* Copyright © 2012-2016 JeeSite All rights reserved.
*/
package com.haoxuer.discover.activiti.data.service.ext;
import com.haoxuer.discover.activiti.data.service.SpringContextHolder;
import com.google.common.collect.Lists;
import com.haoxuer.discover.user.data.service.UserInfoService;
import org.activiti.engine.identity.Group;
import org.activiti.engine.identity.GroupQuery;
import org.activiti.engine.impl.GroupQueryImpl;
import org.activiti.engine.impl.Page;
import org.activiti.engine.impl.persistence.entity.GroupEntity;
import org.activiti.engine.impl.persistence.entity.GroupEntityManager;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* Activiti Group Entity Service
* @author ThinkGem
* @version 2013-12-05
*/
@Service
public class ActGroupEntityService extends GroupEntityManager {
private UserInfoService systemService;
public UserInfoService getSystemService() {
if (systemService == null){
systemService = SpringContextHolder.getBean(UserInfoService.class);
}
return systemService;
}
@Override
public Group createNewGroup(String groupId) {
return new GroupEntity(groupId);
}
@Override
public void insertGroup(Group group) {
// getDbSqlSession().insert((PersistentObject) group);
throw new RuntimeException("not implement method.");
}
public void updateGroup(GroupEntity updatedGroup) {
// CommandContext commandContext = Context.getCommandContext();
// DbSqlSession dbSqlSession = commandContext.getDbSqlSession();
// dbSqlSession.update(updatedGroup);
throw new RuntimeException("not implement method.");
}
@Override
public void deleteGroup(String groupId) {
// GroupEntity group = getDbSqlSession().selectById(GroupEntity.class, groupId);
// getDbSqlSession().delete("deleteMembershipsByGroupId", groupId);
// getDbSqlSession().delete(group);
throw new RuntimeException("not implement method.");
}
@Override
public GroupQuery createNewGroupQuery() {
// return new GroupQueryImpl(Context.getProcessEngineConfiguration().getCommandExecutorTxRequired());
throw new RuntimeException("not implement method.");
}
@Override
public List findGroupByQueryCriteria(GroupQueryImpl query, Page page) {
// return getDbSqlSession().selectList("selectGroupByQueryCriteria", query, page);
throw new RuntimeException("not implement method.");
}
@Override
public long findGroupCountByQueryCriteria(GroupQueryImpl query) {
// return (Long) getDbSqlSession().selectOne("selectGroupCountByQueryCriteria", query);
throw new RuntimeException("not implement method.");
}
@Override
public List findGroupsByUser(String userId) {
// return getDbSqlSession().selectList("selectGroupsByUserId", userId);
List list = Lists.newArrayList();
// User user = getSystemService().getUserByLoginName(userId);
// if (user != null && user.getRoleList() != null){
// for (Role role : user.getRoleList()){
// list.add(ActUtils.toActivitiGroup(role));
// }
// }
return list;
}
@Override
public List findGroupsByNativeQuery(Map parameterMap, int firstResult, int maxResults) {
// return getDbSqlSession().selectListWithRawParameter("selectGroupByNativeQuery", parameterMap, firstResult, maxResults);
throw new RuntimeException("not implement method.");
}
@Override
public long findGroupCountByNativeQuery(Map parameterMap) {
// return (Long) getDbSqlSession().selectOne("selectGroupCountByNativeQuery", parameterMap);
throw new RuntimeException("not implement method.");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy