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

📄 customerrule.java

📁 一个基于java工厂模式的 的实现
💻 JAVA
字号:
/*
 * CustomerRule.java
 *
 * Created on 2007年4月18日, 下午2:48
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.ebuy.businessrule;

import com.ebuy.common.dao.IDAO;
import com.ebuy.common.dao.IDAOFactory;
import com.ebuy.common.rule.IRule;
import com.ebuy.common.NameProvider;
import com.ebuy.entities.CustomerEntity;
import java.util.List;

/**
 *
 * @author Administrator
 */
public class CustomerRule extends RuleAdapter
{
    
    /** Creates a new instance of CustomerRule */
    public CustomerRule()
    {
        super(NameProvider.Customer);
    }

    public boolean addEntity(Object entity)
    {
       return dao.addEntity(entity);
    }

    public boolean updateEntity(Object entity)
    {
        return false;
    }

    public boolean deleteEntity(Object entity)
    {
         return false;
    }

    public Object findByPK(Object... pk)
    {
       return this.dao.findByPK(pk);
    }

    public List findAll()
    {
        return null;
    }
    
}

⌨️ 快捷键说明

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