Java/Excercise

interface ch04 UserInfoDao

낭구리 2021. 8. 31. 17:44
package ch04;

public class UserInfoMsSqlDao implements UserInfoDao{
	@Override
	public void insertUserInfo(UserInfo userInfo) {
		System.out.println("MsSql : 저장하기 " + userInfo.getUserName());
		System.out.println("MsSql : 저장하기 " + userInfo.getUserId());
		System.out.println("MsSql : 저장하기 " + userInfo.getPassword());
	}

	@Override
	public void updateUserInfo(UserInfo userInfo) {
		System.out.println("MsSql : 수정하기 " + userInfo.getUserName());
		System.out.println("MsSql : 수정하기 " + userInfo.getUserId());
		System.out.println("MsSql : 수정하기 " + userInfo.getPassword());
	}

	@Override
	public void deleteUserInfo(UserInfo userInfo) {
		System.out.println("MsSql : 삭제하기 " + userInfo.getUserName());
		System.out.println("MsSql : 삭제하기 " + userInfo.getUserId());
		System.out.println("MsSql : 삭제하기 " + userInfo.getPassword());
	}

}

 

package ch04;

public class UserInfoMySqlDao implements UserInfoDao{

	@Override
	public void insertUserInfo(UserInfo userInfo) {
		System.out.println("MySql : 저장하기 " + userInfo.getUserName());
		System.out.println("MySql : 저장하기 " + userInfo.getUserId());
		System.out.println("MySql : 저장하기 " + userInfo.getPassword());
	}

	@Override
	public void updateUserInfo(UserInfo userInfo) {
		System.out.println("MySql : 수정하기 " + userInfo.getUserName());
		System.out.println("MySql : 수정하기 " + userInfo.getUserId());
		System.out.println("MySql : 수정하기 " + userInfo.getPassword());
	}

	@Override
	public void deleteUserInfo(UserInfo userInfo) {
		System.out.println("MySql : 삭제하기 " + userInfo.getUserName());
		System.out.println("MySql : 삭제하기 " + userInfo.getUserId());
		System.out.println("MySql : 삭제하기 " + userInfo.getPassword());
	}


}

 

package ch04;

public class UserInfoOracleDao implements UserInfoDao{

	@Override
	public void insertUserInfo(UserInfo userInfo) {
		System.out.println("Oracle : 저장하기 " + userInfo.getUserName());
		System.out.println("Oracle : 저장하기 " + userInfo.getUserId());
		System.out.println("Oracle : 저장하기 " + userInfo.getPassword());
	}

	@Override
	public void updateUserInfo(UserInfo userInfo) {
		System.out.println("Oracle : 수정하기 " + userInfo.getUserName());
		System.out.println("Oracle : 수정하기 " + userInfo.getUserId());
		System.out.println("Oracle : 수정하기 " + userInfo.getPassword());
	}

	@Override
	public void deleteUserInfo(UserInfo userInfo) {
		System.out.println("Oracle : 삭제하기 " + userInfo.getUserName());
		System.out.println("Oracle : 삭제하기 " + userInfo.getUserId());
		System.out.println("Oracle : 삭제하기 " + userInfo.getPassword());
	}

	
}

'Java > Excercise' 카테고리의 다른 글

object ch01 Book  (0) 2021.09.01
interface ch04 UserInfoClient  (0) 2021.08.31
interface ch04 UserInfo  (0) 2021.08.31
interface ch02 HomeMainTest  (0) 2021.08.31
interface ch02 HomeAppliances  (0) 2021.08.31