/// <summary>Retrieves in the calling MembershipCollection object all MembershipEntity objects which have data in common with the specified related Entities. If one is omitted, that entity is not used as a filter. </summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <param name="roleInstance">RoleEntity instance to use as a filter for the MembershipEntity objects to return</param>
 /// <param name="storeInformationInstance">StoreInformationEntity instance to use as a filter for the MembershipEntity objects to return</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 public bool GetMulti(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IPredicateExpression filter, IEntity roleInstance, IEntity storeInformationInstance, int pageNumber, int pageSize)
 {
     this.EntityFactoryToUse = entityFactoryToUse;
     IEntityFields fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(ProductSearchEngine.EntityType.MembershipEntity);
     IPredicateExpression selectFilter = CreateFilterUsingForeignKeys(roleInstance, storeInformationInstance, fieldsToReturn);
     if(filter!=null)
     {
         selectFilter.AddWithAnd(filter);
     }
     return this.PerformGetMultiAction(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, null, null, pageNumber, pageSize);
 }
Пример #2
0
 /// <summary>Retrieves in the calling ForumCollection object all ForumEntity objects which have data in common with the specified related Entities. If one is omitted, that entity is not used as a filter. </summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <param name="sectionInstance">SectionEntity instance to use as a filter for the ForumEntity objects to return</param>
 /// <param name="defaultSupportQueueInstance">SupportQueueEntity instance to use as a filter for the ForumEntity objects to return</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 public bool GetMulti(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IPredicateExpression filter, IEntity sectionInstance, IEntity defaultSupportQueueInstance, int pageNumber, int pageSize)
 {
     this.EntityFactoryToUse = entityFactoryToUse;
     IEntityFields fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(SD.HnD.DAL.EntityType.ForumEntity);
     IPredicateExpression selectFilter = CreateFilterUsingForeignKeys(sectionInstance, defaultSupportQueueInstance, fieldsToReturn);
     if(filter!=null)
     {
         selectFilter.AddWithAnd(filter);
     }
     return this.PerformGetMultiAction(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, null, null, pageNumber, pageSize);
 }
Пример #3
0
 internal ColumnConstraint(string constraintTableName, string constraintColumnName, IPredicateExpression predicateExpression, PredicateExpressionOperator operatorToUse)
 {
     this.predicateExpression = predicateExpression;
     if (string.IsNullOrEmpty(constraintTableName))
         throw new QueryGenerationException("Cannot create a constraint without a table");
     if (string.IsNullOrEmpty(constraintColumnName))
         throw new QueryGenerationException("Cannot create a constraint without a column");
     this.ColumnName = constraintColumnName;
     this.TableName = constraintTableName;
     this.Parameters = new List<IDataParameter>();
     if (operatorToUse == PredicateExpressionOperator.And)
         predicateExpression.And(this);
     else
         predicateExpression.Or(this);
 }
        /// <summary>
        /// Returns predicate which returns single (on none) entity for given moment in time.
        /// Vraća predikat koji filtrira jedan entitet koji je validan za dani momentInTime.
        /// </summary>
        /// <param name="setFilter">Additional filter which applies before datetime predicate.</param>
        public static PredicateExpression FilterValidEntities(DateTime momentInTime,
            EntityField2 validDateTimeField,
            IPredicateExpression setFilter)
        {
            PredicateExpression newSetFilter;

            if (null != setFilter)
            {
                newSetFilter = new PredicateExpression(setFilter);
                newSetFilter.AddWithAnd(validDateTimeField <= momentInTime);
            }
            else
            {
                newSetFilter = new PredicateExpression(validDateTimeField <= momentInTime);
            }

            PredicateExpression toReturn = new PredicateExpression();
            toReturn.Add(validDateTimeField <= momentInTime);
            toReturn.Add(new FieldCompareSetPredicate(validDateTimeField, null, validDateTimeField, null, SetOperator.GreaterEqualAll, newSetFilter));

            return toReturn;
        }
Пример #5
0
 /// <summary> Retrieves all related entities of type 'THistoryAlatEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'THistoryAlatEntity'</returns>
 public Kalibrasi.Data.CollectionClasses.THistoryAlatCollection GetMultiThistoryAlat(bool forceFetch, IPredicateExpression filter)
 {
     return GetMultiThistoryAlat(forceFetch, _thistoryAlat.EntityFactoryToUse, filter);
 }
Пример #6
0
 /// <summary> Retrieves all related entities of type 'ForumEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'ForumEntity'</returns>
 public SD.HnD.DAL.CollectionClasses.ForumCollection GetMultiForums(bool forceFetch, IPredicateExpression filter)
 {
     return GetMultiForums(forceFetch, _forums.EntityFactoryToUse, filter);
 }
Пример #7
0
 /// <summary> Retrieves in this AuditDataMessageRelatedCollection object all AuditDataMessageRelatedEntity objects which have data in common with the specified related Entities.
 /// If one is omitted, that entity is not used as a filter. All current elements in the collection are removed from the collection.</summary>
 /// <param name="auditActionInstance">AuditActionEntity instance to use as a filter for the AuditDataMessageRelatedEntity objects to return</param>
 /// <param name="messageInstance">MessageEntity instance to use as a filter for the AuditDataMessageRelatedEntity objects to return</param>
 /// <param name="userAuditedInstance">UserEntity instance to use as a filter for the AuditDataMessageRelatedEntity objects to return</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <returns>true if succeeded, false otherwise</returns>
 public bool GetMultiManyToOne(IEntity auditActionInstance, IEntity messageInstance, IEntity userAuditedInstance, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicateExpression filter)
 {
     return(GetMultiManyToOne(auditActionInstance, messageInstance, userAuditedInstance, maxNumberOfItemsToReturn, sortClauses, filter, 0, 0));
 }
Пример #8
0
 /// <summary> Retrieves all related entities of type 'AuctionEventDonorEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'AuctionEventDonorEntity'</returns>
 public Auction.Entities.CollectionClasses.AuctionEventDonorCollection GetMultiAuctionEventDonor(bool forceFetch, IPredicateExpression filter)
 {
     return GetMultiAuctionEventDonor(forceFetch, _auctionEventDonor.EntityFactoryToUse, filter);
 }
Пример #9
0
 /// <summary> Retrieves all related entities of type 'MUserEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'MUserEntity'</returns>
 public Kalibrasi.Data.CollectionClasses.MUserCollection GetMultiMuser(bool forceFetch, IPredicateExpression filter)
 {
     return GetMultiMuser(forceFetch, _muser.EntityFactoryToUse, filter);
 }
 /// <summary> Retrieves all related entities of type 'ProductPhotoEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'ProductPhotoEntity'</returns>
 public ProductSearchEngine.CollectionClasses.ProductPhotoCollection GetMultiProductPhotos(bool forceFetch, IPredicateExpression filter)
 {
     return GetMultiProductPhotos(forceFetch, _productPhotos.EntityFactoryToUse, filter);
 }
Пример #11
0
 /// <summary> Retrieves in this QueryCollection object all QueryEntity objects which have data in common with the specified related Entities.
 /// If one is omitted, that entity is not used as a filter. All current elements in the collection are removed from the collection.</summary>
 /// <param name="libraryInstance">LibraryEntity instance to use as a filter for the QueryEntity objects to return</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <returns>true if succeeded, false otherwise</returns>
 public bool GetMultiManyToOne(IEntity libraryInstance, IPredicateExpression filter)
 {
     return(GetMultiManyToOne(libraryInstance, base.MaxNumberOfItemsToReturn, base.SortClauses, filter, 0, 0));
 }
