public static List<DateTime> FetchRepoAukcijaDateCollection(DataAccessAdapterBase adapter) { if (null == _repoAukcijaDateCollection) { EntityCollection<RepoAukcijaEntity> repoAukcijaEntityCollection = new EntityCollection<RepoAukcijaEntity>(new RepoAukcijaEntityFactory()); ExcludeIncludeFieldsList includeFieldList = new ExcludeIncludeFieldsList(false); includeFieldList.Add(RepoAukcijaFields.DatumAukcije); adapter.FetchEntityCollection(repoAukcijaEntityCollection, includeFieldList, null); _repoAukcijaDateCollection = repoAukcijaEntityCollection.OrderByDescending(ra => ra.DatumAukcije).Select(ra => ra.DatumAukcije).ToList(); } return _repoAukcijaDateCollection; }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="customerId">PK value for CustomerCustomerDemo which data should be fetched into this CustomerCustomerDemo object</param> /// <param name="customerTypeId">PK value for CustomerCustomerDemo which data should be fetched into this CustomerCustomerDemo object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.String customerId, System.String customerTypeId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return(Fetch(customerId, customerTypeId, prefetchPathToUse, contextToUse, excludedIncludedFields)); }
/// <summary>Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="orderId">PK value for OrderDetail which data should be fetched into this OrderDetail object</param> /// <param name="productId">PK value for OrderDetail which data should be fetched into this OrderDetail object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int32 orderId, System.Int32 productId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return(Fetch(orderId, productId, prefetchPathToUse, contextToUse, excludedIncludedFields)); }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="sectionID">PK value for Section which data should be fetched into this Section object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int32 sectionID, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return Fetch(sectionID, prefetchPathToUse, contextToUse, excludedIncludedFields); }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key specified in a polymorphic way, so the entity returned could be of a subtype of the current entity or the current entity.</summary> /// <param name="transactionToUse">transaction to use during fetch</param> /// <param name="auditDataID">PK value for AuditDataMessageRelated which data should be fetched into this AuditDataMessageRelated object</param> /// <param name="contextToUse">Context to use for fetch</param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>Fetched entity of the type of this entity or a subtype, or an empty entity of that type if not found.</returns> /// <remarks>Creates a new instance, doesn't fill <i>this</i> entity instance</remarks> public static new AuditDataMessageRelatedEntity FetchPolymorphic(ITransaction transactionToUse, System.Int32 auditDataID, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { IEntityFields fields = EntityFieldsFactory.CreateEntityFieldsObject(SD.HnD.DAL.EntityType.AuditDataMessageRelatedEntity); fields[(int)AuditDataMessageRelatedFieldIndex.AuditDataID].ForcedCurrentValueWrite(auditDataID); return (AuditDataMessageRelatedEntity)new AuditDataMessageRelatedDAO().FetchExistingPolymorphic(transactionToUse, fields, contextToUse, excludedIncludedFields); }
/// <summary>Reads an entity based on a unique constraint. Which entity is read is determined from the passed in fields for the UniqueConstraint.</summary> /// <param name="entityToFetch">The entity to fetch. Contained data will be overwritten.</param> /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param> /// <param name="threadID">Value for a field in the UniqueConstraint, which is used to retrieve the contents.</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param> /// <param name="contextToUse">The context to fetch the prefetch path with.</param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> public void FetchSupportQueueThreadUsingUCThreadID(IEntity entityToFetch, ITransaction containingTransaction, System.Int32 threadID, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { IPredicateExpression selectFilter = new PredicateExpression(); selectFilter.Add(new FieldCompareValuePredicate(entityToFetch.Fields[(int)SupportQueueThreadFieldIndex.ThreadID], ComparisonOperator.Equal, threadID)); this.PerformFetchEntityAction(entityToFetch, containingTransaction, selectFilter, prefetchPathToUse, contextToUse, excludedIncludedFields); }
/// <summary> Fetches the entity from the persistent storage. Fetch simply reads the entity into an EntityFields object. </summary> /// <param name="forumID">PK value for ForumRoleForumActionRight which data should be fetched into this ForumRoleForumActionRight object</param> /// <param name="roleID">PK value for ForumRoleForumActionRight which data should be fetched into this ForumRoleForumActionRight object</param> /// <param name="actionRightID">PK value for ForumRoleForumActionRight which data should be fetched into this ForumRoleForumActionRight object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> private bool Fetch(System.Int32 forumID, System.Int32 roleID, System.Int32 actionRightID, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); this.Fields[(int)ForumRoleForumActionRightFieldIndex.ForumID].ForcedCurrentValueWrite(forumID); this.Fields[(int)ForumRoleForumActionRightFieldIndex.RoleID].ForcedCurrentValueWrite(roleID); this.Fields[(int)ForumRoleForumActionRightFieldIndex.ActionRightID].ForcedCurrentValueWrite(actionRightID); CreateDAOInstance().FetchExisting(this, this.Transaction, prefetchPathToUse, contextToUse, excludedIncludedFields); return (this.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
partial void OnAfterFetchCustomerCustomerDemoPkRequest(IDataAccessAdapter adapter, CustomerCustomerDemoPkRequest request, CustomerCustomerDemoEntity entity, IPrefetchPath2 prefetchPath, ExcludeIncludeFieldsList excludedIncludedFields);
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="deviceStateTrackingId">PK value for DeviceStateTracking which data should be fetched into this DeviceStateTracking object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int64 deviceStateTrackingId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return(Fetch(deviceStateTrackingId, prefetchPathToUse, contextToUse, excludedIncludedFields)); }
/// <summary>Reads an entity based on a unique constraint. Which entity is read is determined from the passed in fields for the UniqueConstraint.</summary> /// <param name="entityToFetch">The entity to fetch. Contained data will be overwritten.</param> /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param> /// <param name="nickName">Value for a field in the UniqueConstraint, which is used to retrieve the contents.</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param> /// <param name="contextToUse">The context to fetch the prefetch path with.</param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> public void FetchUserUsingUCNickName(IEntity entityToFetch, ITransaction containingTransaction, System.String nickName, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { IPredicateExpression selectFilter = new PredicateExpression(); selectFilter.Add(new FieldCompareValuePredicate(entityToFetch.Fields[(int)UserFieldIndex.NickName], ComparisonOperator.Equal, nickName)); this.PerformFetchEntityAction(entityToFetch, containingTransaction, selectFilter, prefetchPathToUse, contextToUse, excludedIncludedFields); }
private static IPrefetchPathElement2 ConvertPrefetchRepresentationToPrefetchPathElement(EntityType parentEntityType, PrefetchElementStringRepresentation prefetchRepresentation, Dictionary <string, List <string> > prefetchFieldNamesDictionary, string fieldNamesKey, out ExcludeIncludeFieldsList includeFieldList) { includeFieldList = null; if (prefetchRepresentation == null) { return(null); } var includeMap = GetEntityTypeIncludeMap(parentEntityType); IPrefetchPathElement2 newElement = null; var rr = includeMap.FirstOrDefault( rm => rm.Key.Equals(prefetchRepresentation.Name, StringComparison.InvariantCultureIgnoreCase)); if (!rr.Equals(default(KeyValuePair <string, IPrefetchPathElement2>))) { newElement = rr.Value; foreach (var childRepresentation in prefetchRepresentation.Children) { ExcludeIncludeFieldsList subElementIncludeFieldList; var subElement = ConvertPrefetchRepresentationToPrefetchPathElement((EntityType)newElement.ToFetchEntityType, childRepresentation, prefetchFieldNamesDictionary, string.Concat(fieldNamesKey, ".", childRepresentation.Name .ToLowerInvariant ()), out subElementIncludeFieldList); if (subElement != null) { newElement.SubPath.Add(subElement, subElementIncludeFieldList); } } } if (newElement != null) { // Determin if there is a max amount of records to return for this prefetch element if (newElement.MaxAmountOfItemsToReturn < prefetchRepresentation.MaxNumberOfItemsToReturn) { newElement.MaxAmountOfItemsToReturn = prefetchRepresentation.MaxNumberOfItemsToReturn; } // Determine if there are field name restrictions applied to the prefetched item if (prefetchFieldNamesDictionary.ContainsKey(fieldNamesKey)) { includeFieldList = ConvertEntityTypeFieldNamesToExcludedIncludedFields( (EntityType)newElement.ToFetchEntityType, prefetchFieldNamesDictionary[fieldNamesKey]); } } return(newElement); }
/// <summary>Reads an entity based on a unique constraint. Which entity is read is determined from the passed in fields for the UniqueConstraint.</summary> /// <param name="entityToFetch">The entity to fetch. Contained data will be overwritten.</param> /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param> /// <param name="offerCode">Value for a field in the UniqueConstraint, which is used to retrieve the contents.</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param> /// <param name="contextToUse">The context to fetch the prefetch path with.</param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> public void FetchRedemptionCodeUsingUCOfferCode(IEntity entityToFetch, ITransaction containingTransaction, System.String offerCode, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { IPredicateExpression selectFilter = new PredicateExpression(); selectFilter.Add(new FieldCompareValuePredicate(entityToFetch.Fields[(int)RedemptionCodeFieldIndex.OfferCode], ComparisonOperator.Equal, offerCode)); this.PerformFetchEntityAction(entityToFetch, containingTransaction, selectFilter, prefetchPathToUse, contextToUse, excludedIncludedFields); }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="roleID">PK value for RoleUser which data should be fetched into this RoleUser object</param> /// <param name="userID">PK value for RoleUser which data should be fetched into this RoleUser object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int32 roleID, System.Int32 userID, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return Fetch(roleID, userID, prefetchPathToUse, contextToUse, excludedIncludedFields); }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="keywordId">PK value for ProductKeyword which data should be fetched into this ProductKeyword object</param> /// <param name="productId">PK value for ProductKeyword which data should be fetched into this ProductKeyword object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int32 keywordId, System.Int32 productId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return Fetch(keywordId, productId, prefetchPathToUse, contextToUse, excludedIncludedFields); }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="employeeId">PK value for EmployeeTerritory which data should be fetched into this EmployeeTerritory object</param> /// <param name="territoryId">PK value for EmployeeTerritory which data should be fetched into this EmployeeTerritory object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int32 employeeId, System.String territoryId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return(Fetch(employeeId, territoryId, prefetchPathToUse, contextToUse, excludedIncludedFields)); }
/// <summary> Fetches the entity from the persistent storage. Fetch simply reads the entity into an EntityFields object. </summary> /// <param name="deviceStateTrackingId">PK value for DeviceStateTracking which data should be fetched into this DeviceStateTracking object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> private bool Fetch(System.Int64 deviceStateTrackingId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); this.Fields[(int)DeviceStateTrackingFieldIndex.DeviceStateTrackingId].ForcedCurrentValueWrite(deviceStateTrackingId); CreateDAOInstance().FetchExisting(this, this.Transaction, prefetchPathToUse, contextToUse, excludedIncludedFields); return(this.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="productId">PK value for ProductSpecification which data should be fetched into this ProductSpecification object</param> /// <param name="specificationName">PK value for ProductSpecification which data should be fetched into this ProductSpecification object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int32 productId, System.String specificationName, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return(Fetch(productId, specificationName, prefetchPathToUse, contextToUse, excludedIncludedFields)); }
/// <summary> Fetches the entity from the persistent storage. Fetch simply reads the entity into an EntityFields object. </summary> /// <param name="uID">PK value for ObserverDataSetColour which data should be fetched into this ObserverDataSetColour object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> private bool Fetch(System.Int32 uID, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); IDao dao = this.CreateDAOInstance(); base.Fields[(int)ObserverDataSetColourFieldIndex.UID].ForcedCurrentValueWrite(uID); dao.FetchExisting(this, base.Transaction, prefetchPathToUse, contextToUse, excludedIncludedFields); return(base.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="eventId">PK value for AuctionEventDonor which data should be fetched into this AuctionEventDonor object</param> /// <param name="donorId">PK value for AuctionEventDonor which data should be fetched into this AuctionEventDonor object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int64 eventId, System.Int64 donorId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return Fetch(eventId, donorId, prefetchPathToUse, contextToUse, excludedIncludedFields); }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="roleID">PK value for RoleUser which data should be fetched into this RoleUser object</param> /// <param name="userID">PK value for RoleUser which data should be fetched into this RoleUser object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int32 roleID, System.Int32 userID, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return(Fetch(roleID, userID, prefetchPathToUse, contextToUse, excludedIncludedFields)); }
/// <summary> Fetches the entity from the persistent storage. Fetch simply reads the entity into an EntityFields object. </summary> /// <param name="productId">PK value for ProductSpecification which data should be fetched into this ProductSpecification object</param> /// <param name="specificationName">PK value for ProductSpecification which data should be fetched into this ProductSpecification object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> private bool Fetch(System.Int32 productId, System.String specificationName, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); this.Fields[(int)ProductSpecificationFieldIndex.ProductId].ForcedCurrentValueWrite(productId); this.Fields[(int)ProductSpecificationFieldIndex.SpecificationName].ForcedCurrentValueWrite(specificationName); CreateDAOInstance().FetchExisting(this, this.Transaction, prefetchPathToUse, contextToUse, excludedIncludedFields); return (this.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
/// <summary> Fetches the entity from the persistent storage. Fetch simply reads the entity into an EntityFields object. </summary> /// <param name="roleID">PK value for RoleUser which data should be fetched into this RoleUser object</param> /// <param name="userID">PK value for RoleUser which data should be fetched into this RoleUser object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> private bool Fetch(System.Int32 roleID, System.Int32 userID, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); this.Fields[(int)RoleUserFieldIndex.RoleID].ForcedCurrentValueWrite(roleID); this.Fields[(int)RoleUserFieldIndex.UserID].ForcedCurrentValueWrite(userID); CreateDAOInstance().FetchExisting(this, this.Transaction, prefetchPathToUse, contextToUse, excludedIncludedFields); return(this.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="dEntry">PK value for TJadwal which data should be fetched into this TJadwal object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(Nullable<System.DateTime> dEntry, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return Fetch(dEntry, prefetchPathToUse, contextToUse, excludedIncludedFields); }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="controller">PK value for UpdateStatus which data should be fetched into this UpdateStatus object</param> /// <param name="action">PK value for UpdateStatus which data should be fetched into this UpdateStatus object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.String controller, System.String action, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return(Fetch(controller, action, prefetchPathToUse, contextToUse, excludedIncludedFields)); }
/// <summary> Method which will try to fetch the contents for this entity using a unique constraint. </summary> /// <remarks>All contents of the entity is lost.</remarks> /// <param name="threadID">Value for a field in the UniqueConstraint, which is used to retrieve the contents.</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>true if succeeded and the contents is read, false otherwise</returns> public bool FetchUsingUCThreadID(System.Int32 threadID, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); ((SupportQueueThreadDAO)CreateDAOInstance()).FetchSupportQueueThreadUsingUCThreadID(this, this.Transaction, threadID, prefetchPathToUse, contextToUse, excludedIncludedFields); return (this.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
/// <summary> Fetches the entity from the persistent storage. Fetch simply reads the entity into an EntityFields object. </summary> /// <param name="controller">PK value for UpdateStatus which data should be fetched into this UpdateStatus object</param> /// <param name="action">PK value for UpdateStatus which data should be fetched into this UpdateStatus object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> private bool Fetch(System.String controller, System.String action, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); this.Fields[(int)UpdateStatusFieldIndex.Controller].ForcedCurrentValueWrite(controller); this.Fields[(int)UpdateStatusFieldIndex.Action].ForcedCurrentValueWrite(action); CreateDAOInstance().FetchExisting(this, this.Transaction, prefetchPathToUse, contextToUse, excludedIncludedFields); return(this.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key specified in a polymorphic way, so the entity returned /// could be of a subtype of the current entity or the current entity.</summary> /// <param name="transactionToUse">transaction to use during fetch</param> /// <param name="id">PK value for Condition which data should be fetched into this Condition object</param> /// <param name="contextToUse">Context to use for fetch</param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>Fetched entity of the type of this entity or a subtype, or an empty entity of that type if not found.</returns> /// <remarks>Creates a new instance, doesn't fill <i>this</i> entity instance</remarks> public static new ConditionEntity FetchPolymorphic(ITransaction transactionToUse, System.Int32 id, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { ConditionDAO dao = new ConditionDAO(); IEntityFields fields = EntityFieldsFactory.CreateEntityFieldsObject(policyDB.EntityType.ConditionEntity); fields[(int)ConditionFieldIndex.Id].ForcedCurrentValueWrite(id); return (ConditionEntity)dao.FetchExistingPolymorphic(transactionToUse, fields, contextToUse, excludedIncludedFields); }
partial void OnAfterFetchEmployeePkRequest(IDataAccessAdapter adapter, EmployeePkRequest request, EmployeeEntity entity, IPrefetchPath2 prefetchPath, ExcludeIncludeFieldsList excludedIncludedFields);
/// <summary>Fetches the entity from the persistent storage. Fetch simply reads the entity into an EntityFields object. </summary> /// <param name="orderId">PK value for OrderDetail which data should be fetched into this OrderDetail object</param> /// <param name="productId">PK value for OrderDetail which data should be fetched into this OrderDetail object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> private bool Fetch(System.Int32 orderId, System.Int32 productId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); this.Fields[(int)OrderDetailFieldIndex.OrderId].ForcedCurrentValueWrite(orderId); this.Fields[(int)OrderDetailFieldIndex.ProductId].ForcedCurrentValueWrite(productId); CreateDAOInstance().FetchExisting(this, this.Transaction, prefetchPathToUse, contextToUse, excludedIncludedFields); return(this.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
/// <summary>Fetches the contents of this entity from the persistent storage using the primary key specified in a polymorphic way, so the entity returned could be of a subtype of the current entity or the current entity.</summary> /// <param name="transactionToUse">transaction to use during fetch</param> /// <param name="auditInfoId">PK value for AuditInfo which data should be fetched into this AuditInfo object</param> /// <param name="contextToUse">Context to use for fetch</param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>Fetched entity of the type of this entity or a subtype, or an empty entity of that type if not found.</returns> public static AuditInfoEntity FetchPolymorphic(ITransaction transactionToUse, System.Int32 auditInfoId, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { IEntityFields fields = EntityFieldsFactory.CreateEntityFieldsObject(SD.LLBLGen.Pro.Examples.Auditing.EntityType.AuditInfoEntity); fields.ForcedValueWrite((int)AuditInfoFieldIndex.AuditInfoId, auditInfoId); return((AuditInfoEntity) new AuditInfoDAO().FetchExistingPolymorphic(transactionToUse, fields, contextToUse, excludedIncludedFields)); }
/// <summary> Fetches the entity from the persistent storage. Fetch simply reads the entity into an EntityFields object. </summary> /// <param name="customerId">PK value for CustomerCustomerDemo which data should be fetched into this CustomerCustomerDemo object</param> /// <param name="customerTypeId">PK value for CustomerCustomerDemo which data should be fetched into this CustomerCustomerDemo object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> private bool Fetch(System.String customerId, System.String customerTypeId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); this.Fields[(int)CustomerCustomerDemoFieldIndex.CustomerId].ForcedCurrentValueWrite(customerId); this.Fields[(int)CustomerCustomerDemoFieldIndex.CustomerTypeId].ForcedCurrentValueWrite(customerTypeId); CreateDAOInstance().FetchExisting(this, this.Transaction, prefetchPathToUse, contextToUse, excludedIncludedFields); return(this.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="auditActionTypeId">PK value for AuditActionType which data should be fetched into this AuditActionType object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int32 auditActionTypeId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return(Fetch(auditActionTypeId, prefetchPathToUse, contextToUse, excludedIncludedFields)); }
/// <summary> Fetches the entity from the persistent storage. Fetch simply reads the entity into an EntityFields object. </summary> /// <param name="employeeId">PK value for EmployeeTerritory which data should be fetched into this EmployeeTerritory object</param> /// <param name="territoryId">PK value for EmployeeTerritory which data should be fetched into this EmployeeTerritory object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> private bool Fetch(System.Int32 employeeId, System.String territoryId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); this.Fields[(int)EmployeeTerritoryFieldIndex.EmployeeId].ForcedCurrentValueWrite(employeeId); this.Fields[(int)EmployeeTerritoryFieldIndex.TerritoryId].ForcedCurrentValueWrite(territoryId); CreateDAOInstance().FetchExisting(this, this.Transaction, prefetchPathToUse, contextToUse, excludedIncludedFields); return(this.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
/// <summary>Reads an entity based on a unique constraint. Which entity is read is determined from the passed in fields for the UniqueConstraint.</summary> /// <param name="entityToFetch">The entity to fetch. Contained data will be overwritten.</param> /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param> /// <param name="companyName">Value for a field in the UniqueConstraint, which is used to retrieve the contents.</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param> /// <param name="contextToUse">The context to fetch the prefetch path with.</param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> public void FetchCustomerUsingUCCompanyName(IEntity entityToFetch, ITransaction containingTransaction, System.String companyName, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { IPredicateExpression selectFilter = new PredicateExpression(); selectFilter.Add(new FieldCompareValuePredicate(entityToFetch.Fields[(int)CustomerFieldIndex.CompanyName], ComparisonOperator.Equal, companyName)); this.PerformFetchEntityAction(entityToFetch, containingTransaction, selectFilter, prefetchPathToUse, contextToUse, excludedIncludedFields); }
/// <summary> Method which will try to fetch the contents for this entity using a unique constraint. </summary> /// <remarks>All contents of the entity is lost.</remarks> /// <param name="nickName">Value for a field in the UniqueConstraint, which is used to retrieve the contents.</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>true if succeeded and the contents is read, false otherwise</returns> public bool FetchUsingUCNickName(System.String nickName, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); ((UserDAO)CreateDAOInstance()).FetchUserUsingUCNickName(this, this.Transaction, nickName, prefetchPathToUse, contextToUse, excludedIncludedFields); return (this.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
partial void OnAfterFetchProductPkRequest(IDataAccessAdapter adapter, ProductPkRequest request, ProductEntity entity, IPrefetchPath2 prefetchPath, ExcludeIncludeFieldsList excludedIncludedFields);
private static void LoadTrgovanjeGodinaList(DataAccessAdapterBase adapter) { EntityCollection<TrgovanjeGlavaEntity> trgovanjeGlavaCollection = new EntityCollection<TrgovanjeGlavaEntity>(new TrgovanjeGlavaEntityFactory()); ExcludeIncludeFieldsList includeFieldList = new ExcludeIncludeFieldsList(false); includeFieldList.Add(TrgovanjeGlavaFields.Datum); adapter.FetchEntityCollection(trgovanjeGlavaCollection, includeFieldList, null); _godinaTrgovanjaCollection = trgovanjeGlavaCollection.Select(tg => tg.Datum.Year).Distinct().ToList(); _godinaTrgovanjaCollection.Sort(); }
partial void OnAfterFetchProductUcProductNameRequest(IDataAccessAdapter adapter, ProductUcProductNameRequest request, ProductEntity entity, IPredicateExpression predicate, IPrefetchPath2 prefetchPath, ExcludeIncludeFieldsList excludedIncludedFields);
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="forumID">PK value for ForumRoleForumActionRight which data should be fetched into this ForumRoleForumActionRight object</param> /// <param name="roleID">PK value for ForumRoleForumActionRight which data should be fetched into this ForumRoleForumActionRight object</param> /// <param name="actionRightID">PK value for ForumRoleForumActionRight which data should be fetched into this ForumRoleForumActionRight object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int32 forumID, System.Int32 roleID, System.Int32 actionRightID, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return Fetch(forumID, roleID, actionRightID, prefetchPathToUse, contextToUse, excludedIncludedFields); }
partial void OnAfterFetchSupplierPkRequest(IDataAccessAdapter adapter, SupplierPkRequest request, SupplierEntity entity, IPrefetchPath2 prefetchPath, ExcludeIncludeFieldsList excludedIncludedFields);
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="productId">PK value for ProductSpecification which data should be fetched into this ProductSpecification object</param> /// <param name="specificationName">PK value for ProductSpecification which data should be fetched into this ProductSpecification object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int32 productId, System.String specificationName, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return Fetch(productId, specificationName, prefetchPathToUse, contextToUse, excludedIncludedFields); }
partial void OnAfterFetchSupplierUcSupplierNameRequest(IDataAccessAdapter adapter, SupplierUcSupplierNameRequest request, SupplierEntity entity, IPredicateExpression predicate, IPrefetchPath2 prefetchPath, ExcludeIncludeFieldsList excludedIncludedFields);
private static IPrefetchPathElement2 ConvertPrefetchRepresentationToPrefetchPathElement(EntityType parentEntityType, PrefetchElementStringRepresentation prefetchRepresentation, Dictionary <string, List<string>> prefetchFieldNamesDictionary, string fieldNamesKey, out ExcludeIncludeFieldsList includeFieldList) { includeFieldList = null; if (prefetchRepresentation == null) return null; var includeMap = GetEntityTypeIncludeMap(parentEntityType); IPrefetchPathElement2 newElement = null; var rr = includeMap.FirstOrDefault( rm => rm.Key.Equals(prefetchRepresentation.Name, StringComparison.InvariantCultureIgnoreCase)); if (!rr.Equals(default(KeyValuePair<string, IPrefetchPathElement2>))) { newElement = rr.Value; foreach (var childRepresentation in prefetchRepresentation.Children) { ExcludeIncludeFieldsList subElementIncludeFieldList; var subElement = ConvertPrefetchRepresentationToPrefetchPathElement((EntityType)newElement.ToFetchEntityType, childRepresentation, prefetchFieldNamesDictionary, string.Concat(fieldNamesKey, ".", childRepresentation.Name .ToLowerInvariant ()), out subElementIncludeFieldList); if (subElement != null) newElement.SubPath.Add(subElement, subElementIncludeFieldList); } } if (newElement != null) { // Determin if there is a max amount of records to return for this prefetch element if (newElement.MaxAmountOfItemsToReturn < prefetchRepresentation.MaxNumberOfItemsToReturn) newElement.MaxAmountOfItemsToReturn = prefetchRepresentation.MaxNumberOfItemsToReturn; // Determine if there are field name restrictions applied to the prefetched item if (prefetchFieldNamesDictionary.ContainsKey(fieldNamesKey)) { includeFieldList = ConvertEntityTypeFieldNamesToExcludedIncludedFields( (EntityType)newElement.ToFetchEntityType, prefetchFieldNamesDictionary[fieldNamesKey]); } } return newElement; }
partial void OnBeforeFetchSupplierQueryCollectionRequest(IDataAccessAdapter adapter, SupplierQueryCollectionRequest request, SortExpression sortExpression, ExcludeIncludeFieldsList excludedIncludedFields, IPrefetchPath2 prefetchPath, IRelationPredicateBucket predicateBucket, int pageNumber, int pageSize, int limit);
/// <summary> Fetches the entity from the persistent storage. Fetch simply reads the entity into an EntityFields object. </summary> /// <param name="dEntry">PK value for TJadwal which data should be fetched into this TJadwal object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> private bool Fetch(Nullable<System.DateTime> dEntry, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); IDao dao = this.CreateDAOInstance(); base.Fields[(int)TJadwalFieldIndex.DEntry].ForcedCurrentValueWrite(dEntry); dao.FetchExisting(this, base.Transaction, prefetchPathToUse, contextToUse, excludedIncludedFields); return (base.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
partial void OnAfterFetchSupplierQueryCollectionRequest(IDataAccessAdapter adapter, SupplierQueryCollectionRequest request, EntityCollection <SupplierEntity> entities, SortExpression sortExpression, ExcludeIncludeFieldsList excludedIncludedFields, IPrefetchPath2 prefetchPath, IRelationPredicateBucket predicateBucket, int pageNumber, int pageSize, int limit, int totalItemCount);
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="cIdHakAkses">PK value for MHakAkses which data should be fetched into this MHakAkses object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.String cIdHakAkses, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return Fetch(cIdHakAkses, prefetchPathToUse, contextToUse, excludedIncludedFields); }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="organId">PK value for OrganSystemOrgan which data should be fetched into this OrganSystemOrgan object</param> /// <param name="licenseOrganSystemId">PK value for OrganSystemOrgan which data should be fetched into this OrganSystemOrgan object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int16 organId, System.Int16 licenseOrganSystemId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return(Fetch(organId, licenseOrganSystemId, prefetchPathToUse, contextToUse, excludedIncludedFields)); }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="queueID">PK value for SupportQueueThread which data should be fetched into this SupportQueueThread object</param> /// <param name="threadID">PK value for SupportQueueThread which data should be fetched into this SupportQueueThread object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int32 queueID, System.Int32 threadID, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return Fetch(queueID, threadID, prefetchPathToUse, contextToUse, excludedIncludedFields); }
/// <summary> Fetches the entity from the persistent storage. Fetch simply reads the entity into an EntityFields object. </summary> /// <param name="organId">PK value for OrganSystemOrgan which data should be fetched into this OrganSystemOrgan object</param> /// <param name="licenseOrganSystemId">PK value for OrganSystemOrgan which data should be fetched into this OrganSystemOrgan object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> private bool Fetch(System.Int16 organId, System.Int16 licenseOrganSystemId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); this.Fields[(int)OrganSystemOrganFieldIndex.OrganId].ForcedCurrentValueWrite(organId); this.Fields[(int)OrganSystemOrganFieldIndex.LicenseOrganSystemId].ForcedCurrentValueWrite(licenseOrganSystemId); CreateDAOInstance().FetchExisting(this, this.Transaction, prefetchPathToUse, contextToUse, excludedIncludedFields); return(this.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
/// <summary> Fetches the entity from the persistent storage. Fetch simply reads the entity into an EntityFields object. </summary> /// <param name="id">PK value for Raffle which data should be fetched into this Raffle object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> private bool Fetch(System.Int64 id, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); IDao dao = this.CreateDAOInstance(); base.Fields[(int)RaffleFieldIndex.Id].ForcedCurrentValueWrite(id); dao.FetchExisting(this, base.Transaction, prefetchPathToUse, contextToUse, excludedIncludedFields); return (base.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
/// <summary>Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="categoryId">PK value for Category which data should be fetched into this Category object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int32 categoryId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return(Fetch(categoryId, prefetchPathToUse, contextToUse, excludedIncludedFields)); }
/// <summary> Fetches the entity from the persistent storage. Fetch simply reads the entity into an EntityFields object. </summary> /// <param name="sectionID">PK value for Section which data should be fetched into this Section object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> private bool Fetch(System.Int32 sectionID, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { try { OnFetch(); this.Fields[(int)SectionFieldIndex.SectionID].ForcedCurrentValueWrite(sectionID); CreateDAOInstance().FetchExisting(this, this.Transaction, prefetchPathToUse, contextToUse, excludedIncludedFields); return (this.Fields.State == EntityState.Fetched); } finally { OnFetchComplete(); } }
/// <summary> Fetches the contents of this entity from the persistent storage using the primary key.</summary> /// <param name="targetId">PK value for TargetCondition which data should be fetched into this TargetCondition object</param> /// <param name="conditionId">PK value for TargetCondition which data should be fetched into this TargetCondition object</param> /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch as well</param> /// <param name="contextToUse">The context to add the entity to if the fetch was succesful. </param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>True if succeeded, false otherwise.</returns> public bool FetchUsingPK(System.Int32 targetId, System.Int32 conditionId, IPrefetchPath prefetchPathToUse, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { return Fetch(targetId, conditionId, prefetchPathToUse, contextToUse, excludedIncludedFields); }