附1 Websharp主要接口定义

1Websharp主要接口定义:

 

PersistenceCapable

public interface PersistenceCapable

     {

         EntityData EntityData{get;set;}

         int ObjectCount{get;}

         void AddNew();

         bool Next();

         void First();

}

      

 

 

 

 

 

 

PersistenceManager

public interface PersistenceManager : IDisposable

{

     void Close();

     bool IsClosed{get;}

     Transaction CurrentTransaction{  get;}

     bool IgnoreCache{get;set;}

 

     void PersistNewObject(EntityData entity);

     void PersistNewObject(PersistenceCapable pc);

     void UpdateObject(EntityData entity);

     void UpdateObject(PersistenceCapable pc);

     void DeleteObject(EntityData entity);

     void DeleteObject(PersistenceCapable pc);

     void Reload(EntityData entity);

     void Reload(PersistenceCapable pc);

     void Evict (object pc);

     void EvictAll (object[] pcs);

     void EvictAll (ICollection pcs);

     void EvictAll ();

     EntityData FindEntityDataByPrimaryKey(object id,string entityTypeName);

     EntityData FindEntityDataByPrimaryKey(object id,EntityData entity);

     PersistenceCapable FindObjectByPrimaryKey(object id,PersistenceCapable pc);

     PersistenceCapable FindObjectByPrimaryKey(object id,Type entityType);

 

     Query NewQuery();

     Query NewQuery(string entityTypeName);

     Query NewQuery(string entityTypeName,string filter);

     Query NewQuery(string entityTypeName,string filter,QueryParameterCollection paramColletion);

 

     DataAccess NewDataAccess();

}

 

Transaction

public interface Transaction

     {

         void Begin();

         void Commit();

         void Rollback();

         PersistenceManager PersistenceManager{get;}

     }

 

 Query

     public interface Query

     {

         string EntityTypeName{get;set;}   

         string Filter{get;set;}

   

         QueryParameterCollection Parameters

         {

              get;

              set;

         }

         string Ordering{get;set;}   

    

         bool IgnoreCache{get;set;}  

       

         EntityData QueryData();

         PersistenceCapable QueryObject(PersistenceCapable ps);

         EntityData LoadSubObject(EntityData entity,string subTypeName);

         PersistenceCapable QueryObject(PersistenceCapable ps,string subTypeName);

         EntityData LoadSubObjects(EntityData entity);

 

 

         PersistenceManager PersistenceManager{get;}

 

         bool QuerySubObjects{get;set;}

         bool IsClosed{get;}

         void Close ();

         void Open();

     }

阅读更多
想对作者说点什么? 我来说一句

WebSharp教程

2008年07月10日 184KB 下载

Websharp2.0(2006-2-6) ORM

2008年10月24日 2.26MB 下载

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