public Process getProcessById(String id) {
		AssertHelper.notEmpty(id);
		Process entity = null;
		String processName;
		Cache<String, String> nameCache = ensureAvailableNameCache();
		Cache<String, Process> entityCache = ensureAvailableEntityCache();
		if(nameCache != null && entityCache != null) {
			processName = nameCache.get(id);
			if(StringHelper.isNotEmpty(processName)) {
				entity = entityCache.get(processName);
			}
		}
		if(entity != null) {
			if(log.isDebugEnabled()) {
				log.debug("obtain process[id={}] from cache.", id);
			}
			return entity;
		}
		entity = access().getProcess(id);
		if(entity != null) {
			if(log.isDebugEnabled()) {
				log.debug("obtain process[id={}] from database.", id);
			}
			cache(entity);
		}
		return entity;
	}
public Process getProcessById(String id) {
		AssertHelper.notEmpty(id);
		Process entity = null;
		String processName;
		Cache<String, String> nameCache = ensureAvailableNameCache();
		Cache<String, Process> entityCache = ensureAvailableEntityCache();
		if(nameCache != null && entityCache != null) {
			processName = nameCache.get(id);
			if(StringHelper.isNotEmpty(processName)) {
				entity = entityCache.get(processName);
			}
		}
		if(entity != null) {
			if(log.isDebugEnabled()) {
				log.debug("obtain process[id={}] from cache.", id);
			}
			return entity;
		}
		entity = access().getProcess(id);
		if(entity != null) {
			if(log.isDebugEnabled()) {
				log.debug("obtain process[id={}] from database.", id);
			}
			cache(entity);
		}
		return entity;
	}
public Process getProcessById ( String id ) { AssertHelper . notEmpty ( id ) ; Process entity = null ; String processName ; Cache < String , String > nameCache = ensureAvailableNameCache ( ) ; Cache < String , Process > entityCache = ensureAvailableEntityCache ( ) ; if ( nameCache != null && entityCache != null ) { processName = nameCache . get ( id ) ; if ( StringHelper . isNotEmpty ( processName ) ) { entity = entityCache . get ( processName ) ; } } if ( entity != null ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "obtain process[id={}] from cache." , id ) ; } return entity ; } entity = access ( ) . getProcess ( id ) ; if ( entity != null ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "obtain process[id={}] from database." , id ) ; } cache ( entity ) ; } return entity ; }
根据id获取process对象
先通过cache获取，如果返回空，就从数据库读取并put
根据id获取process对象 先通过cache获取，如果返回空，就从数据库读取并put