Пример #12
0
 /// <summary>Gets the amount of rows in the database for this typed list.</summary>
 /// <param name="allowDuplicates">Flag to allow duplicate rows (true) or not (false)</param>
 /// <param name="filter">The filter to apply for the count retrieval</param>
 /// <returns>the number of rows in the set defined by the passed in query elements</returns>
 public int GetDbCount(bool allowDuplicates, IPredicateExpression filter)
 {
     return(GetDbCount(allowDuplicates, filter, null));
 }
Пример #13
0
        /// <summary>Gets the amount of rows in the database for this typed list.</summary>
        /// <param name="allowDuplicates">Flag to allow duplicate rows (true) or not (false)</param>
        /// <param name="filter">The filter to apply for the count retrieval</param>
        /// <param name="groupByClause">group by clause to embed in the query</param>
        /// <returns>the number of rows in the set defined by the passed in query elements</returns>
        public virtual int GetDbCount(bool allowDuplicates, IPredicateExpression filter, GroupByCollection groupByClause)
        {
            IEntityFields fieldsInResultset = EntityFieldsFactory.CreateTypedViewEntityFieldsObject(TypedViewType.OrderDetailsExtendedTypedView);

            return(DAOFactory.CreateTypedListDAO().GetDbCount(fieldsInResultset, null, filter, null, groupByClause, allowDuplicates));
        }
 /// <summary> Retrieves all related entities of type 'OrderEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'OrderEntity'</returns>
 public SD.LLBLGen.Pro.Examples.CollectionClasses.OrderCollection GetMultiOrders(bool forceFetch, IPredicateExpression filter)
 {
     return(GetMultiOrders(forceFetch, _orders.EntityFactoryToUse, filter));
 }
 /// <summary> Retrieves all related entities of type 'OrderEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="entityFactoryToUse">The entity factory to use for the GetMultiManyToOne() routine.</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of the type constructed by the passed in entity factory</returns>
 public virtual SD.LLBLGen.Pro.Examples.CollectionClasses.OrderCollection GetMultiOrders(bool forceFetch, IEntityFactory entityFactoryToUse, IPredicateExpression filter)
 {
     if ((!_alreadyFetchedOrders || forceFetch || _alwaysFetchOrders) && !this.IsSerializing && !this.IsDeserializing && !this.InDesignMode)
     {
         AddToTransactionIfNecessary(_orders);
         _orders.SuppressClearInGetMulti = !forceFetch;
         _orders.EntityFactoryToUse      = entityFactoryToUse;
         _orders.GetMultiManyToOne(null, null, this, filter);
         _orders.SuppressClearInGetMulti = false;
         _alreadyFetchedOrders           = true;
     }
     return(_orders);
 }
Пример #16
0
 /// <summary> Retrieves all related entities of type 'ProductEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'ProductEntity'</returns>
 public Northwind.SSDAL.CollectionClasses.ProductCollection GetMultiProducts(bool forceFetch, IPredicateExpression filter)
 {
     return(GetMultiProducts(forceFetch, _products.EntityFactoryToUse, filter));
 }
Пример #17
0
 /// <summary> Retrieves all related entities of type 'StoreInformationEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'StoreInformationEntity'</returns>
 public ProductSearchEngine.CollectionClasses.StoreInformationCollection GetMultiStoreInformations(bool forceFetch, IPredicateExpression filter)
 {
     return(GetMultiStoreInformations(forceFetch, _storeInformations.EntityFactoryToUse, filter));
 }
        /// <summary>
        /// Retrieves in the calling PolicyDocumentCollection object all PolicyDocumentEntity objects which have data in common
        /// with the specified related Entities. If one is omitted, that entity is not used as a filter.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return.
        /// When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
        /// <param name="libraryInstance">LibraryEntity instance to use as a filter for the PolicyDocumentEntity objects to return</param>
        /// <param name="policyLinkInstance">PolicyLinkEntity instance to use as a filter for the PolicyDocumentEntity objects to return</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        public bool GetMulti(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IPredicateExpression filter, IEntity libraryInstance, IEntity policyLinkInstance, int pageNumber, int pageSize)
        {
            base.EntityFactoryToUse = entityFactoryToUse;
            IEntityFields        fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(policyDB.EntityType.PolicyDocumentEntity);
            IPredicateExpression selectFilter   = CreateFilterUsingForeignKeys(libraryInstance, policyLinkInstance, fieldsToReturn);

            if (filter != null)
            {
                selectFilter.AddWithAnd(filter);
            }
            return(base.PerformGetMultiAction(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, null, null, pageNumber, pageSize));
        }
Пример #19
0
 /// <summary> Retrieves all related entities of type 'MDepartementEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'MDepartementEntity'</returns>
 public Kalibrasi.Data.CollectionClasses.MDepartementCollection GetMultiMdepartement(bool forceFetch, IPredicateExpression filter)
 {
     return GetMultiMdepartement(forceFetch, _mdepartement.EntityFactoryToUse, filter);
 }
Пример #20
0
 /// <summary> Retrieves all related entities of type 'ProductEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'ProductEntity'</returns>
 public ProductSearchEngine.CollectionClasses.ProductCollection GetMultiProducts(bool forceFetch, IPredicateExpression filter)
 {
     return(GetMultiProducts(forceFetch, _products.EntityFactoryToUse, filter));
 }
Пример #21
0
 /// <summary>
 /// Retrieves in the calling PackageCollection object all PackageEntity objects which have data in common
 /// with the specified related Entities. If one is omitted, that entity is not used as a filter. 
 /// </summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. 
 /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. 
 /// When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <param name="auctionEventInstance">AuctionEventEntity instance to use as a filter for the PackageEntity objects to return</param>
 /// <param name="bidderInstance">BidderEntity instance to use as a filter for the PackageEntity objects to return</param>
 /// <param name="categoryInstance">CategoryEntity instance to use as a filter for the PackageEntity objects to return</param>
 /// <param name="user__Instance">UserEntity instance to use as a filter for the PackageEntity objects to return</param>
 /// <param name="user_Instance">UserEntity instance to use as a filter for the PackageEntity objects to return</param>
 /// <param name="userInstance">UserEntity instance to use as a filter for the PackageEntity objects to return</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 public bool GetMulti(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IPredicateExpression filter, IEntity auctionEventInstance, IEntity bidderInstance, IEntity categoryInstance, IEntity user__Instance, IEntity user_Instance, IEntity userInstance, int pageNumber, int pageSize)
 {
     base.EntityFactoryToUse = entityFactoryToUse;
     IEntityFields fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(Auction.Entities.EntityType.PackageEntity);
     IPredicateExpression selectFilter = CreateFilterUsingForeignKeys(auctionEventInstance, bidderInstance, categoryInstance, user__Instance, user_Instance, userInstance, fieldsToReturn);
     if(filter!=null)
     {
         selectFilter.AddWithAnd(filter);
     }
     return base.PerformGetMultiAction(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, null, null, pageNumber, pageSize);
 }
Пример #22
0
 /// <summary> Retrieves all related entities of type 'ProductEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="entityFactoryToUse">The entity factory to use for the GetMultiManyToOne() routine.</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of the type constructed by the passed in entity factory</returns>
 public virtual ProductSearchEngine.CollectionClasses.ProductCollection GetMultiProducts(bool forceFetch, IEntityFactory entityFactoryToUse, IPredicateExpression filter)
 {
     if ((!_alreadyFetchedProducts || forceFetch || _alwaysFetchProducts) && !this.IsSerializing && !this.IsDeserializing && !this.InDesignMode)
     {
         AddToTransactionIfNecessary(_products);
         _products.SuppressClearInGetMulti = !forceFetch;
         _products.EntityFactoryToUse      = entityFactoryToUse;
         _products.GetMultiManyToOne(this, null, null, filter);
         _products.SuppressClearInGetMulti = false;
         _alreadyFetchedProducts           = true;
     }
     return(_products);
 }
 /// <summary> Retrieves all related entities of type 'PolicyEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'PolicyEntity'</returns>
 public policyDB.CollectionClasses.PolicyCollection GetMultiPolicy(bool forceFetch, IPredicateExpression filter)
 {
     return GetMultiPolicy(forceFetch, _policy.EntityFactoryToUse, filter);
 }
 /// <summary> Retrieves all related entities of type 'CustomerCustomerDemoEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'CustomerCustomerDemoEntity'</returns>
 public Northwind.DAL.CollectionClasses.CustomerCustomerDemoCollection GetMultiCustomerCustomerDemos(bool forceFetch, IPredicateExpression filter)
 {
     return(GetMultiCustomerCustomerDemos(forceFetch, _customerCustomerDemos.EntityFactoryToUse, filter));
 }
Пример #25
0
 /// <summary> Retrieves all related entities of type 'StoreInformationEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="entityFactoryToUse">The entity factory to use for the GetMultiManyToOne() routine.</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of the type constructed by the passed in entity factory</returns>
 public virtual ProductSearchEngine.CollectionClasses.StoreInformationCollection GetMultiStoreInformations(bool forceFetch, IEntityFactory entityFactoryToUse, IPredicateExpression filter)
 {
     if( ( !_alreadyFetchedStoreInformations || forceFetch || _alwaysFetchStoreInformations) && !this.IsSerializing && !this.IsDeserializing && !this.InDesignMode)
     {
         AddToTransactionIfNecessary(_storeInformations);
         _storeInformations.SuppressClearInGetMulti=!forceFetch;
         _storeInformations.EntityFactoryToUse = entityFactoryToUse;
         _storeInformations.GetMultiManyToOne(this, filter);
         _storeInformations.SuppressClearInGetMulti=false;
         _alreadyFetchedStoreInformations = true;
     }
     return _storeInformations;
 }
 /// <summary> Retrieves all related entities of type 'CustomerCustomerDemoEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="entityFactoryToUse">The entity factory to use for the GetMultiManyToOne() routine.</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of the type constructed by the passed in entity factory</returns>
 public virtual Northwind.DAL.CollectionClasses.CustomerCustomerDemoCollection GetMultiCustomerCustomerDemos(bool forceFetch, IEntityFactory entityFactoryToUse, IPredicateExpression filter)
 {
     if ((!_alreadyFetchedCustomerCustomerDemos || forceFetch || _alwaysFetchCustomerCustomerDemos) && !this.IsSerializing && !this.IsDeserializing && !this.InDesignMode)
     {
         AddToTransactionIfNecessary(_customerCustomerDemos);
         _customerCustomerDemos.SuppressClearInGetMulti = !forceFetch;
         _customerCustomerDemos.EntityFactoryToUse      = entityFactoryToUse;
         _customerCustomerDemos.GetMultiManyToOne(null, this, filter);
         _customerCustomerDemos.SuppressClearInGetMulti = false;
         _alreadyFetchedCustomerCustomerDemos           = true;
     }
     return(_customerCustomerDemos);
 }
Пример #27
0
 /// <summary> Retrieves all related entities of type 'DonationEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'DonationEntity'</returns>
 public Auction.Entities.CollectionClasses.DonationCollection GetMultiDonation(bool forceFetch, IPredicateExpression filter)
 {
     return GetMultiDonation(forceFetch, _donation.EntityFactoryToUse, filter);
 }
        /// <summary> Retrieves in this AttributeValueCollection object all AttributeValueEntity objects which have data in common with the specified related Entities.
        /// If one is omitted, that entity is not used as a filter. All current elements in the collection are removed from the collection.</summary>
        /// <param name="attributeInstance">AttributeEntity instance to use as a filter for the AttributeValueEntity objects to return</param>
        /// <param name="attributeMatchInstance">DecisionNodeEntity instance to use as a filter for the AttributeValueEntity objects to return</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public virtual bool GetMultiManyToOne(IEntity attributeInstance, IEntity attributeMatchInstance, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicateExpression filter, int pageNumber, int pageSize)
        {
            bool validParameters = false;

            validParameters |= (attributeInstance != null);
            validParameters |= (attributeMatchInstance != null);
            if (!validParameters)
            {
                return(GetMulti(filter, maxNumberOfItemsToReturn, sortClauses, null, pageNumber, pageSize));
            }
            if (!base.SuppressClearInGetMulti)
            {
                this.Clear();
            }
            AttributeValueDAO dao = DAOFactory.CreateAttributeValueDAO();

            return(dao.GetMulti(base.Transaction, this, maxNumberOfItemsToReturn, sortClauses, base.EntityFactoryToUse, filter, attributeInstance, attributeMatchInstance, pageNumber, pageSize));
        }
Пример #29
0
        /// <summary> Retrieves in this ContactCollection object all ContactEntity objects which have data in common with the specified related Entities.
        /// If one is omitted, that entity is not used as a filter. All current elements in the collection are removed from the collection.</summary>
        /// <param name="organizationInstance">OrganizationEntity instance to use as a filter for the ContactEntity objects to return</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public virtual bool GetMultiManyToOne(IEntity organizationInstance, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicateExpression filter, int pageNumber, int pageSize)
        {
            bool validParameters = false;

            validParameters |= (organizationInstance != null);
            if (!validParameters)
            {
                return(GetMulti(filter, maxNumberOfItemsToReturn, sortClauses, null, pageNumber, pageSize));
            }
            if (!this.SuppressClearInGetMulti)
            {
                this.Clear();
            }
            return(DAOFactory.CreateContactDAO().GetMulti(this.Transaction, this, maxNumberOfItemsToReturn, sortClauses, this.EntityFactoryToUse, filter, organizationInstance, pageNumber, pageSize));
        }
 /// <summary> Retrieves in this AttributeValueCollection object all AttributeValueEntity objects which have data in common with the specified related Entities.
 /// If one is omitted, that entity is not used as a filter. All current elements in the collection are removed from the collection.</summary>
 /// <param name="attributeInstance">AttributeEntity instance to use as a filter for the AttributeValueEntity objects to return</param>
 /// <param name="attributeMatchInstance">DecisionNodeEntity instance to use as a filter for the AttributeValueEntity objects to return</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <returns>true if succeeded, false otherwise</returns>
 public bool GetMultiManyToOne(IEntity attributeInstance, IEntity attributeMatchInstance, IPredicateExpression filter)
 {
     return(GetMultiManyToOne(attributeInstance, attributeMatchInstance, base.MaxNumberOfItemsToReturn, base.SortClauses, filter, 0, 0));
 }
Пример #31
0
 /// <summary>
 /// Retrieves in the calling MUserCollection object all MUserEntity objects which have data in common
 /// with the specified related Entities. If one is omitted, that entity is not used as a filter. 
 /// </summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. 
 /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. 
 /// When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <param name="mhakAksesInstance">MHakAksesEntity instance to use as a filter for the MUserEntity objects to return</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 public bool GetMulti(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IPredicateExpression filter, IEntity mhakAksesInstance, int pageNumber, int pageSize)
 {
     base.EntityFactoryToUse = entityFactoryToUse;
     IEntityFields fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(Kalibrasi.Data.EntityType.MUserEntity);
     IPredicateExpression selectFilter = CreateFilterUsingForeignKeys(mhakAksesInstance, fieldsToReturn);
     if(filter!=null)
     {
         selectFilter.AddWithAnd(filter);
     }
     return base.PerformGetMultiAction(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, null, null, pageNumber, pageSize);
 }
