import java.util.*;

public class CurScreen {
    private String value = "企業一覧";
	private ScreenTemplates screenTemplates;
	private Screen screen;
	private CurScreen curScreen;
	public CurScreen(Screen screen, ScreenTemplates screenTemplates) {
		this.screenTemplates = screenTemplates;
		this.screen = screen;
	}
	public String getValue() {
		return new String(this.value);
	}
	public void updateFromState(String scId, String wid, int state) {
		String temp_if2;
		if ((state==0)) {
			temp_if2 = "検索画面";
		} else {
			temp_if2 = this.value;
		}
		this.value = temp_if2;
		Map<String, Object> screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue();
		this.screen.updateFromCurScreen(this.value, screenTemplate);
	}
	public void updateFromState2(String scId, String wid, int state) {
		String temp_if3;
		if ((state==0)) {
			temp_if3 = "企業一覧";
		} else {
			temp_if3 = this.value;
		}
		this.value = temp_if3;
        Map<String, Object> screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue();
        this.screen.updateFromCurScreen(this.value, screenTemplate);
	}
	public void updateFromState3(String scId, String wid, int state) {
		String temp_if4;
		if ((state==0)) {
			temp_if4 = "検索画面";
		} else {
			temp_if4 = this.value;
		}
		this.value = temp_if4;
        Map<String, Object> screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue();
        this.screen.updateFromCurScreen(this.value, screenTemplate);
	}
	public void updateFromState4(String scId, String wid, int state) {
		String temp_if5;
		if ((state==0)) {
			temp_if5 = "登録画面１";
		} else {
			temp_if5 = this.value;
		}
		this.value = temp_if5;
        Map<String, Object> screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue();
        this.screen.updateFromCurScreen(this.value, screenTemplate);
	}
	public void updateFromState5(String scId, String wid, int state) {
		String temp_if6;
		if ((state==0)) {
			temp_if6 = "検索項目画面";
		} else {
			temp_if6 = this.value;
		}
		this.value = temp_if6;
        Map<String, Object> screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue();
        this.screen.updateFromCurScreen(this.value, screenTemplate);
	}
	public void updateFromState6(String scId, String wid, int state) {
		String temp_if7;
		if ((state==0)) {
			temp_if7 = "企業一覧";
		} else {
			temp_if7 = this.value;
		}
		this.value = temp_if7;
        Map<String, Object> screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue();
        this.screen.updateFromCurScreen(this.value, screenTemplate);
	}
	public void updateFromState7(String scId, String wid, String text, int state, String editcompany, String editrepresentative, String editposition, String editaddress1, String editaddress2, String editestablish, String editURL, String editbusiness1, String editbusiness2, String editcompanydetail, Map<String, Map<String, Object>> businessCardManagement) {
		String temp_if9;
		if ((state==0)) {
			String temp_if8;
            if ((!text.equals("")&&businessCardManagement.containsKey(text))) {
                temp_if8 = "企業一覧";
            } else {
                temp_if8 = this.value;
            }
			temp_if9 = temp_if8;
		} else {
			temp_if9 = this.value;
		}
		this.value = temp_if9;
        Map<String, Object> screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue();
        this.screen.updateFromCurScreen(this.value, screenTemplate);
	}
	public void updateFromState8(String scId, String wid, String text, int state, String company, String representative, String position, String address1, String address2, String establishment, Map<String, Map<String, Object>> businessCardManagement) {
        Map<String, Object> screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue();
        this.screen.updateFromCurScreen(this.value, screenTemplate);
	}
	public void updateFromState9(String scId, String wid, int state) {
		String temp_if10;
		if ((state==0)) {
			temp_if10 = "企業一覧";
		} else {
			temp_if10 = this.value;
		}
		this.value = temp_if10;
        Map<String, Object> screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue();
        this.screen.updateFromCurScreen(this.value, screenTemplate);
	}
	public void updateFromState10(String scId, String wid, int state) {
		String temp_if11;
		if ((state==0)) {
			temp_if11 = "企業一覧";
		} else {
			temp_if11 = this.value;
		}
		this.value = temp_if11;
        Map<String, Object> screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue();
        this.screen.updateFromCurScreen(this.value, screenTemplate);
	}
	public void changeCurScreen(String nextScId) {
		this.value = nextScId;
        Map<String, Object> screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue();
        this.screen.updateFromCurScreen(this.value, screenTemplate);
	}
}