package com.dev.swms.server.service.base.pojo;

import java.util.List;

import com.dev.swms.server.model.base.Town;
import com.dev.swms.server.model.base.TransSite;
import com.dev.swms.server.service.base.RouteInfoManager;
import com.dev.energy.server.service.pojo.DefaultBaseManager;

public class DefaultRouteInfoManager extends DefaultBaseManager implements
		RouteInfoManager {

	// 城市信息维护
	public void storeTown(Town town) {
		this.store(town);
	}

	// 城市信息失效
	public void disabledTown(List<Long> ids) {
		for (Long id : ids) {
			Town c = this.load(Town.class, id);
			c.setDisabled(true);
		}
	}

	// 城市信息恢复
	public void reUseTown(List<Long> ids) {
		for (Long id : ids) {
			Town c = this.load(Town.class, id);
			c.setDisabled(false);
		}
	}

	//运输地信息维护
	public void storeTransSite(TransSite transSite) {
		this.store(transSite);
	}

	//运输地信息失效
	public void disabledTransSite(List<Long> ids) {
		for (Long id : ids) {
			TransSite t = this.load(TransSite.class, id);
			t.setDisabled(true);
		}
	}

	//运输地信息恢复
	public void reUseTransSite(List<Long> ids) {
		for (Long id : ids) {
			TransSite t = this.load(TransSite.class, id);
			t.setDisabled(false);
		}
	}

}
