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

📄 kjavahelper.java

📁 一个免费wap站
💻 JAVA
字号:
package com.eline.wap.resource.client;

import com.eline.wap.common.model.Page;
import com.eline.wap.resource.dao.KJavaDAO;
import com.eline.wap.resource.dao.ResourceDAOFactory;
import com.eline.wap.resource.exceptions.ResourceDAOSysException;
import com.eline.wap.resource.exceptions.ResourceException;
import com.eline.wap.resource.model.KJava;
import com.eline.wap.resource.model.KJavaCondition;
import com.eline.wap.resource.model.KJavaStorage;

public class KJavaHelper {

	private KJavaDAO dao = null;

	public Page searchKJavas(KJavaCondition condition, int start, int count) throws ResourceException {
		try {
			if (dao == null)
				dao = ResourceDAOFactory.getKJavaDAO();
			return dao.searchKJavas(condition, start, count);
		} catch (ResourceDAOSysException e) {
			throw new ResourceException(e.getMessage());
		}
	}
	public void updateKJava(KJava item) throws ResourceException {
		try {
			if (dao == null)
				dao = ResourceDAOFactory.getKJavaDAO();
			dao.updateKJava(item);
		} catch (ResourceDAOSysException e) {
			throw new ResourceException(e.getMessage());
		}
	}
	public void deleteKJava(int indexId) throws ResourceException {
		try {
			if (dao == null)
				dao = ResourceDAOFactory.getKJavaDAO();
			dao.deleteKJava(indexId);
		} catch (ResourceDAOSysException e) {
			throw new ResourceException(e.getMessage());
		}
	}
	public void createKJava(KJava item) throws ResourceException {
		try {
			if (dao == null)
				dao = ResourceDAOFactory.getKJavaDAO();
			dao.createKJava(item);
		} catch (ResourceDAOSysException e) {
			throw new ResourceException(e.getMessage());
		}
	}
	public KJava getKJava(int indexId) throws ResourceException {
		try {
			if (dao == null)
				dao = ResourceDAOFactory.getKJavaDAO();
			return dao.getKJava(indexId);
		} catch (ResourceDAOSysException e) {
			throw new ResourceException(e.getMessage());
		}
	}
	public Page getKJavaStorages(int parentId, int start, int count) throws ResourceException {
		try {
			if (dao == null)
				dao = ResourceDAOFactory.getKJavaDAO();
			return dao.getKJavaStorages(parentId, start, count);
		} catch (ResourceDAOSysException e) {
			throw new ResourceException(e.getMessage());
		}
	}
	public KJavaStorage getKJavaStorage(int indexId) throws ResourceException {
		try {
			if (dao == null)
				dao = ResourceDAOFactory.getKJavaDAO();
			return dao.getKJavaStorage(indexId);
		} catch (ResourceDAOSysException e) {
			throw new ResourceException(e.getMessage());
		}
	}
	public void createKJavaStorage(KJavaStorage item) throws ResourceException {
		try {
			if (dao == null)
				dao = ResourceDAOFactory.getKJavaDAO();
			dao.createKJavaStorage(item);
		} catch (ResourceDAOSysException e) {
			throw new ResourceException(e.getMessage());
		}
	}
	public void updateKJavaStorage(KJavaStorage item) throws ResourceException {
		try {
			if (dao == null)
				dao = ResourceDAOFactory.getKJavaDAO();
			dao.updateKJavaStorage(item);
		} catch (ResourceDAOSysException e) {
			throw new ResourceException(e.getMessage());
		}
	}
	public void deleteKJavaStorage(int indexId) throws ResourceException {
		try {
			if (dao == null)
				dao = ResourceDAOFactory.getKJavaDAO();
			dao.deleteKJavaStorage(indexId);
		} catch (ResourceDAOSysException e) {
			throw new ResourceException(e.getMessage());
		}
	}
}

⌨️ 快捷键说明

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