Spring.net的初次使用(2)--关于Bll类

BaseManager.cs
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using Ivan.Spring.Dao;
using Ivan.Spring.Model;
namespace Ivan.Spring.Bll
{
    
public abstract class BaseManager : IBaseManager
    
{
        
// Methods
        public bool DeleteObject(Entity entity)
        
{
            
return this.getBaseDAO().DeleteObject(entity);
        }


        
public IList GetAllObjectsList()
        
{
            
return this.getBaseDAO().GetAllObjectsList();
        }


        
protected abstract DaoBase getBaseDAO();

        
public Entity Load(object ID)
        
{
            
return this.getBaseDAO().Load(ID);
        }


        
public Entity SaveObject(Entity entity)
        
{
            
return this.getBaseDAO().SaveObject(entity);
        }


        
public bool UpdateObject(Entity entity)
        
{
            
return this.getBaseDAO().UpdateObject(entity);
        }


    }

}

IBaseManager.cs
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using Ivan.Spring.Dao;
using Ivan.Spring.Model;
namespace Ivan.Spring.Bll
{
    
public abstract class BaseManager : IBaseManager
    
{
        
// Methods
        public bool DeleteObject(Entity entity)
        
{
            
return this.getBaseDAO().DeleteObject(entity);
        }


        
public IList GetAllObjectsList()
        
{
            
return this.getBaseDAO().GetAllObjectsList();
        }


        
protected abstract DaoBase getBaseDAO();

        
public Entity Load(object ID)
        
{
            
return this.getBaseDAO().Load(ID);
        }


        
public Entity SaveObject(Entity entity)
        
{
            
return this.getBaseDAO().SaveObject(entity);
        }


        
public bool UpdateObject(Entity entity)
        
{
            
return this.getBaseDAO().UpdateObject(entity);
        }


    }

}


UserManager.cs
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using Ivan.Spring.Dao;
namespace Ivan.Spring.Bll
{
    
        
IUserManager接口

        
UserManager类
    
}



posted @ 2007-06-01 17:11  迪迪Ivan  阅读(377)  评论(0)    收藏  举报