Пример #32
0
        /// <summary> Retrieves in this ServiceLocationAssetTypeChangeLogCollection object all ServiceLocationAssetTypeChangeLogEntity objects which have data in common with the specified related Entities.
        /// If one is omitted, that entity is not used as a filter. All current elements in the collection are removed from the collection.</summary>
        /// <param name="changeLogInstance">ChangeLogEntity instance to use as a filter for the ServiceLocationAssetTypeChangeLogEntity objects to return</param>
        /// <param name="serviceLocationAssetTypeInstance">ServiceLocationAssetTypeEntity instance to use as a filter for the ServiceLocationAssetTypeChangeLogEntity objects to return</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public virtual bool GetMultiManyToOne(IEntity changeLogInstance, IEntity serviceLocationAssetTypeInstance, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicateExpression filter, int pageNumber, int pageSize)
        {
            bool validParameters = false;

            validParameters |= (changeLogInstance != null);
            validParameters |= (serviceLocationAssetTypeInstance != null);
            if (!validParameters)
            {
                return(GetMulti(filter, maxNumberOfItemsToReturn, sortClauses, null, pageNumber, pageSize));
            }
            if (!base.SuppressClearInGetMulti)
            {
                this.Clear();
            }
            ServiceLocationAssetTypeChangeLogDAO dao = DAOFactory.CreateServiceLocationAssetTypeChangeLogDAO();

            return(dao.GetMulti(base.Transaction, this, maxNumberOfItemsToReturn, sortClauses, base.EntityFactoryToUse, filter, changeLogInstance, serviceLocationAssetTypeInstance, pageNumber, pageSize));
        }
Пример #33
0
 /// <summary> Retrieves all related entities of type 'RuleEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="entityFactoryToUse">The entity factory to use for the GetMultiManyToOne() routine.</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of the type constructed by the passed in entity factory</returns>
 public virtual policyDB.CollectionClasses.RuleCollection GetMultiRule(bool forceFetch, IEntityFactory entityFactoryToUse, IPredicateExpression filter)
 {
     if( ( !_alreadyFetchedRule || forceFetch || _alwaysFetchRule) && !base.IsSerializing && !base.IsDeserializing && !base.InDesignMode)
     {
         if(base.ParticipatesInTransaction)
         {
             if(!_rule.ParticipatesInTransaction)
             {
                 base.Transaction.Add(_rule);
             }
         }
         _rule.SuppressClearInGetMulti=!forceFetch;
         if(entityFactoryToUse!=null)
         {
             _rule.EntityFactoryToUse = entityFactoryToUse;
         }
         _rule.GetMultiManyToOne(null, null, this, filter);
         _rule.SuppressClearInGetMulti=false;
         _alreadyFetchedRule = true;
     }
     return _rule;
 }
Пример #34
0
 /// <summary> Retrieves in this ServiceLocationAssetTypeChangeLogCollection object all ServiceLocationAssetTypeChangeLogEntity objects which have data in common with the specified related Entities.
 /// If one is omitted, that entity is not used as a filter. All current elements in the collection are removed from the collection.</summary>
 /// <param name="changeLogInstance">ChangeLogEntity instance to use as a filter for the ServiceLocationAssetTypeChangeLogEntity objects to return</param>
 /// <param name="serviceLocationAssetTypeInstance">ServiceLocationAssetTypeEntity instance to use as a filter for the ServiceLocationAssetTypeChangeLogEntity objects to return</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <returns>true if succeeded, false otherwise</returns>
 public bool GetMultiManyToOne(IEntity changeLogInstance, IEntity serviceLocationAssetTypeInstance, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicateExpression filter)
 {
     return(GetMultiManyToOne(changeLogInstance, serviceLocationAssetTypeInstance, maxNumberOfItemsToReturn, sortClauses, filter, 0, 0));
 }
Пример #35
0
 /// <summary> Retrieves all related entities of type 'THistoryAlatEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="entityFactoryToUse">The entity factory to use for the GetMultiManyToOne() routine.</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of the type constructed by the passed in entity factory</returns>
 public virtual Kalibrasi.Data.CollectionClasses.THistoryAlatCollection GetMultiThistoryAlat(bool forceFetch, IEntityFactory entityFactoryToUse, IPredicateExpression filter)
 {
     if( ( !_alreadyFetchedThistoryAlat || forceFetch || _alwaysFetchThistoryAlat) && !base.IsSerializing && !base.IsDeserializing && !base.InDesignMode)
     {
         if(base.ParticipatesInTransaction)
         {
             if(!_thistoryAlat.ParticipatesInTransaction)
             {
                 base.Transaction.Add(_thistoryAlat);
             }
         }
         _thistoryAlat.SuppressClearInGetMulti=!forceFetch;
         if(entityFactoryToUse!=null)
         {
             _thistoryAlat.EntityFactoryToUse = entityFactoryToUse;
         }
         _thistoryAlat.GetMultiManyToOne(this, filter);
         _thistoryAlat.SuppressClearInGetMulti=false;
         _alreadyFetchedThistoryAlat = true;
     }
     return _thistoryAlat;
 }
Пример #36
0
        /// <summary> Retrieves in this OrderCollection object all OrderEntity objects which have data in common with the specified related Entities.
        /// If one is omitted, that entity is not used as a filter. All current elements in the collection are removed from the collection.</summary>
        /// <param name="customerInstance">CustomerEntity instance to use as a filter for the OrderEntity objects to return</param>
        /// <param name="employeeInstance">EmployeeEntity instance to use as a filter for the OrderEntity objects to return</param>
        /// <param name="shipperInstance">ShipperEntity instance to use as a filter for the OrderEntity objects to return</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public virtual bool GetMultiManyToOne(IEntity customerInstance, IEntity employeeInstance, IEntity shipperInstance, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicateExpression filter, int pageNumber, int pageSize)
        {
            bool validParameters = false;

            validParameters |= (customerInstance != null);
            validParameters |= (employeeInstance != null);
            validParameters |= (shipperInstance != null);
            if (!validParameters)
            {
                return(GetMulti(filter, maxNumberOfItemsToReturn, sortClauses, null, pageNumber, pageSize));
            }
            if (!this.SuppressClearInGetMulti)
            {
                this.Clear();
            }
            return(DAOFactory.CreateOrderDAO().GetMulti(this.Transaction, this, maxNumberOfItemsToReturn, sortClauses, this.EntityFactoryToUse, filter, customerInstance, employeeInstance, shipperInstance, pageNumber, pageSize));
        }
Пример #37
0
 /// <summary> Retrieves all related entities of type 'MLokasiEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'MLokasiEntity'</returns>
 public Kalibrasi.Data.CollectionClasses.MLokasiCollection GetMultiMlokasi(bool forceFetch, IPredicateExpression filter)
 {
     return GetMultiMlokasi(forceFetch, _mlokasi.EntityFactoryToUse, filter);
 }
Пример #38
0
 /// <summary> Retrieves in this OrderCollection object all OrderEntity objects which have data in common with the specified related Entities.
 /// If one is omitted, that entity is not used as a filter. All current elements in the collection are removed from the collection.</summary>
 /// <param name="customerInstance">CustomerEntity instance to use as a filter for the OrderEntity objects to return</param>
 /// <param name="employeeInstance">EmployeeEntity instance to use as a filter for the OrderEntity objects to return</param>
 /// <param name="shipperInstance">ShipperEntity instance to use as a filter for the OrderEntity objects to return</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <returns>true if succeeded, false otherwise</returns>
 public bool GetMultiManyToOne(IEntity customerInstance, IEntity employeeInstance, IEntity shipperInstance, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicateExpression filter)
 {
     return(GetMultiManyToOne(customerInstance, employeeInstance, shipperInstance, maxNumberOfItemsToReturn, sortClauses, filter, 0, 0));
 }
Пример #39
0
 /// <summary> Retrieves all related entities of type 'PackageEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'PackageEntity'</returns>
 public Auction.Entities.CollectionClasses.PackageCollection GetMultiPackage(bool forceFetch, IPredicateExpression filter)
 {
     return GetMultiPackage(forceFetch, _package.EntityFactoryToUse, filter);
 }
