CSDN博客

img sunny_y_m

Websharp使用说明(7)

发表于2004/2/26 14:39:00  1055人阅读

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

相关博文

我的热门文章

img
取 消
img