コード例 #1
0
 public override int ExecuteNonQuery()
 {
     if (!context.GetPersistenceUnit().GetPersistenceGroup().CurrentSessionExists())
     {
         if (sessionAwareInstance == null)
         {
             sessionAwareInstance = context.GetPersistenceUnit().GetPersistenceGroup().GetContext().MakeSessionAware <Net.Vpc.Upa.Impl.Persistence.DefaultQuery>(this);
         }
         return(sessionAwareInstance.ExecuteNonQuery());
     }
     //
     Net.Vpc.Upa.Impl.Persistence.QueryExecutor queryExecutor = CreateNativeSQL(null);
     return(queryExecutor.Execute().GetResultCount());
 }
コード例 #2
0
 protected internal virtual Net.Vpc.Upa.Impl.Persistence.QueryExecutor ExecuteQuery(Net.Vpc.Upa.Filters.FieldFilter fieldFilter)
 {
     //        if (result != null) {
     //            throw new FindException("QueryAlreadyExecutedException");
     //        }
     Net.Vpc.Upa.Impl.Persistence.QueryExecutor queryExecutor = CreateNativeSQL(fieldFilter);
     //        DefaultResultMetaData m = new DefaultResultMetaData();
     //        for (NativeField x : queryExecutor.getFields()) {
     //            m.addField(x.getName(), x.getTypeTransform(), x.getField());
     //        }
     //        this.metadata = m;
     queryExecutor.Execute();
     result = queryExecutor.GetQueryResult();
     return(queryExecutor);
 }