关闭

附1 Websharp主要接口定义

533人阅读 评论(0) 收藏 举报

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();

     }

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:55097次
    • 积分:714
    • 等级:
    • 排名:千里之外
    • 原创:0篇
    • 转载:59篇
    • 译文:0篇
    • 评论:3条
    文章存档