Пример #40
0
        /// <summary>Retrieves in the calling DeviceEventCollection object all DeviceEventEntity objects which have data in common with the specified related Entities. If one is omitted, that entity is not used as a filter. </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
        /// <param name="deviceInstance">DeviceEntity instance to use as a filter for the DeviceEventEntity objects to return</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        public bool GetMulti(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IPredicateExpression filter, IEntity deviceInstance, int pageNumber, int pageSize)
        {
            this.EntityFactoryToUse = entityFactoryToUse;
            IEntityFields        fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(EPICCentralDL.EntityType.DeviceEventEntity);
            IPredicateExpression selectFilter   = CreateFilterUsingForeignKeys(deviceInstance, fieldsToReturn);

            if (filter != null)
            {
                selectFilter.AddWithAnd(filter);
            }
            return(this.PerformGetMultiAction(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, null, null, pageNumber, pageSize));
        }
Пример #41
0
 /// <summary> Retrieves all related entities of type 'CommentEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'CommentEntity'</returns>
 public ProductSearchEngine.CollectionClasses.CommentCollection GetMultiComments(bool forceFetch, IPredicateExpression filter)
 {
     return GetMultiComments(forceFetch, _comments.EntityFactoryToUse, filter);
 }
Пример #42
0
        /// <summary>Retrieves in the calling OrderDetailCollection object all OrderDetailEntity objects which have data in common with the specified related Entities. If one is omitted, that entity is not used as a filter. </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
        /// <param name="ordersInstance">OrderEntity instance to use as a filter for the OrderDetailEntity objects to return</param>
        /// <param name="productsInstance">ProductEntity instance to use as a filter for the OrderDetailEntity objects to return</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        public bool GetMulti(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IPredicateExpression filter, IEntity ordersInstance, IEntity productsInstance, int pageNumber, int pageSize)
        {
            this.EntityFactoryToUse = entityFactoryToUse;
            IEntityFields        fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(SD.LLBLGen.Pro.Examples.Auditing.EntityType.OrderDetailEntity);
            IPredicateExpression selectFilter   = CreateFilterUsingForeignKeys(ordersInstance, productsInstance, fieldsToReturn);

            if (filter != null)
            {
                selectFilter.AddWithAnd(filter);
            }
            return(this.PerformGetMultiAction(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, null, null, pageNumber, pageSize));
        }
 /// <summary> Retrieves all related entities of type 'PolicyEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="entityFactoryToUse">The entity factory to use for the GetMultiManyToOne() routine.</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of the type constructed by the passed in entity factory</returns>
 public virtual policyDB.CollectionClasses.PolicyCollection GetMultiPolicy(bool forceFetch, IEntityFactory entityFactoryToUse, IPredicateExpression filter)
 {
     if( ( !_alreadyFetchedPolicy || forceFetch || _alwaysFetchPolicy) && !base.IsSerializing && !base.IsDeserializing && !base.InDesignMode)
     {
         if(base.ParticipatesInTransaction)
         {
             if(!_policy.ParticipatesInTransaction)
             {
                 base.Transaction.Add(_policy);
             }
         }
         _policy.SuppressClearInGetMulti=!forceFetch;
         if(entityFactoryToUse!=null)
         {
             _policy.EntityFactoryToUse = entityFactoryToUse;
         }
         _policy.GetMultiManyToOne(this, null, null, filter);
         _policy.SuppressClearInGetMulti=false;
         _alreadyFetchedPolicy = true;
     }
     return _policy;
 }
Пример #44
0
        /// <summary>
        /// Retrieves in the calling ChangeLogCollection object all ChangeLogEntity objects which have data in common
        /// with the specified related Entities. If one is omitted, that entity is not used as a filter.
        /// </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.
        /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return.
        /// When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
        /// <param name="changeTypeInstance">ChangeTypeEntity instance to use as a filter for the ChangeLogEntity objects to return</param>
        /// <param name="userInstance">UserEntity instance to use as a filter for the ChangeLogEntity objects to return</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        public bool GetMulti(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IPredicateExpression filter, IEntity changeTypeInstance, IEntity userInstance, int pageNumber, int pageSize)
        {
            base.EntityFactoryToUse = entityFactoryToUse;
            IEntityFields        fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(Reliant.RenuOil.DAL.EntityType.ChangeLogEntity);
            IPredicateExpression selectFilter   = CreateFilterUsingForeignKeys(changeTypeInstance, userInstance, fieldsToReturn);

            if (filter != null)
            {
                selectFilter.AddWithAnd(filter);
            }
            return(base.PerformGetMultiAction(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, null, null, pageNumber, pageSize));
        }
