⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 marryserviceimp.java

📁 Java项目 婚姻介绍系统 jsp+struts+hibernate+spring 开发环境 Eclipse+oracle9i+tomcat 高质量代码 可用于学生论文
💻 JAVA
字号:
package com.xdf.marry.bo.service;

import com.xdf.marry.bean.Yuyue;
import com.xdf.marry.bo.IMarryService;
import com.xdf.marry.dao.IManDAO;
import com.xdf.marry.dao.IWomanDAO;
import com.xdf.marry.dao.IYuyueDAO;

public class MarryServiceImp implements IMarryService{
	private IYuyueDAO yuyuedao;
	private IManDAO mandao;
	private IWomanDAO womandao;
	
	public IManDAO getMandao() {
		return mandao;
	}

	public void setMandao(IManDAO mandao) {
		this.mandao = mandao;
	}

	public IWomanDAO getWomandao() {
		return womandao;
	}

	public void setWomandao(IWomanDAO womandao) {
		this.womandao = womandao;
	}

	public IYuyueDAO getYuyuedao() {
		return yuyuedao;
	}

	public void setYuyuedao(IYuyueDAO yuyuedao) {
		this.yuyuedao = yuyuedao;
	}

	public void deleteyuyue(Yuyue y) {
		mandao.delete(y.getMan());
		womandao.delete(y.getWoman());
		yuyuedao.delete(y);
	}

	public Yuyue findyuyue(String bianhao, String mima) {
		return yuyuedao.findyuyue(bianhao,mima);
	}

	public void updateyuyue(Yuyue y) {
		mandao.update(y.getMan());
		womandao.update(y.getWoman());
		yuyuedao.update(y);
	}

	public void yuyue(Yuyue y) {
		yuyuedao.add(y);
		mandao.add(y.getMan());
		womandao.add(y.getWoman());
		
	}
	public String getNextyuyueid() {
		String str = yuyuedao.findMaxyuyueid();
		if(str==null) {
			return "J000000001";
		}else {
			long i = Long.parseLong(str.substring(1));
			i++;
			String newstr = i+"";
			while(newstr.length()<9) {
				newstr = "0"+newstr;
			}
			return "J"+newstr;
		}
	}
	public String getNextyuyuepassword() {
		
		StringBuffer str = new StringBuffer();
		for (int i=0;i<6;i++) {
			char c = (char)('a' + (int)(26*Math.random()));//[0,26)
			str.append(c);
		}
		return str.toString();
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -