コード例 #1
0
        /**
         * @return any Criteria.  If no Criteria has been established we establish
         * one and return it.
         */
        private ICriteria GetOrEstablishSomeCriteria()
        {
            ICriteria crit = GetSomeCriteria();

            if (crit != null)
            {
                IShard shard = shards[0];
                crit = shard.EstablishCriteria(this);
            }
            return(crit);
        }
コード例 #2
0
        /**
         * @return Returns an actual Criteria object.  If no actual Criteria object
         * has been allocated, allocate one and return it.
         */
        private ICriteria GetOrEstablishSomeSubcriteria()
        {
            ICriteria crit = GetSomeSubcriteria();

            if (crit == null)
            {
                IShard shard = shards[0];
                // this should trigger the creation of all subcriteria for the parent
                shard.EstablishCriteria(parent);
            }
            return(GetSomeSubcriteria());
        }
コード例 #3
0
 public T Execute(IShard shard)
 {
     shard.EstablishCriteria(shardedCriteria);
     return((T)shard.List(shardedCriteria.CriteriaId));
 }