Пример #45
0
 /// <summary> Retrieves all related entities of type 'StoreInformationEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'StoreInformationEntity'</returns>
 public ProductSearchEngine.CollectionClasses.StoreInformationCollection GetMultiStoreInformations(bool forceFetch, IPredicateExpression filter)
 {
     return GetMultiStoreInformations(forceFetch, _storeInformations.EntityFactoryToUse, filter);
 }
		/// <summary> Retrieves in this PurchaseHistoryCollection object all PurchaseHistoryEntity objects which have data in common with the specified related Entities.
		/// If one is omitted, that entity is not used as a filter. All current elements in the collection are removed from the collection.</summary>
		/// <param name="deviceInstance">DeviceEntity instance to use as a filter for the PurchaseHistoryEntity objects to return</param>
		/// <param name="locationInstance">LocationEntity instance to use as a filter for the PurchaseHistoryEntity objects to return</param>
		/// <param name="userInstance">UserEntity instance to use as a filter for the PurchaseHistoryEntity objects to return</param>
		/// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
		/// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
		/// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
		/// <param name="pageNumber">The page number to retrieve.</param>
		/// <param name="pageSize">The page size of the page to retrieve.</param>
		/// <returns>true if succeeded, false otherwise</returns>
		public virtual bool GetMultiManyToOne(IEntity deviceInstance, IEntity locationInstance, IEntity userInstance, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicateExpression filter, int pageNumber, int pageSize)
		{
			bool validParameters = false;
			validParameters |= (deviceInstance!=null);
			validParameters |= (locationInstance!=null);
			validParameters |= (userInstance!=null);
			if(!validParameters)
			{
				return GetMulti(filter, maxNumberOfItemsToReturn, sortClauses, null, pageNumber, pageSize);
			}
			if(!this.SuppressClearInGetMulti)
			{
				this.Clear();
			}
			return DAOFactory.CreatePurchaseHistoryDAO().GetMulti(this.Transaction, this, maxNumberOfItemsToReturn, sortClauses, this.EntityFactoryToUse, filter, deviceInstance, locationInstance, userInstance, pageNumber, pageSize);
		}
        /// <summary>
        /// Inserts in each predicate expression element the persistence info object for the field used. If there is already a fieldpersistenceinfo 
        /// element for a given field, it is skipped. 
        /// </summary>
        /// <param name="expression">IPredicateExpression object which has predicate elements whose persistence info objects have to be
        /// set to a value.</param>
        protected override void InsertPersistenceInfoObjects(IPredicateExpression expression)
        {
            if(expression == null)
            {
                return;
            }

            for (int i = 0; i < expression.Count; i++)
            {
                if(expression[i].Type!=PredicateExpressionElementType.Predicate)
                {
                    continue;
                }

                IPredicate currentPredicate = (IPredicate)expression[i].Contents;
                switch((PredicateType)currentPredicate.InstanceType)
                {
                    case PredicateType.Undefined:
                        continue;
                    case PredicateType.PredicateExpression:
                        // recurse
                        InsertPersistenceInfoObjects((IPredicateExpression)expression[i].Contents);
                        break;
                    case PredicateType.FieldBetweenPredicate:
                        FieldBetweenPredicate betweenPredicate = (FieldBetweenPredicate)currentPredicate;
                        if(betweenPredicate.PersistenceInfo==null)
                        {
                            betweenPredicate.PersistenceInfo = GetFieldPersistenceInfo((IEntityField2)betweenPredicate.FieldCore);
                        }
                        if(betweenPredicate.BeginIsField && (betweenPredicate.PersistenceInfoBegin==null))
                        {
                            betweenPredicate.PersistenceInfoBegin = GetFieldPersistenceInfo((IEntityField2)betweenPredicate.FieldBeginCore);
                        }
                        if(betweenPredicate.EndIsField && (betweenPredicate.PersistenceInfoEnd==null))
                        {
                            betweenPredicate.PersistenceInfoEnd = GetFieldPersistenceInfo((IEntityField2)betweenPredicate.FieldEndCore);
                        }
                        break;
                    case PredicateType.FieldCompareNullPredicate:
                        FieldCompareNullPredicate compareNullPredicate = (FieldCompareNullPredicate)currentPredicate;
                        if(compareNullPredicate.PersistenceInfo==null)
                        {
                            compareNullPredicate.PersistenceInfo = GetFieldPersistenceInfo((IEntityField2)compareNullPredicate.FieldCore);
                        }
                        break;
                    case PredicateType.FieldCompareValuePredicate:
                        FieldCompareValuePredicate compareValuePredicate = (FieldCompareValuePredicate)currentPredicate;
                        if(compareValuePredicate.PersistenceInfo==null)
                        {
                            compareValuePredicate.PersistenceInfo = GetFieldPersistenceInfo((IEntityField2)compareValuePredicate.FieldCore);
                        }
                        break;
                    case PredicateType.FieldLikePredicate:
                        FieldLikePredicate likePredicate = (FieldLikePredicate)currentPredicate;
                        if(likePredicate.PersistenceInfo==null)
                        {
                            likePredicate.PersistenceInfo = GetFieldPersistenceInfo((IEntityField2)likePredicate.FieldCore);
                        }
                        break;
                    case PredicateType.FieldCompareRangePredicate:
                        FieldCompareRangePredicate compareRangePredicate = (FieldCompareRangePredicate)currentPredicate;
                        if(compareRangePredicate.PersistenceInfo==null)
                        {
                            compareRangePredicate.PersistenceInfo = GetFieldPersistenceInfo((IEntityField2)compareRangePredicate.FieldCore);
                        }
                        break;
                    case PredicateType.FieldCompareExpressionPredicate:
                        FieldCompareExpressionPredicate expressionPredicate = (FieldCompareExpressionPredicate)currentPredicate;
                        if(expressionPredicate.PersistenceInfo==null)
                        {
                            expressionPredicate.PersistenceInfo = GetFieldPersistenceInfo((IEntityField2)expressionPredicate.FieldCore);
                        }
                        if(expressionPredicate.ExpressionToCompareWith!=null)
                        {
                            InsertPersistenceInfoObjects(expressionPredicate.ExpressionToCompareWith);
                        }
                        break;
                    case PredicateType.FieldFullTextSearchPredicate:
                        FieldFullTextSearchPredicate fullTextSearchPredicate = (FieldFullTextSearchPredicate)currentPredicate;
                        if(fullTextSearchPredicate.TargetIsFieldList)
                        {
                            if(fullTextSearchPredicate.PersistenceInfosFieldsList==null)
                            {
                                ArrayList persistenceInfos = new ArrayList();
                                foreach(IEntityField2 field in fullTextSearchPredicate.FieldsList)
                                {
                                    persistenceInfos.Add(GetFieldPersistenceInfo(field));
                                }
                                fullTextSearchPredicate.PersistenceInfosFieldsList = persistenceInfos;
                            }
                        }
                        else
                        {
                            if(fullTextSearchPredicate.PersistenceInfo==null)
                            {
                                fullTextSearchPredicate.PersistenceInfo = GetFieldPersistenceInfo((IEntityField2)fullTextSearchPredicate.FieldCore);
                            }
                        }
                        break;
                    case PredicateType.FieldCompareSetPredicate:
                        FieldCompareSetPredicate compareSetPredicate = (FieldCompareSetPredicate)currentPredicate;
                        if((compareSetPredicate.PersistenceInfoField==null)&&(compareSetPredicate.FieldCore!=null))
                        {
                            compareSetPredicate.PersistenceInfoField = GetFieldPersistenceInfo((IEntityField2)compareSetPredicate.FieldCore);
                        }
                        if(compareSetPredicate.PersistenceInfoSetField==null)
                        {
                            compareSetPredicate.PersistenceInfoSetField = GetFieldPersistenceInfo((IEntityField2)compareSetPredicate.SetFieldCore);
                        }
                        InsertPersistenceInfoObjects(compareSetPredicate.SetFilterAsPredicateExpression);
                        InsertPersistenceInfoObjects(compareSetPredicate.SetRelations);
                        InsertPersistenceInfoObjects(compareSetPredicate.SetSorter);
                        InsertPersistenceInfoObjects(compareSetPredicate.GroupByClause);
                        break;
                    default:

                        // __LLBLGENPRO_USER_CODE_REGION_START InsertPersistenceInfoObjectsPredicate
                        // __LLBLGENPRO_USER_CODE_REGION_END
                        OnInsertPersistenceObjects(currentPredicate);
                        break;
                }
            }
        }
		/// <summary> Retrieves in this PurchaseHistoryCollection object all PurchaseHistoryEntity objects which have data in common with the specified related Entities.
		/// If one is omitted, that entity is not used as a filter. All current elements in the collection are removed from the collection.</summary>
		/// <param name="deviceInstance">DeviceEntity instance to use as a filter for the PurchaseHistoryEntity objects to return</param>
		/// <param name="locationInstance">LocationEntity instance to use as a filter for the PurchaseHistoryEntity objects to return</param>
		/// <param name="userInstance">UserEntity instance to use as a filter for the PurchaseHistoryEntity objects to return</param>
		/// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
		/// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
		/// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
		/// <returns>true if succeeded, false otherwise</returns>
		public bool GetMultiManyToOne(IEntity deviceInstance, IEntity locationInstance, IEntity userInstance, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicateExpression filter)
		{
			return GetMultiManyToOne(deviceInstance, locationInstance, userInstance, maxNumberOfItemsToReturn, sortClauses, filter, 0, 0);
		}
Пример #49
0
 /// <summary> Retrieves all related entities of type 'AuctionEventDonorEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="entityFactoryToUse">The entity factory to use for the GetMultiManyToOne() routine.</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of the type constructed by the passed in entity factory</returns>
 public virtual Auction.Entities.CollectionClasses.AuctionEventDonorCollection GetMultiAuctionEventDonor(bool forceFetch, IEntityFactory entityFactoryToUse, IPredicateExpression filter)
 {
     if( ( !_alreadyFetchedAuctionEventDonor || forceFetch || _alwaysFetchAuctionEventDonor) && !base.IsSerializing && !base.IsDeserializing && !base.InDesignMode)
     {
         if(base.ParticipatesInTransaction)
         {
             if(!_auctionEventDonor.ParticipatesInTransaction)
             {
                 base.Transaction.Add(_auctionEventDonor);
             }
         }
         _auctionEventDonor.SuppressClearInGetMulti=!forceFetch;
         if(entityFactoryToUse!=null)
         {
             _auctionEventDonor.EntityFactoryToUse = entityFactoryToUse;
         }
         _auctionEventDonor.GetMultiManyToOne(null, this, filter);
         _auctionEventDonor.SuppressClearInGetMulti=false;
         _alreadyFetchedAuctionEventDonor = true;
     }
     return _auctionEventDonor;
 }
Пример #50
0
 /// <summary> Retrieves in this StoreInformationCollection object all StoreInformationEntity objects which have data in common with the specified related Entities.
 /// If one is omitted, that entity is not used as a filter. All current elements in the collection are removed from the collection.</summary>
 /// <param name="cityInstance">CityEntity instance to use as a filter for the StoreInformationEntity objects to return</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <returns>true if succeeded, false otherwise</returns>
 public bool GetMultiManyToOne(IEntity cityInstance, IPredicateExpression filter)
 {
     return(GetMultiManyToOne(cityInstance, this.MaxNumberOfItemsToReturn, this.SortClauses, filter, 0, 0));
 }
Пример #51
0
 /// <summary> Retrieves all related entities of type 'DonationEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="entityFactoryToUse">The entity factory to use for the GetMultiManyToOne() routine.</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of the type constructed by the passed in entity factory</returns>
 public virtual Auction.Entities.CollectionClasses.DonationCollection GetMultiDonation(bool forceFetch, IEntityFactory entityFactoryToUse, IPredicateExpression filter)
 {
     if( ( !_alreadyFetchedDonation || forceFetch || _alwaysFetchDonation) && !base.IsSerializing && !base.IsDeserializing && !base.InDesignMode)
     {
         if(base.ParticipatesInTransaction)
         {
             if(!_donation.ParticipatesInTransaction)
             {
                 base.Transaction.Add(_donation);
             }
         }
         _donation.SuppressClearInGetMulti=!forceFetch;
         if(entityFactoryToUse!=null)
         {
             _donation.EntityFactoryToUse = entityFactoryToUse;
         }
         _donation.GetMultiManyToOne(null, this, null, null, null, filter);
         _donation.SuppressClearInGetMulti=false;
         _alreadyFetchedDonation = true;
     }
     return _donation;
 }
Пример #52
0
 /// <summary> Retrieves in this StoreInformationCollection object all StoreInformationEntity objects which have data in common with the specified related Entities.
 /// If one is omitted, that entity is not used as a filter. All current elements in the collection are removed from the collection.</summary>
 /// <param name="cityInstance">CityEntity instance to use as a filter for the StoreInformationEntity objects to return</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <returns>true if succeeded, false otherwise</returns>
 public bool GetMultiManyToOne(IEntity cityInstance, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicateExpression filter)
 {
     return(GetMultiManyToOne(cityInstance, maxNumberOfItemsToReturn, sortClauses, filter, 0, 0));
 }
Пример #53
0
 /// <summary> Retrieves all related entities of type 'MUserEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="entityFactoryToUse">The entity factory to use for the GetMultiManyToOne() routine.</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of the type constructed by the passed in entity factory</returns>
 public virtual Kalibrasi.Data.CollectionClasses.MUserCollection GetMultiMuser(bool forceFetch, IEntityFactory entityFactoryToUse, IPredicateExpression filter)
 {
     if( ( !_alreadyFetchedMuser || forceFetch || _alwaysFetchMuser) && !base.IsSerializing && !base.IsDeserializing && !base.InDesignMode)
     {
         if(base.ParticipatesInTransaction)
         {
             if(!_muser.ParticipatesInTransaction)
             {
                 base.Transaction.Add(_muser);
             }
         }
         _muser.SuppressClearInGetMulti=!forceFetch;
         if(entityFactoryToUse!=null)
         {
             _muser.EntityFactoryToUse = entityFactoryToUse;
         }
         _muser.GetMultiManyToOne(this, filter);
         _muser.SuppressClearInGetMulti=false;
         _alreadyFetchedMuser = true;
     }
     return _muser;
 }
Пример #54
0
        /// <summary>
        /// Inserts in each predicate expression element the persistence info object for the field used. If there is already a fieldpersistenceinfo
        /// element for a given field, it is skipped.
        /// </summary>
        /// <param name="expression">IPredicateExpression object which has predicate elements whose persistence info objects have to be
        /// set to a value.</param>
        protected override void InsertPersistenceInfoObjects(IPredicateExpression expression)
        {
            if (expression == null)
            {
                return;
            }

            for (int i = 0; i < expression.Count; i++)
            {
                if (expression[i].Type != PredicateExpressionElementType.Predicate)
                {
                    continue;
                }

                IPredicate currentPredicate = (IPredicate)expression[i].Contents;
                switch ((PredicateType)currentPredicate.InstanceType)
                {
                case PredicateType.Undefined:
                    continue;

                case PredicateType.PredicateExpression:
                    // recurse
                    InsertPersistenceInfoObjects((IPredicateExpression)expression[i].Contents);
                    break;

                case PredicateType.FieldBetweenPredicate:
                    FieldBetweenPredicate betweenPredicate = (FieldBetweenPredicate)currentPredicate;
                    if (betweenPredicate.PersistenceInfo == null)
                    {
                        betweenPredicate.PersistenceInfo = GetFieldPersistenceInfo((IEntityField2)betweenPredicate.FieldCore);
                    }
                    if (betweenPredicate.BeginIsField && (betweenPredicate.PersistenceInfoBegin == null))
                    {
                        betweenPredicate.PersistenceInfoBegin = GetFieldPersistenceInfo((IEntityField2)betweenPredicate.FieldBeginCore);
                    }
                    if (betweenPredicate.EndIsField && (betweenPredicate.PersistenceInfoEnd == null))
                    {
                        betweenPredicate.PersistenceInfoEnd = GetFieldPersistenceInfo((IEntityField2)betweenPredicate.FieldEndCore);
                    }
                    break;

                case PredicateType.FieldCompareNullPredicate:
                    FieldCompareNullPredicate compareNullPredicate = (FieldCompareNullPredicate)currentPredicate;
                    if (compareNullPredicate.PersistenceInfo == null)
                    {
                        compareNullPredicate.PersistenceInfo = GetFieldPersistenceInfo((IEntityField2)compareNullPredicate.FieldCore);
                    }
                    break;

                case PredicateType.FieldCompareValuePredicate:
                    FieldCompareValuePredicate compareValuePredicate = (FieldCompareValuePredicate)currentPredicate;
                    if (compareValuePredicate.PersistenceInfo == null)
                    {
                        compareValuePredicate.PersistenceInfo = GetFieldPersistenceInfo((IEntityField2)compareValuePredicate.FieldCore);
                    }
                    break;

                case PredicateType.FieldLikePredicate:
                    FieldLikePredicate likePredicate = (FieldLikePredicate)currentPredicate;
                    if (likePredicate.PersistenceInfo == null)
                    {
                        likePredicate.PersistenceInfo = GetFieldPersistenceInfo((IEntityField2)likePredicate.FieldCore);
                    }
                    break;

                case PredicateType.FieldCompareRangePredicate:
                    FieldCompareRangePredicate compareRangePredicate = (FieldCompareRangePredicate)currentPredicate;
                    if (compareRangePredicate.PersistenceInfo == null)
                    {
                        compareRangePredicate.PersistenceInfo = GetFieldPersistenceInfo((IEntityField2)compareRangePredicate.FieldCore);
                    }
                    break;

                case PredicateType.FieldCompareExpressionPredicate:
                    FieldCompareExpressionPredicate expressionPredicate = (FieldCompareExpressionPredicate)currentPredicate;
                    if (expressionPredicate.PersistenceInfo == null)
                    {
                        expressionPredicate.PersistenceInfo = GetFieldPersistenceInfo((IEntityField2)expressionPredicate.FieldCore);
                    }
                    if (expressionPredicate.ExpressionToCompareWith != null)
                    {
                        InsertPersistenceInfoObjects(expressionPredicate.ExpressionToCompareWith);
                    }
                    break;

                case PredicateType.FieldFullTextSearchPredicate:
                    FieldFullTextSearchPredicate fullTextSearchPredicate = (FieldFullTextSearchPredicate)currentPredicate;
                    if (fullTextSearchPredicate.TargetIsFieldList)
                    {
                        if (fullTextSearchPredicate.PersistenceInfosFieldsList == null)
                        {
                            ArrayList persistenceInfos = new ArrayList();
                            foreach (IEntityField2 field in fullTextSearchPredicate.FieldsList)
                            {
                                persistenceInfos.Add(GetFieldPersistenceInfo(field));
                            }
                            fullTextSearchPredicate.PersistenceInfosFieldsList = persistenceInfos;
                        }
                    }
                    else
                    {
                        if (fullTextSearchPredicate.PersistenceInfo == null)
                        {
                            fullTextSearchPredicate.PersistenceInfo = GetFieldPersistenceInfo((IEntityField2)fullTextSearchPredicate.FieldCore);
                        }
                    }
                    break;

                case PredicateType.FieldCompareSetPredicate:
                    FieldCompareSetPredicate compareSetPredicate = (FieldCompareSetPredicate)currentPredicate;
                    if ((compareSetPredicate.PersistenceInfoField == null) && (compareSetPredicate.FieldCore != null))
                    {
                        compareSetPredicate.PersistenceInfoField = GetFieldPersistenceInfo((IEntityField2)compareSetPredicate.FieldCore);
                    }
                    if (compareSetPredicate.PersistenceInfoSetField == null)
                    {
                        compareSetPredicate.PersistenceInfoSetField = GetFieldPersistenceInfo((IEntityField2)compareSetPredicate.SetFieldCore);
                    }
                    InsertPersistenceInfoObjects(compareSetPredicate.SetFilterAsPredicateExpression);
                    InsertPersistenceInfoObjects(compareSetPredicate.SetRelations);
                    InsertPersistenceInfoObjects(compareSetPredicate.SetSorter);
                    InsertPersistenceInfoObjects(compareSetPredicate.GroupByClause);
                    break;

                default:

                    // __LLBLGENPRO_USER_CODE_REGION_START InsertPersistenceInfoObjectsPredicate
                    // __LLBLGENPRO_USER_CODE_REGION_END

                    OnInsertPersistenceObjects(currentPredicate);
                    break;
                }
            }
        }
Пример #55
0
 /// <summary> Retrieves all related entities of type 'RoleSystemActionRightEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'RoleSystemActionRightEntity'</returns>
 public SD.HnD.DAL.CollectionClasses.RoleSystemActionRightCollection GetMultiRoleSystemActionRights(bool forceFetch, IPredicateExpression filter)
 {
     return GetMultiRoleSystemActionRights(forceFetch, _roleSystemActionRights.EntityFactoryToUse, filter);
 }
Пример #56
0
 /// <summary> Retrieves all related entities of type 'UserEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="entityFactoryToUse">The entity factory to use for the GetMultiManyToOne() routine.</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of the type constructed by the passed in entity factory</returns>
 public virtual Auction.Entities.CollectionClasses.UserCollection GetMultiUser___(bool forceFetch, IEntityFactory entityFactoryToUse, IPredicateExpression filter)
 {
     if( ( !_alreadyFetchedUser___ || forceFetch || _alwaysFetchUser___) && !base.IsSerializing && !base.IsDeserializing && !base.InDesignMode)
     {
         if(base.ParticipatesInTransaction)
         {
             if(!_user___.ParticipatesInTransaction)
             {
                 base.Transaction.Add(_user___);
             }
         }
         _user___.SuppressClearInGetMulti=!forceFetch;
         if(entityFactoryToUse!=null)
         {
             _user___.EntityFactoryToUse = entityFactoryToUse;
         }
         _user___.GetMultiManyToOne(null, null, null, this, filter);
         _user___.SuppressClearInGetMulti=false;
         _alreadyFetchedUser___ = true;
     }
     return _user___;
 }
Пример #57
0
 /// <summary> Retrieves all related entities of type 'ForumEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="entityFactoryToUse">The entity factory to use for the GetMultiManyToOne() routine.</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of the type constructed by the passed in entity factory</returns>
 public virtual SD.HnD.DAL.CollectionClasses.ForumCollection GetMultiForums(bool forceFetch, IEntityFactory entityFactoryToUse, IPredicateExpression filter)
 {
     if( ( !_alreadyFetchedForums || forceFetch || _alwaysFetchForums) && !this.IsSerializing && !this.IsDeserializing && !this.InDesignMode)
     {
         AddToTransactionIfNecessary(_forums);
         _forums.SuppressClearInGetMulti=!forceFetch;
         _forums.EntityFactoryToUse = entityFactoryToUse;
         _forums.GetMultiManyToOne(this, null, filter);
         _forums.SuppressClearInGetMulti=false;
         _alreadyFetchedForums = true;
     }
     return _forums;
 }
Пример #58
0
 /// <summary> Retrieves all related entities of type 'RuleEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of type 'RuleEntity'</returns>
 public policyDB.CollectionClasses.RuleCollection GetMultiRule(bool forceFetch, IPredicateExpression filter)
 {
     return GetMultiRule(forceFetch, _rule.EntityFactoryToUse, filter);
 }
Пример #59
0
        /// <summary>Retrieves in the calling AuditDataMessageRelatedCollection object all AuditDataMessageRelatedEntity objects which have data in common with the specified related Entities. If one is omitted, that entity is not used as a filter. </summary>
        /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
        /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
        /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
        /// <param name="auditActionInstance">AuditActionEntity instance to use as a filter for the AuditDataMessageRelatedEntity objects to return</param>
        /// <param name="messageInstance">MessageEntity instance to use as a filter for the AuditDataMessageRelatedEntity objects to return</param>
        /// <param name="userAuditedInstance">UserEntity instance to use as a filter for the AuditDataMessageRelatedEntity objects to return</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        public bool GetMulti(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IPredicateExpression filter, IEntity auditActionInstance, IEntity messageInstance, IEntity userAuditedInstance, int pageNumber, int pageSize)
        {
            this.EntityFactoryToUse = entityFactoryToUse;
            IEntityFields        fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(SD.HnD.DAL.EntityType.AuditDataMessageRelatedEntity);
            IPredicateExpression selectFilter   = CreateFilterUsingForeignKeys(auditActionInstance, messageInstance, userAuditedInstance, fieldsToReturn);

            if (filter != null)
            {
                selectFilter.AddWithAnd(filter);
            }
            return(this.PerformGetMultiAction(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, null, null, pageNumber, pageSize));
        }
Пример #60
0
        /// <summary> Retrieves in this AuditDataMessageRelatedCollection object all AuditDataMessageRelatedEntity objects which have data in common with the specified related Entities.
        /// If one is omitted, that entity is not used as a filter. All current elements in the collection are removed from the collection.</summary>
        /// <param name="auditActionInstance">AuditActionEntity instance to use as a filter for the AuditDataMessageRelatedEntity objects to return</param>
        /// <param name="messageInstance">MessageEntity instance to use as a filter for the AuditDataMessageRelatedEntity objects to return</param>
        /// <param name="userAuditedInstance">UserEntity instance to use as a filter for the AuditDataMessageRelatedEntity objects to return</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>true if succeeded, false otherwise</returns>
        public virtual bool GetMultiManyToOne(IEntity auditActionInstance, IEntity messageInstance, IEntity userAuditedInstance, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicateExpression filter, int pageNumber, int pageSize)
        {
            bool validParameters = false;

            validParameters |= (auditActionInstance != null);
            validParameters |= (messageInstance != null);
            validParameters |= (userAuditedInstance != null);
            if (!validParameters)
            {
                return(GetMulti(filter, maxNumberOfItemsToReturn, sortClauses, null, pageNumber, pageSize));
            }
            if (!this.SuppressClearInGetMulti)
            {
                this.Clear();
            }
            return(DAOFactory.CreateAuditDataMessageRelatedDAO().GetMulti(this.Transaction, this, maxNumberOfItemsToReturn, sortClauses, this.EntityFactoryToUse, filter, auditActionInstance, messageInstance, userAuditedInstance, pageNumber, pageSize));
        }