001// --------------------------------------------------------------------------------
002// Copyright 2002-2026 Echo Three, LLC
003//
004// Licensed under the Apache License, Version 2.0 (the "License");
005// you may not use this file except in compliance with the License.
006// You may obtain a copy of the License at
007//
008//     http://www.apache.org/licenses/LICENSE-2.0
009//
010// Unless required by applicable law or agreed to in writing, software
011// distributed under the License is distributed on an "AS IS" BASIS,
012// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013// See the License for the specific language governing permissions and
014// limitations under the License.
015// --------------------------------------------------------------------------------
016
017package com.echothree.control.user.graphql.server.schema;
018
019import com.echothree.control.user.inventory.server.command.GetInventoryDispositionAdjustmentCommand;
020import com.echothree.control.user.inventory.server.command.GetInventoryDispositionAdjustmentsCommand;
021import com.echothree.model.control.inventory.server.graphql.InventoryDispositionAdjustmentObject;
022import com.echothree.model.data.inventory.common.InventoryDispositionAdjustmentConstants;
023import com.echothree.model.data.inventory.server.entity.InventoryDispositionAdjustment;
024import com.echothree.control.user.inventory.server.command.GetInventoryTransactionReasonCommand;
025import com.echothree.control.user.inventory.server.command.GetInventoryTransactionReasonsCommand;
026import com.echothree.model.control.inventory.server.graphql.InventoryTransactionReasonObject;
027import com.echothree.model.data.inventory.common.InventoryTransactionReasonConstants;
028import com.echothree.model.data.inventory.server.entity.InventoryTransactionReason;
029import com.echothree.control.user.inventory.server.command.GetInventoryDispositionCommand;
030import com.echothree.control.user.inventory.server.command.GetInventoryDispositionsCommand;
031import com.echothree.model.control.inventory.server.graphql.InventoryDispositionObject;
032import com.echothree.model.data.inventory.common.InventoryDispositionConstants;
033import com.echothree.model.data.inventory.server.entity.InventoryDisposition;
034import com.echothree.control.user.inventory.server.command.GetInventoryTransactionRoleTypeCommand;
035import com.echothree.control.user.inventory.server.command.GetInventoryTransactionRoleTypesCommand;
036import com.echothree.model.control.inventory.server.graphql.InventoryTransactionRoleTypeObject;
037import com.echothree.model.data.inventory.common.InventoryTransactionRoleTypeConstants;
038import com.echothree.model.data.inventory.server.entity.InventoryTransactionRoleType;
039import com.echothree.control.user.inventory.server.command.GetInventoryTransactionTimeTypeCommand;
040import com.echothree.control.user.inventory.server.command.GetInventoryTransactionTimeTypesCommand;
041import com.echothree.model.control.inventory.server.graphql.InventoryTransactionTimeTypeObject;
042import com.echothree.model.data.inventory.common.InventoryTransactionTimeTypeConstants;
043import com.echothree.model.data.inventory.server.entity.InventoryTransactionTimeType;
044import com.echothree.control.user.accounting.common.AccountingUtil;
045import com.echothree.control.user.accounting.server.command.GetCurrenciesCommand;
046import com.echothree.control.user.accounting.server.command.GetCurrencyCommand;
047import com.echothree.control.user.accounting.server.command.GetGlAccountCategoriesCommand;
048import com.echothree.control.user.accounting.server.command.GetGlAccountCategoryCommand;
049import com.echothree.control.user.accounting.server.command.GetGlAccountClassCommand;
050import com.echothree.control.user.accounting.server.command.GetGlAccountClassesCommand;
051import com.echothree.control.user.accounting.server.command.GetGlAccountCommand;
052import com.echothree.control.user.accounting.server.command.GetGlAccountTypeCommand;
053import com.echothree.control.user.accounting.server.command.GetGlAccountTypesCommand;
054import com.echothree.control.user.accounting.server.command.GetGlAccountsCommand;
055import com.echothree.control.user.accounting.server.command.GetGlResourceTypeCommand;
056import com.echothree.control.user.accounting.server.command.GetGlResourceTypesCommand;
057import com.echothree.control.user.accounting.server.command.GetItemAccountingCategoriesCommand;
058import com.echothree.control.user.accounting.server.command.GetItemAccountingCategoryCommand;
059import com.echothree.control.user.accounting.server.command.GetSymbolPositionCommand;
060import com.echothree.control.user.accounting.server.command.GetSymbolPositionsCommand;
061import com.echothree.control.user.accounting.server.command.GetTransactionCommand;
062import com.echothree.control.user.accounting.server.command.GetTransactionEntityRoleTypeCommand;
063import com.echothree.control.user.accounting.server.command.GetTransactionEntityRoleTypesCommand;
064import com.echothree.control.user.accounting.server.command.GetTransactionGlAccountCategoriesCommand;
065import com.echothree.control.user.accounting.server.command.GetTransactionGlAccountCategoryCommand;
066import com.echothree.control.user.accounting.server.command.GetTransactionGroupCommand;
067import com.echothree.control.user.accounting.server.command.GetTransactionGroupsCommand;
068import com.echothree.control.user.accounting.server.command.GetTransactionTimeTypeCommand;
069import com.echothree.control.user.accounting.server.command.GetTransactionTimeTypesCommand;
070import com.echothree.control.user.accounting.server.command.GetTransactionTypeCommand;
071import com.echothree.control.user.accounting.server.command.GetTransactionTypesCommand;
072import com.echothree.control.user.accounting.server.command.GetTransactionsCommand;
073import com.echothree.control.user.campaign.common.CampaignUtil;
074import com.echothree.control.user.campaign.server.command.GetCampaignCommand;
075import com.echothree.control.user.campaign.server.command.GetCampaignContentCommand;
076import com.echothree.control.user.campaign.server.command.GetCampaignContentsCommand;
077import com.echothree.control.user.campaign.server.command.GetCampaignMediumCommand;
078import com.echothree.control.user.campaign.server.command.GetCampaignMediumsCommand;
079import com.echothree.control.user.campaign.server.command.GetCampaignSourceCommand;
080import com.echothree.control.user.campaign.server.command.GetCampaignSourcesCommand;
081import com.echothree.control.user.campaign.server.command.GetCampaignTermCommand;
082import com.echothree.control.user.campaign.server.command.GetCampaignTermsCommand;
083import com.echothree.control.user.campaign.server.command.GetCampaignsCommand;
084import com.echothree.control.user.cancellationpolicy.common.CancellationPolicyUtil;
085import com.echothree.control.user.cancellationpolicy.server.command.GetCancellationKindCommand;
086import com.echothree.control.user.cancellationpolicy.server.command.GetCancellationKindsCommand;
087import com.echothree.control.user.cancellationpolicy.server.command.GetCancellationPoliciesCommand;
088import com.echothree.control.user.cancellationpolicy.server.command.GetCancellationPolicyCommand;
089import com.echothree.control.user.chain.common.ChainUtil;
090import com.echothree.control.user.chain.server.command.GetChainActionCommand;
091import com.echothree.control.user.chain.server.command.GetChainActionSetCommand;
092import com.echothree.control.user.chain.server.command.GetChainActionSetsCommand;
093import com.echothree.control.user.chain.server.command.GetChainActionTypeCommand;
094import com.echothree.control.user.chain.server.command.GetChainActionTypesCommand;
095import com.echothree.control.user.chain.server.command.GetChainActionsCommand;
096import com.echothree.control.user.chain.server.command.GetChainCommand;
097import com.echothree.control.user.chain.server.command.GetChainEntityRoleTypeCommand;
098import com.echothree.control.user.chain.server.command.GetChainEntityRoleTypesCommand;
099import com.echothree.control.user.chain.server.command.GetChainInstanceCommand;
100import com.echothree.control.user.chain.server.command.GetChainInstancesCommand;
101import com.echothree.control.user.chain.server.command.GetChainKindCommand;
102import com.echothree.control.user.chain.server.command.GetChainKindsCommand;
103import com.echothree.control.user.chain.server.command.GetChainTypeCommand;
104import com.echothree.control.user.chain.server.command.GetChainTypesCommand;
105import com.echothree.control.user.chain.server.command.GetChainsCommand;
106import com.echothree.control.user.contact.common.ContactUtil;
107import com.echothree.control.user.contact.server.command.GetContactMechanismPurposeCommand;
108import com.echothree.control.user.contact.server.command.GetContactMechanismPurposesCommand;
109import com.echothree.control.user.contactlist.common.ContactListUtil;
110import com.echothree.control.user.contactlist.server.command.GetContactListCommand;
111import com.echothree.control.user.contactlist.server.command.GetContactListContactMechanismPurposeCommand;
112import com.echothree.control.user.contactlist.server.command.GetContactListContactMechanismPurposesCommand;
113import com.echothree.control.user.contactlist.server.command.GetContactListFrequenciesCommand;
114import com.echothree.control.user.contactlist.server.command.GetContactListFrequencyCommand;
115import com.echothree.control.user.contactlist.server.command.GetContactListGroupCommand;
116import com.echothree.control.user.contactlist.server.command.GetContactListGroupsCommand;
117import com.echothree.control.user.contactlist.server.command.GetContactListTypeCommand;
118import com.echothree.control.user.contactlist.server.command.GetContactListTypesCommand;
119import com.echothree.control.user.contactlist.server.command.GetContactListsCommand;
120import com.echothree.control.user.contactlist.server.command.GetCustomerTypeContactListCommand;
121import com.echothree.control.user.contactlist.server.command.GetCustomerTypeContactListGroupCommand;
122import com.echothree.control.user.contactlist.server.command.GetCustomerTypeContactListGroupsCommand;
123import com.echothree.control.user.contactlist.server.command.GetCustomerTypeContactListsCommand;
124import com.echothree.control.user.contactlist.server.command.GetPartyContactListCommand;
125import com.echothree.control.user.contactlist.server.command.GetPartyContactListsCommand;
126import com.echothree.control.user.contactlist.server.command.GetPartyTypeContactListCommand;
127import com.echothree.control.user.contactlist.server.command.GetPartyTypeContactListGroupCommand;
128import com.echothree.control.user.contactlist.server.command.GetPartyTypeContactListGroupsCommand;
129import com.echothree.control.user.contactlist.server.command.GetPartyTypeContactListsCommand;
130import com.echothree.control.user.content.common.ContentUtil;
131import com.echothree.control.user.content.server.command.GetContentCatalogCommand;
132import com.echothree.control.user.content.server.command.GetContentCatalogItemCommand;
133import com.echothree.control.user.content.server.command.GetContentCatalogItemsCommand;
134import com.echothree.control.user.content.server.command.GetContentCatalogsCommand;
135import com.echothree.control.user.content.server.command.GetContentCategoriesCommand;
136import com.echothree.control.user.content.server.command.GetContentCategoryCommand;
137import com.echothree.control.user.content.server.command.GetContentCategoryItemCommand;
138import com.echothree.control.user.content.server.command.GetContentCategoryItemsCommand;
139import com.echothree.control.user.content.server.command.GetContentCollectionCommand;
140import com.echothree.control.user.content.server.command.GetContentCollectionsCommand;
141import com.echothree.control.user.content.server.command.GetContentPageAreaCommand;
142import com.echothree.control.user.content.server.command.GetContentPageAreaTypeCommand;
143import com.echothree.control.user.content.server.command.GetContentPageAreaTypesCommand;
144import com.echothree.control.user.content.server.command.GetContentPageAreasCommand;
145import com.echothree.control.user.content.server.command.GetContentPageCommand;
146import com.echothree.control.user.content.server.command.GetContentPageLayoutAreaCommand;
147import com.echothree.control.user.content.server.command.GetContentPageLayoutAreasCommand;
148import com.echothree.control.user.content.server.command.GetContentPageLayoutCommand;
149import com.echothree.control.user.content.server.command.GetContentPageLayoutsCommand;
150import com.echothree.control.user.content.server.command.GetContentPagesCommand;
151import com.echothree.control.user.content.server.command.GetContentSectionCommand;
152import com.echothree.control.user.content.server.command.GetContentSectionsCommand;
153import com.echothree.control.user.content.server.command.GetContentWebAddressCommand;
154import com.echothree.control.user.content.server.command.GetContentWebAddressesCommand;
155import com.echothree.control.user.core.common.CoreUtil;
156import com.echothree.control.user.core.server.command.GetAppearanceCommand;
157import com.echothree.control.user.core.server.command.GetAppearancesCommand;
158import com.echothree.control.user.core.server.command.GetColorCommand;
159import com.echothree.control.user.core.server.command.GetColorsCommand;
160import com.echothree.control.user.core.server.command.GetComponentVendorCommand;
161import com.echothree.control.user.core.server.command.GetComponentVendorsCommand;
162import com.echothree.control.user.core.server.command.GetEntityAliasCommand;
163import com.echothree.control.user.core.server.command.GetEntityAliasTypeCommand;
164import com.echothree.control.user.core.server.command.GetEntityAliasTypesCommand;
165import com.echothree.control.user.core.server.command.GetEntityAliasesCommand;
166import com.echothree.control.user.core.server.command.GetEntityAttributeCommand;
167import com.echothree.control.user.core.server.command.GetEntityAttributeEntityAttributeGroupCommand;
168import com.echothree.control.user.core.server.command.GetEntityAttributeEntityAttributeGroupsCommand;
169import com.echothree.control.user.core.server.command.GetEntityAttributeGroupCommand;
170import com.echothree.control.user.core.server.command.GetEntityAttributeGroupsCommand;
171import com.echothree.control.user.core.server.command.GetEntityAttributeTypeCommand;
172import com.echothree.control.user.core.server.command.GetEntityAttributeTypesCommand;
173import com.echothree.control.user.core.server.command.GetEntityAttributesCommand;
174import com.echothree.control.user.core.server.command.GetEntityInstanceCommand;
175import com.echothree.control.user.core.server.command.GetEntityInstancesCommand;
176import com.echothree.control.user.core.server.command.GetEntityTypeCommand;
177import com.echothree.control.user.core.server.command.GetEntityTypesCommand;
178import com.echothree.control.user.core.server.command.GetEventTypeCommand;
179import com.echothree.control.user.core.server.command.GetEventTypesCommand;
180import com.echothree.control.user.core.server.command.GetFontStyleCommand;
181import com.echothree.control.user.core.server.command.GetFontStylesCommand;
182import com.echothree.control.user.core.server.command.GetFontWeightCommand;
183import com.echothree.control.user.core.server.command.GetFontWeightsCommand;
184import com.echothree.control.user.core.server.command.GetMimeTypeCommand;
185import com.echothree.control.user.core.server.command.GetMimeTypeFileExtensionCommand;
186import com.echothree.control.user.core.server.command.GetMimeTypeFileExtensionsCommand;
187import com.echothree.control.user.core.server.command.GetMimeTypeUsageTypeCommand;
188import com.echothree.control.user.core.server.command.GetMimeTypeUsageTypesCommand;
189import com.echothree.control.user.core.server.command.GetMimeTypesCommand;
190import com.echothree.control.user.core.server.command.GetTextDecorationCommand;
191import com.echothree.control.user.core.server.command.GetTextDecorationsCommand;
192import com.echothree.control.user.core.server.command.GetTextTransformationCommand;
193import com.echothree.control.user.core.server.command.GetTextTransformationsCommand;
194import com.echothree.control.user.customer.common.CustomerUtil;
195import com.echothree.control.user.customer.server.command.GetCustomerCommand;
196import com.echothree.control.user.customer.server.command.GetCustomerTypeCommand;
197import com.echothree.control.user.customer.server.command.GetCustomerTypePaymentMethodCommand;
198import com.echothree.control.user.customer.server.command.GetCustomerTypePaymentMethodsCommand;
199import com.echothree.control.user.customer.server.command.GetCustomerTypeShippingMethodCommand;
200import com.echothree.control.user.customer.server.command.GetCustomerTypeShippingMethodsCommand;
201import com.echothree.control.user.customer.server.command.GetCustomerTypesCommand;
202import com.echothree.control.user.customer.server.command.GetCustomersCommand;
203import com.echothree.control.user.employee.common.EmployeeUtil;
204import com.echothree.control.user.employee.server.command.GetEmployeeCommand;
205import com.echothree.control.user.employee.server.command.GetEmployeesCommand;
206import com.echothree.control.user.filter.common.FilterUtil;
207import com.echothree.control.user.filter.server.command.GetFilterAdjustmentAmountCommand;
208import com.echothree.control.user.filter.server.command.GetFilterAdjustmentAmountsCommand;
209import com.echothree.control.user.filter.server.command.GetFilterAdjustmentCommand;
210import com.echothree.control.user.filter.server.command.GetFilterAdjustmentFixedAmountCommand;
211import com.echothree.control.user.filter.server.command.GetFilterAdjustmentFixedAmountsCommand;
212import com.echothree.control.user.filter.server.command.GetFilterAdjustmentPercentCommand;
213import com.echothree.control.user.filter.server.command.GetFilterAdjustmentPercentsCommand;
214import com.echothree.control.user.filter.server.command.GetFilterAdjustmentSourceCommand;
215import com.echothree.control.user.filter.server.command.GetFilterAdjustmentSourcesCommand;
216import com.echothree.control.user.filter.server.command.GetFilterAdjustmentTypeCommand;
217import com.echothree.control.user.filter.server.command.GetFilterAdjustmentTypesCommand;
218import com.echothree.control.user.filter.server.command.GetFilterAdjustmentsCommand;
219import com.echothree.control.user.filter.server.command.GetFilterCommand;
220import com.echothree.control.user.filter.server.command.GetFilterEntranceStepCommand;
221import com.echothree.control.user.filter.server.command.GetFilterEntranceStepsCommand;
222import com.echothree.control.user.filter.server.command.GetFilterKindCommand;
223import com.echothree.control.user.filter.server.command.GetFilterKindsCommand;
224import com.echothree.control.user.filter.server.command.GetFilterStepCommand;
225import com.echothree.control.user.filter.server.command.GetFilterStepDestinationCommand;
226import com.echothree.control.user.filter.server.command.GetFilterStepDestinationsCommand;
227import com.echothree.control.user.filter.server.command.GetFilterStepElementCommand;
228import com.echothree.control.user.filter.server.command.GetFilterStepElementsCommand;
229import com.echothree.control.user.filter.server.command.GetFilterStepsCommand;
230import com.echothree.control.user.filter.server.command.GetFilterTypeCommand;
231import com.echothree.control.user.filter.server.command.GetFilterTypesCommand;
232import com.echothree.control.user.filter.server.command.GetFiltersCommand;
233import com.echothree.control.user.geo.common.GeoUtil;
234import com.echothree.control.user.geo.server.command.GetCitiesCommand;
235import com.echothree.control.user.geo.server.command.GetCityCommand;
236import com.echothree.control.user.geo.server.command.GetCountiesCommand;
237import com.echothree.control.user.geo.server.command.GetCountriesCommand;
238import com.echothree.control.user.geo.server.command.GetCountryCommand;
239import com.echothree.control.user.geo.server.command.GetCountyCommand;
240import com.echothree.control.user.geo.server.command.GetGeoCodeAliasCommand;
241import com.echothree.control.user.geo.server.command.GetGeoCodeAliasTypeCommand;
242import com.echothree.control.user.geo.server.command.GetGeoCodeAliasTypesCommand;
243import com.echothree.control.user.geo.server.command.GetGeoCodeAliasesCommand;
244import com.echothree.control.user.geo.server.command.GetGeoCodeCommand;
245import com.echothree.control.user.geo.server.command.GetGeoCodeCurrenciesCommand;
246import com.echothree.control.user.geo.server.command.GetGeoCodeCurrencyCommand;
247import com.echothree.control.user.geo.server.command.GetGeoCodeDateTimeFormatCommand;
248import com.echothree.control.user.geo.server.command.GetGeoCodeDateTimeFormatsCommand;
249import com.echothree.control.user.geo.server.command.GetGeoCodeLanguageCommand;
250import com.echothree.control.user.geo.server.command.GetGeoCodeLanguagesCommand;
251import com.echothree.control.user.geo.server.command.GetGeoCodeScopeCommand;
252import com.echothree.control.user.geo.server.command.GetGeoCodeScopesCommand;
253import com.echothree.control.user.geo.server.command.GetGeoCodeTimeZoneCommand;
254import com.echothree.control.user.geo.server.command.GetGeoCodeTimeZonesCommand;
255import com.echothree.control.user.geo.server.command.GetGeoCodeTypeCommand;
256import com.echothree.control.user.geo.server.command.GetGeoCodeTypesCommand;
257import com.echothree.control.user.geo.server.command.GetStateCommand;
258import com.echothree.control.user.geo.server.command.GetStatesCommand;
259import com.echothree.control.user.geo.server.command.GetZipCodeCommand;
260import com.echothree.control.user.geo.server.command.GetZipCodesCommand;
261import com.echothree.control.user.inventory.common.InventoryUtil;
262import com.echothree.control.user.inventory.server.command.GetAllocationPrioritiesCommand;
263import com.echothree.control.user.inventory.server.command.GetAllocationPriorityCommand;
264import com.echothree.control.user.inventory.server.command.GetInventoryAdjustmentTypeCommand;
265import com.echothree.control.user.inventory.server.command.GetInventoryAdjustmentTypesCommand;
266import com.echothree.control.user.inventory.server.command.GetInventoryBucketTypeCommand;
267import com.echothree.control.user.inventory.server.command.GetInventoryBucketTypesCommand;
268import com.echothree.control.user.inventory.server.command.GetInventoryConditionCommand;
269import com.echothree.control.user.inventory.server.command.GetInventoryConditionsCommand;
270import com.echothree.control.user.inventory.server.command.GetInventoryCostingMethodCommand;
271import com.echothree.control.user.inventory.server.command.GetInventoryCostingMethodsCommand;
272import com.echothree.control.user.inventory.server.command.GetInventoryLocationCommand;
273import com.echothree.control.user.inventory.server.command.GetInventoryLocationBucketCommand;
274import com.echothree.control.user.inventory.server.command.GetInventoryLocationBucketsCommand;
275import com.echothree.control.user.inventory.server.command.GetInventoryLocationGroupCommand;
276import com.echothree.control.user.inventory.server.command.GetInventoryLocationGroupsCommand;
277import com.echothree.control.user.inventory.server.command.GetInventoryLocationsCommand;
278import com.echothree.control.user.inventory.server.command.GetInventoryTransactionTypeCommand;
279import com.echothree.control.user.inventory.server.command.GetInventoryTransactionTypesCommand;
280import com.echothree.control.user.inventory.server.command.GetLotCommand;
281import com.echothree.control.user.inventory.server.command.GetLotsCommand;
282import com.echothree.control.user.inventory.server.command.GetPartyBucketCommand;
283import com.echothree.control.user.inventory.server.command.GetPartyBucketsCommand;
284import com.echothree.control.user.inventory.server.command.GetPartyInventoryCostingMethodCommand;
285import com.echothree.control.user.inventory.server.command.GetPartyInventoryCostingMethodsCommand;
286import com.echothree.control.user.item.common.ItemUtil;
287import com.echothree.control.user.item.server.command.GetItemAliasChecksumTypeCommand;
288import com.echothree.control.user.item.server.command.GetItemAliasChecksumTypesCommand;
289import com.echothree.control.user.item.server.command.GetItemAliasCommand;
290import com.echothree.control.user.item.server.command.GetItemAliasTypeCommand;
291import com.echothree.control.user.item.server.command.GetItemAliasTypesCommand;
292import com.echothree.control.user.item.server.command.GetItemAliasesCommand;
293import com.echothree.control.user.item.server.command.GetItemCategoriesCommand;
294import com.echothree.control.user.item.server.command.GetItemCategoryCommand;
295import com.echothree.control.user.item.server.command.GetItemCommand;
296import com.echothree.control.user.item.server.command.GetItemDeliveryTypeCommand;
297import com.echothree.control.user.item.server.command.GetItemDeliveryTypesCommand;
298import com.echothree.control.user.item.server.command.GetItemDescriptionCommand;
299import com.echothree.control.user.item.server.command.GetItemDescriptionTypeCommand;
300import com.echothree.control.user.item.server.command.GetItemDescriptionTypeUseCommand;
301import com.echothree.control.user.item.server.command.GetItemDescriptionTypeUseTypeCommand;
302import com.echothree.control.user.item.server.command.GetItemDescriptionTypeUseTypesCommand;
303import com.echothree.control.user.item.server.command.GetItemDescriptionTypeUsesCommand;
304import com.echothree.control.user.item.server.command.GetItemDescriptionTypesCommand;
305import com.echothree.control.user.item.server.command.GetItemDescriptionsCommand;
306import com.echothree.control.user.item.server.command.GetItemImageTypeCommand;
307import com.echothree.control.user.item.server.command.GetItemImageTypesCommand;
308import com.echothree.control.user.item.server.command.GetItemInventoryTypeCommand;
309import com.echothree.control.user.item.server.command.GetItemInventoryTypesCommand;
310import com.echothree.control.user.item.server.command.GetItemPriceCommand;
311import com.echothree.control.user.item.server.command.GetItemPriceTypeCommand;
312import com.echothree.control.user.item.server.command.GetItemPriceTypesCommand;
313import com.echothree.control.user.item.server.command.GetItemPricesCommand;
314import com.echothree.control.user.item.server.command.GetItemTypeCommand;
315import com.echothree.control.user.item.server.command.GetItemTypesCommand;
316import com.echothree.control.user.item.server.command.GetItemUnitOfMeasureTypeCommand;
317import com.echothree.control.user.item.server.command.GetItemUnitOfMeasureTypesCommand;
318import com.echothree.control.user.item.server.command.GetItemUseTypeCommand;
319import com.echothree.control.user.item.server.command.GetItemUseTypesCommand;
320import com.echothree.control.user.item.server.command.GetItemVolumeTypeCommand;
321import com.echothree.control.user.item.server.command.GetItemVolumeTypesCommand;
322import com.echothree.control.user.item.server.command.GetItemWeightTypeCommand;
323import com.echothree.control.user.item.server.command.GetItemWeightTypesCommand;
324import com.echothree.control.user.item.server.command.GetItemsCommand;
325import com.echothree.control.user.item.server.command.GetRelatedItemCommand;
326import com.echothree.control.user.item.server.command.GetRelatedItemTypeCommand;
327import com.echothree.control.user.item.server.command.GetRelatedItemTypesCommand;
328import com.echothree.control.user.item.server.command.GetRelatedItemsCommand;
329import com.echothree.control.user.offer.common.OfferUtil;
330import com.echothree.control.user.offer.server.command.GetOfferCommand;
331import com.echothree.control.user.offer.server.command.GetOfferCustomerTypeCommand;
332import com.echothree.control.user.offer.server.command.GetOfferCustomerTypesCommand;
333import com.echothree.control.user.offer.server.command.GetOfferItemCommand;
334import com.echothree.control.user.offer.server.command.GetOfferItemPriceCommand;
335import com.echothree.control.user.offer.server.command.GetOfferItemPricesCommand;
336import com.echothree.control.user.offer.server.command.GetOfferItemsCommand;
337import com.echothree.control.user.offer.server.command.GetOfferNameElementCommand;
338import com.echothree.control.user.offer.server.command.GetOfferNameElementsCommand;
339import com.echothree.control.user.offer.server.command.GetOfferUseCommand;
340import com.echothree.control.user.offer.server.command.GetOfferUsesCommand;
341import com.echothree.control.user.offer.server.command.GetOffersCommand;
342import com.echothree.control.user.offer.server.command.GetUseCommand;
343import com.echothree.control.user.offer.server.command.GetUseNameElementCommand;
344import com.echothree.control.user.offer.server.command.GetUseNameElementsCommand;
345import com.echothree.control.user.offer.server.command.GetUseTypeCommand;
346import com.echothree.control.user.offer.server.command.GetUseTypesCommand;
347import com.echothree.control.user.offer.server.command.GetUsesCommand;
348import com.echothree.control.user.order.common.OrderUtil;
349import com.echothree.control.user.order.server.command.GetOrderPrioritiesCommand;
350import com.echothree.control.user.order.server.command.GetOrderPriorityCommand;
351import com.echothree.control.user.order.server.command.GetOrderTimeTypeCommand;
352import com.echothree.control.user.order.server.command.GetOrderTimeTypesCommand;
353import com.echothree.control.user.order.server.command.GetOrderTypeCommand;
354import com.echothree.control.user.order.server.command.GetOrderTypesCommand;
355import com.echothree.control.user.party.common.PartyUtil;
356import com.echothree.control.user.party.server.command.GetCompaniesCommand;
357import com.echothree.control.user.party.server.command.GetCompanyCommand;
358import com.echothree.control.user.party.server.command.GetDateTimeFormatCommand;
359import com.echothree.control.user.party.server.command.GetDateTimeFormatsCommand;
360import com.echothree.control.user.party.server.command.GetDepartmentCommand;
361import com.echothree.control.user.party.server.command.GetDepartmentsCommand;
362import com.echothree.control.user.party.server.command.GetDivisionCommand;
363import com.echothree.control.user.party.server.command.GetDivisionsCommand;
364import com.echothree.control.user.party.server.command.GetLanguageCommand;
365import com.echothree.control.user.party.server.command.GetLanguagesCommand;
366import com.echothree.control.user.party.server.command.GetNameSuffixesCommand;
367import com.echothree.control.user.party.server.command.GetPartiesCommand;
368import com.echothree.control.user.party.server.command.GetPartyAliasCommand;
369import com.echothree.control.user.party.server.command.GetPartyAliasTypeCommand;
370import com.echothree.control.user.party.server.command.GetPartyAliasTypesCommand;
371import com.echothree.control.user.party.server.command.GetPartyAliasesCommand;
372import com.echothree.control.user.party.server.command.GetPartyCommand;
373import com.echothree.control.user.party.server.command.GetPartyTypeCommand;
374import com.echothree.control.user.party.server.command.GetPartyTypesCommand;
375import com.echothree.control.user.party.server.command.GetPersonalTitlesCommand;
376import com.echothree.control.user.party.server.command.GetRoleTypeCommand;
377import com.echothree.control.user.party.server.command.GetRoleTypesCommand;
378import com.echothree.control.user.party.server.command.GetTimeZoneCommand;
379import com.echothree.control.user.party.server.command.GetTimeZonesCommand;
380import com.echothree.control.user.payment.common.PaymentUtil;
381import com.echothree.control.user.payment.server.command.GetPaymentMethodCommand;
382import com.echothree.control.user.payment.server.command.GetPaymentMethodTypeCommand;
383import com.echothree.control.user.payment.server.command.GetPaymentMethodTypesCommand;
384import com.echothree.control.user.payment.server.command.GetPaymentMethodsCommand;
385import com.echothree.control.user.payment.server.command.GetPaymentProcessorActionTypeCommand;
386import com.echothree.control.user.payment.server.command.GetPaymentProcessorActionTypesCommand;
387import com.echothree.control.user.payment.server.command.GetPaymentProcessorCommand;
388import com.echothree.control.user.payment.server.command.GetPaymentProcessorResultCodeCommand;
389import com.echothree.control.user.payment.server.command.GetPaymentProcessorResultCodesCommand;
390import com.echothree.control.user.payment.server.command.GetPaymentProcessorTransactionCommand;
391import com.echothree.control.user.payment.server.command.GetPaymentProcessorTransactionsCommand;
392import com.echothree.control.user.payment.server.command.GetPaymentProcessorTypeCodeCommand;
393import com.echothree.control.user.payment.server.command.GetPaymentProcessorTypeCodeTypeCommand;
394import com.echothree.control.user.payment.server.command.GetPaymentProcessorTypeCommand;
395import com.echothree.control.user.payment.server.command.GetPaymentProcessorTypesCommand;
396import com.echothree.control.user.payment.server.command.GetPaymentProcessorsCommand;
397import com.echothree.control.user.queue.common.QueueUtil;
398import com.echothree.control.user.queue.server.command.GetQueueTypeCommand;
399import com.echothree.control.user.queue.server.command.GetQueueTypesCommand;
400import com.echothree.control.user.returnpolicy.common.ReturnPolicyUtil;
401import com.echothree.control.user.returnpolicy.server.command.GetReturnKindCommand;
402import com.echothree.control.user.returnpolicy.server.command.GetReturnKindsCommand;
403import com.echothree.control.user.returnpolicy.server.command.GetReturnPoliciesCommand;
404import com.echothree.control.user.returnpolicy.server.command.GetReturnPolicyCommand;
405import com.echothree.control.user.search.common.SearchUtil;
406import com.echothree.control.user.search.common.result.CheckItemSpellingResult;
407import com.echothree.control.user.search.server.command.GetComponentVendorResultsCommand;
408import com.echothree.control.user.search.server.command.GetContentCatalogItemResultsCommand;
409import com.echothree.control.user.search.server.command.GetContentCatalogResultsCommand;
410import com.echothree.control.user.search.server.command.GetContentCategoryResultsCommand;
411import com.echothree.control.user.search.server.command.GetCustomerResultsCommand;
412import com.echothree.control.user.search.server.command.GetEmployeeResultsCommand;
413import com.echothree.control.user.search.server.command.GetEntityAliasTypeResultsCommand;
414import com.echothree.control.user.search.server.command.GetEntityAttributeGroupResultsCommand;
415import com.echothree.control.user.search.server.command.GetEntityAttributeResultsCommand;
416import com.echothree.control.user.search.server.command.GetEntityListItemResultsCommand;
417import com.echothree.control.user.search.server.command.GetEntityTypeResultsCommand;
418import com.echothree.control.user.search.server.command.GetItemResultsCommand;
419import com.echothree.control.user.search.server.command.GetSearchCheckSpellingActionTypeCommand;
420import com.echothree.control.user.search.server.command.GetSearchCheckSpellingActionTypesCommand;
421import com.echothree.control.user.search.server.command.GetSearchDefaultOperatorCommand;
422import com.echothree.control.user.search.server.command.GetSearchDefaultOperatorsCommand;
423import com.echothree.control.user.search.server.command.GetSearchKindCommand;
424import com.echothree.control.user.search.server.command.GetSearchKindsCommand;
425import com.echothree.control.user.search.server.command.GetSearchResultActionTypeCommand;
426import com.echothree.control.user.search.server.command.GetSearchResultActionTypesCommand;
427import com.echothree.control.user.search.server.command.GetSearchSortDirectionCommand;
428import com.echothree.control.user.search.server.command.GetSearchSortDirectionsCommand;
429import com.echothree.control.user.search.server.command.GetSearchSortOrderCommand;
430import com.echothree.control.user.search.server.command.GetSearchSortOrdersCommand;
431import com.echothree.control.user.search.server.command.GetSearchTypeCommand;
432import com.echothree.control.user.search.server.command.GetSearchTypesCommand;
433import com.echothree.control.user.search.server.command.GetSearchUseTypeCommand;
434import com.echothree.control.user.search.server.command.GetSearchUseTypesCommand;
435import com.echothree.control.user.search.server.command.GetShippingMethodResultsCommand;
436import com.echothree.control.user.search.server.command.GetVendorResultsCommand;
437import com.echothree.control.user.search.server.command.GetWarehouseResultsCommand;
438import com.echothree.control.user.security.common.SecurityUtil;
439import com.echothree.control.user.security.server.command.GetSecurityRoleCommand;
440import com.echothree.control.user.security.server.command.GetSecurityRoleGroupCommand;
441import com.echothree.control.user.security.server.command.GetSecurityRoleGroupsCommand;
442import com.echothree.control.user.security.server.command.GetSecurityRolesCommand;
443import com.echothree.control.user.selector.common.SelectorUtil;
444import com.echothree.control.user.selector.server.command.GetSelectorCommand;
445import com.echothree.control.user.selector.server.command.GetSelectorKindCommand;
446import com.echothree.control.user.selector.server.command.GetSelectorKindsCommand;
447import com.echothree.control.user.selector.server.command.GetSelectorTypeCommand;
448import com.echothree.control.user.selector.server.command.GetSelectorTypesCommand;
449import com.echothree.control.user.selector.server.command.GetSelectorsCommand;
450import com.echothree.control.user.sequence.common.SequenceUtil;
451import com.echothree.control.user.sequence.common.result.GetSequenceValueResult;
452import com.echothree.control.user.sequence.server.command.GetSequenceChecksumTypeCommand;
453import com.echothree.control.user.sequence.server.command.GetSequenceChecksumTypesCommand;
454import com.echothree.control.user.sequence.server.command.GetSequenceCommand;
455import com.echothree.control.user.sequence.server.command.GetSequenceEncoderTypeCommand;
456import com.echothree.control.user.sequence.server.command.GetSequenceEncoderTypesCommand;
457import com.echothree.control.user.sequence.server.command.GetSequenceTypeCommand;
458import com.echothree.control.user.sequence.server.command.GetSequenceTypesCommand;
459import com.echothree.control.user.sequence.server.command.GetSequencesCommand;
460import com.echothree.control.user.shipment.common.ShipmentUtil;
461import com.echothree.control.user.shipment.server.command.GetFreeOnBoardCommand;
462import com.echothree.control.user.shipment.server.command.GetFreeOnBoardsCommand;
463import com.echothree.control.user.shipping.common.ShippingUtil;
464import com.echothree.control.user.shipping.server.command.GetShippingMethodCommand;
465import com.echothree.control.user.shipping.server.command.GetShippingMethodsCommand;
466import com.echothree.control.user.subscription.common.SubscriptionUtil;
467import com.echothree.control.user.subscription.server.command.GetSubscriptionCommand;
468import com.echothree.control.user.subscription.server.command.GetSubscriptionKindCommand;
469import com.echothree.control.user.subscription.server.command.GetSubscriptionKindsCommand;
470import com.echothree.control.user.subscription.server.command.GetSubscriptionTypeCommand;
471import com.echothree.control.user.subscription.server.command.GetSubscriptionTypesCommand;
472import com.echothree.control.user.subscription.server.command.GetSubscriptionsCommand;
473import com.echothree.control.user.tag.common.TagUtil;
474import com.echothree.control.user.tag.server.command.GetEntityTagCommand;
475import com.echothree.control.user.tag.server.command.GetEntityTagsCommand;
476import com.echothree.control.user.tag.server.command.GetTagCommand;
477import com.echothree.control.user.tag.server.command.GetTagScopeCommand;
478import com.echothree.control.user.tag.server.command.GetTagScopeEntityTypeCommand;
479import com.echothree.control.user.tag.server.command.GetTagScopeEntityTypesCommand;
480import com.echothree.control.user.tag.server.command.GetTagScopesCommand;
481import com.echothree.control.user.tag.server.command.GetTagsCommand;
482import com.echothree.control.user.term.common.TermUtil;
483import com.echothree.control.user.term.server.command.GetTermCommand;
484import com.echothree.control.user.term.server.command.GetTermTypeCommand;
485import com.echothree.control.user.term.server.command.GetTermTypesCommand;
486import com.echothree.control.user.term.server.command.GetTermsCommand;
487import com.echothree.control.user.uom.common.UomUtil;
488import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindCommand;
489import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindUseCommand;
490import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindUseTypeCommand;
491import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindUseTypesCommand;
492import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindUsesCommand;
493import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindsCommand;
494import com.echothree.control.user.uom.server.command.GetUnitOfMeasureTypeCommand;
495import com.echothree.control.user.uom.server.command.GetUnitOfMeasureTypesCommand;
496import com.echothree.control.user.user.common.UserUtil;
497import com.echothree.control.user.user.server.command.GetRecoveryQuestionCommand;
498import com.echothree.control.user.user.server.command.GetRecoveryQuestionsCommand;
499import com.echothree.control.user.user.server.command.GetUserLoginCommand;
500import com.echothree.control.user.user.server.command.GetUserVisitGroupCommand;
501import com.echothree.control.user.user.server.command.GetUserVisitGroupsCommand;
502import com.echothree.control.user.vendor.common.VendorUtil;
503import com.echothree.control.user.vendor.server.command.GetItemPurchasingCategoriesCommand;
504import com.echothree.control.user.vendor.server.command.GetItemPurchasingCategoryCommand;
505import com.echothree.control.user.vendor.server.command.GetVendorCommand;
506import com.echothree.control.user.vendor.server.command.GetVendorItemCommand;
507import com.echothree.control.user.vendor.server.command.GetVendorItemCostCommand;
508import com.echothree.control.user.vendor.server.command.GetVendorItemCostsCommand;
509import com.echothree.control.user.vendor.server.command.GetVendorItemsCommand;
510import com.echothree.control.user.vendor.server.command.GetVendorTypeCommand;
511import com.echothree.control.user.vendor.server.command.GetVendorTypesCommand;
512import com.echothree.control.user.vendor.server.command.GetVendorsCommand;
513import com.echothree.control.user.warehouse.common.WarehouseUtil;
514import com.echothree.control.user.warehouse.server.command.GetLocationCommand;
515import com.echothree.control.user.warehouse.server.command.GetLocationNameElementCommand;
516import com.echothree.control.user.warehouse.server.command.GetLocationNameElementsCommand;
517import com.echothree.control.user.warehouse.server.command.GetLocationTypeCommand;
518import com.echothree.control.user.warehouse.server.command.GetLocationTypesCommand;
519import com.echothree.control.user.warehouse.server.command.GetLocationUseTypeCommand;
520import com.echothree.control.user.warehouse.server.command.GetLocationUseTypesCommand;
521import com.echothree.control.user.warehouse.server.command.GetLocationsCommand;
522import com.echothree.control.user.warehouse.server.command.GetWarehouseCommand;
523import com.echothree.control.user.warehouse.server.command.GetWarehouseTypeCommand;
524import com.echothree.control.user.warehouse.server.command.GetWarehouseTypesCommand;
525import com.echothree.control.user.warehouse.server.command.GetWarehousesCommand;
526import com.echothree.control.user.wishlist.common.WishlistUtil;
527import com.echothree.control.user.wishlist.server.command.GetWishlistPrioritiesCommand;
528import com.echothree.control.user.wishlist.server.command.GetWishlistPriorityCommand;
529import com.echothree.control.user.wishlist.server.command.GetWishlistTypeCommand;
530import com.echothree.control.user.wishlist.server.command.GetWishlistTypesCommand;
531import com.echothree.control.user.workflow.common.WorkflowUtil;
532import com.echothree.control.user.workflow.server.command.GetWorkflowCommand;
533import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationCommand;
534import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationPartyTypeCommand;
535import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationPartyTypesCommand;
536import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationSecurityRoleCommand;
537import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationSecurityRolesCommand;
538import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationSelectorCommand;
539import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationSelectorsCommand;
540import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationStepCommand;
541import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationStepsCommand;
542import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationsCommand;
543import com.echothree.control.user.workflow.server.command.GetWorkflowEntityStatusesCommand;
544import com.echothree.control.user.workflow.server.command.GetWorkflowEntityTypeCommand;
545import com.echothree.control.user.workflow.server.command.GetWorkflowEntityTypesCommand;
546import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceCommand;
547import com.echothree.control.user.workflow.server.command.GetWorkflowEntrancePartyTypeCommand;
548import com.echothree.control.user.workflow.server.command.GetWorkflowEntrancePartyTypesCommand;
549import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceSecurityRoleCommand;
550import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceSecurityRolesCommand;
551import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceSelectorCommand;
552import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceSelectorsCommand;
553import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceStepCommand;
554import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceStepsCommand;
555import com.echothree.control.user.workflow.server.command.GetWorkflowEntrancesCommand;
556import com.echothree.control.user.workflow.server.command.GetWorkflowSelectorKindCommand;
557import com.echothree.control.user.workflow.server.command.GetWorkflowSelectorKindsCommand;
558import com.echothree.control.user.workflow.server.command.GetWorkflowStepCommand;
559import com.echothree.control.user.workflow.server.command.GetWorkflowStepTypeCommand;
560import com.echothree.control.user.workflow.server.command.GetWorkflowStepTypesCommand;
561import com.echothree.control.user.workflow.server.command.GetWorkflowStepsCommand;
562import com.echothree.control.user.workflow.server.command.GetWorkflowsCommand;
563import com.echothree.model.control.accounting.server.graphql.CurrencyObject;
564import com.echothree.model.control.accounting.server.graphql.GlAccountCategoryObject;
565import com.echothree.model.control.accounting.server.graphql.GlAccountClassObject;
566import com.echothree.model.control.accounting.server.graphql.GlAccountObject;
567import com.echothree.model.control.accounting.server.graphql.GlAccountTypeObject;
568import com.echothree.model.control.accounting.server.graphql.GlResourceTypeObject;
569import com.echothree.model.control.accounting.server.graphql.ItemAccountingCategoryObject;
570import com.echothree.model.control.accounting.server.graphql.SymbolPositionObject;
571import com.echothree.model.control.accounting.server.graphql.TransactionEntityRoleTypeObject;
572import com.echothree.model.control.accounting.server.graphql.TransactionGlAccountCategoryObject;
573import com.echothree.model.control.accounting.server.graphql.TransactionGroupObject;
574import com.echothree.model.control.accounting.server.graphql.TransactionObject;
575import com.echothree.model.control.accounting.server.graphql.TransactionTimeTypeObject;
576import com.echothree.model.control.accounting.server.graphql.TransactionTypeObject;
577import com.echothree.model.control.campaign.server.graphql.CampaignContentObject;
578import com.echothree.model.control.campaign.server.graphql.CampaignMediumObject;
579import com.echothree.model.control.campaign.server.graphql.CampaignObject;
580import com.echothree.model.control.campaign.server.graphql.CampaignSourceObject;
581import com.echothree.model.control.campaign.server.graphql.CampaignTermObject;
582import com.echothree.model.control.cancellationpolicy.server.graphql.CancellationKindObject;
583import com.echothree.model.control.cancellationpolicy.server.graphql.CancellationPolicyObject;
584import com.echothree.model.control.chain.server.graphql.ChainActionObject;
585import com.echothree.model.control.chain.server.graphql.ChainActionSetObject;
586import com.echothree.model.control.chain.server.graphql.ChainActionTypeObject;
587import com.echothree.model.control.chain.server.graphql.ChainEntityRoleTypeObject;
588import com.echothree.model.control.chain.server.graphql.ChainInstanceObject;
589import com.echothree.model.control.chain.server.graphql.ChainKindObject;
590import com.echothree.model.control.chain.server.graphql.ChainObject;
591import com.echothree.model.control.chain.server.graphql.ChainTypeObject;
592import com.echothree.model.control.contact.server.graphql.ContactMechanismPurposeObject;
593import com.echothree.model.control.contactlist.server.graphql.ContactListContactMechanismPurposeObject;
594import com.echothree.model.control.contactlist.server.graphql.ContactListFrequencyObject;
595import com.echothree.model.control.contactlist.server.graphql.ContactListGroupObject;
596import com.echothree.model.control.contactlist.server.graphql.ContactListObject;
597import com.echothree.model.control.contactlist.server.graphql.ContactListTypeObject;
598import com.echothree.model.control.contactlist.server.graphql.CustomerTypeContactListGroupObject;
599import com.echothree.model.control.contactlist.server.graphql.CustomerTypeContactListObject;
600import com.echothree.model.control.contactlist.server.graphql.PartyContactListObject;
601import com.echothree.model.control.contactlist.server.graphql.PartyTypeContactListGroupObject;
602import com.echothree.model.control.contactlist.server.graphql.PartyTypeContactListObject;
603import com.echothree.model.control.content.server.graphql.ContentCatalogItemObject;
604import com.echothree.model.control.content.server.graphql.ContentCatalogObject;
605import com.echothree.model.control.content.server.graphql.ContentCategoryItemObject;
606import com.echothree.model.control.content.server.graphql.ContentCategoryObject;
607import com.echothree.model.control.content.server.graphql.ContentCollectionObject;
608import com.echothree.model.control.content.server.graphql.ContentPageAreaObject;
609import com.echothree.model.control.content.server.graphql.ContentPageAreaTypeObject;
610import com.echothree.model.control.content.server.graphql.ContentPageLayoutAreaObject;
611import com.echothree.model.control.content.server.graphql.ContentPageLayoutObject;
612import com.echothree.model.control.content.server.graphql.ContentPageObject;
613import com.echothree.model.control.content.server.graphql.ContentSectionObject;
614import com.echothree.model.control.content.server.graphql.ContentWebAddressObject;
615import com.echothree.model.control.core.server.graphql.AppearanceObject;
616import com.echothree.model.control.core.server.graphql.ColorObject;
617import com.echothree.model.control.core.server.graphql.ComponentVendorObject;
618import com.echothree.model.control.core.server.graphql.EntityAliasObject;
619import com.echothree.model.control.core.server.graphql.EntityAliasTypeObject;
620import com.echothree.model.control.core.server.graphql.EntityAttributeEntityAttributeGroupObject;
621import com.echothree.model.control.core.server.graphql.EntityAttributeGroupObject;
622import com.echothree.model.control.core.server.graphql.EntityAttributeObject;
623import com.echothree.model.control.core.server.graphql.EntityAttributeTypeObject;
624import com.echothree.model.control.core.server.graphql.EntityInstanceObject;
625import com.echothree.model.control.core.server.graphql.EntityTypeObject;
626import com.echothree.model.control.core.server.graphql.EventTypeObject;
627import com.echothree.model.control.core.server.graphql.FontStyleObject;
628import com.echothree.model.control.core.server.graphql.FontWeightObject;
629import com.echothree.model.control.core.server.graphql.MimeTypeFileExtensionObject;
630import com.echothree.model.control.core.server.graphql.MimeTypeObject;
631import com.echothree.model.control.core.server.graphql.MimeTypeUsageTypeObject;
632import com.echothree.model.control.core.server.graphql.TextDecorationObject;
633import com.echothree.model.control.core.server.graphql.TextTransformationObject;
634import com.echothree.model.control.customer.server.graphql.CustomerObject;
635import com.echothree.model.control.customer.server.graphql.CustomerTypeObject;
636import com.echothree.model.control.customer.server.graphql.CustomerTypePaymentMethodObject;
637import com.echothree.model.control.customer.server.graphql.CustomerTypeShippingMethodObject;
638import com.echothree.model.control.employee.server.graphql.EmployeeObject;
639import com.echothree.model.control.filter.server.graphql.FilterAdjustmentAmountObject;
640import com.echothree.model.control.filter.server.graphql.FilterAdjustmentFixedAmountObject;
641import com.echothree.model.control.filter.server.graphql.FilterAdjustmentObject;
642import com.echothree.model.control.filter.server.graphql.FilterAdjustmentPercentObject;
643import com.echothree.model.control.filter.server.graphql.FilterAdjustmentSourceObject;
644import com.echothree.model.control.filter.server.graphql.FilterAdjustmentTypeObject;
645import com.echothree.model.control.filter.server.graphql.FilterEntranceStepObject;
646import com.echothree.model.control.filter.server.graphql.FilterKindObject;
647import com.echothree.model.control.filter.server.graphql.FilterObject;
648import com.echothree.model.control.filter.server.graphql.FilterStepDestinationObject;
649import com.echothree.model.control.filter.server.graphql.FilterStepElementObject;
650import com.echothree.model.control.filter.server.graphql.FilterStepObject;
651import com.echothree.model.control.filter.server.graphql.FilterTypeObject;
652import com.echothree.model.control.geo.server.graphql.GeoCodeAliasObject;
653import com.echothree.model.control.geo.server.graphql.GeoCodeAliasTypeObject;
654import com.echothree.model.control.geo.server.graphql.GeoCodeCurrencyObject;
655import com.echothree.model.control.geo.server.graphql.GeoCodeDateTimeFormatObject;
656import com.echothree.model.control.geo.server.graphql.GeoCodeLanguageObject;
657import com.echothree.model.control.geo.server.graphql.GeoCodeObject;
658import com.echothree.model.control.geo.server.graphql.GeoCodeScopeObject;
659import com.echothree.model.control.geo.server.graphql.GeoCodeTimeZoneObject;
660import com.echothree.model.control.geo.server.graphql.GeoCodeTypeObject;
661import com.echothree.model.control.graphql.server.graphql.count.Connections;
662import com.echothree.model.control.graphql.server.graphql.count.CountedObjects;
663import com.echothree.model.control.graphql.server.graphql.count.CountingDataConnectionFetcher;
664import com.echothree.model.control.graphql.server.graphql.count.CountingPaginatedData;
665import com.echothree.model.control.graphql.server.util.BaseGraphQl;
666import static com.echothree.model.control.graphql.server.util.BaseGraphQl.getUserVisitPK;
667import com.echothree.model.control.graphql.server.util.count.ObjectLimiter;
668import com.echothree.model.control.inventory.server.graphql.AllocationPriorityObject;
669import com.echothree.model.control.inventory.server.graphql.InventoryAdjustmentTypeObject;
670import com.echothree.model.control.inventory.server.graphql.InventoryBucketTypeObject;
671import com.echothree.model.control.inventory.server.graphql.InventoryConditionObject;
672import com.echothree.model.control.inventory.server.graphql.InventoryCostingMethodObject;
673import com.echothree.model.control.inventory.server.graphql.InventoryLocationObject;
674import com.echothree.model.control.inventory.server.graphql.InventoryLocationBucketObject;
675import com.echothree.model.control.inventory.server.graphql.InventoryLocationGroupObject;
676import com.echothree.model.control.inventory.server.graphql.InventoryTransactionTypeObject;
677import com.echothree.model.control.inventory.server.graphql.LotObject;
678import com.echothree.model.control.inventory.server.graphql.PartyBucketObject;
679import com.echothree.model.control.inventory.server.graphql.PartyInventoryCostingMethodObject;
680import com.echothree.model.control.item.server.graphql.ItemAliasChecksumTypeObject;
681import com.echothree.model.control.item.server.graphql.ItemAliasObject;
682import com.echothree.model.control.item.server.graphql.ItemAliasTypeObject;
683import com.echothree.model.control.item.server.graphql.ItemCategoryObject;
684import com.echothree.model.control.item.server.graphql.ItemDeliveryTypeObject;
685import com.echothree.model.control.item.server.graphql.ItemDescriptionObject;
686import com.echothree.model.control.item.server.graphql.ItemDescriptionTypeObject;
687import com.echothree.model.control.item.server.graphql.ItemDescriptionTypeUseObject;
688import com.echothree.model.control.item.server.graphql.ItemDescriptionTypeUseTypeObject;
689import com.echothree.model.control.item.server.graphql.ItemImageTypeObject;
690import com.echothree.model.control.item.server.graphql.ItemInventoryTypeObject;
691import com.echothree.model.control.item.server.graphql.ItemObject;
692import com.echothree.model.control.item.server.graphql.ItemPriceObject;
693import com.echothree.model.control.item.server.graphql.ItemPriceTypeObject;
694import com.echothree.model.control.item.server.graphql.ItemTypeObject;
695import com.echothree.model.control.item.server.graphql.ItemUnitOfMeasureTypeObject;
696import com.echothree.model.control.item.server.graphql.ItemUseTypeObject;
697import com.echothree.model.control.item.server.graphql.ItemVolumeTypeObject;
698import com.echothree.model.control.item.server.graphql.ItemWeightTypeObject;
699import com.echothree.model.control.item.server.graphql.RelatedItemObject;
700import com.echothree.model.control.item.server.graphql.RelatedItemTypeObject;
701import com.echothree.model.control.offer.server.graphql.OfferCustomerTypeObject;
702import com.echothree.model.control.offer.server.graphql.OfferItemObject;
703import com.echothree.model.control.offer.server.graphql.OfferItemPriceObject;
704import com.echothree.model.control.offer.server.graphql.OfferNameElementObject;
705import com.echothree.model.control.offer.server.graphql.OfferObject;
706import com.echothree.model.control.offer.server.graphql.OfferUseObject;
707import com.echothree.model.control.offer.server.graphql.UseNameElementObject;
708import com.echothree.model.control.offer.server.graphql.UseObject;
709import com.echothree.model.control.offer.server.graphql.UseTypeObject;
710import com.echothree.model.control.order.server.graphql.OrderPriorityObject;
711import com.echothree.model.control.order.server.graphql.OrderTimeTypeObject;
712import com.echothree.model.control.order.server.graphql.OrderTypeObject;
713import com.echothree.model.control.party.server.graphql.CompanyObject;
714import com.echothree.model.control.party.server.graphql.DateTimeFormatObject;
715import com.echothree.model.control.party.server.graphql.DepartmentObject;
716import com.echothree.model.control.party.server.graphql.DivisionObject;
717import com.echothree.model.control.party.server.graphql.LanguageObject;
718import com.echothree.model.control.party.server.graphql.NameSuffixObject;
719import com.echothree.model.control.party.server.graphql.PartyAliasObject;
720import com.echothree.model.control.party.server.graphql.PartyAliasTypeObject;
721import com.echothree.model.control.party.server.graphql.PartyObject;
722import com.echothree.model.control.party.server.graphql.PartyTypeObject;
723import com.echothree.model.control.party.server.graphql.PersonalTitleObject;
724import com.echothree.model.control.party.server.graphql.RoleTypeObject;
725import com.echothree.model.control.party.server.graphql.TimeZoneObject;
726import com.echothree.model.control.payment.server.graphql.PaymentMethodObject;
727import com.echothree.model.control.payment.server.graphql.PaymentMethodTypeObject;
728import com.echothree.model.control.payment.server.graphql.PaymentProcessorActionTypeObject;
729import com.echothree.model.control.payment.server.graphql.PaymentProcessorObject;
730import com.echothree.model.control.payment.server.graphql.PaymentProcessorResultCodeObject;
731import com.echothree.model.control.payment.server.graphql.PaymentProcessorTransactionObject;
732import com.echothree.model.control.payment.server.graphql.PaymentProcessorTypeCodeObject;
733import com.echothree.model.control.payment.server.graphql.PaymentProcessorTypeCodeTypeObject;
734import com.echothree.model.control.payment.server.graphql.PaymentProcessorTypeObject;
735import com.echothree.model.control.queue.server.graphql.QueueTypeObject;
736import com.echothree.model.control.returnpolicy.server.graphql.ReturnKindObject;
737import com.echothree.model.control.returnpolicy.server.graphql.ReturnPolicyObject;
738import com.echothree.model.control.search.server.control.SearchControl;
739import com.echothree.model.control.search.server.graphql.CheckItemSpellingObject;
740import com.echothree.model.control.search.server.graphql.ComponentVendorResultsObject;
741import com.echothree.model.control.search.server.graphql.ContentCatalogItemResultsObject;
742import com.echothree.model.control.search.server.graphql.ContentCatalogResultsObject;
743import com.echothree.model.control.search.server.graphql.ContentCategoryResultsObject;
744import com.echothree.model.control.search.server.graphql.CustomerResultsObject;
745import com.echothree.model.control.search.server.graphql.EmployeeResultsObject;
746import com.echothree.model.control.search.server.graphql.EntityAliasTypeResultsObject;
747import com.echothree.model.control.search.server.graphql.EntityAttributeGroupResultsObject;
748import com.echothree.model.control.search.server.graphql.EntityAttributeResultsObject;
749import com.echothree.model.control.search.server.graphql.EntityListItemResultsObject;
750import com.echothree.model.control.search.server.graphql.EntityTypeResultsObject;
751import com.echothree.model.control.search.server.graphql.ItemResultsObject;
752import com.echothree.model.control.search.server.graphql.SearchCheckSpellingActionTypeObject;
753import com.echothree.model.control.search.server.graphql.SearchDefaultOperatorObject;
754import com.echothree.model.control.search.server.graphql.SearchKindObject;
755import com.echothree.model.control.search.server.graphql.SearchResultActionTypeObject;
756import com.echothree.model.control.search.server.graphql.SearchSortDirectionObject;
757import com.echothree.model.control.search.server.graphql.SearchSortOrderObject;
758import com.echothree.model.control.search.server.graphql.SearchTypeObject;
759import com.echothree.model.control.search.server.graphql.SearchUseTypeObject;
760import com.echothree.model.control.search.server.graphql.ShippingMethodResultsObject;
761import com.echothree.model.control.search.server.graphql.VendorResultsObject;
762import com.echothree.model.control.search.server.graphql.WarehouseResultsObject;
763import com.echothree.model.control.security.server.graphql.SecurityRoleGroupObject;
764import com.echothree.model.control.security.server.graphql.SecurityRoleObject;
765import com.echothree.model.control.selector.server.graphql.SelectorKindObject;
766import com.echothree.model.control.selector.server.graphql.SelectorObject;
767import com.echothree.model.control.selector.server.graphql.SelectorTypeObject;
768import com.echothree.model.control.sequence.server.graphql.GetSequenceValueResultObject;
769import com.echothree.model.control.sequence.server.graphql.SequenceChecksumTypeObject;
770import com.echothree.model.control.sequence.server.graphql.SequenceEncoderTypeObject;
771import com.echothree.model.control.sequence.server.graphql.SequenceObject;
772import com.echothree.model.control.sequence.server.graphql.SequenceTypeObject;
773import com.echothree.model.control.shipment.server.graphql.FreeOnBoardObject;
774import com.echothree.model.control.shipping.server.control.ShippingControl;
775import com.echothree.model.control.shipping.server.graphql.ShippingMethodObject;
776import com.echothree.model.control.subscription.server.graphql.SubscriptionKindObject;
777import com.echothree.model.control.subscription.server.graphql.SubscriptionObject;
778import com.echothree.model.control.subscription.server.graphql.SubscriptionTypeObject;
779import com.echothree.model.control.tag.server.graphql.EntityTagObject;
780import com.echothree.model.control.tag.server.graphql.TagObject;
781import com.echothree.model.control.tag.server.graphql.TagScopeEntityTypeObject;
782import com.echothree.model.control.tag.server.graphql.TagScopeObject;
783import com.echothree.model.control.term.server.graphql.TermObject;
784import com.echothree.model.control.term.server.graphql.TermTypeObject;
785import com.echothree.model.control.uom.server.graphql.UnitOfMeasureKindObject;
786import com.echothree.model.control.uom.server.graphql.UnitOfMeasureKindUseObject;
787import com.echothree.model.control.uom.server.graphql.UnitOfMeasureKindUseTypeObject;
788import com.echothree.model.control.uom.server.graphql.UnitOfMeasureTypeObject;
789import com.echothree.model.control.user.server.graphql.RecoveryQuestionObject;
790import com.echothree.model.control.user.server.graphql.UserLoginObject;
791import com.echothree.model.control.user.server.graphql.UserSessionObject;
792import com.echothree.model.control.user.server.graphql.UserVisitGroupObject;
793import com.echothree.model.control.user.server.graphql.UserVisitObject;
794import com.echothree.model.control.vendor.server.graphql.ItemPurchasingCategoryObject;
795import com.echothree.model.control.vendor.server.graphql.VendorItemCostObject;
796import com.echothree.model.control.vendor.server.graphql.VendorItemObject;
797import com.echothree.model.control.vendor.server.graphql.VendorObject;
798import com.echothree.model.control.vendor.server.graphql.VendorTypeObject;
799import com.echothree.model.control.warehouse.server.graphql.LocationNameElementObject;
800import com.echothree.model.control.warehouse.server.graphql.LocationObject;
801import com.echothree.model.control.warehouse.server.graphql.LocationTypeObject;
802import com.echothree.model.control.warehouse.server.graphql.LocationUseTypeObject;
803import com.echothree.model.control.warehouse.server.graphql.WarehouseObject;
804import com.echothree.model.control.warehouse.server.graphql.WarehouseTypeObject;
805import com.echothree.model.control.wishlist.server.graphql.WishlistPriorityObject;
806import com.echothree.model.control.wishlist.server.graphql.WishlistTypeObject;
807import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationObject;
808import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationPartyTypeObject;
809import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationSecurityRoleObject;
810import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationSelectorObject;
811import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationStepObject;
812import com.echothree.model.control.workflow.server.graphql.WorkflowEntityStatusObject;
813import com.echothree.model.control.workflow.server.graphql.WorkflowEntityTypeObject;
814import com.echothree.model.control.workflow.server.graphql.WorkflowEntranceObject;
815import com.echothree.model.control.workflow.server.graphql.WorkflowEntrancePartyTypeObject;
816import com.echothree.model.control.workflow.server.graphql.WorkflowEntranceSecurityRoleObject;
817import com.echothree.model.control.workflow.server.graphql.WorkflowEntranceSelectorObject;
818import com.echothree.model.control.workflow.server.graphql.WorkflowEntranceStepObject;
819import com.echothree.model.control.workflow.server.graphql.WorkflowObject;
820import com.echothree.model.control.workflow.server.graphql.WorkflowSelectorKindObject;
821import com.echothree.model.control.workflow.server.graphql.WorkflowStepObject;
822import com.echothree.model.control.workflow.server.graphql.WorkflowStepTypeObject;
823import com.echothree.model.data.accounting.common.CurrencyConstants;
824import com.echothree.model.data.accounting.common.GlAccountCategoryConstants;
825import com.echothree.model.data.accounting.common.GlAccountClassConstants;
826import com.echothree.model.data.accounting.common.GlAccountConstants;
827import com.echothree.model.data.accounting.common.GlAccountTypeConstants;
828import com.echothree.model.data.accounting.common.GlResourceTypeConstants;
829import com.echothree.model.data.accounting.common.ItemAccountingCategoryConstants;
830import com.echothree.model.data.accounting.common.SymbolPositionConstants;
831import com.echothree.model.data.accounting.common.TransactionConstants;
832import com.echothree.model.data.accounting.common.TransactionEntityRoleTypeConstants;
833import com.echothree.model.data.accounting.common.TransactionGlAccountCategoryConstants;
834import com.echothree.model.data.accounting.common.TransactionGroupConstants;
835import com.echothree.model.data.accounting.common.TransactionTimeTypeConstants;
836import com.echothree.model.data.accounting.common.TransactionTypeConstants;
837import com.echothree.model.data.accounting.server.entity.Currency;
838import com.echothree.model.data.accounting.server.entity.GlAccount;
839import com.echothree.model.data.accounting.server.entity.GlAccountCategory;
840import com.echothree.model.data.accounting.server.entity.GlAccountClass;
841import com.echothree.model.data.accounting.server.entity.GlAccountType;
842import com.echothree.model.data.accounting.server.entity.GlResourceType;
843import com.echothree.model.data.accounting.server.entity.ItemAccountingCategory;
844import com.echothree.model.data.accounting.server.entity.SymbolPosition;
845import com.echothree.model.data.accounting.server.entity.Transaction;
846import com.echothree.model.data.accounting.server.entity.TransactionEntityRoleType;
847import com.echothree.model.data.accounting.server.entity.TransactionGlAccountCategory;
848import com.echothree.model.data.accounting.server.entity.TransactionGroup;
849import com.echothree.model.data.accounting.server.entity.TransactionTimeType;
850import com.echothree.model.data.accounting.server.entity.TransactionType;
851import com.echothree.model.data.campaign.common.CampaignConstants;
852import com.echothree.model.data.campaign.common.CampaignContentConstants;
853import com.echothree.model.data.campaign.common.CampaignMediumConstants;
854import com.echothree.model.data.campaign.common.CampaignSourceConstants;
855import com.echothree.model.data.campaign.common.CampaignTermConstants;
856import com.echothree.model.data.campaign.server.entity.Campaign;
857import com.echothree.model.data.campaign.server.entity.CampaignContent;
858import com.echothree.model.data.campaign.server.entity.CampaignMedium;
859import com.echothree.model.data.campaign.server.entity.CampaignSource;
860import com.echothree.model.data.campaign.server.entity.CampaignTerm;
861import com.echothree.model.data.cancellationpolicy.common.CancellationKindConstants;
862import com.echothree.model.data.cancellationpolicy.common.CancellationPolicyConstants;
863import com.echothree.model.data.cancellationpolicy.server.entity.CancellationKind;
864import com.echothree.model.data.cancellationpolicy.server.entity.CancellationPolicy;
865import com.echothree.model.data.chain.common.ChainActionConstants;
866import com.echothree.model.data.chain.common.ChainActionSetConstants;
867import com.echothree.model.data.chain.common.ChainActionTypeConstants;
868import com.echothree.model.data.chain.common.ChainConstants;
869import com.echothree.model.data.chain.common.ChainEntityRoleTypeConstants;
870import com.echothree.model.data.chain.common.ChainInstanceConstants;
871import com.echothree.model.data.chain.common.ChainKindConstants;
872import com.echothree.model.data.chain.common.ChainTypeConstants;
873import com.echothree.model.data.chain.server.entity.Chain;
874import com.echothree.model.data.chain.server.entity.ChainAction;
875import com.echothree.model.data.chain.server.entity.ChainActionSet;
876import com.echothree.model.data.chain.server.entity.ChainActionType;
877import com.echothree.model.data.chain.server.entity.ChainEntityRoleType;
878import com.echothree.model.data.chain.server.entity.ChainInstance;
879import com.echothree.model.data.chain.server.entity.ChainKind;
880import com.echothree.model.data.chain.server.entity.ChainType;
881import com.echothree.model.data.contact.common.ContactMechanismPurposeConstants;
882import com.echothree.model.data.contact.server.entity.ContactMechanismPurpose;
883import com.echothree.model.data.contactlist.common.ContactListConstants;
884import com.echothree.model.data.contactlist.common.ContactListContactMechanismPurposeConstants;
885import com.echothree.model.data.contactlist.common.ContactListFrequencyConstants;
886import com.echothree.model.data.contactlist.common.ContactListGroupConstants;
887import com.echothree.model.data.contactlist.common.ContactListTypeConstants;
888import com.echothree.model.data.contactlist.common.CustomerTypeContactListConstants;
889import com.echothree.model.data.contactlist.common.CustomerTypeContactListGroupConstants;
890import com.echothree.model.data.contactlist.common.PartyContactListConstants;
891import com.echothree.model.data.contactlist.common.PartyTypeContactListConstants;
892import com.echothree.model.data.contactlist.common.PartyTypeContactListGroupConstants;
893import com.echothree.model.data.contactlist.server.entity.ContactList;
894import com.echothree.model.data.contactlist.server.entity.ContactListContactMechanismPurpose;
895import com.echothree.model.data.contactlist.server.entity.ContactListFrequency;
896import com.echothree.model.data.contactlist.server.entity.ContactListGroup;
897import com.echothree.model.data.contactlist.server.entity.ContactListType;
898import com.echothree.model.data.contactlist.server.entity.CustomerTypeContactList;
899import com.echothree.model.data.contactlist.server.entity.CustomerTypeContactListGroup;
900import com.echothree.model.data.contactlist.server.entity.PartyContactList;
901import com.echothree.model.data.contactlist.server.entity.PartyTypeContactList;
902import com.echothree.model.data.contactlist.server.entity.PartyTypeContactListGroup;
903import com.echothree.model.data.content.common.ContentCatalogConstants;
904import com.echothree.model.data.content.common.ContentCatalogItemConstants;
905import com.echothree.model.data.content.common.ContentCategoryConstants;
906import com.echothree.model.data.content.common.ContentCategoryItemConstants;
907import com.echothree.model.data.content.common.ContentCollectionConstants;
908import com.echothree.model.data.content.common.ContentPageAreaConstants;
909import com.echothree.model.data.content.common.ContentPageAreaTypeConstants;
910import com.echothree.model.data.content.common.ContentPageConstants;
911import com.echothree.model.data.content.common.ContentPageLayoutAreaConstants;
912import com.echothree.model.data.content.common.ContentPageLayoutConstants;
913import com.echothree.model.data.content.common.ContentSectionConstants;
914import com.echothree.model.data.content.common.ContentWebAddressConstants;
915import com.echothree.model.data.content.server.entity.ContentCatalog;
916import com.echothree.model.data.content.server.entity.ContentCatalogItem;
917import com.echothree.model.data.content.server.entity.ContentCategory;
918import com.echothree.model.data.content.server.entity.ContentCategoryItem;
919import com.echothree.model.data.content.server.entity.ContentCollection;
920import com.echothree.model.data.content.server.entity.ContentPage;
921import com.echothree.model.data.content.server.entity.ContentPageArea;
922import com.echothree.model.data.content.server.entity.ContentPageAreaType;
923import com.echothree.model.data.content.server.entity.ContentPageLayout;
924import com.echothree.model.data.content.server.entity.ContentPageLayoutArea;
925import com.echothree.model.data.content.server.entity.ContentSection;
926import com.echothree.model.data.content.server.entity.ContentWebAddress;
927import com.echothree.model.data.core.common.AppearanceConstants;
928import com.echothree.model.data.core.common.ColorConstants;
929import com.echothree.model.data.core.common.ComponentVendorConstants;
930import com.echothree.model.data.core.common.EntityAliasConstants;
931import com.echothree.model.data.core.common.EntityAliasTypeConstants;
932import com.echothree.model.data.core.common.EntityAttributeConstants;
933import com.echothree.model.data.core.common.EntityAttributeEntityAttributeGroupConstants;
934import com.echothree.model.data.core.common.EntityAttributeGroupConstants;
935import com.echothree.model.data.core.common.EntityAttributeTypeConstants;
936import com.echothree.model.data.core.common.EntityInstanceConstants;
937import com.echothree.model.data.core.common.EntityTypeConstants;
938import com.echothree.model.data.core.common.EventTypeConstants;
939import com.echothree.model.data.core.common.FontStyleConstants;
940import com.echothree.model.data.core.common.FontWeightConstants;
941import com.echothree.model.data.core.common.MimeTypeConstants;
942import com.echothree.model.data.core.common.MimeTypeFileExtensionConstants;
943import com.echothree.model.data.core.common.TextDecorationConstants;
944import com.echothree.model.data.core.common.TextTransformationConstants;
945import com.echothree.model.data.core.server.entity.Appearance;
946import com.echothree.model.data.core.server.entity.Color;
947import com.echothree.model.data.core.server.entity.ComponentVendor;
948import com.echothree.model.data.core.server.entity.EntityAlias;
949import com.echothree.model.data.core.server.entity.EntityAliasType;
950import com.echothree.model.data.core.server.entity.EntityAttribute;
951import com.echothree.model.data.core.server.entity.EntityAttributeEntityAttributeGroup;
952import com.echothree.model.data.core.server.entity.EntityAttributeGroup;
953import com.echothree.model.data.core.server.entity.EntityAttributeType;
954import com.echothree.model.data.core.server.entity.EntityInstance;
955import com.echothree.model.data.core.server.entity.EntityType;
956import com.echothree.model.data.core.server.entity.EventType;
957import com.echothree.model.data.core.server.entity.FontStyle;
958import com.echothree.model.data.core.server.entity.FontWeight;
959import com.echothree.model.data.core.server.entity.MimeType;
960import com.echothree.model.data.core.server.entity.MimeTypeFileExtension;
961import com.echothree.model.data.core.server.entity.MimeTypeUsageType;
962import com.echothree.model.data.core.server.entity.TextDecoration;
963import com.echothree.model.data.core.server.entity.TextTransformation;
964import com.echothree.model.data.customer.common.CustomerConstants;
965import com.echothree.model.data.customer.common.CustomerTypeConstants;
966import com.echothree.model.data.customer.common.CustomerTypePaymentMethodConstants;
967import com.echothree.model.data.customer.common.CustomerTypeShippingMethodConstants;
968import com.echothree.model.data.customer.server.entity.Customer;
969import com.echothree.model.data.customer.server.entity.CustomerType;
970import com.echothree.model.data.customer.server.entity.CustomerTypePaymentMethod;
971import com.echothree.model.data.customer.server.entity.CustomerTypeShippingMethod;
972import com.echothree.model.data.employee.common.PartyEmployeeConstants;
973import com.echothree.model.data.employee.server.entity.PartyEmployee;
974import com.echothree.model.data.filter.common.FilterAdjustmentTypeConstants;
975import com.echothree.model.data.filter.common.FilterConstants;
976import com.echothree.model.data.filter.common.FilterEntranceStepConstants;
977import com.echothree.model.data.filter.common.FilterKindConstants;
978import com.echothree.model.data.filter.common.FilterStepConstants;
979import com.echothree.model.data.filter.common.FilterStepDestinationConstants;
980import com.echothree.model.data.filter.common.FilterStepElementConstants;
981import com.echothree.model.data.filter.common.FilterTypeConstants;
982import com.echothree.model.data.filter.server.entity.Filter;
983import com.echothree.model.data.filter.server.entity.FilterAdjustment;
984import com.echothree.model.data.filter.server.entity.FilterAdjustmentAmount;
985import com.echothree.model.data.filter.server.entity.FilterAdjustmentFixedAmount;
986import com.echothree.model.data.filter.server.entity.FilterAdjustmentPercent;
987import com.echothree.model.data.filter.server.entity.FilterAdjustmentSource;
988import com.echothree.model.data.filter.server.entity.FilterAdjustmentType;
989import com.echothree.model.data.filter.server.entity.FilterEntranceStep;
990import com.echothree.model.data.filter.server.entity.FilterKind;
991import com.echothree.model.data.filter.server.entity.FilterStep;
992import com.echothree.model.data.filter.server.entity.FilterStepDestination;
993import com.echothree.model.data.filter.server.entity.FilterStepElement;
994import com.echothree.model.data.filter.server.entity.FilterType;
995import com.echothree.model.data.geo.common.GeoCodeAliasConstants;
996import com.echothree.model.data.geo.common.GeoCodeAliasTypeConstants;
997import com.echothree.model.data.geo.common.GeoCodeConstants;
998import com.echothree.model.data.geo.common.GeoCodeCurrencyConstants;
999import com.echothree.model.data.geo.common.GeoCodeDateTimeFormatConstants;
1000import com.echothree.model.data.geo.common.GeoCodeLanguageConstants;
1001import com.echothree.model.data.geo.common.GeoCodeScopeConstants;
1002import com.echothree.model.data.geo.common.GeoCodeTimeZoneConstants;
1003import com.echothree.model.data.geo.common.GeoCodeTypeConstants;
1004import com.echothree.model.data.geo.server.entity.GeoCode;
1005import com.echothree.model.data.geo.server.entity.GeoCodeAlias;
1006import com.echothree.model.data.geo.server.entity.GeoCodeAliasType;
1007import com.echothree.model.data.geo.server.entity.GeoCodeCurrency;
1008import com.echothree.model.data.geo.server.entity.GeoCodeDateTimeFormat;
1009import com.echothree.model.data.geo.server.entity.GeoCodeLanguage;
1010import com.echothree.model.data.geo.server.entity.GeoCodeScope;
1011import com.echothree.model.data.geo.server.entity.GeoCodeTimeZone;
1012import com.echothree.model.data.geo.server.entity.GeoCodeType;
1013import com.echothree.model.data.inventory.common.AllocationPriorityConstants;
1014import com.echothree.model.data.inventory.common.InventoryAdjustmentTypeConstants;
1015import com.echothree.model.data.inventory.common.InventoryBucketTypeConstants;
1016import com.echothree.model.data.inventory.common.InventoryConditionConstants;
1017import com.echothree.model.data.inventory.common.InventoryCostingMethodConstants;
1018import com.echothree.model.data.inventory.common.InventoryLocationConstants;
1019import com.echothree.model.data.inventory.common.InventoryLocationBucketConstants;
1020import com.echothree.model.data.inventory.common.InventoryLocationGroupConstants;
1021import com.echothree.model.data.inventory.common.InventoryTransactionTypeConstants;
1022import com.echothree.model.data.inventory.common.LotConstants;
1023import com.echothree.model.data.inventory.common.PartyBucketConstants;
1024import com.echothree.model.data.inventory.common.PartyInventoryCostingMethodConstants;
1025import com.echothree.model.data.inventory.server.entity.AllocationPriority;
1026import com.echothree.model.data.inventory.server.entity.InventoryAdjustmentType;
1027import com.echothree.model.data.inventory.server.entity.InventoryBucketType;
1028import com.echothree.model.data.inventory.server.entity.InventoryCondition;
1029import com.echothree.model.data.inventory.server.entity.InventoryCostingMethod;
1030import com.echothree.model.data.inventory.server.entity.InventoryLocation;
1031import com.echothree.model.data.inventory.server.entity.InventoryLocationBucket;
1032import com.echothree.model.data.inventory.server.entity.InventoryLocationGroup;
1033import com.echothree.model.data.inventory.server.entity.InventoryTransactionType;
1034import com.echothree.model.data.inventory.server.entity.Lot;
1035import com.echothree.model.data.inventory.server.entity.PartyBucket;
1036import com.echothree.model.data.inventory.server.entity.PartyInventoryCostingMethod;
1037import com.echothree.model.data.item.common.ItemAliasChecksumTypeConstants;
1038import com.echothree.model.data.item.common.ItemAliasConstants;
1039import com.echothree.model.data.item.common.ItemAliasTypeConstants;
1040import com.echothree.model.data.item.common.ItemCategoryConstants;
1041import com.echothree.model.data.item.common.ItemConstants;
1042import com.echothree.model.data.item.common.ItemDeliveryTypeConstants;
1043import com.echothree.model.data.item.common.ItemDescriptionConstants;
1044import com.echothree.model.data.item.common.ItemDescriptionTypeConstants;
1045import com.echothree.model.data.item.common.ItemDescriptionTypeUseTypeConstants;
1046import com.echothree.model.data.item.common.ItemImageTypeConstants;
1047import com.echothree.model.data.item.common.ItemInventoryTypeConstants;
1048import com.echothree.model.data.item.common.ItemPriceConstants;
1049import com.echothree.model.data.item.common.ItemPriceTypeConstants;
1050import com.echothree.model.data.item.common.ItemTypeConstants;
1051import com.echothree.model.data.item.common.ItemUnitOfMeasureTypeConstants;
1052import com.echothree.model.data.item.common.ItemUseTypeConstants;
1053import com.echothree.model.data.item.common.ItemVolumeTypeConstants;
1054import com.echothree.model.data.item.common.ItemWeightTypeConstants;
1055import com.echothree.model.data.item.common.RelatedItemConstants;
1056import com.echothree.model.data.item.common.RelatedItemTypeConstants;
1057import com.echothree.model.data.item.server.entity.Item;
1058import com.echothree.model.data.item.server.entity.ItemAlias;
1059import com.echothree.model.data.item.server.entity.ItemAliasChecksumType;
1060import com.echothree.model.data.item.server.entity.ItemAliasType;
1061import com.echothree.model.data.item.server.entity.ItemCategory;
1062import com.echothree.model.data.item.server.entity.ItemDeliveryType;
1063import com.echothree.model.data.item.server.entity.ItemDescription;
1064import com.echothree.model.data.item.server.entity.ItemDescriptionType;
1065import com.echothree.model.data.item.server.entity.ItemDescriptionTypeUse;
1066import com.echothree.model.data.item.server.entity.ItemDescriptionTypeUseType;
1067import com.echothree.model.data.item.server.entity.ItemImageType;
1068import com.echothree.model.data.item.server.entity.ItemInventoryType;
1069import com.echothree.model.data.item.server.entity.ItemPrice;
1070import com.echothree.model.data.item.server.entity.ItemPriceType;
1071import com.echothree.model.data.item.server.entity.ItemType;
1072import com.echothree.model.data.item.server.entity.ItemUnitOfMeasureType;
1073import com.echothree.model.data.item.server.entity.ItemUseType;
1074import com.echothree.model.data.item.server.entity.ItemVolumeType;
1075import com.echothree.model.data.item.server.entity.ItemWeightType;
1076import com.echothree.model.data.item.server.entity.RelatedItem;
1077import com.echothree.model.data.item.server.entity.RelatedItemType;
1078import com.echothree.model.data.offer.common.OfferConstants;
1079import com.echothree.model.data.offer.common.OfferCustomerTypeConstants;
1080import com.echothree.model.data.offer.common.OfferItemConstants;
1081import com.echothree.model.data.offer.common.OfferItemPriceConstants;
1082import com.echothree.model.data.offer.common.OfferNameElementConstants;
1083import com.echothree.model.data.offer.common.UseConstants;
1084import com.echothree.model.data.offer.common.UseNameElementConstants;
1085import com.echothree.model.data.offer.common.UseTypeConstants;
1086import com.echothree.model.data.offer.server.entity.Offer;
1087import com.echothree.model.data.offer.server.entity.OfferCustomerType;
1088import com.echothree.model.data.offer.server.entity.OfferItem;
1089import com.echothree.model.data.offer.server.entity.OfferItemPrice;
1090import com.echothree.model.data.offer.server.entity.OfferNameElement;
1091import com.echothree.model.data.offer.server.entity.OfferUse;
1092import com.echothree.model.data.offer.server.entity.Use;
1093import com.echothree.model.data.offer.server.entity.UseNameElement;
1094import com.echothree.model.data.offer.server.entity.UseType;
1095import com.echothree.model.data.order.common.OrderPriorityConstants;
1096import com.echothree.model.data.order.common.OrderTimeTypeConstants;
1097import com.echothree.model.data.order.common.OrderTypeConstants;
1098import com.echothree.model.data.order.server.entity.OrderPriority;
1099import com.echothree.model.data.order.server.entity.OrderTimeType;
1100import com.echothree.model.data.order.server.entity.OrderType;
1101import com.echothree.model.data.party.common.DateTimeFormatConstants;
1102import com.echothree.model.data.party.common.LanguageConstants;
1103import com.echothree.model.data.party.common.NameSuffixConstants;
1104import com.echothree.model.data.party.common.PartyAliasTypeConstants;
1105import com.echothree.model.data.party.common.PartyCompanyConstants;
1106import com.echothree.model.data.party.common.PartyConstants;
1107import com.echothree.model.data.party.common.PartyDepartmentConstants;
1108import com.echothree.model.data.party.common.PartyDivisionConstants;
1109import com.echothree.model.data.party.common.PartyTypeConstants;
1110import com.echothree.model.data.party.common.PersonalTitleConstants;
1111import com.echothree.model.data.party.common.RoleTypeConstants;
1112import com.echothree.model.data.party.common.TimeZoneConstants;
1113import com.echothree.model.data.party.server.entity.DateTimeFormat;
1114import com.echothree.model.data.party.server.entity.Language;
1115import com.echothree.model.data.party.server.entity.Party;
1116import com.echothree.model.data.party.server.entity.PartyAlias;
1117import com.echothree.model.data.party.server.entity.PartyAliasType;
1118import com.echothree.model.data.party.server.entity.PartyCompany;
1119import com.echothree.model.data.party.server.entity.PartyDepartment;
1120import com.echothree.model.data.party.server.entity.PartyDivision;
1121import com.echothree.model.data.party.server.entity.PartyType;
1122import com.echothree.model.data.party.server.entity.RoleType;
1123import com.echothree.model.data.party.server.entity.TimeZone;
1124import com.echothree.model.data.payment.common.PaymentMethodConstants;
1125import com.echothree.model.data.payment.common.PaymentMethodTypeConstants;
1126import com.echothree.model.data.payment.common.PaymentProcessorActionTypeConstants;
1127import com.echothree.model.data.payment.common.PaymentProcessorConstants;
1128import com.echothree.model.data.payment.common.PaymentProcessorResultCodeConstants;
1129import com.echothree.model.data.payment.common.PaymentProcessorTransactionConstants;
1130import com.echothree.model.data.payment.common.PaymentProcessorTypeConstants;
1131import com.echothree.model.data.payment.server.entity.PaymentMethod;
1132import com.echothree.model.data.payment.server.entity.PaymentMethodType;
1133import com.echothree.model.data.payment.server.entity.PaymentProcessor;
1134import com.echothree.model.data.payment.server.entity.PaymentProcessorActionType;
1135import com.echothree.model.data.payment.server.entity.PaymentProcessorResultCode;
1136import com.echothree.model.data.payment.server.entity.PaymentProcessorTransaction;
1137import com.echothree.model.data.payment.server.entity.PaymentProcessorType;
1138import com.echothree.model.data.payment.server.entity.PaymentProcessorTypeCode;
1139import com.echothree.model.data.payment.server.entity.PaymentProcessorTypeCodeType;
1140import com.echothree.model.data.queue.common.QueueTypeConstants;
1141import com.echothree.model.data.queue.server.entity.QueueType;
1142import com.echothree.model.data.returnpolicy.common.ReturnKindConstants;
1143import com.echothree.model.data.returnpolicy.common.ReturnPolicyConstants;
1144import com.echothree.model.data.returnpolicy.server.entity.ReturnKind;
1145import com.echothree.model.data.returnpolicy.server.entity.ReturnPolicy;
1146import com.echothree.model.data.search.common.SearchCheckSpellingActionTypeConstants;
1147import com.echothree.model.data.search.common.SearchDefaultOperatorConstants;
1148import com.echothree.model.data.search.common.SearchKindConstants;
1149import com.echothree.model.data.search.common.SearchResultActionTypeConstants;
1150import com.echothree.model.data.search.common.SearchSortDirectionConstants;
1151import com.echothree.model.data.search.common.SearchSortOrderConstants;
1152import com.echothree.model.data.search.common.SearchTypeConstants;
1153import com.echothree.model.data.search.common.SearchUseTypeConstants;
1154import com.echothree.model.data.search.server.entity.SearchCheckSpellingActionType;
1155import com.echothree.model.data.search.server.entity.SearchDefaultOperator;
1156import com.echothree.model.data.search.server.entity.SearchKind;
1157import com.echothree.model.data.search.server.entity.SearchResultActionType;
1158import com.echothree.model.data.search.server.entity.SearchSortDirection;
1159import com.echothree.model.data.search.server.entity.SearchSortOrder;
1160import com.echothree.model.data.search.server.entity.SearchType;
1161import com.echothree.model.data.search.server.entity.SearchUseType;
1162import com.echothree.model.data.security.common.SecurityRoleConstants;
1163import com.echothree.model.data.security.common.SecurityRoleGroupConstants;
1164import com.echothree.model.data.security.server.entity.SecurityRole;
1165import com.echothree.model.data.security.server.entity.SecurityRoleGroup;
1166import com.echothree.model.data.selector.common.SelectorKindConstants;
1167import com.echothree.model.data.selector.common.SelectorTypeConstants;
1168import com.echothree.model.data.selector.server.entity.Selector;
1169import com.echothree.model.data.selector.server.entity.SelectorKind;
1170import com.echothree.model.data.selector.server.entity.SelectorType;
1171import com.echothree.model.data.sequence.common.SequenceChecksumTypeConstants;
1172import com.echothree.model.data.sequence.common.SequenceConstants;
1173import com.echothree.model.data.sequence.common.SequenceEncoderTypeConstants;
1174import com.echothree.model.data.sequence.common.SequenceTypeConstants;
1175import com.echothree.model.data.sequence.server.entity.Sequence;
1176import com.echothree.model.data.sequence.server.entity.SequenceChecksumType;
1177import com.echothree.model.data.sequence.server.entity.SequenceEncoderType;
1178import com.echothree.model.data.sequence.server.entity.SequenceType;
1179import com.echothree.model.data.shipment.common.FreeOnBoardConstants;
1180import com.echothree.model.data.shipment.server.entity.FreeOnBoard;
1181import com.echothree.model.data.shipping.common.ShippingMethodConstants;
1182import com.echothree.model.data.shipping.server.entity.ShippingMethod;
1183import com.echothree.model.data.subscription.common.SubscriptionConstants;
1184import com.echothree.model.data.subscription.common.SubscriptionKindConstants;
1185import com.echothree.model.data.subscription.common.SubscriptionTypeConstants;
1186import com.echothree.model.data.subscription.server.entity.Subscription;
1187import com.echothree.model.data.subscription.server.entity.SubscriptionKind;
1188import com.echothree.model.data.subscription.server.entity.SubscriptionType;
1189import com.echothree.model.data.tag.common.EntityTagConstants;
1190import com.echothree.model.data.tag.common.TagConstants;
1191import com.echothree.model.data.tag.common.TagScopeConstants;
1192import com.echothree.model.data.tag.common.TagScopeEntityTypeConstants;
1193import com.echothree.model.data.tag.server.entity.EntityTag;
1194import com.echothree.model.data.tag.server.entity.Tag;
1195import com.echothree.model.data.tag.server.entity.TagScope;
1196import com.echothree.model.data.tag.server.entity.TagScopeEntityType;
1197import com.echothree.model.data.term.common.TermConstants;
1198import com.echothree.model.data.term.common.TermTypeConstants;
1199import com.echothree.model.data.term.server.entity.Term;
1200import com.echothree.model.data.term.server.entity.TermType;
1201import com.echothree.model.data.uom.common.UnitOfMeasureKindConstants;
1202import com.echothree.model.data.uom.common.UnitOfMeasureKindUseConstants;
1203import com.echothree.model.data.uom.common.UnitOfMeasureKindUseTypeConstants;
1204import com.echothree.model.data.uom.common.UnitOfMeasureTypeConstants;
1205import com.echothree.model.data.uom.server.entity.UnitOfMeasureKind;
1206import com.echothree.model.data.uom.server.entity.UnitOfMeasureKindUse;
1207import com.echothree.model.data.uom.server.entity.UnitOfMeasureKindUseType;
1208import com.echothree.model.data.uom.server.entity.UnitOfMeasureType;
1209import com.echothree.model.data.user.common.RecoveryQuestionConstants;
1210import com.echothree.model.data.user.common.UserVisitGroupConstants;
1211import com.echothree.model.data.user.server.entity.RecoveryQuestion;
1212import com.echothree.model.data.user.server.entity.UserLogin;
1213import com.echothree.model.data.user.server.entity.UserVisitGroup;
1214import com.echothree.model.data.vendor.common.ItemPurchasingCategoryConstants;
1215import com.echothree.model.data.vendor.common.VendorConstants;
1216import com.echothree.model.data.vendor.common.VendorItemConstants;
1217import com.echothree.model.data.vendor.common.VendorItemCostConstants;
1218import com.echothree.model.data.vendor.common.VendorTypeConstants;
1219import com.echothree.model.data.vendor.server.entity.ItemPurchasingCategory;
1220import com.echothree.model.data.vendor.server.entity.Vendor;
1221import com.echothree.model.data.vendor.server.entity.VendorItem;
1222import com.echothree.model.data.vendor.server.entity.VendorItemCost;
1223import com.echothree.model.data.vendor.server.entity.VendorType;
1224import com.echothree.model.data.warehouse.common.LocationConstants;
1225import com.echothree.model.data.warehouse.common.LocationNameElementConstants;
1226import com.echothree.model.data.warehouse.common.LocationTypeConstants;
1227import com.echothree.model.data.warehouse.common.LocationUseTypeConstants;
1228import com.echothree.model.data.warehouse.common.WarehouseConstants;
1229import com.echothree.model.data.warehouse.common.WarehouseTypeConstants;
1230import com.echothree.model.data.warehouse.server.entity.Location;
1231import com.echothree.model.data.warehouse.server.entity.LocationNameElement;
1232import com.echothree.model.data.warehouse.server.entity.LocationType;
1233import com.echothree.model.data.warehouse.server.entity.LocationUseType;
1234import com.echothree.model.data.warehouse.server.entity.Warehouse;
1235import com.echothree.model.data.warehouse.server.entity.WarehouseType;
1236import com.echothree.model.data.wishlist.common.WishlistPriorityConstants;
1237import com.echothree.model.data.wishlist.common.WishlistTypeConstants;
1238import com.echothree.model.data.wishlist.server.entity.WishlistPriority;
1239import com.echothree.model.data.wishlist.server.entity.WishlistType;
1240import com.echothree.model.data.workflow.common.WorkflowConstants;
1241import com.echothree.model.data.workflow.common.WorkflowDestinationConstants;
1242import com.echothree.model.data.workflow.common.WorkflowDestinationPartyTypeConstants;
1243import com.echothree.model.data.workflow.common.WorkflowDestinationSecurityRoleConstants;
1244import com.echothree.model.data.workflow.common.WorkflowDestinationSelectorConstants;
1245import com.echothree.model.data.workflow.common.WorkflowDestinationStepConstants;
1246import com.echothree.model.data.workflow.common.WorkflowEntityStatusConstants;
1247import com.echothree.model.data.workflow.common.WorkflowEntityTypeConstants;
1248import com.echothree.model.data.workflow.common.WorkflowEntranceConstants;
1249import com.echothree.model.data.workflow.common.WorkflowEntrancePartyTypeConstants;
1250import com.echothree.model.data.workflow.common.WorkflowEntranceSecurityRoleConstants;
1251import com.echothree.model.data.workflow.common.WorkflowEntranceSelectorConstants;
1252import com.echothree.model.data.workflow.common.WorkflowEntranceStepConstants;
1253import com.echothree.model.data.workflow.common.WorkflowSelectorKindConstants;
1254import com.echothree.model.data.workflow.common.WorkflowStepConstants;
1255import com.echothree.model.data.workflow.common.WorkflowStepTypeConstants;
1256import com.echothree.model.data.workflow.server.entity.Workflow;
1257import com.echothree.model.data.workflow.server.entity.WorkflowDestination;
1258import com.echothree.model.data.workflow.server.entity.WorkflowDestinationPartyType;
1259import com.echothree.model.data.workflow.server.entity.WorkflowDestinationSecurityRole;
1260import com.echothree.model.data.workflow.server.entity.WorkflowDestinationSelector;
1261import com.echothree.model.data.workflow.server.entity.WorkflowDestinationStep;
1262import com.echothree.model.data.workflow.server.entity.WorkflowEntityType;
1263import com.echothree.model.data.workflow.server.entity.WorkflowEntrance;
1264import com.echothree.model.data.workflow.server.entity.WorkflowEntrancePartyType;
1265import com.echothree.model.data.workflow.server.entity.WorkflowEntranceSecurityRole;
1266import com.echothree.model.data.workflow.server.entity.WorkflowEntranceSelector;
1267import com.echothree.model.data.workflow.server.entity.WorkflowEntranceStep;
1268import com.echothree.model.data.workflow.server.entity.WorkflowSelectorKind;
1269import com.echothree.model.data.workflow.server.entity.WorkflowStep;
1270import com.echothree.model.data.workflow.server.entity.WorkflowStepType;
1271import com.echothree.util.server.persistence.Session;
1272import graphql.annotations.annotationTypes.GraphQLField;
1273import graphql.annotations.annotationTypes.GraphQLID;
1274import graphql.annotations.annotationTypes.GraphQLName;
1275import graphql.annotations.annotationTypes.GraphQLNonNull;
1276import graphql.annotations.connection.GraphQLConnection;
1277import graphql.schema.DataFetchingEnvironment;
1278import java.util.ArrayList;
1279import java.util.Collection;
1280import static java.util.Collections.emptyList;
1281import java.util.stream.Collectors;
1282import javax.enterprise.inject.spi.CDI;
1283import javax.naming.NamingException;
1284
1285@GraphQLName("query")
1286public interface GraphQlQueries {
1287
1288    @GraphQLField
1289    @GraphQLName("searchKind")
1290    static SearchKindObject searchKind(final DataFetchingEnvironment env,
1291            @GraphQLName("searchKindName") final String searchKindName,
1292            @GraphQLName("id") @GraphQLID final String id) {
1293        SearchKind searchKind;
1294
1295        try {
1296            var commandForm = SearchUtil.getHome().getGetSearchKindForm();
1297
1298            commandForm.setSearchKindName(searchKindName);
1299            commandForm.setUuid(id);
1300
1301            searchKind = CDI.current().select(GetSearchKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1302        } catch (NamingException ex) {
1303            throw new RuntimeException(ex);
1304        }
1305
1306        return searchKind == null ? null : new SearchKindObject(searchKind);
1307    }
1308
1309    @GraphQLField
1310    @GraphQLName("searchKinds")
1311    @GraphQLNonNull
1312    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1313    static CountingPaginatedData<SearchKindObject> searchKinds(final DataFetchingEnvironment env) {
1314        CountingPaginatedData<SearchKindObject> data;
1315
1316        try {
1317            var searchControl = Session.getModelController(SearchControl.class);
1318            var totalCount = searchControl.countSearchKinds();
1319
1320            try(var objectLimiter = new ObjectLimiter(env, SearchKindConstants.COMPONENT_VENDOR_NAME, SearchKindConstants.ENTITY_TYPE_NAME, totalCount)) {
1321                var commandForm = SearchUtil.getHome().getGetSearchKindsForm();
1322                var entities = CDI.current().select(GetSearchKindsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1323
1324                if(entities == null) {
1325                    data = Connections.emptyConnection();
1326                } else {
1327                    var searchKinds = entities.stream().map(SearchKindObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1328
1329                    data = new CountedObjects<>(objectLimiter, searchKinds);
1330                }
1331            }
1332        } catch (NamingException ex) {
1333            throw new RuntimeException(ex);
1334        }
1335
1336        return data;
1337    }
1338
1339    @GraphQLField
1340    @GraphQLName("searchType")
1341    static SearchTypeObject searchType(final DataFetchingEnvironment env,
1342            @GraphQLName("searchKindName") final String searchKindName,
1343            @GraphQLName("searchTypeName") final String searchTypeName,
1344            @GraphQLName("id") @GraphQLID final String id) {
1345        SearchType searchType;
1346
1347        try {
1348            var commandForm = SearchUtil.getHome().getGetSearchTypeForm();
1349
1350            commandForm.setSearchKindName(searchKindName);
1351            commandForm.setSearchTypeName(searchTypeName);
1352            commandForm.setUuid(id);
1353
1354            searchType = CDI.current().select(GetSearchTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1355        } catch (NamingException ex) {
1356            throw new RuntimeException(ex);
1357        }
1358
1359        return searchType == null ? null : new SearchTypeObject(searchType);
1360    }
1361
1362    @GraphQLField
1363    @GraphQLName("searchTypes")
1364    @GraphQLNonNull
1365    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1366    static CountingPaginatedData<SearchTypeObject> searchTypes(final DataFetchingEnvironment env,
1367            @GraphQLName("searchKindName") @GraphQLNonNull final String searchKindName) {
1368        CountingPaginatedData<SearchTypeObject> data;
1369
1370        try {
1371            var commandForm = SearchUtil.getHome().getGetSearchTypesForm();
1372            var command = CDI.current().select(GetSearchTypesCommand.class).get();
1373
1374            commandForm.setSearchKindName(searchKindName);
1375
1376            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1377            if(totalEntities == null) {
1378                data = Connections.emptyConnection();
1379            } else {
1380                try(var objectLimiter = new ObjectLimiter(env, SearchTypeConstants.COMPONENT_VENDOR_NAME, SearchTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
1381                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1382
1383                    var searchTypes = entities.stream()
1384                            .map(SearchTypeObject::new)
1385                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1386
1387                    data = new CountedObjects<>(objectLimiter, searchTypes);
1388                }
1389            }
1390        } catch (NamingException ex) {
1391            throw new RuntimeException(ex);
1392        }
1393
1394        return data;
1395    }
1396
1397    @GraphQLField
1398    @GraphQLName("searchSortOrder")
1399    static SearchSortOrderObject searchSortOrder(final DataFetchingEnvironment env,
1400            @GraphQLName("searchKindName") final String searchKindName,
1401            @GraphQLName("searchSortOrderName") final String searchSortOrderName,
1402            @GraphQLName("id") @GraphQLID final String id) {
1403        SearchSortOrder searchSortOrder;
1404
1405        try {
1406            var commandForm = SearchUtil.getHome().getGetSearchSortOrderForm();
1407
1408            commandForm.setSearchKindName(searchKindName);
1409            commandForm.setSearchSortOrderName(searchSortOrderName);
1410            commandForm.setUuid(id);
1411
1412            searchSortOrder = CDI.current().select(GetSearchSortOrderCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1413        } catch (NamingException ex) {
1414            throw new RuntimeException(ex);
1415        }
1416
1417        return searchSortOrder == null ? null : new SearchSortOrderObject(searchSortOrder);
1418    }
1419
1420    @GraphQLField
1421    @GraphQLName("searchSortOrders")
1422    @GraphQLNonNull
1423    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1424    static CountingPaginatedData<SearchSortOrderObject> searchSortOrders(final DataFetchingEnvironment env,
1425            @GraphQLName("searchKindName") @GraphQLNonNull final String searchKindName) {
1426        CountingPaginatedData<SearchSortOrderObject> data;
1427
1428        try {
1429            var commandForm = SearchUtil.getHome().getGetSearchSortOrdersForm();
1430            var command = CDI.current().select(GetSearchSortOrdersCommand.class).get();
1431
1432            commandForm.setSearchKindName(searchKindName);
1433
1434            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1435            if(totalEntities == null) {
1436                data = Connections.emptyConnection();
1437            } else {
1438                try(var objectLimiter = new ObjectLimiter(env, SearchSortOrderConstants.COMPONENT_VENDOR_NAME, SearchSortOrderConstants.ENTITY_TYPE_NAME, totalEntities)) {
1439                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1440
1441                    var searchSortOrders = entities.stream()
1442                            .map(SearchSortOrderObject::new)
1443                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1444
1445                    data = new CountedObjects<>(objectLimiter, searchSortOrders);
1446                }
1447            }
1448        } catch (NamingException ex) {
1449            throw new RuntimeException(ex);
1450        }
1451
1452        return data;
1453    }
1454
1455    @GraphQLField
1456    @GraphQLName("searchUseType")
1457    static SearchUseTypeObject searchUseType(final DataFetchingEnvironment env,
1458            @GraphQLName("searchUseTypeName") final String searchUseTypeName,
1459            @GraphQLName("id") @GraphQLID final String id) {
1460        SearchUseType searchUseType;
1461
1462        try {
1463            var commandForm = SearchUtil.getHome().getGetSearchUseTypeForm();
1464
1465            commandForm.setSearchUseTypeName(searchUseTypeName);
1466            commandForm.setUuid(id);
1467
1468            searchUseType = CDI.current().select(GetSearchUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1469        } catch (NamingException ex) {
1470            throw new RuntimeException(ex);
1471        }
1472
1473        return searchUseType == null ? null : new SearchUseTypeObject(searchUseType);
1474    }
1475
1476    @GraphQLField
1477    @GraphQLName("searchUseTypes")
1478    @GraphQLNonNull
1479    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1480    static CountingPaginatedData<SearchUseTypeObject> searchUseTypes(final DataFetchingEnvironment env) {
1481        CountingPaginatedData<SearchUseTypeObject> data;
1482
1483        try {
1484            var searchControl = Session.getModelController(SearchControl.class);
1485            var totalCount = searchControl.countSearchUseTypes();
1486
1487            try(var objectLimiter = new ObjectLimiter(env, SearchUseTypeConstants.COMPONENT_VENDOR_NAME, SearchUseTypeConstants.ENTITY_TYPE_NAME, totalCount)) {
1488                var commandForm = SearchUtil.getHome().getGetSearchUseTypesForm();
1489                var entities = CDI.current().select(GetSearchUseTypesCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1490
1491                if(entities == null) {
1492                    data = Connections.emptyConnection();
1493                } else {
1494                    var searchUseTypes = entities.stream().map(SearchUseTypeObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1495
1496                    data = new CountedObjects<>(objectLimiter, searchUseTypes);
1497                }
1498            }
1499        } catch (NamingException ex) {
1500            throw new RuntimeException(ex);
1501        }
1502
1503        return data;
1504    }
1505
1506    @GraphQLField
1507    @GraphQLName("searchDefaultOperator")
1508    static SearchDefaultOperatorObject searchDefaultOperator(final DataFetchingEnvironment env,
1509            @GraphQLName("searchDefaultOperatorName") final String searchDefaultOperatorName,
1510            @GraphQLName("id") @GraphQLID final String id) {
1511        SearchDefaultOperator searchDefaultOperator;
1512
1513        try {
1514            var commandForm = SearchUtil.getHome().getGetSearchDefaultOperatorForm();
1515
1516            commandForm.setSearchDefaultOperatorName(searchDefaultOperatorName);
1517            commandForm.setUuid(id);
1518
1519            searchDefaultOperator = CDI.current().select(GetSearchDefaultOperatorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1520        } catch (NamingException ex) {
1521            throw new RuntimeException(ex);
1522        }
1523
1524        return searchDefaultOperator == null ? null : new SearchDefaultOperatorObject(searchDefaultOperator);
1525    }
1526
1527    @GraphQLField
1528    @GraphQLName("searchDefaultOperators")
1529    @GraphQLNonNull
1530    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1531    static CountingPaginatedData<SearchDefaultOperatorObject> searchDefaultOperators(final DataFetchingEnvironment env) {
1532        CountingPaginatedData<SearchDefaultOperatorObject> data;
1533
1534        try {
1535            var searchControl = Session.getModelController(SearchControl.class);
1536            var totalCount = searchControl.countSearchDefaultOperators();
1537
1538            try(var objectLimiter = new ObjectLimiter(env, SearchDefaultOperatorConstants.COMPONENT_VENDOR_NAME, SearchDefaultOperatorConstants.ENTITY_TYPE_NAME, totalCount)) {
1539                var commandForm = SearchUtil.getHome().getGetSearchDefaultOperatorsForm();
1540                var entities = CDI.current().select(GetSearchDefaultOperatorsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1541
1542                if(entities == null) {
1543                    data = Connections.emptyConnection();
1544                } else {
1545                    var searchDefaultOperators = entities.stream().map(SearchDefaultOperatorObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1546
1547                    data = new CountedObjects<>(objectLimiter, searchDefaultOperators);
1548                }
1549            }
1550        } catch (NamingException ex) {
1551            throw new RuntimeException(ex);
1552        }
1553
1554        return data;
1555    }
1556
1557    @GraphQLField
1558    @GraphQLName("searchSortDirection")
1559    static SearchSortDirectionObject searchSortDirection(final DataFetchingEnvironment env,
1560            @GraphQLName("searchSortDirectionName") final String searchSortDirectionName,
1561            @GraphQLName("id") @GraphQLID final String id) {
1562        SearchSortDirection searchSortDirection;
1563
1564        try {
1565            var commandForm = SearchUtil.getHome().getGetSearchSortDirectionForm();
1566
1567            commandForm.setSearchSortDirectionName(searchSortDirectionName);
1568            commandForm.setUuid(id);
1569
1570            searchSortDirection = CDI.current().select(GetSearchSortDirectionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1571        } catch (NamingException ex) {
1572            throw new RuntimeException(ex);
1573        }
1574
1575        return searchSortDirection == null ? null : new SearchSortDirectionObject(searchSortDirection);
1576    }
1577
1578    @GraphQLField
1579    @GraphQLName("searchSortDirections")
1580    @GraphQLNonNull
1581    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1582    static CountingPaginatedData<SearchSortDirectionObject> searchSortDirections(final DataFetchingEnvironment env) {
1583        CountingPaginatedData<SearchSortDirectionObject> data;
1584
1585        try {
1586            var searchControl = Session.getModelController(SearchControl.class);
1587            var totalCount = searchControl.countSearchSortDirections();
1588
1589            try(var objectLimiter = new ObjectLimiter(env, SearchSortDirectionConstants.COMPONENT_VENDOR_NAME, SearchSortDirectionConstants.ENTITY_TYPE_NAME, totalCount)) {
1590                var commandForm = SearchUtil.getHome().getGetSearchSortDirectionsForm();
1591                var entities = CDI.current().select(GetSearchSortDirectionsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1592
1593                if(entities == null) {
1594                    data = Connections.emptyConnection();
1595                } else {
1596                    var searchSortDirections = entities.stream().map(SearchSortDirectionObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1597
1598                    data = new CountedObjects<>(objectLimiter, searchSortDirections);
1599                }
1600            }
1601        } catch (NamingException ex) {
1602            throw new RuntimeException(ex);
1603        }
1604
1605        return data;
1606    }
1607
1608    @GraphQLField
1609    @GraphQLName("searchResultActionType")
1610    static SearchResultActionTypeObject searchResultActionType(final DataFetchingEnvironment env,
1611            @GraphQLName("searchResultActionTypeName") final String searchResultActionTypeName,
1612            @GraphQLName("id") @GraphQLID final String id) {
1613        SearchResultActionType searchResultActionType;
1614
1615        try {
1616            var commandForm = SearchUtil.getHome().getGetSearchResultActionTypeForm();
1617
1618            commandForm.setSearchResultActionTypeName(searchResultActionTypeName);
1619            commandForm.setUuid(id);
1620
1621            searchResultActionType = CDI.current().select(GetSearchResultActionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1622        } catch (NamingException ex) {
1623            throw new RuntimeException(ex);
1624        }
1625
1626        return searchResultActionType == null ? null : new SearchResultActionTypeObject(searchResultActionType);
1627    }
1628
1629    @GraphQLField
1630    @GraphQLName("searchResultActionTypes")
1631    @GraphQLNonNull
1632    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1633    static CountingPaginatedData<SearchResultActionTypeObject> searchResultActionTypes(final DataFetchingEnvironment env) {
1634        CountingPaginatedData<SearchResultActionTypeObject> data;
1635
1636        try {
1637            var commandForm = SearchUtil.getHome().getGetSearchResultActionTypesForm();
1638            var command = CDI.current().select(GetSearchResultActionTypesCommand.class).get();
1639
1640            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1641            if(totalEntities == null) {
1642                data = Connections.emptyConnection();
1643            } else {
1644                try(var objectLimiter = new ObjectLimiter(env, SearchResultActionTypeConstants.COMPONENT_VENDOR_NAME, SearchResultActionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
1645                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1646
1647                    var searchResultActionTypes = entities.stream()
1648                            .map(SearchResultActionTypeObject::new)
1649                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1650
1651                    data = new CountedObjects<>(objectLimiter, searchResultActionTypes);
1652                }
1653            }
1654        } catch (NamingException ex) {
1655            throw new RuntimeException(ex);
1656        }
1657
1658        return data;
1659    }
1660
1661    @GraphQLField
1662    @GraphQLName("searchCheckSpellingActionType")
1663    static SearchCheckSpellingActionTypeObject searchCheckSpellingActionType(final DataFetchingEnvironment env,
1664            @GraphQLName("searchCheckSpellingActionTypeName") final String searchCheckSpellingActionTypeName,
1665            @GraphQLName("id") @GraphQLID final String id) {
1666        SearchCheckSpellingActionType searchCheckSpellingActionType;
1667
1668        try {
1669            var commandForm = SearchUtil.getHome().getGetSearchCheckSpellingActionTypeForm();
1670
1671            commandForm.setSearchCheckSpellingActionTypeName(searchCheckSpellingActionTypeName);
1672            commandForm.setUuid(id);
1673
1674            searchCheckSpellingActionType = CDI.current().select(GetSearchCheckSpellingActionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1675        } catch (NamingException ex) {
1676            throw new RuntimeException(ex);
1677        }
1678
1679        return searchCheckSpellingActionType == null ? null : new SearchCheckSpellingActionTypeObject(searchCheckSpellingActionType);
1680    }
1681
1682    @GraphQLField
1683    @GraphQLName("searchCheckSpellingActionTypes")
1684    @GraphQLNonNull
1685    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1686    static CountingPaginatedData<SearchCheckSpellingActionTypeObject> searchCheckSpellingActionTypes(final DataFetchingEnvironment env) {
1687        CountingPaginatedData<SearchCheckSpellingActionTypeObject> data;
1688
1689        try {
1690            var commandForm = SearchUtil.getHome().getGetSearchCheckSpellingActionTypesForm();
1691            var command = CDI.current().select(GetSearchCheckSpellingActionTypesCommand.class).get();
1692
1693            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1694            if(totalEntities == null) {
1695                data = Connections.emptyConnection();
1696            } else {
1697                try(var objectLimiter = new ObjectLimiter(env, SearchCheckSpellingActionTypeConstants.COMPONENT_VENDOR_NAME, SearchCheckSpellingActionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
1698                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1699
1700                    var searchCheckSpellingActionTypes = entities.stream()
1701                            .map(SearchCheckSpellingActionTypeObject::new)
1702                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1703
1704                    data = new CountedObjects<>(objectLimiter, searchCheckSpellingActionTypes);
1705                }
1706            }
1707        } catch (NamingException ex) {
1708            throw new RuntimeException(ex);
1709        }
1710
1711        return data;
1712    }
1713
1714    @GraphQLField
1715    @GraphQLName("workflow")
1716    static WorkflowObject workflow(final DataFetchingEnvironment env,
1717            @GraphQLName("workflowName") final String workflowName,
1718            @GraphQLName("id") @GraphQLID final String id) {
1719        Workflow workflow;
1720
1721        try {
1722            var commandForm = WorkflowUtil.getHome().getGetWorkflowForm();
1723
1724            commandForm.setWorkflowName(workflowName);
1725            commandForm.setUuid(id);
1726
1727            workflow = CDI.current().select(GetWorkflowCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1728        } catch (NamingException ex) {
1729            throw new RuntimeException(ex);
1730        }
1731
1732        return workflow == null ? null : new WorkflowObject(workflow);
1733    }
1734
1735    @GraphQLField
1736    @GraphQLName("workflows")
1737    @GraphQLNonNull
1738    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1739    static CountingPaginatedData<WorkflowObject> workflows(final DataFetchingEnvironment env,
1740            @GraphQLName("selectorKindName") final String selectorKindName) {
1741        CountingPaginatedData<WorkflowObject> data;
1742
1743        try {
1744            var commandForm = WorkflowUtil.getHome().getGetWorkflowsForm();
1745            var command = CDI.current().select(GetWorkflowsCommand.class).get();
1746
1747            commandForm.setSelectorKindName(selectorKindName);
1748
1749            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1750            if(totalEntities == null) {
1751                data = Connections.emptyConnection();
1752            } else {
1753                try(var objectLimiter = new ObjectLimiter(env, WorkflowConstants.COMPONENT_VENDOR_NAME, WorkflowConstants.ENTITY_TYPE_NAME, totalEntities)) {
1754                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1755
1756                    var workflows = entities.stream()
1757                            .map(WorkflowObject::new)
1758                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1759
1760                    data = new CountedObjects<>(objectLimiter, workflows);
1761                }
1762            }
1763        } catch (NamingException ex) {
1764            throw new RuntimeException(ex);
1765        }
1766
1767        return data;
1768    }
1769    
1770    @GraphQLField
1771    @GraphQLName("workflowEntityType")
1772    static WorkflowEntityTypeObject workflowEntityType(final DataFetchingEnvironment env,
1773            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
1774            @GraphQLName("componentVendorName") @GraphQLNonNull final String componentVendorName,
1775            @GraphQLName("entityTypeName") @GraphQLNonNull final String entityTypeName) {
1776        WorkflowEntityType workflowEntityType;
1777
1778        try {
1779            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntityTypeForm();
1780
1781            commandForm.setWorkflowName(workflowName);
1782            commandForm.setComponentVendorName(componentVendorName);
1783            commandForm.setEntityTypeName(entityTypeName);
1784
1785            workflowEntityType = CDI.current().select(GetWorkflowEntityTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1786        } catch (NamingException ex) {
1787            throw new RuntimeException(ex);
1788        }
1789
1790        return workflowEntityType == null ? null : new WorkflowEntityTypeObject(workflowEntityType);
1791    }
1792
1793    @GraphQLField
1794    @GraphQLName("workflowEntityTypes")
1795    @GraphQLNonNull
1796    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1797    static CountingPaginatedData<WorkflowEntityTypeObject> workflowEntityTypes(final DataFetchingEnvironment env,
1798            @GraphQLName("workflowName") final String workflowName,
1799            @GraphQLName("componentVendorName") final String componentVendorName,
1800            @GraphQLName("entityTypeName") final String entityTypeName) {
1801        CountingPaginatedData<WorkflowEntityTypeObject> data;
1802
1803        try {
1804            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntityTypesForm();
1805            var command = CDI.current().select(GetWorkflowEntityTypesCommand.class).get();
1806
1807            commandForm.setWorkflowName(workflowName);
1808            commandForm.setComponentVendorName(componentVendorName);
1809            commandForm.setEntityTypeName(entityTypeName);
1810
1811            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1812            if(totalEntities == null) {
1813                data = Connections.emptyConnection();
1814            } else {
1815                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntityTypeConstants.COMPONENT_VENDOR_NAME, WorkflowEntityTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
1816                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1817
1818                    var workflowEntityTypes = entities.stream()
1819                            .map(WorkflowEntityTypeObject::new)
1820                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1821
1822                    data = new CountedObjects<>(objectLimiter, workflowEntityTypes);
1823                }
1824            }
1825        } catch (NamingException ex) {
1826            throw new RuntimeException(ex);
1827        }
1828
1829        return data;
1830    }
1831
1832    @GraphQLField
1833    @GraphQLName("workflowSelectorKind")
1834    static WorkflowSelectorKindObject workflowSelectorKind(final DataFetchingEnvironment env,
1835            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
1836            @GraphQLName("selectorKindName") @GraphQLNonNull final String selectorKindName) {
1837        WorkflowSelectorKind workflowSelectorKind;
1838
1839        try {
1840            var commandForm = WorkflowUtil.getHome().getGetWorkflowSelectorKindForm();
1841
1842            commandForm.setWorkflowName(workflowName);
1843            commandForm.setSelectorKindName(selectorKindName);
1844
1845            workflowSelectorKind = CDI.current().select(GetWorkflowSelectorKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1846        } catch (NamingException ex) {
1847            throw new RuntimeException(ex);
1848        }
1849
1850        return workflowSelectorKind == null ? null : new WorkflowSelectorKindObject(workflowSelectorKind);
1851    }
1852
1853    @GraphQLField
1854    @GraphQLName("workflowSelectorKinds")
1855    @GraphQLNonNull
1856    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1857    static CountingPaginatedData<WorkflowSelectorKindObject> workflowSelectorKinds(final DataFetchingEnvironment env,
1858            @GraphQLName("workflowName") final String workflowName,
1859            @GraphQLName("selectorKindName") final String selectorKindName) {
1860        CountingPaginatedData<WorkflowSelectorKindObject> data;
1861
1862        try {
1863            var commandForm = WorkflowUtil.getHome().getGetWorkflowSelectorKindsForm();
1864            var command = CDI.current().select(GetWorkflowSelectorKindsCommand.class).get();
1865
1866            commandForm.setWorkflowName(workflowName);
1867            commandForm.setSelectorKindName(selectorKindName);
1868
1869            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1870            if(totalEntities == null) {
1871                data = Connections.emptyConnection();
1872            } else {
1873                try(var objectLimiter = new ObjectLimiter(env, WorkflowSelectorKindConstants.COMPONENT_VENDOR_NAME, WorkflowSelectorKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
1874                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1875
1876                    var workflowSelectorKinds = entities.stream()
1877                            .map(WorkflowSelectorKindObject::new)
1878                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1879
1880                    data = new CountedObjects<>(objectLimiter, workflowSelectorKinds);
1881                }
1882            }
1883        } catch (NamingException ex) {
1884            throw new RuntimeException(ex);
1885        }
1886
1887        return data;
1888    }
1889
1890    @GraphQLField
1891    @GraphQLName("workflowEntityStatuses")
1892    @GraphQLNonNull
1893    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1894    static CountingPaginatedData<WorkflowEntityStatusObject> workflowEntityStatuses(final DataFetchingEnvironment env,
1895            @GraphQLName("workflowName") final String workflowName) {
1896        CountingPaginatedData<WorkflowEntityStatusObject> data;
1897
1898        try {
1899            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntityStatusesForm();
1900            var command = CDI.current().select(GetWorkflowEntityStatusesCommand.class).get();
1901
1902            commandForm.setWorkflowName(workflowName);
1903
1904            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1905            if(totalEntities == null) {
1906                data = Connections.emptyConnection();
1907            } else {
1908                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntityStatusConstants.COMPONENT_VENDOR_NAME, WorkflowEntityStatusConstants.ENTITY_TYPE_NAME, totalEntities)) {
1909                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1910
1911                    var workflowEntityStatuses = entities.stream()
1912                            .map(WorkflowEntityStatusObject::new)
1913                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1914
1915                    data = new CountedObjects<>(objectLimiter, workflowEntityStatuses);
1916                }
1917            }
1918        } catch (NamingException ex) {
1919            throw new RuntimeException(ex);
1920        }
1921
1922        return data;
1923    }
1924
1925    @GraphQLField
1926    @GraphQLName("workflowStep")
1927    static WorkflowStepObject workflowStep(final DataFetchingEnvironment env,
1928            @GraphQLName("workflowName") final String workflowName,
1929            @GraphQLName("workflowStepName") final String workflowStepName,
1930            @GraphQLName("id") @GraphQLID final String id) {
1931        WorkflowStep workflowStep;
1932
1933        try {
1934            var commandForm = WorkflowUtil.getHome().getGetWorkflowStepForm();
1935
1936            commandForm.setWorkflowName(workflowName);
1937            commandForm.setWorkflowStepName(workflowStepName);
1938            commandForm.setUuid(id);
1939
1940            workflowStep = CDI.current().select(GetWorkflowStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1941        } catch (NamingException ex) {
1942            throw new RuntimeException(ex);
1943        }
1944
1945        return workflowStep == null ? null : new WorkflowStepObject(workflowStep);
1946    }
1947
1948    @GraphQLField
1949    @GraphQLName("workflowSteps")
1950    @GraphQLNonNull
1951    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1952    static CountingPaginatedData<WorkflowStepObject> workflowSteps(final DataFetchingEnvironment env,
1953            @GraphQLName("workflowName") final String workflowName) {
1954        CountingPaginatedData<WorkflowStepObject> data;
1955
1956        try {
1957            var commandForm = WorkflowUtil.getHome().getGetWorkflowStepsForm();
1958            var command = CDI.current().select(GetWorkflowStepsCommand.class).get();
1959
1960            commandForm.setWorkflowName(workflowName);
1961
1962            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1963            if(totalEntities == null) {
1964                data = Connections.emptyConnection();
1965            } else {
1966                try(var objectLimiter = new ObjectLimiter(env, WorkflowStepConstants.COMPONENT_VENDOR_NAME, WorkflowStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
1967                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1968
1969                    var workflowSteps = entities.stream()
1970                            .map(WorkflowStepObject::new)
1971                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1972
1973                    data = new CountedObjects<>(objectLimiter, workflowSteps);
1974                }
1975            }
1976        } catch (NamingException ex) {
1977            throw new RuntimeException(ex);
1978        }
1979
1980        return data;
1981    }
1982    
1983    @GraphQLField
1984    @GraphQLName("workflowDestination")
1985    static WorkflowDestinationObject workflowDestination(final DataFetchingEnvironment env,
1986            @GraphQLName("workflowName") final String workflowName,
1987            @GraphQLName("workflowStepName") final String workflowStepName,
1988            @GraphQLName("workflowDestinationName") final String workflowDestinationName,
1989            @GraphQLName("id") @GraphQLID final String id) {
1990        WorkflowDestination workflowDestination;
1991
1992        try {
1993            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationForm();
1994
1995            commandForm.setWorkflowName(workflowName);
1996            commandForm.setWorkflowStepName(workflowStepName);
1997            commandForm.setWorkflowDestinationName(workflowDestinationName);
1998            commandForm.setUuid(id);
1999
2000            workflowDestination = CDI.current().select(GetWorkflowDestinationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2001        } catch (NamingException ex) {
2002            throw new RuntimeException(ex);
2003        }
2004
2005        return workflowDestination == null ? null : new WorkflowDestinationObject(workflowDestination);
2006    }
2007
2008    @GraphQLField
2009    @GraphQLName("workflowDestinations")
2010    @GraphQLNonNull
2011    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2012    static CountingPaginatedData<WorkflowDestinationObject> workflowDestinations(final DataFetchingEnvironment env,
2013            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2014            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName) {
2015        CountingPaginatedData<WorkflowDestinationObject> data;
2016
2017        try {
2018            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationsForm();
2019            var command = CDI.current().select(GetWorkflowDestinationsCommand.class).get();
2020
2021            commandForm.setWorkflowName(workflowName);
2022            commandForm.setWorkflowStepName(workflowStepName);
2023
2024            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2025            if(totalEntities == null) {
2026                data = Connections.emptyConnection();
2027            } else {
2028                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationConstants.ENTITY_TYPE_NAME, totalEntities)) {
2029                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2030
2031                    var workflowDestinations = entities.stream()
2032                            .map(WorkflowDestinationObject::new)
2033                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2034
2035                    data = new CountedObjects<>(objectLimiter, workflowDestinations);
2036                }
2037            }
2038        } catch (NamingException ex) {
2039            throw new RuntimeException(ex);
2040        }
2041
2042        return data;
2043    }
2044
2045    @GraphQLField
2046    @GraphQLName("workflowDestinationStep")
2047    static WorkflowDestinationStepObject workflowDestinationStep(final DataFetchingEnvironment env,
2048            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2049            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2050            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
2051            @GraphQLName("destinationWorkflowName") @GraphQLNonNull final String destinationWorkflowName,
2052            @GraphQLName("destinationWorkflowStepName") @GraphQLNonNull final String destinationWorkflowStepName) {
2053        WorkflowDestinationStep workflowDestinationStep;
2054
2055        try {
2056            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationStepForm();
2057
2058            commandForm.setWorkflowName(workflowName);
2059            commandForm.setWorkflowStepName(workflowStepName);
2060            commandForm.setWorkflowDestinationName(workflowDestinationName);
2061            commandForm.setDestinationWorkflowName(destinationWorkflowName);
2062            commandForm.setDestinationWorkflowStepName(destinationWorkflowStepName);
2063
2064            workflowDestinationStep = CDI.current().select(GetWorkflowDestinationStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2065        } catch (NamingException ex) {
2066            throw new RuntimeException(ex);
2067        }
2068
2069        return workflowDestinationStep == null ? null : new WorkflowDestinationStepObject(workflowDestinationStep);
2070    }
2071
2072    @GraphQLField
2073    @GraphQLName("workflowDestinationSteps")
2074    @GraphQLNonNull
2075    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2076    static CountingPaginatedData<WorkflowDestinationStepObject> workflowDestinationSteps(final DataFetchingEnvironment env,
2077            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2078            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2079            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName) {
2080        CountingPaginatedData<WorkflowDestinationStepObject> data;
2081
2082        try {
2083            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationStepsForm();
2084            var command = CDI.current().select(GetWorkflowDestinationStepsCommand.class).get();
2085
2086            commandForm.setWorkflowName(workflowName);
2087            commandForm.setWorkflowStepName(workflowStepName);
2088            commandForm.setWorkflowDestinationName(workflowDestinationName);
2089
2090            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2091            if(totalEntities == null) {
2092                data = Connections.emptyConnection();
2093            } else {
2094                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationStepConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
2095                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2096
2097                    var workflowDestinationSteps = entities.stream()
2098                            .map(WorkflowDestinationStepObject::new)
2099                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2100
2101                    data = new CountedObjects<>(objectLimiter, workflowDestinationSteps);
2102                }
2103            }
2104        } catch (NamingException ex) {
2105            throw new RuntimeException(ex);
2106        }
2107
2108        return data;
2109    }
2110
2111    @GraphQLField
2112    @GraphQLName("workflowDestinationPartyType")
2113    static WorkflowDestinationPartyTypeObject workflowDestinationPartyType(final DataFetchingEnvironment env,
2114            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2115            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2116            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
2117            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
2118        WorkflowDestinationPartyType workflowDestinationPartyType;
2119
2120        try {
2121            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationPartyTypeForm();
2122
2123            commandForm.setWorkflowName(workflowName);
2124            commandForm.setWorkflowStepName(workflowStepName);
2125            commandForm.setWorkflowDestinationName(workflowDestinationName);
2126            commandForm.setPartyTypeName(partyTypeName);
2127
2128            workflowDestinationPartyType = CDI.current().select(GetWorkflowDestinationPartyTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2129        } catch (NamingException ex) {
2130            throw new RuntimeException(ex);
2131        }
2132
2133        return workflowDestinationPartyType == null ? null : new WorkflowDestinationPartyTypeObject(workflowDestinationPartyType);
2134    }
2135
2136    @GraphQLField
2137    @GraphQLName("workflowDestinationPartyTypes")
2138    @GraphQLNonNull
2139    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2140    static CountingPaginatedData<WorkflowDestinationPartyTypeObject> workflowDestinationPartyTypes(final DataFetchingEnvironment env,
2141            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2142            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2143            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName) {
2144        CountingPaginatedData<WorkflowDestinationPartyTypeObject> data;
2145
2146        try {
2147            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationPartyTypesForm();
2148            var command = CDI.current().select(GetWorkflowDestinationPartyTypesCommand.class).get();
2149
2150            commandForm.setWorkflowName(workflowName);
2151            commandForm.setWorkflowStepName(workflowStepName);
2152            commandForm.setWorkflowDestinationName(workflowDestinationName);
2153
2154            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2155            if(totalEntities == null) {
2156                data = Connections.emptyConnection();
2157            } else {
2158                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationPartyTypeConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationPartyTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2159                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2160
2161                    var workflowDestinationPartyTypes = entities.stream()
2162                            .map(WorkflowDestinationPartyTypeObject::new)
2163                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2164
2165                    data = new CountedObjects<>(objectLimiter, workflowDestinationPartyTypes);
2166                }
2167            }
2168        } catch (NamingException ex) {
2169            throw new RuntimeException(ex);
2170        }
2171
2172        return data;
2173    }
2174
2175    @GraphQLField
2176    @GraphQLName("workflowDestinationSecurityRole")
2177    static WorkflowDestinationSecurityRoleObject workflowDestinationSecurityRole(final DataFetchingEnvironment env,
2178            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2179            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2180            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
2181            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName,
2182            @GraphQLName("securityRoleName") @GraphQLNonNull final String securityRoleName) {
2183        WorkflowDestinationSecurityRole workflowDestinationSecurityRole;
2184
2185        try {
2186            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationSecurityRoleForm();
2187
2188            commandForm.setWorkflowName(workflowName);
2189            commandForm.setWorkflowStepName(workflowStepName);
2190            commandForm.setWorkflowDestinationName(workflowDestinationName);
2191            commandForm.setPartyTypeName(partyTypeName);
2192            commandForm.setSecurityRoleName(securityRoleName);
2193
2194            workflowDestinationSecurityRole = CDI.current().select(GetWorkflowDestinationSecurityRoleCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2195        } catch (NamingException ex) {
2196            throw new RuntimeException(ex);
2197        }
2198
2199        return workflowDestinationSecurityRole == null ? null : new WorkflowDestinationSecurityRoleObject(workflowDestinationSecurityRole);
2200    }
2201
2202    @GraphQLField
2203    @GraphQLName("workflowDestinationSecurityRoles")
2204    @GraphQLNonNull
2205    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2206    static CountingPaginatedData<WorkflowDestinationSecurityRoleObject> workflowDestinationSecurityRoles(final DataFetchingEnvironment env,
2207            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2208            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2209            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
2210            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
2211        CountingPaginatedData<WorkflowDestinationSecurityRoleObject> data;
2212
2213        try {
2214            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationSecurityRolesForm();
2215            var command = CDI.current().select(GetWorkflowDestinationSecurityRolesCommand.class).get();
2216
2217            commandForm.setWorkflowName(workflowName);
2218            commandForm.setWorkflowStepName(workflowStepName);
2219            commandForm.setWorkflowDestinationName(workflowDestinationName);
2220            commandForm.setPartyTypeName(partyTypeName);
2221
2222            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2223            if(totalEntities == null) {
2224                data = Connections.emptyConnection();
2225            } else {
2226                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationSecurityRoleConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationSecurityRoleConstants.ENTITY_TYPE_NAME, totalEntities)) {
2227                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2228
2229                    var workflowDestinationSecurityRoles = entities.stream()
2230                            .map(WorkflowDestinationSecurityRoleObject::new)
2231                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2232
2233                    data = new CountedObjects<>(objectLimiter, workflowDestinationSecurityRoles);
2234                }
2235            }
2236        } catch (NamingException ex) {
2237            throw new RuntimeException(ex);
2238        }
2239
2240        return data;
2241    }
2242
2243    @GraphQLField
2244    @GraphQLName("workflowDestinationSelector")
2245    static WorkflowDestinationSelectorObject workflowDestinationSelector(final DataFetchingEnvironment env,
2246            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2247            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2248            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
2249            @GraphQLName("selectorName") @GraphQLNonNull final String selectorName) {
2250        WorkflowDestinationSelector workflowDestinationSelector;
2251
2252        try {
2253            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationSelectorForm();
2254
2255            commandForm.setWorkflowName(workflowName);
2256            commandForm.setWorkflowStepName(workflowStepName);
2257            commandForm.setWorkflowDestinationName(workflowDestinationName);
2258            commandForm.setSelectorName(selectorName);
2259
2260            workflowDestinationSelector = CDI.current().select(GetWorkflowDestinationSelectorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2261        } catch (NamingException ex) {
2262            throw new RuntimeException(ex);
2263        }
2264
2265        return workflowDestinationSelector == null ? null : new WorkflowDestinationSelectorObject(workflowDestinationSelector);
2266    }
2267
2268    @GraphQLField
2269    @GraphQLName("workflowDestinationSelectors")
2270    @GraphQLNonNull
2271    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2272    static CountingPaginatedData<WorkflowDestinationSelectorObject> workflowDestinationSelectors(final DataFetchingEnvironment env,
2273            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2274            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2275            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName) {
2276        CountingPaginatedData<WorkflowDestinationSelectorObject> data;
2277
2278        try {
2279            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationSelectorsForm();
2280            var command = CDI.current().select(GetWorkflowDestinationSelectorsCommand.class).get();
2281
2282            commandForm.setWorkflowName(workflowName);
2283            commandForm.setWorkflowStepName(workflowStepName);
2284            commandForm.setWorkflowDestinationName(workflowDestinationName);
2285
2286            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2287            if(totalEntities == null) {
2288                data = Connections.emptyConnection();
2289            } else {
2290                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationSelectorConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationSelectorConstants.ENTITY_TYPE_NAME, totalEntities)) {
2291                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2292
2293                    var workflowDestinationSelectors = entities.stream()
2294                            .map(WorkflowDestinationSelectorObject::new)
2295                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2296
2297                    data = new CountedObjects<>(objectLimiter, workflowDestinationSelectors);
2298                }
2299            }
2300        } catch (NamingException ex) {
2301            throw new RuntimeException(ex);
2302        }
2303
2304        return data;
2305    }
2306
2307    @GraphQLField
2308    @GraphQLName("workflowEntrance")
2309    static WorkflowEntranceObject workflowEntrance(final DataFetchingEnvironment env,
2310            @GraphQLName("workflowName") final String workflowName,
2311            @GraphQLName("workflowEntranceName") final String workflowEntranceName,
2312            @GraphQLName("id") @GraphQLID final String id) {
2313        WorkflowEntrance workflowEntrance;
2314
2315        try {
2316            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceForm();
2317
2318            commandForm.setWorkflowName(workflowName);
2319            commandForm.setWorkflowEntranceName(workflowEntranceName);
2320            commandForm.setUuid(id);
2321
2322            workflowEntrance = CDI.current().select(GetWorkflowEntranceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2323        } catch (NamingException ex) {
2324            throw new RuntimeException(ex);
2325        }
2326
2327        return workflowEntrance == null ? null : new WorkflowEntranceObject(workflowEntrance);
2328    }
2329
2330    @GraphQLField
2331    @GraphQLName("workflowEntrances")
2332    @GraphQLNonNull
2333    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2334    static CountingPaginatedData<WorkflowEntranceObject> workflowEntrances(final DataFetchingEnvironment env,
2335            @GraphQLName("workflowName") final String workflowName) {
2336        CountingPaginatedData<WorkflowEntranceObject> data;
2337
2338        try {
2339            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntrancesForm();
2340            var command = CDI.current().select(GetWorkflowEntrancesCommand.class).get();
2341
2342            commandForm.setWorkflowName(workflowName);
2343
2344            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2345            if(totalEntities == null) {
2346                data = Connections.emptyConnection();
2347            } else {
2348                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntranceConstants.COMPONENT_VENDOR_NAME, WorkflowEntranceConstants.ENTITY_TYPE_NAME, totalEntities)) {
2349                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2350
2351                    var workflowEntrances = entities.stream()
2352                            .map(WorkflowEntranceObject::new)
2353                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2354
2355                    data = new CountedObjects<>(objectLimiter, workflowEntrances);
2356                }
2357            }
2358        } catch (NamingException ex) {
2359            throw new RuntimeException(ex);
2360        }
2361
2362        return data;
2363    }
2364
2365    @GraphQLField
2366    @GraphQLName("workflowEntranceStep")
2367    static WorkflowEntranceStepObject workflowEntranceStep(final DataFetchingEnvironment env,
2368            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2369            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2370            @GraphQLName("entranceWorkflowName") @GraphQLNonNull final String entranceWorkflowName,
2371            @GraphQLName("entranceWorkflowStepName") @GraphQLNonNull final String entranceWorkflowStepName) {
2372        WorkflowEntranceStep workflowEntranceStep;
2373
2374        try {
2375            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceStepForm();
2376
2377            commandForm.setWorkflowName(workflowName);
2378            commandForm.setWorkflowEntranceName(workflowEntranceName);
2379            commandForm.setEntranceWorkflowName(entranceWorkflowName);
2380            commandForm.setEntranceWorkflowStepName(entranceWorkflowStepName);
2381
2382            workflowEntranceStep = CDI.current().select(GetWorkflowEntranceStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2383        } catch (NamingException ex) {
2384            throw new RuntimeException(ex);
2385        }
2386
2387        return workflowEntranceStep == null ? null : new WorkflowEntranceStepObject(workflowEntranceStep);
2388    }
2389
2390    @GraphQLField
2391    @GraphQLName("workflowEntranceSteps")
2392    @GraphQLNonNull
2393    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2394    static CountingPaginatedData<WorkflowEntranceStepObject> workflowEntranceSteps(final DataFetchingEnvironment env,
2395            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2396            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName) {
2397        CountingPaginatedData<WorkflowEntranceStepObject> data;
2398
2399        try {
2400            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceStepsForm();
2401            var command = CDI.current().select(GetWorkflowEntranceStepsCommand.class).get();
2402
2403            commandForm.setWorkflowName(workflowName);
2404            commandForm.setWorkflowEntranceName(workflowEntranceName);
2405
2406            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2407            if(totalEntities == null) {
2408                data = Connections.emptyConnection();
2409            } else {
2410                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntranceStepConstants.COMPONENT_VENDOR_NAME, WorkflowEntranceStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
2411                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2412
2413                    var workflowEntranceSteps = entities.stream()
2414                            .map(WorkflowEntranceStepObject::new)
2415                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2416
2417                    data = new CountedObjects<>(objectLimiter, workflowEntranceSteps);
2418                }
2419            }
2420        } catch (NamingException ex) {
2421            throw new RuntimeException(ex);
2422        }
2423
2424        return data;
2425    }
2426
2427    @GraphQLField
2428    @GraphQLName("workflowEntrancePartyType")
2429    static WorkflowEntrancePartyTypeObject workflowEntrancePartyType(final DataFetchingEnvironment env,
2430            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2431            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2432            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
2433        WorkflowEntrancePartyType workflowEntrancePartyType;
2434
2435        try {
2436            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntrancePartyTypeForm();
2437
2438            commandForm.setWorkflowName(workflowName);
2439            commandForm.setWorkflowEntranceName(workflowEntranceName);
2440            commandForm.setPartyTypeName(partyTypeName);
2441
2442            workflowEntrancePartyType = CDI.current().select(GetWorkflowEntrancePartyTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2443        } catch (NamingException ex) {
2444            throw new RuntimeException(ex);
2445        }
2446
2447        return workflowEntrancePartyType == null ? null : new WorkflowEntrancePartyTypeObject(workflowEntrancePartyType);
2448    }
2449
2450    @GraphQLField
2451    @GraphQLName("workflowEntrancePartyTypes")
2452    @GraphQLNonNull
2453    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2454    static CountingPaginatedData<WorkflowEntrancePartyTypeObject> workflowEntrancePartyTypes(final DataFetchingEnvironment env,
2455            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2456            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName) {
2457        CountingPaginatedData<WorkflowEntrancePartyTypeObject> data;
2458
2459        try {
2460            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntrancePartyTypesForm();
2461            var command = CDI.current().select(GetWorkflowEntrancePartyTypesCommand.class).get();
2462
2463            commandForm.setWorkflowName(workflowName);
2464            commandForm.setWorkflowEntranceName(workflowEntranceName);
2465
2466            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2467            if(totalEntities == null) {
2468                data = Connections.emptyConnection();
2469            } else {
2470                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntrancePartyTypeConstants.COMPONENT_VENDOR_NAME, WorkflowEntrancePartyTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2471                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2472
2473                    var workflowEntrancePartyTypes = entities.stream()
2474                            .map(WorkflowEntrancePartyTypeObject::new)
2475                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2476
2477                    data = new CountedObjects<>(objectLimiter, workflowEntrancePartyTypes);
2478                }
2479            }
2480        } catch (NamingException ex) {
2481            throw new RuntimeException(ex);
2482        }
2483
2484        return data;
2485    }
2486
2487    @GraphQLField
2488    @GraphQLName("workflowEntranceSecurityRole")
2489    static WorkflowEntranceSecurityRoleObject workflowEntranceSecurityRole(final DataFetchingEnvironment env,
2490            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2491            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2492            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName,
2493            @GraphQLName("securityRoleName") @GraphQLNonNull final String securityRoleName) {
2494        WorkflowEntranceSecurityRole workflowEntranceSecurityRole;
2495
2496        try {
2497            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceSecurityRoleForm();
2498
2499            commandForm.setWorkflowName(workflowName);
2500            commandForm.setWorkflowEntranceName(workflowEntranceName);
2501            commandForm.setPartyTypeName(partyTypeName);
2502            commandForm.setSecurityRoleName(securityRoleName);
2503
2504            workflowEntranceSecurityRole = CDI.current().select(GetWorkflowEntranceSecurityRoleCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2505        } catch (NamingException ex) {
2506            throw new RuntimeException(ex);
2507        }
2508
2509        return workflowEntranceSecurityRole == null ? null : new WorkflowEntranceSecurityRoleObject(workflowEntranceSecurityRole);
2510    }
2511
2512    @GraphQLField
2513    @GraphQLName("workflowEntranceSecurityRoles")
2514    @GraphQLNonNull
2515    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2516    static CountingPaginatedData<WorkflowEntranceSecurityRoleObject> workflowEntranceSecurityRoles(final DataFetchingEnvironment env,
2517            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2518            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2519            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
2520        CountingPaginatedData<WorkflowEntranceSecurityRoleObject> data;
2521
2522        try {
2523            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceSecurityRolesForm();
2524            var command = CDI.current().select(GetWorkflowEntranceSecurityRolesCommand.class).get();
2525
2526            commandForm.setWorkflowName(workflowName);
2527            commandForm.setWorkflowEntranceName(workflowEntranceName);
2528            commandForm.setPartyTypeName(partyTypeName);
2529
2530            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2531            if(totalEntities == null) {
2532                data = Connections.emptyConnection();
2533            } else {
2534                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntranceSecurityRoleConstants.COMPONENT_VENDOR_NAME, WorkflowEntranceSecurityRoleConstants.ENTITY_TYPE_NAME, totalEntities)) {
2535                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2536
2537                    var workflowEntranceSecurityRoles = entities.stream()
2538                            .map(WorkflowEntranceSecurityRoleObject::new)
2539                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2540
2541                    data = new CountedObjects<>(objectLimiter, workflowEntranceSecurityRoles);
2542                }
2543            }
2544        } catch (NamingException ex) {
2545            throw new RuntimeException(ex);
2546        }
2547
2548        return data;
2549    }
2550
2551    @GraphQLField
2552    @GraphQLName("workflowEntranceSelector")
2553    static WorkflowEntranceSelectorObject workflowEntranceSelector(final DataFetchingEnvironment env,
2554            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2555            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2556            @GraphQLName("selectorName") @GraphQLNonNull final String selectorName) {
2557        WorkflowEntranceSelector workflowEntranceSelector;
2558
2559        try {
2560            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceSelectorForm();
2561
2562            commandForm.setWorkflowName(workflowName);
2563            commandForm.setWorkflowEntranceName(workflowEntranceName);
2564            commandForm.setSelectorName(selectorName);
2565
2566            workflowEntranceSelector = CDI.current().select(GetWorkflowEntranceSelectorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2567        } catch (NamingException ex) {
2568            throw new RuntimeException(ex);
2569        }
2570
2571        return workflowEntranceSelector == null ? null : new WorkflowEntranceSelectorObject(workflowEntranceSelector);
2572    }
2573
2574    @GraphQLField
2575    @GraphQLName("workflowEntranceSelectors")
2576    @GraphQLNonNull
2577    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2578    static CountingPaginatedData<WorkflowEntranceSelectorObject> workflowEntranceSelectors(final DataFetchingEnvironment env,
2579            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2580            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName) {
2581        CountingPaginatedData<WorkflowEntranceSelectorObject> data;
2582
2583        try {
2584            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceSelectorsForm();
2585            var command = CDI.current().select(GetWorkflowEntranceSelectorsCommand.class).get();
2586
2587            commandForm.setWorkflowName(workflowName);
2588            commandForm.setWorkflowEntranceName(workflowEntranceName);
2589
2590            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2591            if(totalEntities == null) {
2592                data = Connections.emptyConnection();
2593            } else {
2594                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntranceSelectorConstants.COMPONENT_VENDOR_NAME, WorkflowEntranceSelectorConstants.ENTITY_TYPE_NAME, totalEntities)) {
2595                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2596
2597                    var workflowEntranceSelectors = entities.stream()
2598                            .map(WorkflowEntranceSelectorObject::new)
2599                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2600
2601                    data = new CountedObjects<>(objectLimiter, workflowEntranceSelectors);
2602                }
2603            }
2604        } catch (NamingException ex) {
2605            throw new RuntimeException(ex);
2606        }
2607
2608        return data;
2609    }
2610
2611    @GraphQLField
2612    @GraphQLName("workflowStepType")
2613    static WorkflowStepTypeObject workflowStepType(final DataFetchingEnvironment env,
2614            @GraphQLName("workflowStepTypeName") final String workflowStepTypeName,
2615            @GraphQLName("id") @GraphQLID final String id) {
2616        WorkflowStepType workflowStepType;
2617
2618        try {
2619            var commandForm = WorkflowUtil.getHome().getGetWorkflowStepTypeForm();
2620
2621            commandForm.setWorkflowStepTypeName(workflowStepTypeName);
2622            commandForm.setUuid(id);
2623
2624            workflowStepType = CDI.current().select(GetWorkflowStepTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2625        } catch (NamingException ex) {
2626            throw new RuntimeException(ex);
2627        }
2628
2629        return workflowStepType == null ? null : new WorkflowStepTypeObject(workflowStepType);
2630    }
2631
2632    @GraphQLField
2633    @GraphQLName("workflowStepTypes")
2634    @GraphQLNonNull
2635    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2636    static CountingPaginatedData<WorkflowStepTypeObject> workflowStepTypes(final DataFetchingEnvironment env) {
2637        CountingPaginatedData<WorkflowStepTypeObject> data;
2638
2639        try {
2640            var commandForm = WorkflowUtil.getHome().getGetWorkflowStepTypesForm();
2641            var command = CDI.current().select(GetWorkflowStepTypesCommand.class).get();
2642
2643            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2644            if(totalEntities == null) {
2645                data = Connections.emptyConnection();
2646            } else {
2647                try(var objectLimiter = new ObjectLimiter(env, WorkflowStepTypeConstants.COMPONENT_VENDOR_NAME, WorkflowStepTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2648                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2649
2650                    var workflowStepTypes = entities.stream()
2651                            .map(WorkflowStepTypeObject::new)
2652                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2653
2654                    data = new CountedObjects<>(objectLimiter, workflowStepTypes);
2655                }
2656            }
2657        } catch (NamingException ex) {
2658            throw new RuntimeException(ex);
2659        }
2660
2661        return data;
2662    }
2663
2664    @GraphQLField
2665    @GraphQLName("sequence")
2666    static SequenceObject sequence(final DataFetchingEnvironment env,
2667            @GraphQLName("sequenceTypeName") final String sequenceTypeName,
2668            @GraphQLName("sequenceName") final String sequenceName,
2669            @GraphQLName("id") @GraphQLID final String id) {
2670        Sequence sequence;
2671
2672        try {
2673            var commandForm = SequenceUtil.getHome().getGetSequenceForm();
2674
2675            commandForm.setSequenceTypeName(sequenceTypeName);
2676            commandForm.setSequenceName(sequenceName);
2677            commandForm.setUuid(id);
2678
2679            sequence = CDI.current().select(GetSequenceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2680        } catch (NamingException ex) {
2681            throw new RuntimeException(ex);
2682        }
2683
2684        return sequence == null ? null : new SequenceObject(sequence);
2685    }
2686
2687    @GraphQLField
2688    @GraphQLName("sequenceValue")
2689    static GetSequenceValueResultObject sequenceValue(final DataFetchingEnvironment env,
2690            @GraphQLName("sequenceTypeName") final String sequenceTypeName,
2691            @GraphQLName("sequenceName") final String sequenceName,
2692            @GraphQLName("id") @GraphQLID final String id) {
2693        GetSequenceValueResultObject result = null;
2694
2695        try {
2696            var commandForm = SequenceUtil.getHome().getGetSequenceValueForm();
2697
2698            commandForm.setSequenceTypeName(sequenceTypeName);
2699            commandForm.setSequenceName(sequenceName);
2700            commandForm.setUuid(id);
2701
2702            var commandResult = SequenceUtil.getHome().getSequenceValue(BaseGraphQl.getUserVisitPK(env), commandForm);
2703
2704            if(!commandResult.hasErrors()) {
2705                result = new GetSequenceValueResultObject((GetSequenceValueResult)commandResult.getExecutionResult().getResult());
2706            }
2707        } catch (NamingException ex) {
2708            throw new RuntimeException(ex);
2709        }
2710
2711        return result;
2712    }
2713
2714    @GraphQLField
2715    @GraphQLName("sequences")
2716    @GraphQLNonNull
2717    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2718    static CountingPaginatedData<SequenceObject> sequences(final DataFetchingEnvironment env,
2719            @GraphQLName("sequenceTypeName") @GraphQLNonNull final String sequenceTypeName) {
2720        CountingPaginatedData<SequenceObject> data;
2721
2722        try {
2723            var commandForm = SequenceUtil.getHome().getGetSequencesForm();
2724            var command = CDI.current().select(GetSequencesCommand.class).get();
2725
2726            commandForm.setSequenceTypeName(sequenceTypeName);
2727
2728            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2729            if(totalEntities == null) {
2730                data = Connections.emptyConnection();
2731            } else {
2732                try(var objectLimiter = new ObjectLimiter(env, SequenceConstants.COMPONENT_VENDOR_NAME, SequenceConstants.ENTITY_TYPE_NAME, totalEntities)) {
2733                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2734
2735                    var sequences = entities.stream()
2736                            .map(SequenceObject::new)
2737                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2738
2739                    data = new CountedObjects<>(objectLimiter, sequences);
2740                }
2741            }
2742        } catch (NamingException ex) {
2743            throw new RuntimeException(ex);
2744        }
2745
2746        return data;
2747    }
2748
2749    @GraphQLField
2750    @GraphQLName("sequenceType")
2751    static SequenceTypeObject sequenceType(final DataFetchingEnvironment env,
2752            @GraphQLName("sequenceTypeName") final String sequenceTypeName,
2753            @GraphQLName("id") @GraphQLID final String id) {
2754        SequenceType sequenceType;
2755
2756        try {
2757            var commandForm = SequenceUtil.getHome().getGetSequenceTypeForm();
2758
2759            commandForm.setSequenceTypeName(sequenceTypeName);
2760            commandForm.setUuid(id);
2761
2762            sequenceType = CDI.current().select(GetSequenceTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2763        } catch (NamingException ex) {
2764            throw new RuntimeException(ex);
2765        }
2766
2767        return sequenceType == null ? null : new SequenceTypeObject(sequenceType);
2768    }
2769
2770    @GraphQLField
2771    @GraphQLName("sequenceTypes")
2772    @GraphQLNonNull
2773    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2774    static CountingPaginatedData<SequenceTypeObject> sequenceTypes(final DataFetchingEnvironment env) {
2775        CountingPaginatedData<SequenceTypeObject> data;
2776
2777        try {
2778            var commandForm = SequenceUtil.getHome().getGetSequenceTypesForm();
2779            var command = CDI.current().select(GetSequenceTypesCommand.class).get();
2780
2781            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2782            if(totalEntities == null) {
2783                data = Connections.emptyConnection();
2784            } else {
2785                try(var objectLimiter = new ObjectLimiter(env, SequenceTypeConstants.COMPONENT_VENDOR_NAME, SequenceTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2786                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2787
2788                    var sequenceTypes = entities.stream()
2789                            .map(SequenceTypeObject::new)
2790                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2791
2792                    data = new CountedObjects<>(objectLimiter, sequenceTypes);
2793                }
2794            }
2795        } catch (NamingException ex) {
2796            throw new RuntimeException(ex);
2797        }
2798
2799        return data;
2800    }
2801
2802    @GraphQLField
2803    @GraphQLName("sequenceChecksumType")
2804    static SequenceChecksumTypeObject sequenceChecksumType(final DataFetchingEnvironment env,
2805            @GraphQLName("sequenceChecksumTypeName") @GraphQLNonNull final String sequenceChecksumTypeName) {
2806        SequenceChecksumType sequenceChecksumType;
2807
2808        try {
2809            var commandForm = SequenceUtil.getHome().getGetSequenceChecksumTypeForm();
2810
2811            commandForm.setSequenceChecksumTypeName(sequenceChecksumTypeName);
2812
2813            sequenceChecksumType = CDI.current().select(GetSequenceChecksumTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2814        } catch (NamingException ex) {
2815            throw new RuntimeException(ex);
2816        }
2817
2818        return sequenceChecksumType == null ? null : new SequenceChecksumTypeObject(sequenceChecksumType);
2819    }
2820
2821    @GraphQLField
2822    @GraphQLName("sequenceChecksumTypes")
2823    @GraphQLNonNull
2824    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2825    static CountingPaginatedData<SequenceChecksumTypeObject> sequenceChecksumTypes(final DataFetchingEnvironment env) {
2826        CountingPaginatedData<SequenceChecksumTypeObject> data;
2827
2828        try {
2829            var commandForm = SequenceUtil.getHome().getGetSequenceChecksumTypesForm();
2830            var command = CDI.current().select(GetSequenceChecksumTypesCommand.class).get();
2831
2832            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2833            if(totalEntities == null) {
2834                data = Connections.emptyConnection();
2835            } else {
2836                try(var objectLimiter = new ObjectLimiter(env, SequenceChecksumTypeConstants.COMPONENT_VENDOR_NAME, SequenceChecksumTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2837                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2838
2839                    var sequenceChecksumTypes = entities.stream()
2840                            .map(SequenceChecksumTypeObject::new)
2841                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2842
2843                    data = new CountedObjects<>(objectLimiter, sequenceChecksumTypes);
2844                }
2845            }
2846        } catch (NamingException ex) {
2847            throw new RuntimeException(ex);
2848        }
2849
2850        return data;
2851    }
2852
2853    @GraphQLField
2854    @GraphQLName("sequenceEncoderType")
2855    static SequenceEncoderTypeObject sequenceEncoderType(final DataFetchingEnvironment env,
2856            @GraphQLName("sequenceEncoderTypeName") @GraphQLNonNull final String sequenceEncoderTypeName) {
2857        SequenceEncoderType sequenceEncoderType;
2858
2859        try {
2860            var commandForm = SequenceUtil.getHome().getGetSequenceEncoderTypeForm();
2861
2862            commandForm.setSequenceEncoderTypeName(sequenceEncoderTypeName);
2863
2864            sequenceEncoderType = CDI.current().select(GetSequenceEncoderTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2865        } catch (NamingException ex) {
2866            throw new RuntimeException(ex);
2867        }
2868
2869        return sequenceEncoderType == null ? null : new SequenceEncoderTypeObject(sequenceEncoderType);
2870    }
2871
2872    @GraphQLField
2873    @GraphQLName("sequenceEncoderTypes")
2874    @GraphQLNonNull
2875    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2876    static CountingPaginatedData<SequenceEncoderTypeObject> sequenceEncoderTypes(final DataFetchingEnvironment env) {
2877        CountingPaginatedData<SequenceEncoderTypeObject> data;
2878
2879        try {
2880            var commandForm = SequenceUtil.getHome().getGetSequenceEncoderTypesForm();
2881            var command = CDI.current().select(GetSequenceEncoderTypesCommand.class).get();
2882
2883            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2884            if(totalEntities == null) {
2885                data = Connections.emptyConnection();
2886            } else {
2887                try(var objectLimiter = new ObjectLimiter(env, SequenceEncoderTypeConstants.COMPONENT_VENDOR_NAME, SequenceEncoderTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2888                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2889
2890                    var sequenceEncoderTypes = entities.stream()
2891                            .map(SequenceEncoderTypeObject::new)
2892                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2893
2894                    data = new CountedObjects<>(objectLimiter, sequenceEncoderTypes);
2895                }
2896            }
2897        } catch (NamingException ex) {
2898            throw new RuntimeException(ex);
2899        }
2900
2901        return data;
2902    }
2903
2904    @GraphQLField
2905    @GraphQLName("selectorKind")
2906    static SelectorKindObject selectorKind(final DataFetchingEnvironment env,
2907            @GraphQLName("selectorKindName") final String selectorKindName,
2908            @GraphQLName("id") @GraphQLID final String id) {
2909        SelectorKind selectorKind;
2910
2911        try {
2912            var commandForm = SelectorUtil.getHome().getGetSelectorKindForm();
2913
2914            commandForm.setSelectorKindName(selectorKindName);
2915            commandForm.setUuid(id);
2916
2917            selectorKind = CDI.current().select(GetSelectorKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2918        } catch (NamingException ex) {
2919            throw new RuntimeException(ex);
2920        }
2921
2922        return selectorKind == null ? null : new SelectorKindObject(selectorKind);
2923    }
2924
2925    @GraphQLField
2926    @GraphQLName("selectorKinds")
2927    @GraphQLNonNull
2928    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2929    static CountingPaginatedData<SelectorKindObject> selectorKinds(final DataFetchingEnvironment env) {
2930        CountingPaginatedData<SelectorKindObject> data;
2931
2932        try {
2933            var commandForm = SelectorUtil.getHome().getGetSelectorKindsForm();
2934            var command = CDI.current().select(GetSelectorKindsCommand.class).get();
2935
2936            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2937            if(totalEntities == null) {
2938                data = Connections.emptyConnection();
2939            } else {
2940                try(var objectLimiter = new ObjectLimiter(env, SelectorKindConstants.COMPONENT_VENDOR_NAME, SelectorKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
2941                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2942
2943                    var selectorKinds = entities.stream()
2944                            .map(SelectorKindObject::new)
2945                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2946
2947                    data = new CountedObjects<>(objectLimiter, selectorKinds);
2948                }
2949            }
2950        } catch (NamingException ex) {
2951            throw new RuntimeException(ex);
2952        }
2953
2954        return data;
2955    }
2956    
2957    @GraphQLField
2958    @GraphQLName("selectorType")
2959    static SelectorTypeObject selectorType(final DataFetchingEnvironment env,
2960            @GraphQLName("selectorKindName") final String selectorKindName,
2961            @GraphQLName("selectorTypeName") final String selectorTypeName,
2962            @GraphQLName("id") @GraphQLID final String id) {
2963        SelectorType selectorType;
2964
2965        try {
2966            var commandForm = SelectorUtil.getHome().getGetSelectorTypeForm();
2967
2968            commandForm.setSelectorKindName(selectorKindName);
2969            commandForm.setSelectorTypeName(selectorTypeName);
2970            commandForm.setUuid(id);
2971
2972            selectorType = CDI.current().select(GetSelectorTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2973        } catch (NamingException ex) {
2974            throw new RuntimeException(ex);
2975        }
2976
2977        return selectorType == null ? null : new SelectorTypeObject(selectorType);
2978    }
2979
2980    @GraphQLField
2981    @GraphQLName("selectorTypes")
2982    @GraphQLNonNull
2983    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2984    static CountingPaginatedData<SelectorTypeObject> selectorTypes(final DataFetchingEnvironment env,
2985            @GraphQLName("selectorKindName") @GraphQLNonNull final String selectorKindName) {
2986        CountingPaginatedData<SelectorTypeObject> data;
2987
2988        try {
2989            var commandForm = SelectorUtil.getHome().getGetSelectorTypesForm();
2990            var command = CDI.current().select(GetSelectorTypesCommand.class).get();
2991
2992            commandForm.setSelectorKindName(selectorKindName);
2993
2994            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2995            if(totalEntities == null) {
2996                data = Connections.emptyConnection();
2997            } else {
2998                try(var objectLimiter = new ObjectLimiter(env, SelectorTypeConstants.COMPONENT_VENDOR_NAME, SelectorTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2999                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3000
3001                    var selectorTypes = entities.stream()
3002                            .map(SelectorTypeObject::new)
3003                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3004
3005                    data = new CountedObjects<>(objectLimiter, selectorTypes);
3006                }
3007            }
3008        } catch (NamingException ex) {
3009            throw new RuntimeException(ex);
3010        }
3011
3012        return data;
3013    }
3014
3015    @GraphQLField
3016    @GraphQLName("selector")
3017    static SelectorObject selector(final DataFetchingEnvironment env,
3018            @GraphQLName("selectorKindName") final String selectorKindName,
3019            @GraphQLName("selectorTypeName") final String selectorTypeName,
3020            @GraphQLName("selectorName") final String selectorName,
3021            @GraphQLName("id") @GraphQLID final String id) {
3022        Selector selector;
3023
3024        try {
3025            var commandForm = SelectorUtil.getHome().getGetSelectorForm();
3026
3027            commandForm.setSelectorKindName(selectorKindName);
3028            commandForm.setSelectorTypeName(selectorTypeName);
3029            commandForm.setSelectorName(selectorName);
3030            commandForm.setUuid(id);
3031
3032            selector = CDI.current().select(GetSelectorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3033        } catch (NamingException ex) {
3034            throw new RuntimeException(ex);
3035        }
3036
3037        return selector == null ? null : new SelectorObject(selector);
3038    }
3039
3040    @GraphQLField
3041    @GraphQLName("selectors")
3042    static Collection<SelectorObject> selectors(final DataFetchingEnvironment env,
3043            @GraphQLName("selectorKindName") @GraphQLNonNull final String selectorKindName,
3044            @GraphQLName("selectorTypeName") @GraphQLNonNull final String selectorTypeName) {
3045        Collection<Selector> selectors;
3046        Collection<SelectorObject> selectorObjects;
3047
3048        try {
3049            var commandForm = SelectorUtil.getHome().getGetSelectorsForm();
3050
3051            commandForm.setSelectorKindName(selectorKindName);
3052            commandForm.setSelectorTypeName(selectorTypeName);
3053
3054            selectors = CDI.current().select(GetSelectorsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3055        } catch (NamingException ex) {
3056            throw new RuntimeException(ex);
3057        }
3058
3059        if(selectors == null) {
3060            selectorObjects = emptyList();
3061        } else {
3062            selectorObjects = new ArrayList<>(selectors.size());
3063
3064            selectors.stream()
3065                    .map(SelectorObject::new)
3066                    .forEachOrdered(selectorObjects::add);
3067        }
3068
3069        return selectorObjects;
3070    }
3071
3072    @GraphQLField
3073    @GraphQLName("filterKind")
3074    static FilterKindObject filterKind(final DataFetchingEnvironment env,
3075            @GraphQLName("filterKindName") final String filterKindName,
3076            @GraphQLName("id") @GraphQLID final String id) {
3077        FilterKind filterKind;
3078
3079        try {
3080            var commandForm = FilterUtil.getHome().getGetFilterKindForm();
3081
3082            commandForm.setFilterKindName(filterKindName);
3083            commandForm.setUuid(id);
3084
3085            filterKind = CDI.current().select(GetFilterKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3086        } catch (NamingException ex) {
3087            throw new RuntimeException(ex);
3088        }
3089
3090        return filterKind == null ? null : new FilterKindObject(filterKind);
3091    }
3092
3093    @GraphQLField
3094    @GraphQLName("filterKinds")
3095    @GraphQLNonNull
3096    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3097    static CountingPaginatedData<FilterKindObject> filterKinds(final DataFetchingEnvironment env) {
3098        CountingPaginatedData<FilterKindObject> data;
3099
3100        try {
3101            var commandForm = FilterUtil.getHome().getGetFilterKindsForm();
3102            var command = CDI.current().select(GetFilterKindsCommand.class).get();
3103
3104            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3105            if(totalEntities == null) {
3106                data = Connections.emptyConnection();
3107            } else {
3108                try(var objectLimiter = new ObjectLimiter(env, FilterKindConstants.COMPONENT_VENDOR_NAME, FilterKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
3109                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3110
3111                    var filterKinds = entities.stream()
3112                            .map(FilterKindObject::new)
3113                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3114
3115                    data = new CountedObjects<>(objectLimiter, filterKinds);
3116                }
3117            }
3118        } catch (NamingException ex) {
3119            throw new RuntimeException(ex);
3120        }
3121
3122        return data;
3123    }
3124
3125    @GraphQLField
3126    @GraphQLName("filterType")
3127    static FilterTypeObject filterType(final DataFetchingEnvironment env,
3128            @GraphQLName("filterKindName") final String filterKindName,
3129            @GraphQLName("filterTypeName") final String filterTypeName,
3130            @GraphQLName("id") @GraphQLID final String id) {
3131        FilterType filterType;
3132
3133        try {
3134            var commandForm = FilterUtil.getHome().getGetFilterTypeForm();
3135
3136            commandForm.setFilterKindName(filterKindName);
3137            commandForm.setFilterTypeName(filterTypeName);
3138            commandForm.setUuid(id);
3139
3140            filterType = CDI.current().select(GetFilterTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3141        } catch (NamingException ex) {
3142            throw new RuntimeException(ex);
3143        }
3144
3145        return filterType == null ? null : new FilterTypeObject(filterType);
3146    }
3147
3148    @GraphQLField
3149    @GraphQLName("filterTypes")
3150    @GraphQLNonNull
3151    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3152    static CountingPaginatedData<FilterTypeObject> filterTypes(final DataFetchingEnvironment env,
3153            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName) {
3154        CountingPaginatedData<FilterTypeObject> data;
3155
3156        try {
3157            var commandForm = FilterUtil.getHome().getGetFilterTypesForm();
3158            var command = CDI.current().select(GetFilterTypesCommand.class).get();
3159
3160            commandForm.setFilterKindName(filterKindName);
3161
3162            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3163            if(totalEntities == null) {
3164                data = Connections.emptyConnection();
3165            } else {
3166                try(var objectLimiter = new ObjectLimiter(env, FilterTypeConstants.COMPONENT_VENDOR_NAME, FilterTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
3167                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3168
3169                    var filterTypes = entities.stream()
3170                            .map(FilterTypeObject::new)
3171                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3172
3173                    data = new CountedObjects<>(objectLimiter, filterTypes);
3174                }
3175            }
3176        } catch (NamingException ex) {
3177            throw new RuntimeException(ex);
3178        }
3179
3180        return data;
3181    }
3182
3183    @GraphQLField
3184    @GraphQLName("filter")
3185    static FilterObject filter(final DataFetchingEnvironment env,
3186            @GraphQLName("filterKindName") final String filterKindName,
3187            @GraphQLName("filterTypeName") final String filterTypeName,
3188            @GraphQLName("filterName") final String filterName,
3189            @GraphQLName("id") @GraphQLID final String id) {
3190        Filter filter;
3191
3192        try {
3193            var commandForm = FilterUtil.getHome().getGetFilterForm();
3194
3195            commandForm.setFilterKindName(filterKindName);
3196            commandForm.setFilterTypeName(filterTypeName);
3197            commandForm.setFilterName(filterName);
3198            commandForm.setUuid(id);
3199
3200            filter = CDI.current().select(GetFilterCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3201        } catch (NamingException ex) {
3202            throw new RuntimeException(ex);
3203        }
3204
3205        return filter == null ? null : new FilterObject(filter);
3206    }
3207
3208    @GraphQLField
3209    @GraphQLName("filters")
3210    @GraphQLNonNull
3211    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3212    static CountingPaginatedData<FilterObject> filters(final DataFetchingEnvironment env,
3213            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3214            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName) {
3215        CountingPaginatedData<FilterObject> data;
3216
3217        try {
3218            var commandForm = FilterUtil.getHome().getGetFiltersForm();
3219            var command = CDI.current().select(GetFiltersCommand.class).get();
3220
3221            commandForm.setFilterKindName(filterKindName);
3222            commandForm.setFilterTypeName(filterTypeName);
3223
3224            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3225            if(totalEntities == null) {
3226                data = Connections.emptyConnection();
3227            } else {
3228                try(var objectLimiter = new ObjectLimiter(env, FilterConstants.COMPONENT_VENDOR_NAME, FilterConstants.ENTITY_TYPE_NAME, totalEntities)) {
3229                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3230
3231                    var filters = entities.stream()
3232                            .map(FilterObject::new)
3233                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3234
3235                    data = new CountedObjects<>(objectLimiter, filters);
3236                }
3237            }
3238        } catch (NamingException ex) {
3239            throw new RuntimeException(ex);
3240        }
3241
3242        return data;
3243    }
3244
3245    @GraphQLField
3246    @GraphQLName("filterEntranceStep")
3247    static FilterEntranceStepObject filterEntranceStep(final DataFetchingEnvironment env,
3248            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3249            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3250            @GraphQLName("filterName") @GraphQLNonNull final String filterName,
3251            @GraphQLName("filterStepName") @GraphQLNonNull final String filterStepName) {
3252        FilterEntranceStep filterEntranceStep;
3253
3254        try {
3255            var commandForm = FilterUtil.getHome().getGetFilterEntranceStepForm();
3256
3257            commandForm.setFilterKindName(filterKindName);
3258            commandForm.setFilterTypeName(filterTypeName);
3259            commandForm.setFilterName(filterName);
3260            commandForm.setFilterStepName(filterStepName);
3261
3262            filterEntranceStep = CDI.current().select(GetFilterEntranceStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3263        } catch (NamingException ex) {
3264            throw new RuntimeException(ex);
3265        }
3266
3267        return filterEntranceStep == null ? null : new FilterEntranceStepObject(filterEntranceStep);
3268    }
3269
3270    @GraphQLField
3271    @GraphQLName("filterEntranceSteps")
3272    @GraphQLNonNull
3273    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3274    static CountingPaginatedData<FilterEntranceStepObject> filterEntranceSteps(final DataFetchingEnvironment env,
3275            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3276            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3277            @GraphQLName("filterName") @GraphQLNonNull final String filterName) {
3278        CountingPaginatedData<FilterEntranceStepObject> data;
3279
3280        try {
3281            var commandForm = FilterUtil.getHome().getGetFilterEntranceStepsForm();
3282            var command = CDI.current().select(GetFilterEntranceStepsCommand.class).get();
3283
3284            commandForm.setFilterKindName(filterKindName);
3285            commandForm.setFilterTypeName(filterTypeName);
3286            commandForm.setFilterName(filterName);
3287
3288            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3289            if(totalEntities == null) {
3290                data = Connections.emptyConnection();
3291            } else {
3292                try(var objectLimiter = new ObjectLimiter(env, FilterEntranceStepConstants.COMPONENT_VENDOR_NAME, FilterEntranceStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
3293                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3294
3295                    var filterEntranceSteps = entities.stream()
3296                            .map(FilterEntranceStepObject::new)
3297                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3298
3299                    data = new CountedObjects<>(objectLimiter, filterEntranceSteps);
3300                }
3301            }
3302        } catch (NamingException ex) {
3303            throw new RuntimeException(ex);
3304        }
3305
3306        return data;
3307    }
3308
3309    @GraphQLField
3310    @GraphQLName("filterStep")
3311    static FilterStepObject filterStep(final DataFetchingEnvironment env,
3312            @GraphQLName("filterKindName") final String filterKindName,
3313            @GraphQLName("filterTypeName") final String filterTypeName,
3314            @GraphQLName("filterName") final String filterName,
3315            @GraphQLName("filterStepName") final String filterStepName,
3316            @GraphQLName("id") @GraphQLID final String id) {
3317        FilterStep filterStep;
3318
3319        try {
3320            var commandForm = FilterUtil.getHome().getGetFilterStepForm();
3321
3322            commandForm.setFilterKindName(filterKindName);
3323            commandForm.setFilterTypeName(filterTypeName);
3324            commandForm.setFilterName(filterName);
3325            commandForm.setFilterStepName(filterStepName);
3326            commandForm.setUuid(id);
3327
3328            filterStep = CDI.current().select(GetFilterStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3329        } catch (NamingException ex) {
3330            throw new RuntimeException(ex);
3331        }
3332
3333        return filterStep == null ? null : new FilterStepObject(filterStep);
3334    }
3335
3336    @GraphQLField
3337    @GraphQLName("filterSteps")
3338    @GraphQLNonNull
3339    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3340    static CountingPaginatedData<FilterStepObject> filterSteps(final DataFetchingEnvironment env,
3341            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3342            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3343            @GraphQLName("filterName") @GraphQLNonNull final String filterName) {
3344        CountingPaginatedData<FilterStepObject> data;
3345
3346        try {
3347            var commandForm = FilterUtil.getHome().getGetFilterStepsForm();
3348            var command = CDI.current().select(GetFilterStepsCommand.class).get();
3349
3350            commandForm.setFilterKindName(filterKindName);
3351            commandForm.setFilterTypeName(filterTypeName);
3352            commandForm.setFilterName(filterName);
3353
3354            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3355            if(totalEntities == null) {
3356                data = Connections.emptyConnection();
3357            } else {
3358                try(var objectLimiter = new ObjectLimiter(env, FilterStepConstants.COMPONENT_VENDOR_NAME, FilterStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
3359                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3360
3361                    var filterSteps = entities.stream()
3362                            .map(FilterStepObject::new)
3363                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3364
3365                    data = new CountedObjects<>(objectLimiter, filterSteps);
3366                }
3367            }
3368        } catch (NamingException ex) {
3369            throw new RuntimeException(ex);
3370        }
3371
3372        return data;
3373    }
3374
3375    @GraphQLField
3376    @GraphQLName("filterStepElement")
3377    static FilterStepElementObject filterStepElement(final DataFetchingEnvironment env,
3378            @GraphQLName("filterKindName") final String filterKindName,
3379            @GraphQLName("filterTypeName") final String filterTypeName,
3380            @GraphQLName("filterName") final String filterName,
3381            @GraphQLName("filterStepName") final String filterStepName,
3382            @GraphQLName("filterStepElementName") final String filterStepElementName,
3383            @GraphQLName("id") @GraphQLID final String id) {
3384        FilterStepElement filterStepElement;
3385
3386        try {
3387            var commandForm = FilterUtil.getHome().getGetFilterStepElementForm();
3388
3389            commandForm.setFilterKindName(filterKindName);
3390            commandForm.setFilterTypeName(filterTypeName);
3391            commandForm.setFilterName(filterName);
3392            commandForm.setFilterStepName(filterStepName);
3393            commandForm.setFilterStepElementName(filterStepElementName);
3394            commandForm.setUuid(id);
3395
3396            filterStepElement = CDI.current().select(GetFilterStepElementCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3397        } catch (NamingException ex) {
3398            throw new RuntimeException(ex);
3399        }
3400
3401        return filterStepElement == null ? null : new FilterStepElementObject(filterStepElement);
3402    }
3403
3404    @GraphQLField
3405    @GraphQLName("filterStepElements")
3406    @GraphQLNonNull
3407    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3408    static CountingPaginatedData<FilterStepElementObject> filterStepElements(final DataFetchingEnvironment env,
3409            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3410            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3411            @GraphQLName("filterName") @GraphQLNonNull final String filterName,
3412            @GraphQLName("filterStepName") @GraphQLNonNull final String filterStepName) {
3413        CountingPaginatedData<FilterStepElementObject> data;
3414
3415        try {
3416            var commandForm = FilterUtil.getHome().getGetFilterStepElementsForm();
3417            var command = CDI.current().select(GetFilterStepElementsCommand.class).get();
3418
3419            commandForm.setFilterKindName(filterKindName);
3420            commandForm.setFilterTypeName(filterTypeName);
3421            commandForm.setFilterName(filterName);
3422            commandForm.setFilterStepName(filterStepName);
3423
3424            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3425            if(totalEntities == null) {
3426                data = Connections.emptyConnection();
3427            } else {
3428                try(var objectLimiter = new ObjectLimiter(env, FilterStepElementConstants.COMPONENT_VENDOR_NAME, FilterStepElementConstants.ENTITY_TYPE_NAME, totalEntities)) {
3429                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3430
3431                    var filterStepElements = entities.stream()
3432                            .map(FilterStepElementObject::new)
3433                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3434
3435                    data = new CountedObjects<>(objectLimiter, filterStepElements);
3436                }
3437            }
3438        } catch (NamingException ex) {
3439            throw new RuntimeException(ex);
3440        }
3441
3442        return data;
3443    }
3444
3445    @GraphQLField
3446    @GraphQLName("filterStepDestination")
3447    static FilterStepDestinationObject filterStepDestination(final DataFetchingEnvironment env,
3448            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3449            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3450            @GraphQLName("filterName") @GraphQLNonNull final String filterName,
3451            @GraphQLName("fromFilterStepName") @GraphQLNonNull final String fromFilterStepName,
3452            @GraphQLName("toFilterStepName") @GraphQLNonNull final String toFilterStepName) {
3453        FilterStepDestination filterStepDestination;
3454
3455        try {
3456            var commandForm = FilterUtil.getHome().getGetFilterStepDestinationForm();
3457
3458            commandForm.setFilterKindName(filterKindName);
3459            commandForm.setFilterTypeName(filterTypeName);
3460            commandForm.setFilterName(filterName);
3461            commandForm.setFromFilterStepName(fromFilterStepName);
3462            commandForm.setToFilterStepName(toFilterStepName);
3463
3464            filterStepDestination = CDI.current().select(GetFilterStepDestinationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3465        } catch (NamingException ex) {
3466            throw new RuntimeException(ex);
3467        }
3468
3469        return filterStepDestination == null ? null : new FilterStepDestinationObject(filterStepDestination);
3470    }
3471
3472    @GraphQLField
3473    @GraphQLName("filterStepDestinations")
3474    @GraphQLNonNull
3475    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3476    static CountingPaginatedData<FilterStepDestinationObject> filterStepDestinations(final DataFetchingEnvironment env,
3477            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3478            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3479            @GraphQLName("filterName") @GraphQLNonNull final String filterName,
3480            @GraphQLName("fromFilterStepName") final String fromFilterStepName,
3481            @GraphQLName("toFilterStepName") final String toFilterStepName) {
3482        CountingPaginatedData<FilterStepDestinationObject> data;
3483
3484        try {
3485            var commandForm = FilterUtil.getHome().getGetFilterStepDestinationsForm();
3486            var command = CDI.current().select(GetFilterStepDestinationsCommand.class).get();
3487
3488            commandForm.setFilterKindName(filterKindName);
3489            commandForm.setFilterTypeName(filterTypeName);
3490            commandForm.setFilterName(filterName);
3491            commandForm.setFromFilterStepName(fromFilterStepName);
3492            commandForm.setToFilterStepName(toFilterStepName);
3493
3494            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3495            if(totalEntities == null) {
3496                data = Connections.emptyConnection();
3497            } else {
3498                try(var objectLimiter = new ObjectLimiter(env, FilterStepDestinationConstants.COMPONENT_VENDOR_NAME, FilterStepDestinationConstants.ENTITY_TYPE_NAME, totalEntities)) {
3499                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3500
3501                    var filterStepDestinations = entities.stream()
3502                            .map(FilterStepDestinationObject::new)
3503                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3504
3505                    data = new CountedObjects<>(objectLimiter, filterStepDestinations);
3506                }
3507            }
3508        } catch (NamingException ex) {
3509            throw new RuntimeException(ex);
3510        }
3511
3512        return data;
3513    }
3514
3515    @GraphQLField
3516    @GraphQLName("filterAdjustmentSource")
3517    static FilterAdjustmentSourceObject filterAdjustmentSource(final DataFetchingEnvironment env,
3518            @GraphQLName("filterAdjustmentSourceName") @GraphQLNonNull final String filterAdjustmentSourceName) {
3519        FilterAdjustmentSource filterAdjustmentSource;
3520
3521        try {
3522            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentSourceForm();
3523
3524            commandForm.setFilterAdjustmentSourceName(filterAdjustmentSourceName);
3525
3526            filterAdjustmentSource = CDI.current().select(GetFilterAdjustmentSourceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3527        } catch (NamingException ex) {
3528            throw new RuntimeException(ex);
3529        }
3530
3531        return filterAdjustmentSource == null ? null : new FilterAdjustmentSourceObject(filterAdjustmentSource);
3532    }
3533
3534    @GraphQLField
3535    @GraphQLName("filterAdjustmentSources")
3536    @GraphQLNonNull
3537    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3538    static CountingPaginatedData<FilterAdjustmentSourceObject> filterAdjustmentSources(final DataFetchingEnvironment env) {
3539        CountingPaginatedData<FilterAdjustmentSourceObject> data;
3540
3541        try {
3542            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentSourcesForm();
3543            var command = CDI.current().select(GetFilterAdjustmentSourcesCommand.class).get();
3544
3545            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3546            if(totalEntities == null) {
3547                data = Connections.emptyConnection();
3548            } else {
3549                try(var objectLimiter = new ObjectLimiter(env, com.echothree.model.data.filter.common.FilterAdjustmentSourceConstants.COMPONENT_VENDOR_NAME, com.echothree.model.data.filter.common.FilterAdjustmentSourceConstants.ENTITY_TYPE_NAME, totalEntities)) {
3550                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3551
3552                    var filterAdjustmentSources = entities.stream()
3553                            .map(FilterAdjustmentSourceObject::new)
3554                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3555
3556                    data = new CountedObjects<>(objectLimiter, filterAdjustmentSources);
3557                }
3558            }
3559        } catch (NamingException ex) {
3560            throw new RuntimeException(ex);
3561        }
3562
3563        return data;
3564    }
3565
3566    @GraphQLField
3567    @GraphQLName("filterAdjustmentType")
3568    static FilterAdjustmentTypeObject filterAdjustmentType(final DataFetchingEnvironment env,
3569            @GraphQLName("filterAdjustmentTypeName") @GraphQLNonNull final String filterAdjustmentTypeName) {
3570        FilterAdjustmentType filterAdjustmentType;
3571
3572        try {
3573            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentTypeForm();
3574
3575            commandForm.setFilterAdjustmentTypeName(filterAdjustmentTypeName);
3576
3577            filterAdjustmentType = CDI.current().select(GetFilterAdjustmentTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3578        } catch (NamingException ex) {
3579            throw new RuntimeException(ex);
3580        }
3581
3582        return filterAdjustmentType == null ? null : new FilterAdjustmentTypeObject(filterAdjustmentType);
3583    }
3584
3585    @GraphQLField
3586    @GraphQLName("filterAdjustmentTypes")
3587    @GraphQLNonNull
3588    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3589    static CountingPaginatedData<FilterAdjustmentTypeObject> filterAdjustmentTypes(final DataFetchingEnvironment env) {
3590        CountingPaginatedData<FilterAdjustmentTypeObject> data;
3591
3592        try {
3593            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentTypesForm();
3594            var command = CDI.current().select(GetFilterAdjustmentTypesCommand.class).get();
3595
3596            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3597            if(totalEntities == null) {
3598                data = Connections.emptyConnection();
3599            } else {
3600                try(var objectLimiter = new ObjectLimiter(env, FilterAdjustmentTypeConstants.COMPONENT_VENDOR_NAME, FilterAdjustmentTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
3601                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3602
3603                    var filterAdjustmentTypes = entities.stream()
3604                            .map(FilterAdjustmentTypeObject::new)
3605                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3606
3607                    data = new CountedObjects<>(objectLimiter, filterAdjustmentTypes);
3608                }
3609            }
3610        } catch (NamingException ex) {
3611            throw new RuntimeException(ex);
3612        }
3613
3614        return data;
3615    }
3616
3617    @GraphQLField
3618    @GraphQLName("filterAdjustment")
3619    static FilterAdjustmentObject filterAdjustment(final DataFetchingEnvironment env,
3620            @GraphQLName("filterKindName") final String filterKindName,
3621            @GraphQLName("filterAdjustmentName") final String filterAdjustmentName,
3622            @GraphQLName("id") @GraphQLID final String id) {
3623        FilterAdjustment filterAdjustment;
3624
3625        try {
3626            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentForm();
3627
3628            commandForm.setFilterKindName(filterKindName);
3629            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3630            commandForm.setUuid(id);
3631
3632            filterAdjustment = CDI.current().select(GetFilterAdjustmentCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3633        } catch (NamingException ex) {
3634            throw new RuntimeException(ex);
3635        }
3636
3637        return filterAdjustment == null ? null : new FilterAdjustmentObject(filterAdjustment);
3638    }
3639
3640    @GraphQLField
3641    @GraphQLName("filterAdjustments")
3642    static Collection<FilterAdjustmentObject> filterAdjustments(final DataFetchingEnvironment env,
3643            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName) {
3644        Collection<FilterAdjustment> filterAdjustments;
3645        Collection<FilterAdjustmentObject> filterAdjustmentObjects;
3646
3647        try {
3648            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentsForm();
3649
3650            commandForm.setFilterKindName(filterKindName);
3651
3652            filterAdjustments = CDI.current().select(GetFilterAdjustmentsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3653        } catch (NamingException ex) {
3654            throw new RuntimeException(ex);
3655        }
3656
3657        if(filterAdjustments == null) {
3658            filterAdjustmentObjects = emptyList();
3659        } else {
3660            filterAdjustmentObjects = new ArrayList<>(filterAdjustments.size());
3661
3662            filterAdjustments.stream()
3663                    .map(FilterAdjustmentObject::new)
3664                    .forEachOrdered(filterAdjustmentObjects::add);
3665        }
3666
3667        return filterAdjustmentObjects;
3668    }
3669
3670    @GraphQLField
3671    @GraphQLName("filterAdjustmentAmount")
3672    static FilterAdjustmentAmountObject filterAdjustmentAmount(final DataFetchingEnvironment env,
3673            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3674            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName,
3675            @GraphQLName("unitOfMeasureName") final String unitOfMeasureName,
3676            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName,
3677            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
3678            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
3679        FilterAdjustmentAmount filterAdjustmentAmount;
3680
3681        try {
3682            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentAmountForm();
3683
3684            commandForm.setFilterKindName(filterKindName);
3685            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3686            commandForm.setUnitOfMeasureName(unitOfMeasureName);
3687            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
3688            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
3689            commandForm.setCurrencyIsoName(currencyIsoName);
3690
3691            filterAdjustmentAmount = CDI.current().select(GetFilterAdjustmentAmountCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3692        } catch (NamingException ex) {
3693            throw new RuntimeException(ex);
3694        }
3695
3696        return filterAdjustmentAmount == null ? null : new FilterAdjustmentAmountObject(filterAdjustmentAmount);
3697    }
3698
3699    @GraphQLField
3700    @GraphQLName("filterAdjustmentAmounts")
3701    static Collection<FilterAdjustmentAmountObject> filterAdjustmentAmounts(final DataFetchingEnvironment env,
3702            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3703            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName) {
3704        Collection<FilterAdjustmentAmount> filterAdjustmentAmounts;
3705        Collection<FilterAdjustmentAmountObject> filterAdjustmentAmountObjects;
3706
3707        try {
3708            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentAmountsForm();
3709
3710            commandForm.setFilterKindName(filterKindName);
3711            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3712
3713            filterAdjustmentAmounts = CDI.current().select(GetFilterAdjustmentAmountsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3714        } catch (NamingException ex) {
3715            throw new RuntimeException(ex);
3716        }
3717
3718        if(filterAdjustmentAmounts == null) {
3719            filterAdjustmentAmountObjects = emptyList();
3720        } else {
3721            filterAdjustmentAmountObjects = new ArrayList<>(filterAdjustmentAmounts.size());
3722
3723            filterAdjustmentAmounts.stream()
3724                    .map(FilterAdjustmentAmountObject::new)
3725                    .forEachOrdered(filterAdjustmentAmountObjects::add);
3726        }
3727
3728        return filterAdjustmentAmountObjects;
3729    }
3730
3731    @GraphQLField
3732    @GraphQLName("filterAdjustmentFixedAmount")
3733    static FilterAdjustmentFixedAmountObject filterAdjustmentFixedAmount(final DataFetchingEnvironment env,
3734            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3735            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName,
3736            @GraphQLName("unitOfMeasureName") final String unitOfMeasureName,
3737            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName,
3738            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
3739            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
3740        FilterAdjustmentFixedAmount filterAdjustmentFixedAmount;
3741
3742        try {
3743            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentFixedAmountForm();
3744
3745            commandForm.setFilterKindName(filterKindName);
3746            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3747            commandForm.setUnitOfMeasureName(unitOfMeasureName);
3748            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
3749            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
3750            commandForm.setCurrencyIsoName(currencyIsoName);
3751
3752            filterAdjustmentFixedAmount = CDI.current().select(GetFilterAdjustmentFixedAmountCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3753        } catch (NamingException ex) {
3754            throw new RuntimeException(ex);
3755        }
3756
3757        return filterAdjustmentFixedAmount == null ? null : new FilterAdjustmentFixedAmountObject(filterAdjustmentFixedAmount);
3758    }
3759
3760    @GraphQLField
3761    @GraphQLName("filterAdjustmentFixedAmounts")
3762    static Collection<FilterAdjustmentFixedAmountObject> filterAdjustmentFixedAmounts(final DataFetchingEnvironment env,
3763            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3764            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName) {
3765        Collection<FilterAdjustmentFixedAmount> filterAdjustmentFixedAmounts;
3766        Collection<FilterAdjustmentFixedAmountObject> filterAdjustmentFixedAmountObjects;
3767
3768        try {
3769            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentFixedAmountsForm();
3770
3771            commandForm.setFilterKindName(filterKindName);
3772            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3773
3774            filterAdjustmentFixedAmounts = CDI.current().select(GetFilterAdjustmentFixedAmountsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3775        } catch (NamingException ex) {
3776            throw new RuntimeException(ex);
3777        }
3778
3779        if(filterAdjustmentFixedAmounts == null) {
3780            filterAdjustmentFixedAmountObjects = emptyList();
3781        } else {
3782            filterAdjustmentFixedAmountObjects = new ArrayList<>(filterAdjustmentFixedAmounts.size());
3783
3784            filterAdjustmentFixedAmounts.stream()
3785                    .map(FilterAdjustmentFixedAmountObject::new)
3786                    .forEachOrdered(filterAdjustmentFixedAmountObjects::add);
3787        }
3788
3789        return filterAdjustmentFixedAmountObjects;
3790    }
3791
3792    @GraphQLField
3793    @GraphQLName("filterAdjustmentPercent")
3794    static FilterAdjustmentPercentObject filterAdjustmentPercent(final DataFetchingEnvironment env,
3795            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3796            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName,
3797            @GraphQLName("unitOfMeasureName") final String unitOfMeasureName,
3798            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName,
3799            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
3800            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
3801        FilterAdjustmentPercent filterAdjustmentPercent;
3802
3803        try {
3804            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentPercentForm();
3805
3806            commandForm.setFilterKindName(filterKindName);
3807            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3808            commandForm.setUnitOfMeasureName(unitOfMeasureName);
3809            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
3810            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
3811            commandForm.setCurrencyIsoName(currencyIsoName);
3812
3813            filterAdjustmentPercent = CDI.current().select(GetFilterAdjustmentPercentCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3814        } catch (NamingException ex) {
3815            throw new RuntimeException(ex);
3816        }
3817
3818        return filterAdjustmentPercent == null ? null : new FilterAdjustmentPercentObject(filterAdjustmentPercent);
3819    }
3820
3821    @GraphQLField
3822    @GraphQLName("filterAdjustmentPercents")
3823    static Collection<FilterAdjustmentPercentObject> filterAdjustmentPercents(final DataFetchingEnvironment env,
3824            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3825            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName) {
3826        Collection<FilterAdjustmentPercent> filterAdjustmentPercents;
3827        Collection<FilterAdjustmentPercentObject> filterAdjustmentPercentObjects;
3828
3829        try {
3830            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentPercentsForm();
3831
3832            commandForm.setFilterKindName(filterKindName);
3833            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3834
3835            filterAdjustmentPercents = CDI.current().select(GetFilterAdjustmentPercentsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3836        } catch (NamingException ex) {
3837            throw new RuntimeException(ex);
3838        }
3839
3840        if(filterAdjustmentPercents == null) {
3841            filterAdjustmentPercentObjects = emptyList();
3842        } else {
3843            filterAdjustmentPercentObjects = new ArrayList<>(filterAdjustmentPercents.size());
3844
3845            filterAdjustmentPercents.stream()
3846                    .map(FilterAdjustmentPercentObject::new)
3847                    .forEachOrdered(filterAdjustmentPercentObjects::add);
3848        }
3849
3850        return filterAdjustmentPercentObjects;
3851    }
3852
3853    @GraphQLField
3854    @GraphQLName("offerUse")
3855    static OfferUseObject offerUse(final DataFetchingEnvironment env,
3856            @GraphQLName("offerName") @GraphQLNonNull final String offerName,
3857            @GraphQLName("useName") @GraphQLNonNull final String useName) {
3858        OfferUse offerUse;
3859
3860        try {
3861            var commandForm = OfferUtil.getHome().getGetOfferUseForm();
3862
3863            commandForm.setOfferName(offerName);
3864            commandForm.setUseName(useName);
3865
3866            offerUse = CDI.current().select(GetOfferUseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3867        } catch (NamingException ex) {
3868            throw new RuntimeException(ex);
3869        }
3870
3871        return offerUse == null ? null : new OfferUseObject(offerUse);
3872    }
3873
3874    @GraphQLField
3875    @GraphQLName("offerUses")
3876    @GraphQLNonNull
3877    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3878    static CountingPaginatedData<OfferUseObject> offerUses(final DataFetchingEnvironment env,
3879            @GraphQLName("offerName") final String offerName,
3880            @GraphQLName("useName") final String useName) {
3881        CountingPaginatedData<OfferUseObject> data;
3882
3883        try {
3884            var commandForm = OfferUtil.getHome().getGetOfferUsesForm();
3885
3886            commandForm.setOfferName(offerName);
3887            commandForm.setUseName(useName);
3888
3889            var command = CDI.current().select(GetOfferUsesCommand.class).get();
3890
3891            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3892            if(totalEntities == null) {
3893                data = Connections.emptyConnection();
3894            } else {
3895                try(var objectLimiter = new ObjectLimiter(env, OfferConstants.COMPONENT_VENDOR_NAME, OfferConstants.ENTITY_TYPE_NAME, totalEntities)) {
3896                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3897
3898                    var offerUses = entities.stream()
3899                            .map(OfferUseObject::new)
3900                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3901
3902                    data = new CountedObjects<>(objectLimiter, offerUses);
3903                }
3904            }
3905        } catch (NamingException ex) {
3906            throw new RuntimeException(ex);
3907        }
3908
3909        return data;
3910    }
3911
3912    @GraphQLField
3913    @GraphQLName("offer")
3914    static OfferObject offer(final DataFetchingEnvironment env,
3915            @GraphQLName("offerName") final String offerName,
3916            @GraphQLName("id") @GraphQLID final String id) {
3917        Offer offer;
3918
3919        try {
3920            var commandForm = OfferUtil.getHome().getGetOfferForm();
3921
3922            commandForm.setOfferName(offerName);
3923            commandForm.setUuid(id);
3924
3925            offer = CDI.current().select(GetOfferCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3926        } catch (NamingException ex) {
3927            throw new RuntimeException(ex);
3928        }
3929
3930        return offer == null ? null : new OfferObject(offer);
3931    }
3932
3933    @GraphQLField
3934    @GraphQLName("offers")
3935    @GraphQLNonNull
3936    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3937    static CountingPaginatedData<OfferObject> offers(final DataFetchingEnvironment env) {
3938        CountingPaginatedData<OfferObject> data;
3939
3940        try {
3941            var commandForm = OfferUtil.getHome().getGetOffersForm();
3942            var command = CDI.current().select(GetOffersCommand.class).get();
3943
3944            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3945            if(totalEntities == null) {
3946                data = Connections.emptyConnection();
3947            } else {
3948                try(var objectLimiter = new ObjectLimiter(env, OfferConstants.COMPONENT_VENDOR_NAME, OfferConstants.ENTITY_TYPE_NAME, totalEntities)) {
3949                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3950
3951                    var offers = entities.stream()
3952                            .map(OfferObject::new)
3953                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3954
3955                    data = new CountedObjects<>(objectLimiter, offers);
3956                }
3957            }
3958        } catch (NamingException ex) {
3959            throw new RuntimeException(ex);
3960        }
3961
3962        return data;
3963    }
3964    
3965    @GraphQLField
3966    @GraphQLName("offerItem")
3967    static OfferItemObject offerItem(final DataFetchingEnvironment env,
3968            @GraphQLName("offerName") final String offerName,
3969            @GraphQLName("itemName") final String itemName,
3970            @GraphQLName("id") @GraphQLID final String id) {
3971        OfferItem offerItem;
3972
3973        try {
3974            var commandForm = OfferUtil.getHome().getGetOfferItemForm();
3975
3976            commandForm.setOfferName(offerName);
3977            commandForm.setItemName(itemName);
3978            commandForm.setUuid(id);
3979
3980            offerItem = CDI.current().select(GetOfferItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3981        } catch (NamingException ex) {
3982            throw new RuntimeException(ex);
3983        }
3984
3985        return offerItem == null ? null : new OfferItemObject(offerItem);
3986    }
3987
3988    @GraphQLField
3989    @GraphQLName("offerItems")
3990    @GraphQLNonNull
3991    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3992    static CountingPaginatedData<OfferItemObject> offerItems(final DataFetchingEnvironment env,
3993            @GraphQLName("offerName") @GraphQLNonNull final String offerName) {
3994        CountingPaginatedData<OfferItemObject> data;
3995
3996        try {
3997            var commandForm = OfferUtil.getHome().getGetOfferItemsForm();
3998            var command = CDI.current().select(GetOfferItemsCommand.class).get();
3999
4000            commandForm.setOfferName(offerName);
4001
4002            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4003            if(totalEntities == null) {
4004                data = Connections.emptyConnection();
4005            } else {
4006                try(var objectLimiter = new ObjectLimiter(env, OfferItemConstants.COMPONENT_VENDOR_NAME, OfferItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
4007                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4008
4009                    var offerItemObjects = entities.stream()
4010                            .map(OfferItemObject::new)
4011                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4012
4013                    data = new CountedObjects<>(objectLimiter, offerItemObjects);
4014                }
4015            }
4016        } catch (NamingException ex) {
4017            throw new RuntimeException(ex);
4018        }
4019
4020        return data;
4021    }
4022
4023    @GraphQLField
4024    @GraphQLName("offerItemPrice")
4025    static OfferItemPriceObject offerItemPrice(final DataFetchingEnvironment env,
4026            @GraphQLName("offerName") @GraphQLNonNull final String offerName,
4027            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
4028            @GraphQLName("inventoryConditionName") @GraphQLNonNull final String inventoryConditionName,
4029            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName,
4030            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
4031        OfferItemPrice offerItemPrice;
4032
4033        try {
4034            var commandForm = OfferUtil.getHome().getGetOfferItemPriceForm();
4035
4036            commandForm.setOfferName(offerName);
4037            commandForm.setItemName(itemName);
4038            commandForm.setInventoryConditionName(inventoryConditionName);
4039            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
4040            commandForm.setCurrencyIsoName(currencyIsoName);
4041
4042            offerItemPrice = CDI.current().select(GetOfferItemPriceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4043        } catch (NamingException ex) {
4044            throw new RuntimeException(ex);
4045        }
4046
4047        return offerItemPrice == null ? null : new OfferItemPriceObject(offerItemPrice);
4048    }
4049
4050    @GraphQLField
4051    @GraphQLName("offerItemPrices")
4052    @GraphQLNonNull
4053    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4054    static CountingPaginatedData<OfferItemPriceObject> offerItemPrices(final DataFetchingEnvironment env,
4055            @GraphQLName("offerName") @GraphQLNonNull final String offerName,
4056            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
4057        CountingPaginatedData<OfferItemPriceObject> data;
4058
4059        try {
4060            var commandForm = OfferUtil.getHome().getGetOfferItemPricesForm();
4061            var command = CDI.current().select(GetOfferItemPricesCommand.class).get();
4062
4063            commandForm.setOfferName(offerName);
4064            commandForm.setItemName(itemName);
4065
4066            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4067            if(totalEntities == null) {
4068                data = Connections.emptyConnection();
4069            } else {
4070                try(var objectLimiter = new ObjectLimiter(env, OfferItemPriceConstants.COMPONENT_VENDOR_NAME, OfferItemPriceConstants.ENTITY_TYPE_NAME, totalEntities)) {
4071                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4072
4073                    var offerItemPrices = entities.stream()
4074                            .map(OfferItemPriceObject::new)
4075                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4076
4077                    data = new CountedObjects<>(objectLimiter, offerItemPrices);
4078                }
4079            }
4080        } catch (NamingException ex) {
4081            throw new RuntimeException(ex);
4082        }
4083
4084        return data;
4085    }
4086
4087    @GraphQLField
4088    @GraphQLName("offerCustomerType")
4089    static OfferCustomerTypeObject offerCustomerType(final DataFetchingEnvironment env,
4090            @GraphQLName("offerName") @GraphQLNonNull final String offerName,
4091            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName) {
4092        OfferCustomerType offerCustomerType;
4093
4094        try {
4095            var commandForm = OfferUtil.getHome().getGetOfferCustomerTypeForm();
4096
4097            commandForm.setOfferName(offerName);
4098            commandForm.setCustomerTypeName(customerTypeName);
4099
4100            offerCustomerType = CDI.current().select(GetOfferCustomerTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4101        } catch (NamingException ex) {
4102            throw new RuntimeException(ex);
4103        }
4104
4105        return offerCustomerType == null ? null : new OfferCustomerTypeObject(offerCustomerType);
4106    }
4107
4108    @GraphQLField
4109    @GraphQLName("offerCustomerTypes")
4110    @GraphQLNonNull
4111    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4112    static CountingPaginatedData<OfferCustomerTypeObject> offerCustomerTypes(final DataFetchingEnvironment env,
4113            @GraphQLName("offerName") final String offerName,
4114            @GraphQLName("customerTypeName") final String customerTypeName) {
4115        CountingPaginatedData<OfferCustomerTypeObject> data;
4116
4117        try {
4118            var commandForm = OfferUtil.getHome().getGetOfferCustomerTypesForm();
4119            var command = CDI.current().select(GetOfferCustomerTypesCommand.class).get();
4120
4121            commandForm.setOfferName(offerName);
4122            commandForm.setCustomerTypeName(customerTypeName);
4123
4124            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4125            if(totalEntities == null) {
4126                data = Connections.emptyConnection();
4127            } else {
4128                try(var objectLimiter = new ObjectLimiter(env, OfferCustomerTypeConstants.COMPONENT_VENDOR_NAME, OfferCustomerTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4129                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4130
4131                    var offerCustomerTypeObjects = entities.stream()
4132                            .map(OfferCustomerTypeObject::new)
4133                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4134
4135                    data = new CountedObjects<>(objectLimiter, offerCustomerTypeObjects);
4136                }
4137            }
4138        } catch (NamingException ex) {
4139            throw new RuntimeException(ex);
4140        }
4141
4142        return data;
4143    }
4144
4145    @GraphQLField
4146    @GraphQLName("use")
4147    static UseObject use(final DataFetchingEnvironment env,
4148            @GraphQLName("useName") final String useName,
4149            @GraphQLName("id") @GraphQLID final String id) {
4150        Use use;
4151
4152        try {
4153            var commandForm = OfferUtil.getHome().getGetUseForm();
4154
4155            commandForm.setUseName(useName);
4156            commandForm.setUuid(id);
4157
4158            use = CDI.current().select(GetUseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4159        } catch (NamingException ex) {
4160            throw new RuntimeException(ex);
4161        }
4162
4163        return use == null ? null : new UseObject(use);
4164    }
4165
4166    @GraphQLField
4167    @GraphQLName("uses")
4168    @GraphQLNonNull
4169    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4170    static CountingPaginatedData<UseObject> uses(final DataFetchingEnvironment env) {
4171        CountingPaginatedData<UseObject> data;
4172
4173        try {
4174            var commandForm = OfferUtil.getHome().getGetUsesForm();
4175            var command = CDI.current().select(GetUsesCommand.class).get();
4176
4177            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4178            if(totalEntities == null) {
4179                data = Connections.emptyConnection();
4180            } else {
4181                try(var objectLimiter = new ObjectLimiter(env, UseConstants.COMPONENT_VENDOR_NAME, UseConstants.ENTITY_TYPE_NAME, totalEntities)) {
4182                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4183
4184                    var uses = entities.stream()
4185                            .map(UseObject::new)
4186                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4187
4188                    data = new CountedObjects<>(objectLimiter, uses);
4189                }
4190            }
4191        } catch (NamingException ex) {
4192            throw new RuntimeException(ex);
4193        }
4194
4195        return data;
4196    }
4197
4198    @GraphQLField
4199    @GraphQLName("offerNameElement")
4200    static OfferNameElementObject offerNameElement(final DataFetchingEnvironment env,
4201            @GraphQLName("offerNameElementName") final String offerNameElementName,
4202            @GraphQLName("id") @GraphQLID final String id) {
4203        OfferNameElement offerNameElement;
4204
4205        try {
4206            var commandForm = OfferUtil.getHome().getGetOfferNameElementForm();
4207
4208            commandForm.setOfferNameElementName(offerNameElementName);
4209            commandForm.setUuid(id);
4210
4211            offerNameElement = CDI.current().select(GetOfferNameElementCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4212        } catch (NamingException ex) {
4213            throw new RuntimeException(ex);
4214        }
4215
4216        return offerNameElement == null ? null : new OfferNameElementObject(offerNameElement);
4217    }
4218
4219    @GraphQLField
4220    @GraphQLName("offerNameElements")
4221    @GraphQLNonNull
4222    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4223    static CountingPaginatedData<OfferNameElementObject> offerNameElements(final DataFetchingEnvironment env) {
4224        CountingPaginatedData<OfferNameElementObject> data;
4225
4226        try {
4227            var commandForm = OfferUtil.getHome().getGetOfferNameElementsForm();
4228            var command = CDI.current().select(GetOfferNameElementsCommand.class).get();
4229
4230            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4231            if(totalEntities == null) {
4232                data = Connections.emptyConnection();
4233            } else {
4234                try(var objectLimiter = new ObjectLimiter(env, OfferNameElementConstants.COMPONENT_VENDOR_NAME, OfferNameElementConstants.ENTITY_TYPE_NAME, totalEntities)) {
4235                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4236
4237                    var offerNameElementObjects = entities.stream()
4238                            .map(OfferNameElementObject::new)
4239                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4240
4241                    data = new CountedObjects<>(objectLimiter, offerNameElementObjects);
4242                }
4243            }
4244        } catch (NamingException ex) {
4245            throw new RuntimeException(ex);
4246        }
4247
4248        return data;
4249    }
4250
4251    @GraphQLField
4252    @GraphQLName("useNameElement")
4253    static UseNameElementObject useNameElement(final DataFetchingEnvironment env,
4254            @GraphQLName("useNameElementName") final String useNameElementName,
4255            @GraphQLName("id") @GraphQLID final String id) {
4256        UseNameElement useNameElement;
4257
4258        try {
4259            var commandForm = OfferUtil.getHome().getGetUseNameElementForm();
4260
4261            commandForm.setUseNameElementName(useNameElementName);
4262            commandForm.setUuid(id);
4263
4264            useNameElement = CDI.current().select(GetUseNameElementCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4265        } catch (NamingException ex) {
4266            throw new RuntimeException(ex);
4267        }
4268
4269        return useNameElement == null ? null : new UseNameElementObject(useNameElement);
4270    }
4271
4272    @GraphQLField
4273    @GraphQLName("useNameElements")
4274    @GraphQLNonNull
4275    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4276    static CountingPaginatedData<UseNameElementObject> useNameElements(final DataFetchingEnvironment env) {
4277        CountingPaginatedData<UseNameElementObject> data;
4278
4279        try {
4280            var commandForm = OfferUtil.getHome().getGetUseNameElementsForm();
4281            var command = CDI.current().select(GetUseNameElementsCommand.class).get();
4282
4283            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4284            if(totalEntities == null) {
4285                data = Connections.emptyConnection();
4286            } else {
4287                try(var objectLimiter = new ObjectLimiter(env, UseNameElementConstants.COMPONENT_VENDOR_NAME, UseNameElementConstants.ENTITY_TYPE_NAME, totalEntities)) {
4288                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4289
4290                    var useNameElementObjects = entities.stream()
4291                            .map(UseNameElementObject::new)
4292                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4293
4294                    data = new CountedObjects<>(objectLimiter, useNameElementObjects);
4295                }
4296            }
4297        } catch (NamingException ex) {
4298            throw new RuntimeException(ex);
4299        }
4300
4301        return data;
4302    }
4303
4304    @GraphQLField
4305    @GraphQLName("useType")
4306    static UseTypeObject useType(final DataFetchingEnvironment env,
4307            @GraphQLName("useTypeName") final String useTypeName,
4308            @GraphQLName("id") @GraphQLID final String id) {
4309        UseType useType;
4310
4311        try {
4312            var commandForm = OfferUtil.getHome().getGetUseTypeForm();
4313
4314            commandForm.setUseTypeName(useTypeName);
4315            commandForm.setUuid(id);
4316
4317            useType = CDI.current().select(GetUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4318        } catch (NamingException ex) {
4319            throw new RuntimeException(ex);
4320        }
4321
4322        return useType == null ? null : new UseTypeObject(useType);
4323    }
4324
4325    @GraphQLField
4326    @GraphQLName("useTypes")
4327    @GraphQLNonNull
4328    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4329    static CountingPaginatedData<UseTypeObject> useTypes(final DataFetchingEnvironment env) {
4330        CountingPaginatedData<UseTypeObject> data;
4331
4332        try {
4333            var commandForm = OfferUtil.getHome().getGetUseTypesForm();
4334            var command = CDI.current().select(GetUseTypesCommand.class).get();
4335
4336            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4337            if(totalEntities == null) {
4338                data = Connections.emptyConnection();
4339            } else {
4340                try(var objectLimiter = new ObjectLimiter(env, UseTypeConstants.COMPONENT_VENDOR_NAME, UseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4341                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4342
4343                    var useTypes = entities.stream()
4344                            .map(UseTypeObject::new)
4345                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4346
4347                    data = new CountedObjects<>(objectLimiter, useTypes);
4348                }
4349            }
4350        } catch (NamingException ex) {
4351            throw new RuntimeException(ex);
4352        }
4353
4354        return data;
4355    }
4356
4357    @GraphQLField
4358    @GraphQLName("freeOnBoard")
4359    static FreeOnBoardObject freeOnBoard(final DataFetchingEnvironment env,
4360            @GraphQLName("freeOnBoardName") final String freeOnBoardName,
4361            @GraphQLName("id") @GraphQLID final String id) {
4362        FreeOnBoard freeOnBoard;
4363
4364        try {
4365            var commandForm = ShipmentUtil.getHome().getGetFreeOnBoardForm();
4366
4367            commandForm.setFreeOnBoardName(freeOnBoardName);
4368            commandForm.setUuid(id);
4369
4370            freeOnBoard = CDI.current().select(GetFreeOnBoardCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4371        } catch (NamingException ex) {
4372            throw new RuntimeException(ex);
4373        }
4374
4375        return freeOnBoard == null ? null : new FreeOnBoardObject(freeOnBoard);
4376    }
4377
4378    @GraphQLField
4379    @GraphQLName("freeOnBoards")
4380    @GraphQLNonNull
4381    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4382    static CountingPaginatedData<FreeOnBoardObject> freeOnBoards(final DataFetchingEnvironment env) {
4383        CountingPaginatedData<FreeOnBoardObject> data;
4384
4385        try {
4386            var commandForm = ShipmentUtil.getHome().getGetFreeOnBoardsForm();
4387            var command = CDI.current().select(GetFreeOnBoardsCommand.class).get();
4388
4389            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4390            if(totalEntities == null) {
4391                data = Connections.emptyConnection();
4392            } else {
4393                try(var objectLimiter = new ObjectLimiter(env, FreeOnBoardConstants.COMPONENT_VENDOR_NAME, FreeOnBoardConstants.ENTITY_TYPE_NAME, totalEntities)) {
4394                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4395
4396                    var freeOnBoards = entities.stream()
4397                            .map(FreeOnBoardObject::new)
4398                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4399
4400                    data = new CountedObjects<>(objectLimiter, freeOnBoards);
4401                }
4402            }
4403        } catch (NamingException ex) {
4404            throw new RuntimeException(ex);
4405        }
4406
4407        return data;
4408    }
4409
4410    @GraphQLField
4411    @GraphQLName("paymentProcessorTypeCodeType")
4412    static PaymentProcessorTypeCodeTypeObject paymentProcessorTypeCodeType(final DataFetchingEnvironment env,
4413            @GraphQLName("paymentProcessorTypeName") final String paymentProcessorTypeName,
4414            @GraphQLName("paymentProcessorTypeCodeTypeName") final String paymentProcessorTypeCodeTypeName,
4415            @GraphQLName("id") @GraphQLID final String id) {
4416        PaymentProcessorTypeCodeType paymentProcessorTypeCodeType;
4417
4418        try {
4419            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTypeCodeTypeForm();
4420
4421            commandForm.setPaymentProcessorTypeName(paymentProcessorTypeName);
4422            commandForm.setPaymentProcessorTypeCodeTypeName(paymentProcessorTypeCodeTypeName);
4423            commandForm.setUuid(id);
4424
4425            paymentProcessorTypeCodeType = CDI.current().select(GetPaymentProcessorTypeCodeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4426        } catch (NamingException ex) {
4427            throw new RuntimeException(ex);
4428        }
4429
4430        return paymentProcessorTypeCodeType == null ? null : new PaymentProcessorTypeCodeTypeObject(paymentProcessorTypeCodeType);
4431    }
4432
4433    @GraphQLField
4434    @GraphQLName("paymentProcessorTypeCode")
4435    static PaymentProcessorTypeCodeObject paymentProcessorTypeCode(final DataFetchingEnvironment env,
4436            @GraphQLName("paymentProcessorTypeName") final String paymentProcessorTypeName,
4437            @GraphQLName("paymentProcessorTypeCodeTypeName") final String paymentProcessorTypeCodeTypeName,
4438            @GraphQLName("paymentProcessorTypeCodeName") final String paymentProcessorTypeCodeName,
4439            @GraphQLName("id") @GraphQLID final String id) {
4440        PaymentProcessorTypeCode paymentProcessorTypeCode;
4441
4442        try {
4443            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTypeCodeForm();
4444
4445            commandForm.setPaymentProcessorTypeName(paymentProcessorTypeName);
4446            commandForm.setPaymentProcessorTypeCodeTypeName(paymentProcessorTypeCodeTypeName);
4447            commandForm.setPaymentProcessorTypeCodeName(paymentProcessorTypeCodeName);
4448            commandForm.setUuid(id);
4449
4450            paymentProcessorTypeCode = CDI.current().select(GetPaymentProcessorTypeCodeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4451        } catch (NamingException ex) {
4452            throw new RuntimeException(ex);
4453        }
4454
4455        return paymentProcessorTypeCode == null ? null : new PaymentProcessorTypeCodeObject(paymentProcessorTypeCode);
4456    }
4457
4458    @GraphQLField
4459    @GraphQLName("paymentProcessorTransaction")
4460    static PaymentProcessorTransactionObject paymentProcessorTransaction(final DataFetchingEnvironment env,
4461            @GraphQLName("paymentProcessorTransactionName") final String paymentProcessorTransactionName,
4462            @GraphQLName("id") @GraphQLID final String id) {
4463        PaymentProcessorTransaction paymentProcessorTransaction;
4464
4465        try {
4466            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTransactionForm();
4467
4468            commandForm.setPaymentProcessorTransactionName(paymentProcessorTransactionName);
4469            commandForm.setUuid(id);
4470
4471            paymentProcessorTransaction = CDI.current().select(GetPaymentProcessorTransactionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4472        } catch (NamingException ex) {
4473            throw new RuntimeException(ex);
4474        }
4475
4476        return paymentProcessorTransaction == null ? null : new PaymentProcessorTransactionObject(paymentProcessorTransaction);
4477    }
4478
4479    @GraphQLField
4480    @GraphQLName("paymentProcessorTransactions")
4481    @GraphQLNonNull
4482    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4483    static CountingPaginatedData<PaymentProcessorTransactionObject> paymentProcessorTransactions(final DataFetchingEnvironment env) {
4484        CountingPaginatedData<PaymentProcessorTransactionObject> data;
4485
4486        try {
4487            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTransactionsForm();
4488            var command = CDI.current().select(GetPaymentProcessorTransactionsCommand.class).get();
4489
4490            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4491            if(totalEntities == null) {
4492                data = Connections.emptyConnection();
4493            } else {
4494                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorTransactionConstants.COMPONENT_VENDOR_NAME, PaymentProcessorTransactionConstants.ENTITY_TYPE_NAME, totalEntities)) {
4495                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4496
4497                    var paymentProcessorTransactions = entities.stream()
4498                            .map(PaymentProcessorTransactionObject::new)
4499                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4500
4501                    data = new CountedObjects<>(objectLimiter, paymentProcessorTransactions);
4502                }
4503            }
4504        } catch (NamingException ex) {
4505            throw new RuntimeException(ex);
4506        }
4507
4508        return data;
4509    }
4510
4511    @GraphQLField
4512    @GraphQLName("paymentProcessor")
4513    static PaymentProcessorObject paymentProcessor(final DataFetchingEnvironment env,
4514            @GraphQLName("paymentProcessorName") final String paymentProcessorName,
4515            @GraphQLName("id") @GraphQLID final String id) {
4516        PaymentProcessor paymentProcessor;
4517
4518        try {
4519            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorForm();
4520
4521            commandForm.setPaymentProcessorName(paymentProcessorName);
4522            commandForm.setUuid(id);
4523
4524            paymentProcessor = CDI.current().select(GetPaymentProcessorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4525        } catch (NamingException ex) {
4526            throw new RuntimeException(ex);
4527        }
4528
4529        return paymentProcessor == null ? null : new PaymentProcessorObject(paymentProcessor);
4530    }
4531
4532    @GraphQLField
4533    @GraphQLName("paymentProcessors")
4534    @GraphQLNonNull
4535    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4536    static CountingPaginatedData<PaymentProcessorObject> paymentProcessors(final DataFetchingEnvironment env) {
4537        CountingPaginatedData<PaymentProcessorObject> data;
4538
4539        try {
4540            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorsForm();
4541            var command = CDI.current().select(GetPaymentProcessorsCommand.class).get();
4542
4543            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4544            if(totalEntities == null) {
4545                data = Connections.emptyConnection();
4546            } else {
4547                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorConstants.COMPONENT_VENDOR_NAME, PaymentProcessorConstants.ENTITY_TYPE_NAME, totalEntities)) {
4548                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4549
4550                    var paymentProcessors = entities.stream()
4551                            .map(PaymentProcessorObject::new)
4552                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4553
4554                    data = new CountedObjects<>(objectLimiter, paymentProcessors);
4555                }
4556            }
4557        } catch (NamingException ex) {
4558            throw new RuntimeException(ex);
4559        }
4560
4561        return data;
4562    }
4563
4564    @GraphQLField
4565    @GraphQLName("paymentProcessorType")
4566    static PaymentProcessorTypeObject paymentProcessorType(final DataFetchingEnvironment env,
4567            @GraphQLName("paymentProcessorTypeName") final String paymentProcessorTypeName,
4568            @GraphQLName("id") @GraphQLID final String id) {
4569        PaymentProcessorType paymentProcessorType;
4570
4571        try {
4572            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTypeForm();
4573
4574            commandForm.setPaymentProcessorTypeName(paymentProcessorTypeName);
4575            commandForm.setUuid(id);
4576
4577            paymentProcessorType = CDI.current().select(GetPaymentProcessorTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4578        } catch (NamingException ex) {
4579            throw new RuntimeException(ex);
4580        }
4581
4582        return paymentProcessorType == null ? null : new PaymentProcessorTypeObject(paymentProcessorType);
4583    }
4584
4585    @GraphQLField
4586    @GraphQLName("paymentProcessorTypes")
4587    @GraphQLNonNull
4588    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4589    static CountingPaginatedData<PaymentProcessorTypeObject> paymentProcessorTypes(final DataFetchingEnvironment env) {
4590        CountingPaginatedData<PaymentProcessorTypeObject> data;
4591
4592        try {
4593            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTypesForm();
4594            var command = CDI.current().select(GetPaymentProcessorTypesCommand.class).get();
4595
4596            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4597            if(totalEntities == null) {
4598                data = Connections.emptyConnection();
4599            } else {
4600                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorTypeConstants.COMPONENT_VENDOR_NAME, PaymentProcessorTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4601                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4602
4603                    var paymentProcessorTypes = entities.stream()
4604                            .map(PaymentProcessorTypeObject::new)
4605                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4606
4607                    data = new CountedObjects<>(objectLimiter, paymentProcessorTypes);
4608                }
4609            }
4610        } catch (NamingException ex) {
4611            throw new RuntimeException(ex);
4612        }
4613
4614        return data;
4615    }
4616
4617    @GraphQLField
4618    @GraphQLName("paymentMethodType")
4619    static PaymentMethodTypeObject paymentMethodType(final DataFetchingEnvironment env,
4620            @GraphQLName("paymentMethodTypeName") final String paymentMethodTypeName,
4621            @GraphQLName("id") @GraphQLID final String id) {
4622        PaymentMethodType paymentMethodType;
4623
4624        try {
4625            var commandForm = PaymentUtil.getHome().getGetPaymentMethodTypeForm();
4626
4627            commandForm.setPaymentMethodTypeName(paymentMethodTypeName);
4628            commandForm.setUuid(id);
4629
4630            paymentMethodType = CDI.current().select(GetPaymentMethodTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4631        } catch (NamingException ex) {
4632            throw new RuntimeException(ex);
4633        }
4634
4635        return paymentMethodType == null ? null : new PaymentMethodTypeObject(paymentMethodType);
4636    }
4637
4638    @GraphQLField
4639    @GraphQLName("paymentMethodTypes")
4640    @GraphQLNonNull
4641    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4642    static CountingPaginatedData<PaymentMethodTypeObject> paymentMethodTypes(final DataFetchingEnvironment env) {
4643        CountingPaginatedData<PaymentMethodTypeObject> data;
4644
4645        try {
4646            var commandForm = PaymentUtil.getHome().getGetPaymentMethodTypesForm();
4647            var command = CDI.current().select(GetPaymentMethodTypesCommand.class).get();
4648
4649            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4650            if(totalEntities == null) {
4651                data = Connections.emptyConnection();
4652            } else {
4653                try(var objectLimiter = new ObjectLimiter(env, PaymentMethodTypeConstants.COMPONENT_VENDOR_NAME, PaymentMethodTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4654                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4655
4656                    var paymentMethodTypes = entities.stream()
4657                            .map(PaymentMethodTypeObject::new)
4658                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4659
4660                    data = new CountedObjects<>(objectLimiter, paymentMethodTypes);
4661                }
4662            }
4663        } catch (NamingException ex) {
4664            throw new RuntimeException(ex);
4665        }
4666
4667        return data;
4668    }
4669
4670    @GraphQLField
4671    @GraphQLName("paymentMethod")
4672    static PaymentMethodObject paymentMethod(final DataFetchingEnvironment env,
4673            @GraphQLName("paymentMethodName") final String paymentMethodName) {
4674        PaymentMethod paymentMethod;
4675
4676        try {
4677            var commandForm = PaymentUtil.getHome().getGetPaymentMethodForm();
4678
4679            commandForm.setPaymentMethodName(paymentMethodName);
4680
4681            paymentMethod = CDI.current().select(GetPaymentMethodCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4682        } catch (NamingException ex) {
4683            throw new RuntimeException(ex);
4684        }
4685
4686        return paymentMethod == null ? null : new PaymentMethodObject(paymentMethod);
4687    }
4688
4689    @GraphQLField
4690    @GraphQLName("paymentMethods")
4691    @GraphQLNonNull
4692    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4693    static CountingPaginatedData<PaymentMethodObject> paymentMethods(final DataFetchingEnvironment env) {
4694        CountingPaginatedData<PaymentMethodObject> data;
4695
4696        try {
4697            var commandForm = PaymentUtil.getHome().getGetPaymentMethodsForm();
4698            var command = CDI.current().select(GetPaymentMethodsCommand.class).get();
4699
4700            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4701            if(totalEntities == null) {
4702                data = Connections.emptyConnection();
4703            } else {
4704                try(var objectLimiter = new ObjectLimiter(env, PaymentMethodConstants.COMPONENT_VENDOR_NAME, PaymentMethodConstants.ENTITY_TYPE_NAME, totalEntities)) {
4705                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4706
4707                    var paymentMethods = entities.stream()
4708                            .map(PaymentMethodObject::new)
4709                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4710
4711                    data = new CountedObjects<>(objectLimiter, paymentMethods);
4712                }
4713            }
4714        } catch (NamingException ex) {
4715            throw new RuntimeException(ex);
4716        }
4717
4718        return data;
4719    }
4720
4721    @GraphQLField
4722    @GraphQLName("paymentProcessorResultCode")
4723    static PaymentProcessorResultCodeObject paymentProcessorResultCode(final DataFetchingEnvironment env,
4724            @GraphQLName("paymentProcessorResultCodeName") final String paymentProcessorResultCodeName,
4725            @GraphQLName("id") @GraphQLID final String id) {
4726        PaymentProcessorResultCode paymentProcessorResultCode;
4727
4728        try {
4729            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorResultCodeForm();
4730
4731            commandForm.setPaymentProcessorResultCodeName(paymentProcessorResultCodeName);
4732            commandForm.setUuid(id);
4733
4734            paymentProcessorResultCode = CDI.current().select(GetPaymentProcessorResultCodeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4735        } catch (NamingException ex) {
4736            throw new RuntimeException(ex);
4737        }
4738
4739        return paymentProcessorResultCode == null ? null : new PaymentProcessorResultCodeObject(paymentProcessorResultCode);
4740    }
4741
4742    @GraphQLField
4743    @GraphQLName("paymentProcessorResultCodes")
4744    @GraphQLNonNull
4745    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4746    static CountingPaginatedData<PaymentProcessorResultCodeObject> paymentProcessorResultCodes(final DataFetchingEnvironment env) {
4747        CountingPaginatedData<PaymentProcessorResultCodeObject> data;
4748
4749        try {
4750            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorResultCodesForm();
4751            var command = CDI.current().select(GetPaymentProcessorResultCodesCommand.class).get();
4752
4753            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4754            if(totalEntities == null) {
4755                data = Connections.emptyConnection();
4756            } else {
4757                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorResultCodeConstants.COMPONENT_VENDOR_NAME, PaymentProcessorResultCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4758                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4759                    var objects = entities.stream()
4760                            .map(PaymentProcessorResultCodeObject::new)
4761                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4762
4763                    data = new CountedObjects<>(objectLimiter, objects);
4764                }
4765            }
4766        } catch (NamingException ex) {
4767            throw new RuntimeException(ex);
4768        }
4769
4770        return data;
4771    }
4772
4773    @GraphQLField
4774    @GraphQLName("paymentProcessorActionType")
4775    static PaymentProcessorActionTypeObject paymentProcessorActionType(final DataFetchingEnvironment env,
4776            @GraphQLName("paymentProcessorActionTypeName") final String paymentProcessorActionTypeName,
4777            @GraphQLName("id") @GraphQLID final String id) {
4778        PaymentProcessorActionType paymentProcessorActionType;
4779
4780        try {
4781            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorActionTypeForm();
4782
4783            commandForm.setPaymentProcessorActionTypeName(paymentProcessorActionTypeName);
4784            commandForm.setUuid(id);
4785
4786            paymentProcessorActionType = CDI.current().select(GetPaymentProcessorActionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4787        } catch (NamingException ex) {
4788            throw new RuntimeException(ex);
4789        }
4790
4791        return paymentProcessorActionType == null ? null : new PaymentProcessorActionTypeObject(paymentProcessorActionType);
4792    }
4793
4794    @GraphQLField
4795    @GraphQLName("paymentProcessorActionTypes")
4796    @GraphQLNonNull
4797    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4798    static CountingPaginatedData<PaymentProcessorActionTypeObject> paymentProcessorActionTypes(final DataFetchingEnvironment env) {
4799        CountingPaginatedData<PaymentProcessorActionTypeObject> data;
4800
4801        try {
4802            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorActionTypesForm();
4803            var command = CDI.current().select(GetPaymentProcessorActionTypesCommand.class).get();
4804
4805            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4806            if(totalEntities == null) {
4807                data = Connections.emptyConnection();
4808            } else {
4809                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorActionTypeConstants.COMPONENT_VENDOR_NAME, PaymentProcessorActionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4810                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4811                    var objects = entities.stream()
4812                            .map(PaymentProcessorActionTypeObject::new)
4813                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4814
4815                    data = new CountedObjects<>(objectLimiter, objects);
4816                }
4817            }
4818        } catch (NamingException ex) {
4819            throw new RuntimeException(ex);
4820        }
4821
4822        return data;
4823    }
4824
4825    @GraphQLField
4826    @GraphQLName("appearance")
4827    static AppearanceObject appearance(final DataFetchingEnvironment env,
4828            @GraphQLName("appearanceName") final String appearanceName,
4829            @GraphQLName("id") @GraphQLID final String id) {
4830        Appearance appearance;
4831
4832        try {
4833            var commandForm = CoreUtil.getHome().getGetAppearanceForm();
4834
4835            commandForm.setAppearanceName(appearanceName);
4836            commandForm.setUuid(id);
4837
4838            appearance = CDI.current().select(GetAppearanceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4839        } catch (NamingException ex) {
4840            throw new RuntimeException(ex);
4841        }
4842
4843        return appearance == null ? null : new AppearanceObject(appearance);
4844    }
4845
4846    @GraphQLField
4847    @GraphQLName("appearances")
4848    @GraphQLNonNull
4849    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4850    static CountingPaginatedData<AppearanceObject> appearances(final DataFetchingEnvironment env) {
4851        CountingPaginatedData<AppearanceObject> data;
4852
4853        try {
4854            var commandForm = CoreUtil.getHome().getGetAppearancesForm();
4855            var command = CDI.current().select(GetAppearancesCommand.class).get();
4856
4857            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4858            if(totalEntities == null) {
4859                data = Connections.emptyConnection();
4860            } else {
4861                try(var objectLimiter = new ObjectLimiter(env, AppearanceConstants.COMPONENT_VENDOR_NAME, AppearanceConstants.ENTITY_TYPE_NAME, totalEntities)) {
4862                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4863
4864                    var appearances = entities.stream()
4865                            .map(AppearanceObject::new)
4866                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4867
4868                    data = new CountedObjects<>(objectLimiter, appearances);
4869                }
4870            }
4871        } catch (NamingException ex) {
4872            throw new RuntimeException(ex);
4873        }
4874
4875        return data;
4876    }
4877
4878    @GraphQLField
4879    @GraphQLName("eventType")
4880    static EventTypeObject eventType(final DataFetchingEnvironment env,
4881            @GraphQLName("eventTypeName") final String eventTypeName,
4882            @GraphQLName("id") @GraphQLID final String id) {
4883        EventType eventType;
4884
4885        try {
4886            var commandForm = CoreUtil.getHome().getGetEventTypeForm();
4887
4888            commandForm.setEventTypeName(eventTypeName);
4889            commandForm.setUuid(id);
4890
4891            eventType = CDI.current().select(GetEventTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4892        } catch (NamingException ex) {
4893            throw new RuntimeException(ex);
4894        }
4895
4896        return eventType == null ? null : new EventTypeObject(eventType);
4897    }
4898
4899    @GraphQLField
4900    @GraphQLName("eventTypes")
4901    @GraphQLNonNull
4902    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4903    static CountingPaginatedData<EventTypeObject> eventTypes(final DataFetchingEnvironment env) {
4904        CountingPaginatedData<EventTypeObject> data;
4905
4906        try {
4907            var commandForm = CoreUtil.getHome().getGetEventTypesForm();
4908            var command = CDI.current().select(GetEventTypesCommand.class).get();
4909
4910            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4911            if(totalEntities == null) {
4912                data = Connections.emptyConnection();
4913            } else {
4914                try(var objectLimiter = new ObjectLimiter(env, EventTypeConstants.COMPONENT_VENDOR_NAME, EventTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4915                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4916
4917                    var eventTypes = entities.stream()
4918                            .map(EventTypeObject::new)
4919                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4920
4921                    data = new CountedObjects<>(objectLimiter, eventTypes);
4922                }
4923            }
4924        } catch (NamingException ex) {
4925            throw new RuntimeException(ex);
4926        }
4927
4928        return data;
4929    }
4930
4931    @GraphQLField
4932    @GraphQLName("entityAliasType")
4933    static EntityAliasTypeObject entityAliasType(final DataFetchingEnvironment env,
4934            @GraphQLName("componentVendorName") final String componentVendorName,
4935            @GraphQLName("entityTypeName") final String entityTypeName,
4936            @GraphQLName("entityAliasTypeName") final String entityAliasTypeName,
4937            @GraphQLName("id") @GraphQLID final String id) {
4938        EntityAliasType entityAliasType;
4939
4940        try {
4941            var commandForm = CoreUtil.getHome().getGetEntityAliasTypeForm();
4942
4943            commandForm.setComponentVendorName(componentVendorName);
4944            commandForm.setEntityTypeName(entityTypeName);
4945            commandForm.setEntityAliasTypeName(entityAliasTypeName);
4946            commandForm.setUuid(id);
4947
4948            entityAliasType = CDI.current().select(GetEntityAliasTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4949        } catch (NamingException ex) {
4950            throw new RuntimeException(ex);
4951        }
4952
4953        return entityAliasType == null ? null : new EntityAliasTypeObject(entityAliasType, null);
4954    }
4955
4956    @GraphQLField
4957    @GraphQLName("entityAliasTypes")
4958    @GraphQLNonNull
4959    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4960    static CountingPaginatedData<EntityAliasTypeObject> entityAliasTypes(final DataFetchingEnvironment env,
4961            @GraphQLName("componentVendorName") final String componentVendorName,
4962            @GraphQLName("entityTypeName") final String entityTypeName,
4963            @GraphQLName("id") @GraphQLID final String id) {
4964        CountingPaginatedData<EntityAliasTypeObject> data;
4965
4966        try {
4967            var commandForm = CoreUtil.getHome().getGetEntityAliasTypesForm();
4968            var command = CDI.current().select(GetEntityAliasTypesCommand.class).get();
4969
4970            commandForm.setComponentVendorName(componentVendorName);
4971            commandForm.setEntityTypeName(entityTypeName);
4972            commandForm.setUuid(id);
4973
4974            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4975            if(totalEntities == null) {
4976                data = Connections.emptyConnection();
4977            } else {
4978                try(var objectLimiter = new ObjectLimiter(env, EntityAliasTypeConstants.COMPONENT_VENDOR_NAME, EntityAliasTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4979                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4980
4981                    var entityAliasTypes = entities.stream()
4982                            .map(entityAliasType -> new EntityAliasTypeObject(entityAliasType, null))
4983                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4984
4985                    data = new CountedObjects<>(objectLimiter, entityAliasTypes);
4986                }
4987            }
4988        } catch (NamingException ex) {
4989            throw new RuntimeException(ex);
4990        }
4991
4992        return data;
4993    }
4994
4995    @GraphQLField
4996    @GraphQLName("entityAlias")
4997    static EntityAliasObject entityAlias(final DataFetchingEnvironment env,
4998            @GraphQLName("componentVendorName") final String componentVendorName,
4999            @GraphQLName("entityTypeName") final String entityTypeName,
5000            @GraphQLName("entityAliasTypeName") final String entityAliasTypeName,
5001            @GraphQLName("id") @GraphQLID final String id,
5002            @GraphQLName("alias") @GraphQLNonNull final String alias) {
5003        EntityAlias entityAlias;
5004
5005        try {
5006            var commandForm = CoreUtil.getHome().getGetEntityAliasForm();
5007
5008            commandForm.setComponentVendorName(componentVendorName);
5009            commandForm.setEntityTypeName(entityTypeName);
5010            commandForm.setEntityAliasTypeName(entityAliasTypeName);
5011            commandForm.setUuid(id);
5012            commandForm.setAlias(alias);
5013
5014            entityAlias = CDI.current().select(GetEntityAliasCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5015        } catch (NamingException ex) {
5016            throw new RuntimeException(ex);
5017        }
5018
5019        return entityAlias == null ? null : new EntityAliasObject(entityAlias);
5020    }
5021
5022    @GraphQLField
5023    @GraphQLName("entityAliases")
5024    @GraphQLNonNull
5025    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5026    static CountingPaginatedData<EntityAliasObject> entityAliases(final DataFetchingEnvironment env,
5027            @GraphQLName("componentVendorName") final String componentVendorName,
5028            @GraphQLName("entityTypeName") final String entityTypeName,
5029            @GraphQLName("entityAliasTypeName") final String entityAliasTypeName,
5030            @GraphQLName("id") @GraphQLID final String id) {
5031        CountingPaginatedData<EntityAliasObject> data;
5032
5033        try {
5034            var commandForm = CoreUtil.getHome().getGetEntityAliasesForm();
5035            var command = CDI.current().select(GetEntityAliasesCommand.class).get();
5036
5037            commandForm.setComponentVendorName(componentVendorName);
5038            commandForm.setEntityTypeName(entityTypeName);
5039            commandForm.setEntityAliasTypeName(entityAliasTypeName);
5040            commandForm.setUuid(id);
5041
5042            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5043            if(totalEntities == null) {
5044                data = Connections.emptyConnection();
5045            } else {
5046                try(var objectLimiter = new ObjectLimiter(env, EntityAliasConstants.COMPONENT_VENDOR_NAME, EntityAliasConstants.ENTITY_TYPE_NAME, totalEntities)) {
5047                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5048
5049                    var entityAliases = entities.stream()
5050                            .map(EntityAliasObject::new)
5051                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5052
5053                    data = new CountedObjects<>(objectLimiter, entityAliases);
5054                }
5055            }
5056        } catch (NamingException ex) {
5057            throw new RuntimeException(ex);
5058        }
5059
5060        return data;
5061    }
5062
5063
5064    @GraphQLField
5065    @GraphQLName("entityAttributeGroup")
5066    static EntityAttributeGroupObject entityAttributeGroup(final DataFetchingEnvironment env,
5067            @GraphQLName("entityAttributeGroupName") final String entityAttributeGroupName,
5068            @GraphQLName("id") @GraphQLID final String id) {
5069        EntityAttributeGroup entityAttributeGroup;
5070
5071        try {
5072            var commandForm = CoreUtil.getHome().getGetEntityAttributeGroupForm();
5073
5074            commandForm.setEntityAttributeGroupName(entityAttributeGroupName);
5075            commandForm.setUuid(id);
5076
5077            entityAttributeGroup = CDI.current().select(GetEntityAttributeGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5078        } catch (NamingException ex) {
5079            throw new RuntimeException(ex);
5080        }
5081
5082        return entityAttributeGroup == null ? null : new EntityAttributeGroupObject(entityAttributeGroup, null);
5083    }
5084
5085    @GraphQLField
5086    @GraphQLName("entityAttributeGroups")
5087    @GraphQLNonNull
5088    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5089    static CountingPaginatedData<EntityAttributeGroupObject> entityAttributeGroups(final DataFetchingEnvironment env) {
5090        CountingPaginatedData<EntityAttributeGroupObject> data;
5091
5092        try {
5093            var commandForm = CoreUtil.getHome().getGetEntityAttributeGroupsForm();
5094            var command = CDI.current().select(GetEntityAttributeGroupsCommand.class).get();
5095
5096            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5097            if(totalEntities == null) {
5098                data = Connections.emptyConnection();
5099            } else {
5100                try(var objectLimiter = new ObjectLimiter(env, EntityAttributeGroupConstants.COMPONENT_VENDOR_NAME, EntityAttributeGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
5101                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5102
5103                    var entityAttributeGroups = entities.stream()
5104                            .map(entityAttributeGroup -> new EntityAttributeGroupObject(entityAttributeGroup, null))
5105                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5106
5107                    data = new CountedObjects<>(objectLimiter, entityAttributeGroups);
5108                }
5109            }
5110        } catch (NamingException ex) {
5111            throw new RuntimeException(ex);
5112        }
5113
5114        return data;
5115    }
5116
5117    @GraphQLField
5118    @GraphQLName("entityAttribute")
5119    static EntityAttributeObject entityAttribute(final DataFetchingEnvironment env,
5120            @GraphQLName("componentVendorName") final String componentVendorName,
5121            @GraphQLName("entityTypeName") final String entityTypeName,
5122            @GraphQLName("entityAttributeName") final String entityAttributeName,
5123            @GraphQLName("id") @GraphQLID final String id) {
5124        EntityAttribute entityAttribute;
5125
5126        try {
5127            var commandForm = CoreUtil.getHome().getGetEntityAttributeForm();
5128
5129            commandForm.setComponentVendorName(componentVendorName);
5130            commandForm.setEntityTypeName(entityTypeName);
5131            commandForm.setEntityAttributeName(entityAttributeName);
5132            commandForm.setUuid(id);
5133
5134            entityAttribute = CDI.current().select(GetEntityAttributeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5135        } catch (NamingException ex) {
5136            throw new RuntimeException(ex);
5137        }
5138
5139        return entityAttribute == null ? null : new EntityAttributeObject(entityAttribute, null);
5140    }
5141
5142    @GraphQLField
5143    @GraphQLName("entityAttributes")
5144    @GraphQLNonNull
5145    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5146    static CountingPaginatedData<EntityAttributeObject> entityAttributes(final DataFetchingEnvironment env,
5147            @GraphQLName("componentVendorName") final String componentVendorName,
5148            @GraphQLName("entityTypeName") final String entityTypeName,
5149            @GraphQLName("entityAttributeTypeNames") final String entityAttributeTypeNames,
5150            @GraphQLName("id") @GraphQLID final String id) {
5151        CountingPaginatedData<EntityAttributeObject> data;
5152
5153        try {
5154            var commandForm = CoreUtil.getHome().getGetEntityAttributesForm();
5155            var command = CDI.current().select(GetEntityAttributesCommand.class).get();
5156
5157            commandForm.setComponentVendorName(componentVendorName);
5158            commandForm.setEntityTypeName(entityTypeName);
5159            commandForm.setEntityAttributeTypeNames(entityAttributeTypeNames);
5160            commandForm.setUuid(id);
5161
5162            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5163            if(totalEntities == null) {
5164                data = Connections.emptyConnection();
5165            } else {
5166                try(var objectLimiter = new ObjectLimiter(env, EntityAttributeConstants.COMPONENT_VENDOR_NAME, EntityAttributeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5167                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5168
5169                    var entityAttributes = entities.stream()
5170                            .map(entityAttribute -> new EntityAttributeObject(entityAttribute, null))
5171                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5172
5173                    data = new CountedObjects<>(objectLimiter, entityAttributes);
5174                }
5175            }
5176        } catch (NamingException ex) {
5177            throw new RuntimeException(ex);
5178        }
5179
5180        return data;
5181    }
5182
5183    @GraphQLField
5184    @GraphQLName("entityAttributeEntityAttributeGroup")
5185    static EntityAttributeEntityAttributeGroupObject entityAttributeEntityAttributeGroup(final DataFetchingEnvironment env,
5186            @GraphQLName("componentVendorName") @GraphQLNonNull final String componentVendorName,
5187            @GraphQLName("entityTypeName") @GraphQLNonNull final String entityTypeName,
5188            @GraphQLName("entityAttributeName") @GraphQLNonNull final String entityAttributeName,
5189            @GraphQLName("entityAttributeGroupName") @GraphQLNonNull final String entityAttributeGroupName) {
5190        EntityAttributeEntityAttributeGroup entityAttributeEntityAttributeGroup;
5191
5192        try {
5193            var commandForm = CoreUtil.getHome().getGetEntityAttributeEntityAttributeGroupForm();
5194
5195            commandForm.setComponentVendorName(componentVendorName);
5196            commandForm.setEntityTypeName(entityTypeName);
5197            commandForm.setEntityAttributeName(entityAttributeName);
5198            commandForm.setEntityAttributeGroupName(entityAttributeGroupName);
5199
5200            entityAttributeEntityAttributeGroup = CDI.current().select(GetEntityAttributeEntityAttributeGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5201        } catch (NamingException ex) {
5202            throw new RuntimeException(ex);
5203        }
5204
5205        return entityAttributeEntityAttributeGroup == null ? null : new EntityAttributeEntityAttributeGroupObject(entityAttributeEntityAttributeGroup);
5206    }
5207
5208    @GraphQLField
5209    @GraphQLName("entityAttributeEntityAttributeGroups")
5210    @GraphQLNonNull
5211    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5212    static CountingPaginatedData<EntityAttributeEntityAttributeGroupObject> entityAttributeEntityAttributeGroups(final DataFetchingEnvironment env,
5213            @GraphQLName("componentVendorName") final String componentVendorName,
5214            @GraphQLName("entityTypeName") final String entityTypeName,
5215            @GraphQLName("entityAttributeName") final String entityAttributeName,
5216            @GraphQLName("entityAttributeGroupName") final String entityAttributeGroupName) {
5217        CountingPaginatedData<EntityAttributeEntityAttributeGroupObject> data;
5218
5219        try {
5220            var commandForm = CoreUtil.getHome().getGetEntityAttributeEntityAttributeGroupsForm();
5221            var command = CDI.current().select(GetEntityAttributeEntityAttributeGroupsCommand.class).get();
5222
5223            commandForm.setComponentVendorName(componentVendorName);
5224            commandForm.setEntityTypeName(entityTypeName);
5225            commandForm.setEntityAttributeName(entityAttributeName);
5226            commandForm.setEntityAttributeGroupName(entityAttributeGroupName);
5227
5228            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5229            if(totalEntities == null) {
5230                data = Connections.emptyConnection();
5231            } else {
5232                try(var objectLimiter = new ObjectLimiter(env, EntityAttributeEntityAttributeGroupConstants.COMPONENT_VENDOR_NAME, EntityAttributeEntityAttributeGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
5233                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5234
5235                    var entityAttributeEntityAttributeGroups = entities.stream()
5236                            .map(EntityAttributeEntityAttributeGroupObject::new)
5237                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5238
5239                    data = new CountedObjects<>(objectLimiter, entityAttributeEntityAttributeGroups);
5240                }
5241            }
5242        } catch (NamingException ex) {
5243            throw new RuntimeException(ex);
5244        }
5245
5246        return data;
5247    }
5248
5249    @GraphQLField
5250    @GraphQLName("entityInstance")
5251    static EntityInstanceObject entityInstance(final DataFetchingEnvironment env,
5252            @GraphQLName("id") @GraphQLID final String id,
5253            @GraphQLName("entityRef") final String entityRef) {
5254        EntityInstance entityInstance;
5255
5256        try {
5257            var commandForm = CoreUtil.getHome().getGetEntityInstanceForm();
5258
5259            commandForm.setUuid(id);
5260            commandForm.setEntityRef(entityRef);
5261
5262            entityInstance = CDI.current().select(GetEntityInstanceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5263        } catch (NamingException ex) {
5264            throw new RuntimeException(ex);
5265        }
5266
5267        return entityInstance == null ? null : new EntityInstanceObject(entityInstance);
5268    }
5269
5270    @GraphQLField
5271    @GraphQLName("entityInstances")
5272    @GraphQLNonNull
5273    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5274    static CountingPaginatedData<EntityInstanceObject> entityInstances(final DataFetchingEnvironment env,
5275            @GraphQLName("componentVendorName") @GraphQLNonNull final String componentVendorName,
5276            @GraphQLName("entityTypeName") @GraphQLNonNull final String entityTypeName) {
5277        CountingPaginatedData<EntityInstanceObject> data;
5278
5279        try {
5280            var commandForm = CoreUtil.getHome().getGetEntityInstancesForm();
5281            var command = CDI.current().select(GetEntityInstancesCommand.class).get();
5282
5283            commandForm.setComponentVendorName(componentVendorName);
5284            commandForm.setEntityTypeName(entityTypeName);
5285
5286            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5287            if(totalEntities == null) {
5288                data = Connections.emptyConnection();
5289            } else {
5290                try(var objectLimiter = new ObjectLimiter(env, EntityInstanceConstants.COMPONENT_VENDOR_NAME, EntityInstanceConstants.ENTITY_TYPE_NAME, totalEntities)) {
5291                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5292
5293                    var entityInstances = entities.stream()
5294                            .map(EntityInstanceObject::new)
5295                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5296
5297                    data = new CountedObjects<>(objectLimiter, entityInstances);
5298                }
5299            }
5300        } catch (NamingException ex) {
5301            throw new RuntimeException(ex);
5302        }
5303
5304        return data;
5305    }
5306
5307    @GraphQLField
5308    @GraphQLName("entityType")
5309    static EntityTypeObject entityType(final DataFetchingEnvironment env,
5310            @GraphQLName("componentVendorName") final String componentVendorName,
5311            @GraphQLName("entityTypeName") final String entityTypeName,
5312            @GraphQLName("id") @GraphQLID final String id) {
5313        EntityType entityType;
5314
5315        try {
5316            var commandForm = CoreUtil.getHome().getGetEntityTypeForm();
5317
5318            commandForm.setComponentVendorName(componentVendorName);
5319            commandForm.setEntityTypeName(entityTypeName);
5320            commandForm.setUuid(id);
5321
5322            entityType = CDI.current().select(GetEntityTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5323        } catch (NamingException ex) {
5324            throw new RuntimeException(ex);
5325        }
5326
5327        return entityType == null ? null : new EntityTypeObject(entityType);
5328    }
5329
5330    @GraphQLField
5331    @GraphQLName("entityTypes")
5332    @GraphQLNonNull
5333    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5334    static CountingPaginatedData<EntityTypeObject> entityTypes(final DataFetchingEnvironment env,
5335            @GraphQLName("componentVendorName") final String componentVendorName) {
5336        CountingPaginatedData<EntityTypeObject> data;
5337
5338        try {
5339            var commandForm = CoreUtil.getHome().getGetEntityTypesForm();
5340            var command = CDI.current().select(GetEntityTypesCommand.class).get();
5341
5342            commandForm.setComponentVendorName(componentVendorName);
5343
5344            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5345            if(totalEntities == null) {
5346                data = Connections.emptyConnection();
5347            } else {
5348                try(var objectLimiter = new ObjectLimiter(env, EntityTypeConstants.COMPONENT_VENDOR_NAME, EntityTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5349                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5350
5351                    var entityTypes = entities.stream()
5352                            .map(EntityTypeObject::new)
5353                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5354
5355                    data = new CountedObjects<>(objectLimiter, entityTypes);
5356                }
5357            }
5358        } catch (NamingException ex) {
5359            throw new RuntimeException(ex);
5360        }
5361
5362        return data;
5363    }
5364
5365    @GraphQLField
5366    @GraphQLName("componentVendor")
5367    static ComponentVendorObject componentVendor(final DataFetchingEnvironment env,
5368            @GraphQLName("componentVendorName") final String componentVendorName,
5369            @GraphQLName("id") @GraphQLID final String id) {
5370        ComponentVendor componentVendor;
5371
5372        try {
5373            var commandForm = CoreUtil.getHome().getGetComponentVendorForm();
5374
5375            commandForm.setComponentVendorName(componentVendorName);
5376            commandForm.setUuid(id);
5377
5378            componentVendor = CDI.current().select(GetComponentVendorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5379        } catch (NamingException ex) {
5380            throw new RuntimeException(ex);
5381        }
5382
5383        return componentVendor == null ? null : new ComponentVendorObject(componentVendor);
5384    }
5385
5386    @GraphQLField
5387    @GraphQLName("componentVendors")
5388    @GraphQLNonNull
5389    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5390    static CountingPaginatedData<ComponentVendorObject> componentVendors(final DataFetchingEnvironment env) {
5391        CountingPaginatedData<ComponentVendorObject> data;
5392
5393        try {
5394            var commandForm = CoreUtil.getHome().getGetComponentVendorsForm();
5395            var command = CDI.current().select(GetComponentVendorsCommand.class).get();
5396
5397            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5398            if(totalEntities == null) {
5399                data = Connections.emptyConnection();
5400            } else {
5401                try(var objectLimiter = new ObjectLimiter(env, ComponentVendorConstants.COMPONENT_VENDOR_NAME, ComponentVendorConstants.ENTITY_TYPE_NAME, totalEntities)) {
5402                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5403
5404                    var componentVendors = entities.stream()
5405                            .map(ComponentVendorObject::new)
5406                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5407
5408                    data = new CountedObjects<>(objectLimiter, componentVendors);
5409                }
5410            }
5411        } catch (NamingException ex) {
5412            throw new RuntimeException(ex);
5413        }
5414
5415        return data;
5416    }
5417
5418    @GraphQLField
5419    @GraphQLName("inventoryCondition")
5420    static InventoryConditionObject inventoryCondition(final DataFetchingEnvironment env,
5421            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
5422            @GraphQLName("id") @GraphQLID final String id) {
5423        InventoryCondition inventoryCondition;
5424
5425        try {
5426            var commandForm = InventoryUtil.getHome().getGetInventoryConditionForm();
5427
5428            commandForm.setInventoryConditionName(inventoryConditionName);
5429            commandForm.setUuid(id);
5430
5431            inventoryCondition = CDI.current().select(GetInventoryConditionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5432        } catch (NamingException ex) {
5433            throw new RuntimeException(ex);
5434        }
5435
5436        return inventoryCondition == null ? null : new InventoryConditionObject(inventoryCondition);
5437    }
5438
5439    @GraphQLField
5440    @GraphQLName("inventoryConditions")
5441    @GraphQLNonNull
5442    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5443    static CountingPaginatedData<InventoryConditionObject> inventoryConditions(final DataFetchingEnvironment env) {
5444        CountingPaginatedData<InventoryConditionObject> data;
5445
5446        try {
5447            var commandForm = InventoryUtil.getHome().getGetInventoryConditionsForm();
5448            var command = CDI.current().select(GetInventoryConditionsCommand.class).get();
5449
5450            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5451            if(totalEntities == null) {
5452                data = Connections.emptyConnection();
5453            } else {
5454                try(var objectLimiter = new ObjectLimiter(env, InventoryConditionConstants.COMPONENT_VENDOR_NAME, InventoryConditionConstants.ENTITY_TYPE_NAME, totalEntities)) {
5455                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5456
5457                    var inventoryConditions = entities.stream()
5458                            .map(InventoryConditionObject::new)
5459                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5460
5461                    data = new CountedObjects<>(objectLimiter, inventoryConditions);
5462                }
5463            }
5464        } catch (NamingException ex) {
5465            throw new RuntimeException(ex);
5466        }
5467
5468        return data;
5469    }
5470
5471    @GraphQLField
5472    @GraphQLName("allocationPriority")
5473    static AllocationPriorityObject allocationPriority(final DataFetchingEnvironment env,
5474            @GraphQLName("allocationPriorityName") final String allocationPriorityName,
5475            @GraphQLName("id") @GraphQLID final String id) {
5476        AllocationPriority allocationPriority;
5477
5478        try {
5479            var commandForm = InventoryUtil.getHome().getGetAllocationPriorityForm();
5480
5481            commandForm.setAllocationPriorityName(allocationPriorityName);
5482            commandForm.setUuid(id);
5483
5484            allocationPriority = CDI.current().select(GetAllocationPriorityCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5485        } catch (NamingException ex) {
5486            throw new RuntimeException(ex);
5487        }
5488
5489        return allocationPriority == null ? null : new AllocationPriorityObject(allocationPriority);
5490    }
5491
5492    @GraphQLField
5493    @GraphQLName("allocationPriorities")
5494    @GraphQLNonNull
5495    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5496    static CountingPaginatedData<AllocationPriorityObject> allocationPriorities(final DataFetchingEnvironment env) {
5497        CountingPaginatedData<AllocationPriorityObject> data;
5498
5499        try {
5500            var commandForm = InventoryUtil.getHome().getGetAllocationPrioritiesForm();
5501            var command = CDI.current().select(GetAllocationPrioritiesCommand.class).get();
5502
5503            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5504            if(totalEntities == null) {
5505                data = Connections.emptyConnection();
5506            } else {
5507                try(var objectLimiter = new ObjectLimiter(env, AllocationPriorityConstants.COMPONENT_VENDOR_NAME, AllocationPriorityConstants.ENTITY_TYPE_NAME, totalEntities)) {
5508                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5509
5510                    var allocationPriorities = entities.stream()
5511                            .map(AllocationPriorityObject::new)
5512                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5513
5514                    data = new CountedObjects<>(objectLimiter, allocationPriorities);
5515                }
5516            }
5517        } catch (NamingException ex) {
5518            throw new RuntimeException(ex);
5519        }
5520
5521        return data;
5522    }
5523
5524    @GraphQLField
5525    @GraphQLName("inventoryTransactionType")
5526    static InventoryTransactionTypeObject inventoryTransactionType(final DataFetchingEnvironment env,
5527            @GraphQLName("inventoryTransactionTypeName") final String inventoryTransactionTypeName,
5528            @GraphQLName("id") @GraphQLID final String id) {
5529        InventoryTransactionType inventoryTransactionType;
5530
5531        try {
5532            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionTypeForm();
5533
5534            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5535            commandForm.setUuid(id);
5536
5537            inventoryTransactionType = CDI.current().select(GetInventoryTransactionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5538        } catch (NamingException ex) {
5539            throw new RuntimeException(ex);
5540        }
5541
5542        return inventoryTransactionType == null ? null : new InventoryTransactionTypeObject(inventoryTransactionType);
5543    }
5544
5545    @GraphQLField
5546    @GraphQLName("inventoryTransactionTypes")
5547    @GraphQLNonNull
5548    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5549    static CountingPaginatedData<InventoryTransactionTypeObject> inventoryTransactionTypes(final DataFetchingEnvironment env) {
5550        CountingPaginatedData<InventoryTransactionTypeObject> data;
5551
5552        try {
5553            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionTypesForm();
5554            var command = CDI.current().select(GetInventoryTransactionTypesCommand.class).get();
5555
5556            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5557            if(totalEntities == null) {
5558                data = Connections.emptyConnection();
5559            } else {
5560                try(var objectLimiter = new ObjectLimiter(env, InventoryTransactionTypeConstants.COMPONENT_VENDOR_NAME, InventoryTransactionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5561                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5562
5563                    var inventoryTransactionTypes = entities.stream()
5564                            .map(InventoryTransactionTypeObject::new)
5565                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5566
5567                    data = new CountedObjects<>(objectLimiter, inventoryTransactionTypes);
5568                }
5569            }
5570        } catch (NamingException ex) {
5571            throw new RuntimeException(ex);
5572        }
5573
5574        return data;
5575    }
5576
5577    @GraphQLField
5578    @GraphQLName("inventoryTransactionTimeType")
5579    static InventoryTransactionTimeTypeObject inventoryTransactionTimeType(final DataFetchingEnvironment env,
5580            @GraphQLName("inventoryTransactionTypeName") final String inventoryTransactionTypeName,
5581            @GraphQLName("inventoryTransactionTimeTypeName") final String inventoryTransactionTimeTypeName,
5582            @GraphQLName("id") @GraphQLID final String id) {
5583        InventoryTransactionTimeType inventoryTransactionTimeType;
5584
5585        try {
5586            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionTimeTypeForm();
5587
5588            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5589            commandForm.setInventoryTransactionTimeTypeName(inventoryTransactionTimeTypeName);
5590            commandForm.setUuid(id);
5591
5592            inventoryTransactionTimeType = 
5593                    CDI.current().select(GetInventoryTransactionTimeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5594        } catch (NamingException ex) {
5595            throw new RuntimeException(ex);
5596        }
5597
5598        return inventoryTransactionTimeType == null ? null : new InventoryTransactionTimeTypeObject(inventoryTransactionTimeType);
5599    }
5600
5601    @GraphQLField
5602    @GraphQLName("inventoryTransactionTimeTypes")
5603    @GraphQLNonNull
5604    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5605    static CountingPaginatedData<InventoryTransactionTimeTypeObject> inventoryTransactionTimeTypes(final DataFetchingEnvironment env,
5606            @GraphQLName("inventoryTransactionTypeName") @GraphQLNonNull final String inventoryTransactionTypeName) {
5607        CountingPaginatedData<InventoryTransactionTimeTypeObject> data;
5608
5609        try {
5610            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionTimeTypesForm();
5611            var command = CDI.current().select(GetInventoryTransactionTimeTypesCommand.class).get();
5612
5613            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5614
5615            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5616            if(totalEntities == null) {
5617                data = Connections.emptyConnection();
5618            } else {
5619                try(var objectLimiter = new ObjectLimiter(env, InventoryTransactionTimeTypeConstants.COMPONENT_VENDOR_NAME,
5620                        InventoryTransactionTimeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5621                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5622
5623                    var inventoryTransactionTimeTypes = entities.stream()
5624                            .map(InventoryTransactionTimeTypeObject::new)
5625                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5626
5627                    data = new CountedObjects<>(objectLimiter, inventoryTransactionTimeTypes);
5628                }
5629            }
5630        } catch (NamingException ex) {
5631            throw new RuntimeException(ex);
5632        }
5633
5634        return data;
5635    }
5636
5637    @GraphQLField
5638    @GraphQLName("inventoryDisposition")
5639    static InventoryDispositionObject inventoryDisposition(final DataFetchingEnvironment env,
5640            @GraphQLName("inventoryTransactionTypeName") final String inventoryTransactionTypeName,
5641            @GraphQLName("inventoryDispositionName") final String inventoryDispositionName,
5642            @GraphQLName("id") @GraphQLID final String id) {
5643        InventoryDisposition inventoryDisposition;
5644
5645        try {
5646            var commandForm = InventoryUtil.getHome().getGetInventoryDispositionForm();
5647
5648            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5649            commandForm.setInventoryDispositionName(inventoryDispositionName);
5650            commandForm.setUuid(id);
5651
5652            inventoryDisposition = 
5653                    CDI.current().select(GetInventoryDispositionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5654        } catch (NamingException ex) {
5655            throw new RuntimeException(ex);
5656        }
5657
5658        return inventoryDisposition == null ? null : new InventoryDispositionObject(inventoryDisposition);
5659    }
5660
5661    @GraphQLField
5662    @GraphQLName("inventoryDispositions")
5663    @GraphQLNonNull
5664    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5665    static CountingPaginatedData<InventoryDispositionObject> inventoryDispositions(final DataFetchingEnvironment env,
5666            @GraphQLName("inventoryTransactionTypeName") @GraphQLNonNull final String inventoryTransactionTypeName) {
5667        CountingPaginatedData<InventoryDispositionObject> data;
5668
5669        try {
5670            var commandForm = InventoryUtil.getHome().getGetInventoryDispositionsForm();
5671            var command = CDI.current().select(GetInventoryDispositionsCommand.class).get();
5672
5673            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5674
5675            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5676            if(totalEntities == null) {
5677                data = Connections.emptyConnection();
5678            } else {
5679                try(var objectLimiter = new ObjectLimiter(env, InventoryDispositionConstants.COMPONENT_VENDOR_NAME,
5680                        InventoryDispositionConstants.ENTITY_TYPE_NAME, totalEntities)) {
5681                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5682
5683                    var inventoryDispositions = entities.stream()
5684                            .map(InventoryDispositionObject::new)
5685                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5686
5687                    data = new CountedObjects<>(objectLimiter, inventoryDispositions);
5688                }
5689            }
5690        } catch (NamingException ex) {
5691            throw new RuntimeException(ex);
5692        }
5693
5694        return data;
5695    }
5696
5697    @GraphQLField
5698    @GraphQLName("inventoryDispositionAdjustment")
5699    static InventoryDispositionAdjustmentObject inventoryDispositionAdjustment(final DataFetchingEnvironment env,
5700            @GraphQLName("inventoryTransactionTypeName") final String inventoryTransactionTypeName,
5701            @GraphQLName("inventoryDispositionName") final String inventoryDispositionName,
5702            @GraphQLName("inventoryDispositionAdjustmentName") final String inventoryDispositionAdjustmentName,
5703            @GraphQLName("id") @GraphQLID final String id) {
5704        InventoryDispositionAdjustment inventoryDispositionAdjustment;
5705
5706        try {
5707            var commandForm = InventoryUtil.getHome().getGetInventoryDispositionAdjustmentForm();
5708
5709            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5710            commandForm.setInventoryDispositionName(inventoryDispositionName);
5711            commandForm.setInventoryDispositionAdjustmentName(inventoryDispositionAdjustmentName);
5712            commandForm.setUuid(id);
5713
5714            inventoryDispositionAdjustment =
5715                    CDI.current().select(GetInventoryDispositionAdjustmentCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5716        } catch (NamingException ex) {
5717            throw new RuntimeException(ex);
5718        }
5719
5720        return inventoryDispositionAdjustment == null ? null : new InventoryDispositionAdjustmentObject(inventoryDispositionAdjustment);
5721    }
5722
5723    @GraphQLField
5724    @GraphQLName("inventoryDispositionAdjustments")
5725    @GraphQLNonNull
5726    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5727    static CountingPaginatedData<InventoryDispositionAdjustmentObject> inventoryDispositionAdjustments(final DataFetchingEnvironment env,
5728            @GraphQLName("inventoryTransactionTypeName") @GraphQLNonNull final String inventoryTransactionTypeName,
5729            @GraphQLName("inventoryDispositionName") @GraphQLNonNull final String inventoryDispositionName) {
5730        CountingPaginatedData<InventoryDispositionAdjustmentObject> data;
5731
5732        try {
5733            var commandForm = InventoryUtil.getHome().getGetInventoryDispositionAdjustmentsForm();
5734            var command = CDI.current().select(GetInventoryDispositionAdjustmentsCommand.class).get();
5735
5736            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5737            commandForm.setInventoryDispositionName(inventoryDispositionName);
5738
5739            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5740            if(totalEntities == null) {
5741                data = Connections.emptyConnection();
5742            } else {
5743                try(var objectLimiter = new ObjectLimiter(env, InventoryDispositionAdjustmentConstants.COMPONENT_VENDOR_NAME,
5744                        InventoryDispositionAdjustmentConstants.ENTITY_TYPE_NAME, totalEntities)) {
5745                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5746
5747                    var inventoryDispositionAdjustments = entities.stream()
5748                            .map(InventoryDispositionAdjustmentObject::new)
5749                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5750
5751                    data = new CountedObjects<>(objectLimiter, inventoryDispositionAdjustments);
5752                }
5753            }
5754        } catch (NamingException ex) {
5755            throw new RuntimeException(ex);
5756        }
5757
5758        return data;
5759    }
5760
5761    @GraphQLField
5762    @GraphQLName("inventoryTransactionReason")
5763    static InventoryTransactionReasonObject inventoryTransactionReason(final DataFetchingEnvironment env,
5764            @GraphQLName("inventoryTransactionTypeName") final String inventoryTransactionTypeName,
5765            @GraphQLName("inventoryTransactionReasonName") final String inventoryTransactionReasonName,
5766            @GraphQLName("id") @GraphQLID final String id) {
5767        InventoryTransactionReason inventoryTransactionReason;
5768
5769        try {
5770            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionReasonForm();
5771
5772            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5773            commandForm.setInventoryTransactionReasonName(inventoryTransactionReasonName);
5774            commandForm.setUuid(id);
5775
5776            inventoryTransactionReason = 
5777                    CDI.current().select(GetInventoryTransactionReasonCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5778        } catch (NamingException ex) {
5779            throw new RuntimeException(ex);
5780        }
5781
5782        return inventoryTransactionReason == null ? null : new InventoryTransactionReasonObject(inventoryTransactionReason);
5783    }
5784
5785    @GraphQLField
5786    @GraphQLName("inventoryTransactionReasons")
5787    @GraphQLNonNull
5788    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5789    static CountingPaginatedData<InventoryTransactionReasonObject> inventoryTransactionReasons(final DataFetchingEnvironment env,
5790            @GraphQLName("inventoryTransactionTypeName") @GraphQLNonNull final String inventoryTransactionTypeName) {
5791        CountingPaginatedData<InventoryTransactionReasonObject> data;
5792
5793        try {
5794            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionReasonsForm();
5795            var command = CDI.current().select(GetInventoryTransactionReasonsCommand.class).get();
5796
5797            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5798
5799            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5800            if(totalEntities == null) {
5801                data = Connections.emptyConnection();
5802            } else {
5803                try(var objectLimiter = new ObjectLimiter(env, InventoryTransactionReasonConstants.COMPONENT_VENDOR_NAME,
5804                        InventoryTransactionReasonConstants.ENTITY_TYPE_NAME, totalEntities)) {
5805                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5806
5807                    var inventoryTransactionReasons = entities.stream()
5808                            .map(InventoryTransactionReasonObject::new)
5809                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5810
5811                    data = new CountedObjects<>(objectLimiter, inventoryTransactionReasons);
5812                }
5813            }
5814        } catch (NamingException ex) {
5815            throw new RuntimeException(ex);
5816        }
5817
5818        return data;
5819    }
5820
5821    @GraphQLField
5822    @GraphQLName("inventoryTransactionRoleType")
5823    static InventoryTransactionRoleTypeObject inventoryTransactionRoleType(final DataFetchingEnvironment env,
5824            @GraphQLName("inventoryTransactionTypeName") final String inventoryTransactionTypeName,
5825            @GraphQLName("inventoryTransactionRoleTypeName") final String inventoryTransactionRoleTypeName,
5826            @GraphQLName("id") @GraphQLID final String id) {
5827        InventoryTransactionRoleType inventoryTransactionRoleType;
5828
5829        try {
5830            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionRoleTypeForm();
5831
5832            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5833            commandForm.setInventoryTransactionRoleTypeName(inventoryTransactionRoleTypeName);
5834            commandForm.setUuid(id);
5835
5836            inventoryTransactionRoleType = 
5837                    CDI.current().select(GetInventoryTransactionRoleTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5838        } catch (NamingException ex) {
5839            throw new RuntimeException(ex);
5840        }
5841
5842        return inventoryTransactionRoleType == null ? null : new InventoryTransactionRoleTypeObject(inventoryTransactionRoleType);
5843    }
5844
5845    @GraphQLField
5846    @GraphQLName("inventoryTransactionRoleTypes")
5847    @GraphQLNonNull
5848    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5849    static CountingPaginatedData<InventoryTransactionRoleTypeObject> inventoryTransactionRoleTypes(final DataFetchingEnvironment env,
5850            @GraphQLName("inventoryTransactionTypeName") @GraphQLNonNull final String inventoryTransactionTypeName) {
5851        CountingPaginatedData<InventoryTransactionRoleTypeObject> data;
5852
5853        try {
5854            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionRoleTypesForm();
5855            var command = CDI.current().select(GetInventoryTransactionRoleTypesCommand.class).get();
5856
5857            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5858
5859            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5860            if(totalEntities == null) {
5861                data = Connections.emptyConnection();
5862            } else {
5863                try(var objectLimiter = new ObjectLimiter(env, InventoryTransactionRoleTypeConstants.COMPONENT_VENDOR_NAME,
5864                        InventoryTransactionRoleTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5865                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5866
5867                    var inventoryTransactionRoleTypes = entities.stream()
5868                            .map(InventoryTransactionRoleTypeObject::new)
5869                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5870
5871                    data = new CountedObjects<>(objectLimiter, inventoryTransactionRoleTypes);
5872                }
5873            }
5874        } catch (NamingException ex) {
5875            throw new RuntimeException(ex);
5876        }
5877
5878        return data;
5879    }
5880
5881    @GraphQLField
5882    @GraphQLName("inventoryAdjustmentType")
5883    static InventoryAdjustmentTypeObject inventoryAdjustmentType(final DataFetchingEnvironment env,
5884            @GraphQLName("inventoryAdjustmentTypeName") final String inventoryAdjustmentTypeName,
5885            @GraphQLName("id") @GraphQLID final String id) {
5886        InventoryAdjustmentType inventoryAdjustmentType;
5887
5888        try {
5889            var commandForm = InventoryUtil.getHome().getGetInventoryAdjustmentTypeForm();
5890
5891            commandForm.setInventoryAdjustmentTypeName(inventoryAdjustmentTypeName);
5892            commandForm.setUuid(id);
5893
5894            inventoryAdjustmentType = CDI.current().select(GetInventoryAdjustmentTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5895        } catch (NamingException ex) {
5896            throw new RuntimeException(ex);
5897        }
5898
5899        return inventoryAdjustmentType == null ? null : new InventoryAdjustmentTypeObject(inventoryAdjustmentType);
5900    }
5901
5902    @GraphQLField
5903    @GraphQLName("inventoryAdjustmentTypes")
5904    @GraphQLNonNull
5905    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5906    static CountingPaginatedData<InventoryAdjustmentTypeObject> inventoryAdjustmentTypes(final DataFetchingEnvironment env) {
5907        CountingPaginatedData<InventoryAdjustmentTypeObject> data;
5908
5909        try {
5910            var commandForm = InventoryUtil.getHome().getGetInventoryAdjustmentTypesForm();
5911            var command = CDI.current().select(GetInventoryAdjustmentTypesCommand.class).get();
5912
5913            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5914            if(totalEntities == null) {
5915                data = Connections.emptyConnection();
5916            } else {
5917                try(var objectLimiter = new ObjectLimiter(env, InventoryAdjustmentTypeConstants.COMPONENT_VENDOR_NAME, InventoryAdjustmentTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5918                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5919
5920                    var inventoryAdjustmentTypes = entities.stream()
5921                            .map(InventoryAdjustmentTypeObject::new)
5922                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5923
5924                    data = new CountedObjects<>(objectLimiter, inventoryAdjustmentTypes);
5925                }
5926            }
5927        } catch (NamingException ex) {
5928            throw new RuntimeException(ex);
5929        }
5930
5931        return data;
5932    }
5933
5934    @GraphQLField
5935    @GraphQLName("inventoryCostingMethod")
5936    static InventoryCostingMethodObject inventoryCostingMethod(final DataFetchingEnvironment env,
5937            @GraphQLName("inventoryCostingMethodName") final String inventoryCostingMethodName,
5938            @GraphQLName("id") @GraphQLID final String id) {
5939        InventoryCostingMethod inventoryCostingMethod;
5940
5941        try {
5942            var commandForm = InventoryUtil.getHome().getGetInventoryCostingMethodForm();
5943
5944            commandForm.setInventoryCostingMethodName(inventoryCostingMethodName);
5945            commandForm.setUuid(id);
5946
5947            inventoryCostingMethod = CDI.current().select(GetInventoryCostingMethodCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5948        } catch (NamingException ex) {
5949            throw new RuntimeException(ex);
5950        }
5951
5952        return inventoryCostingMethod == null ? null : new InventoryCostingMethodObject(inventoryCostingMethod);
5953    }
5954
5955    @GraphQLField
5956    @GraphQLName("inventoryCostingMethods")
5957    @GraphQLNonNull
5958    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5959    static CountingPaginatedData<InventoryCostingMethodObject> inventoryCostingMethods(final DataFetchingEnvironment env) {
5960        CountingPaginatedData<InventoryCostingMethodObject> data;
5961
5962        try {
5963            var commandForm = InventoryUtil.getHome().getGetInventoryCostingMethodsForm();
5964            var command = CDI.current().select(GetInventoryCostingMethodsCommand.class).get();
5965
5966            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5967            if(totalEntities == null) {
5968                data = Connections.emptyConnection();
5969            } else {
5970                try(var objectLimiter = new ObjectLimiter(env, InventoryCostingMethodConstants.COMPONENT_VENDOR_NAME, InventoryCostingMethodConstants.ENTITY_TYPE_NAME, totalEntities)) {
5971                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5972
5973                    var inventoryCostingMethods = entities.stream()
5974                            .map(InventoryCostingMethodObject::new)
5975                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5976
5977                    data = new CountedObjects<>(objectLimiter, inventoryCostingMethods);
5978                }
5979            }
5980        } catch (NamingException ex) {
5981            throw new RuntimeException(ex);
5982        }
5983
5984        return data;
5985    }
5986
5987    @GraphQLField
5988    @GraphQLName("partyInventoryCostingMethod")
5989    static PartyInventoryCostingMethodObject partyInventoryCostingMethod(final DataFetchingEnvironment env,
5990            @GraphQLName("partyName") final String partyName,
5991            @GraphQLName("id") @GraphQLID final String id) {
5992        PartyInventoryCostingMethod partyInventoryCostingMethod;
5993
5994        try {
5995            var commandForm = InventoryUtil.getHome().getGetPartyInventoryCostingMethodForm();
5996
5997            commandForm.setPartyName(partyName);
5998            commandForm.setUuid(id);
5999
6000            partyInventoryCostingMethod = CDI.current().select(GetPartyInventoryCostingMethodCommand.class).get()
6001                    .getEntityForGraphQl(getUserVisitPK(env), commandForm);
6002        } catch (NamingException ex) {
6003            throw new RuntimeException(ex);
6004        }
6005
6006        return partyInventoryCostingMethod == null ? null
6007                : new PartyInventoryCostingMethodObject(partyInventoryCostingMethod);
6008    }
6009
6010    @GraphQLField
6011    @GraphQLName("partyInventoryCostingMethods")
6012    @GraphQLNonNull
6013    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6014    static CountingPaginatedData<PartyInventoryCostingMethodObject> partyInventoryCostingMethods(
6015            final DataFetchingEnvironment env,
6016            @GraphQLName("inventoryCostingMethodName") final String inventoryCostingMethodName,
6017            @GraphQLName("id") @GraphQLID final String id) {
6018        CountingPaginatedData<PartyInventoryCostingMethodObject> data;
6019
6020        try {
6021            var commandForm = InventoryUtil.getHome().getGetPartyInventoryCostingMethodsForm();
6022            var command = CDI.current().select(GetPartyInventoryCostingMethodsCommand.class).get();
6023
6024            commandForm.setInventoryCostingMethodName(inventoryCostingMethodName);
6025            commandForm.setUuid(id);
6026
6027            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6028            if(totalEntities == null) {
6029                data = Connections.emptyConnection();
6030            } else {
6031                try(var objectLimiter = new ObjectLimiter(env,
6032                        PartyInventoryCostingMethodConstants.COMPONENT_VENDOR_NAME,
6033                        PartyInventoryCostingMethodConstants.ENTITY_TYPE_NAME, totalEntities)) {
6034                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6035                    var partyInventoryCostingMethods = entities.stream()
6036                            .map(PartyInventoryCostingMethodObject::new)
6037                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6038
6039                    data = new CountedObjects<>(objectLimiter, partyInventoryCostingMethods);
6040                }
6041            }
6042        } catch (NamingException ex) {
6043            throw new RuntimeException(ex);
6044        }
6045
6046        return data;
6047    }
6048
6049    @GraphQLField
6050    @GraphQLName("inventoryBucketType")
6051    static InventoryBucketTypeObject inventoryBucketType(final DataFetchingEnvironment env,
6052            @GraphQLName("inventoryBucketTypeName") final String inventoryBucketTypeName,
6053            @GraphQLName("id") @GraphQLID final String id) {
6054        InventoryBucketType inventoryBucketType;
6055
6056        try {
6057            var commandForm = InventoryUtil.getHome().getGetInventoryBucketTypeForm();
6058
6059            commandForm.setInventoryBucketTypeName(inventoryBucketTypeName);
6060            commandForm.setUuid(id);
6061
6062            inventoryBucketType = CDI.current().select(GetInventoryBucketTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6063        } catch (NamingException ex) {
6064            throw new RuntimeException(ex);
6065        }
6066
6067        return inventoryBucketType == null ? null : new InventoryBucketTypeObject(inventoryBucketType);
6068    }
6069
6070    @GraphQLField
6071    @GraphQLName("inventoryBucketTypes")
6072    @GraphQLNonNull
6073    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6074    static CountingPaginatedData<InventoryBucketTypeObject> inventoryBucketTypes(final DataFetchingEnvironment env) {
6075        CountingPaginatedData<InventoryBucketTypeObject> data;
6076
6077        try {
6078            var commandForm = InventoryUtil.getHome().getGetInventoryBucketTypesForm();
6079            var command = CDI.current().select(GetInventoryBucketTypesCommand.class).get();
6080
6081            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6082            if(totalEntities == null) {
6083                data = Connections.emptyConnection();
6084            } else {
6085                try(var objectLimiter = new ObjectLimiter(env, InventoryBucketTypeConstants.COMPONENT_VENDOR_NAME, InventoryBucketTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
6086                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6087
6088                    var inventoryBucketTypes = entities.stream()
6089                            .map(InventoryBucketTypeObject::new)
6090                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6091
6092                    data = new CountedObjects<>(objectLimiter, inventoryBucketTypes);
6093                }
6094            }
6095        } catch (NamingException ex) {
6096            throw new RuntimeException(ex);
6097        }
6098
6099        return data;
6100    }
6101
6102    @GraphQLField
6103    @GraphQLName("partyBucket")
6104    static PartyBucketObject partyBucket(final DataFetchingEnvironment env,
6105            @GraphQLName("partyName") final String partyName,
6106            @GraphQLName("companyName") final String companyName,
6107            @GraphQLName("warehouseName") final String warehouseName,
6108            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
6109            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName,
6110            @GraphQLName("inventoryConditionName") @GraphQLNonNull final String inventoryConditionName,
6111            @GraphQLName("inventoryBucketTypeName") @GraphQLNonNull final String inventoryBucketTypeName) {
6112        PartyBucket partyBucket;
6113
6114        try {
6115            var commandForm = InventoryUtil.getHome().getGetPartyBucketForm();
6116
6117            commandForm.setPartyName(partyName);
6118            commandForm.setCompanyName(companyName);
6119            commandForm.setWarehouseName(warehouseName);
6120            commandForm.setItemName(itemName);
6121            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
6122            commandForm.setInventoryConditionName(inventoryConditionName);
6123            commandForm.setInventoryBucketTypeName(inventoryBucketTypeName);
6124
6125            partyBucket = CDI.current().select(GetPartyBucketCommand.class).get()
6126                    .getEntityForGraphQl(getUserVisitPK(env), commandForm);
6127        } catch (NamingException ex) {
6128            throw new RuntimeException(ex);
6129        }
6130
6131        return partyBucket == null ? null : new PartyBucketObject(partyBucket);
6132    }
6133
6134    @GraphQLField
6135    @GraphQLName("partyBuckets")
6136    @GraphQLNonNull
6137    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6138    static CountingPaginatedData<PartyBucketObject> partyBuckets(final DataFetchingEnvironment env,
6139            @GraphQLName("partyName") final String partyName,
6140            @GraphQLName("companyName") final String companyName,
6141            @GraphQLName("warehouseName") final String warehouseName,
6142            @GraphQLName("itemName") final String itemName,
6143            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName,
6144            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
6145            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
6146            @GraphQLName("inventoryBucketTypeName") final String inventoryBucketTypeName) {
6147        CountingPaginatedData<PartyBucketObject> data;
6148
6149        try {
6150            var commandForm = InventoryUtil.getHome().getGetPartyBucketsForm();
6151            var command = CDI.current().select(GetPartyBucketsCommand.class).get();
6152
6153            commandForm.setPartyName(partyName);
6154            commandForm.setCompanyName(companyName);
6155            commandForm.setWarehouseName(warehouseName);
6156            commandForm.setItemName(itemName);
6157            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
6158            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
6159            commandForm.setInventoryConditionName(inventoryConditionName);
6160            commandForm.setInventoryBucketTypeName(inventoryBucketTypeName);
6161
6162            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6163            if(totalEntities == null) {
6164                data = Connections.emptyConnection();
6165            } else {
6166                try(var objectLimiter = new ObjectLimiter(env, PartyBucketConstants.COMPONENT_VENDOR_NAME,
6167                        PartyBucketConstants.ENTITY_TYPE_NAME, totalEntities)) {
6168                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6169                    var partyBuckets = entities.stream()
6170                            .map(PartyBucketObject::new)
6171                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6172
6173                    data = new CountedObjects<>(objectLimiter, partyBuckets);
6174                }
6175            }
6176        } catch (NamingException ex) {
6177            throw new RuntimeException(ex);
6178        }
6179
6180        return data;
6181    }
6182
6183    @GraphQLField
6184    @GraphQLName("lot")
6185    static LotObject lot(final DataFetchingEnvironment env,
6186            @GraphQLName("itemName") final String itemName,
6187            @GraphQLName("lotIdentifier") final String lotIdentifier,
6188            @GraphQLName("id") @GraphQLID final String id) {
6189        Lot lot;
6190
6191        try {
6192            var commandForm = InventoryUtil.getHome().getGetLotForm();
6193
6194            commandForm.setItemName(itemName);
6195            commandForm.setLotIdentifier(lotIdentifier);
6196            commandForm.setUuid(id);
6197
6198            lot = CDI.current().select(GetLotCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6199        } catch (NamingException ex) {
6200            throw new RuntimeException(ex);
6201        }
6202
6203        return lot == null ? null : new LotObject(lot);
6204    }
6205
6206    @GraphQLField
6207    @GraphQLName("lots")
6208    @GraphQLNonNull
6209    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6210    static CountingPaginatedData<LotObject> lots(final DataFetchingEnvironment env,
6211            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
6212        CountingPaginatedData<LotObject> data;
6213
6214        try {
6215            var commandForm = InventoryUtil.getHome().getGetLotsForm();
6216            var command = CDI.current().select(GetLotsCommand.class).get();
6217
6218            commandForm.setItemName(itemName);
6219
6220            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6221            if(totalEntities == null) {
6222                data = Connections.emptyConnection();
6223            } else {
6224                try(var objectLimiter = new ObjectLimiter(env, LotConstants.COMPONENT_VENDOR_NAME, LotConstants.ENTITY_TYPE_NAME, totalEntities)) {
6225                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6226
6227                    var lots = entities.stream()
6228                            .map(LotObject::new)
6229                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6230
6231                    data = new CountedObjects<>(objectLimiter, lots);
6232                }
6233            }
6234        } catch (NamingException ex) {
6235            throw new RuntimeException(ex);
6236        }
6237
6238        return data;
6239    }
6240
6241    @GraphQLField
6242    @GraphQLName("contentPageLayout")
6243    static ContentPageLayoutObject contentPageLayout(final DataFetchingEnvironment env,
6244            @GraphQLName("contentPageLayoutName") final String contentPageLayoutName,
6245            @GraphQLName("id") @GraphQLID final String id) {
6246        ContentPageLayout contentPageLayout;
6247
6248        try {
6249            var commandForm = ContentUtil.getHome().getGetContentPageLayoutForm();
6250
6251            commandForm.setContentPageLayoutName(contentPageLayoutName);
6252            commandForm.setUuid(id);
6253
6254            contentPageLayout = CDI.current().select(GetContentPageLayoutCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6255        } catch (NamingException ex) {
6256            throw new RuntimeException(ex);
6257        }
6258
6259        return contentPageLayout == null ? null : new ContentPageLayoutObject(contentPageLayout);
6260    }
6261
6262    @GraphQLField
6263    @GraphQLName("contentPageLayouts")
6264    @GraphQLNonNull
6265    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6266    static CountingPaginatedData<ContentPageLayoutObject> contentPageLayouts(final DataFetchingEnvironment env) {
6267        CountingPaginatedData<ContentPageLayoutObject> data;
6268
6269        try {
6270            var commandForm = ContentUtil.getHome().getGetContentPageLayoutsForm();
6271            var command = CDI.current().select(GetContentPageLayoutsCommand.class).get();
6272
6273            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6274            if(totalEntities == null) {
6275                data = Connections.emptyConnection();
6276            } else {
6277                try(var objectLimiter = new ObjectLimiter(env, ContentPageLayoutConstants.COMPONENT_VENDOR_NAME, ContentPageLayoutConstants.ENTITY_TYPE_NAME, totalEntities)) {
6278                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6279
6280                    var contentPageLayouts = entities.stream()
6281                            .map(ContentPageLayoutObject::new)
6282                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6283
6284                    data = new CountedObjects<>(objectLimiter, contentPageLayouts);
6285                }
6286            }
6287        } catch (NamingException ex) {
6288            throw new RuntimeException(ex);
6289        }
6290
6291        return data;
6292    }
6293
6294    @GraphQLField
6295    @GraphQLName("contentPageLayoutArea")
6296    static ContentPageLayoutAreaObject contentPageLayoutArea(final DataFetchingEnvironment env,
6297            @GraphQLName("contentCollectionName") @GraphQLNonNull final String contentCollectionName,
6298            @GraphQLName("contentSectionName") @GraphQLNonNull final String contentSectionName,
6299            @GraphQLName("contentPageName") @GraphQLNonNull final String contentPageName,
6300            @GraphQLName("sortOrder") @GraphQLNonNull final String sortOrder) {
6301        ContentPageLayoutArea contentPageLayoutArea;
6302
6303        try {
6304            var commandForm = ContentUtil.getHome().getGetContentPageLayoutAreaForm();
6305
6306            commandForm.setContentCollectionName(contentCollectionName);
6307            commandForm.setContentSectionName(contentSectionName);
6308            commandForm.setContentPageName(contentPageName);
6309            commandForm.setSortOrder(sortOrder);
6310
6311            contentPageLayoutArea = CDI.current().select(GetContentPageLayoutAreaCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6312        } catch (NamingException ex) {
6313            throw new RuntimeException(ex);
6314        }
6315
6316        return contentPageLayoutArea == null ? null : new ContentPageLayoutAreaObject(contentPageLayoutArea);
6317    }
6318
6319    @GraphQLField
6320    @GraphQLName("contentPageLayoutAreas")
6321    @GraphQLNonNull
6322    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6323    static CountingPaginatedData<ContentPageLayoutAreaObject> contentPageLayoutAreas(final DataFetchingEnvironment env,
6324            @GraphQLName("contentCollectionName") @GraphQLNonNull final String contentCollectionName,
6325            @GraphQLName("contentSectionName") @GraphQLNonNull final String contentSectionName,
6326            @GraphQLName("contentPageName") @GraphQLNonNull final String contentPageName) {
6327        CountingPaginatedData<ContentPageLayoutAreaObject> data;
6328
6329        try {
6330            var commandForm = ContentUtil.getHome().getGetContentPageLayoutAreasForm();
6331            var command = CDI.current().select(GetContentPageLayoutAreasCommand.class).get();
6332
6333
6334            commandForm.setContentCollectionName(contentCollectionName);
6335            commandForm.setContentSectionName(contentSectionName);
6336            commandForm.setContentPageName(contentPageName);
6337
6338            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6339            if(totalEntities == null) {
6340                data = Connections.emptyConnection();
6341            } else {
6342                try(var objectLimiter = new ObjectLimiter(env, ContentPageLayoutAreaConstants.COMPONENT_VENDOR_NAME, ContentPageLayoutAreaConstants.ENTITY_TYPE_NAME, totalEntities)) {
6343                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6344
6345                    var contentPageLayoutAreas = entities.stream()
6346                            .map(ContentPageLayoutAreaObject::new)
6347                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6348
6349                    data = new CountedObjects<>(objectLimiter, contentPageLayoutAreas);
6350                }
6351            }
6352        } catch (NamingException ex) {
6353            throw new RuntimeException(ex);
6354        }
6355
6356        return data;
6357    }
6358
6359    @GraphQLField
6360    @GraphQLName("contentPageAreaType")
6361    static ContentPageAreaTypeObject contentPageAreaType(final DataFetchingEnvironment env,
6362            @GraphQLName("contentPageAreaTypeName") final String contentPageAreaTypeName,
6363            @GraphQLName("id") @GraphQLID final String id) {
6364        ContentPageAreaType contentPageAreaType;
6365
6366        try {
6367            var commandForm = ContentUtil.getHome().getGetContentPageAreaTypeForm();
6368
6369            commandForm.setContentPageAreaTypeName(contentPageAreaTypeName);
6370            commandForm.setUuid(id);
6371
6372            contentPageAreaType = CDI.current().select(GetContentPageAreaTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6373        } catch (NamingException ex) {
6374            throw new RuntimeException(ex);
6375        }
6376
6377        return contentPageAreaType == null ? null : new ContentPageAreaTypeObject(contentPageAreaType);
6378    }
6379
6380    @GraphQLField
6381    @GraphQLName("contentPageAreaTypes")
6382    @GraphQLNonNull
6383    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6384    static CountingPaginatedData<ContentPageAreaTypeObject> contentPageAreaTypes(final DataFetchingEnvironment env) {
6385        CountingPaginatedData<ContentPageAreaTypeObject> data;
6386
6387        try {
6388            var commandForm = ContentUtil.getHome().getGetContentPageAreaTypesForm();
6389            var command = CDI.current().select(GetContentPageAreaTypesCommand.class).get();
6390
6391            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6392            if(totalEntities == null) {
6393                data = Connections.emptyConnection();
6394            } else {
6395                try(var objectLimiter = new ObjectLimiter(env, ContentPageAreaTypeConstants.COMPONENT_VENDOR_NAME, ContentPageAreaTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
6396                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6397
6398                    var contentPageAreaTypes = entities.stream()
6399                            .map(ContentPageAreaTypeObject::new)
6400                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6401
6402                    data = new CountedObjects<>(objectLimiter, contentPageAreaTypes);
6403                }
6404            }
6405        } catch (NamingException ex) {
6406            throw new RuntimeException(ex);
6407        }
6408
6409        return data;
6410    }
6411
6412    @GraphQLField
6413    @GraphQLName("contentWebAddress")
6414    static ContentWebAddressObject contentWebAddress(final DataFetchingEnvironment env,
6415            @GraphQLName("contentWebAddressName") @GraphQLNonNull final String contentWebAddressName) {
6416        ContentWebAddress contentWebAddress;
6417
6418        try {
6419            var commandForm = ContentUtil.getHome().getGetContentWebAddressForm();
6420
6421            commandForm.setContentWebAddressName(contentWebAddressName);
6422
6423            contentWebAddress = CDI.current().select(GetContentWebAddressCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6424        } catch (NamingException ex) {
6425            throw new RuntimeException(ex);
6426        }
6427
6428        return contentWebAddress == null ? null : new ContentWebAddressObject(contentWebAddress);
6429    }
6430
6431    @GraphQLField
6432    @GraphQLName("contentWebAddresses")
6433    @GraphQLNonNull
6434    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6435    static CountingPaginatedData<ContentWebAddressObject> contentWebAddresses(final DataFetchingEnvironment env) {
6436        CountingPaginatedData<ContentWebAddressObject> data;
6437
6438        try {
6439            var commandForm = ContentUtil.getHome().getGetContentWebAddressesForm();
6440            var command = CDI.current().select(GetContentWebAddressesCommand.class).get();
6441
6442            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6443            if(totalEntities == null) {
6444                data = Connections.emptyConnection();
6445            } else {
6446                try(var objectLimiter = new ObjectLimiter(env, ContentWebAddressConstants.COMPONENT_VENDOR_NAME, ContentWebAddressConstants.ENTITY_TYPE_NAME, totalEntities)) {
6447                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6448
6449                    var contentWebAddresses = entities.stream()
6450                            .map(ContentWebAddressObject::new)
6451                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6452
6453                    data = new CountedObjects<>(objectLimiter, contentWebAddresses);
6454                }
6455            }
6456        } catch (NamingException ex) {
6457            throw new RuntimeException(ex);
6458        }
6459
6460        return data;
6461    }
6462
6463    @GraphQLField
6464    @GraphQLName("contentCollection")
6465    static ContentCollectionObject contentCollection(final DataFetchingEnvironment env,
6466            @GraphQLName("contentCollectionName") final String contentCollectionName) {
6467        ContentCollection contentCollection;
6468
6469        try {
6470            var commandForm = ContentUtil.getHome().getGetContentCollectionForm();
6471
6472            commandForm.setContentCollectionName(contentCollectionName);
6473
6474            contentCollection = CDI.current().select(GetContentCollectionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6475        } catch (NamingException ex) {
6476            throw new RuntimeException(ex);
6477        }
6478
6479        return contentCollection == null ? null : new ContentCollectionObject(contentCollection);
6480    }
6481
6482    @GraphQLField
6483    @GraphQLName("contentCollections")
6484    @GraphQLNonNull
6485    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6486    static CountingPaginatedData<ContentCollectionObject> contentCollections(final DataFetchingEnvironment env) {
6487        CountingPaginatedData<ContentCollectionObject> data;
6488
6489        try {
6490            var commandForm = ContentUtil.getHome().getGetContentCollectionsForm();
6491            var command = CDI.current().select(GetContentCollectionsCommand.class).get();
6492
6493            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6494            if(totalEntities == null) {
6495                data = Connections.emptyConnection();
6496            } else {
6497                try(var objectLimiter = new ObjectLimiter(env, ContentCollectionConstants.COMPONENT_VENDOR_NAME, ContentCollectionConstants.ENTITY_TYPE_NAME, totalEntities)) {
6498                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6499
6500                    var contentCollections = entities.stream()
6501                            .map(ContentCollectionObject::new)
6502                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6503
6504                    data = new CountedObjects<>(objectLimiter, contentCollections);
6505                }
6506            }
6507        } catch (NamingException ex) {
6508            throw new RuntimeException(ex);
6509        }
6510
6511        return data;
6512    }
6513    
6514    @GraphQLField
6515    @GraphQLName("contentSection")
6516    static ContentSectionObject contentSection(final DataFetchingEnvironment env,
6517            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6518            @GraphQLName("contentCollectionName") final String contentCollectionName,
6519            @GraphQLName("contentSectionName") final String contentSectionName,
6520            @GraphQLName("associateProgramName") final String associateProgramName,
6521            @GraphQLName("associateName") final String associateName,
6522            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6523        ContentSection contentSection;
6524
6525        try {
6526            var commandForm = ContentUtil.getHome().getGetContentSectionForm();
6527
6528            commandForm.setContentWebAddressName(contentWebAddressName);
6529            commandForm.setContentCollectionName(contentCollectionName);
6530            commandForm.setContentSectionName(contentSectionName);
6531            commandForm.setAssociateProgramName(associateProgramName);
6532            commandForm.setAssociateName(associateName);
6533            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6534
6535            contentSection = CDI.current().select(GetContentSectionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6536        } catch (NamingException ex) {
6537            throw new RuntimeException(ex);
6538        }
6539
6540        return contentSection == null ? null : new ContentSectionObject(contentSection);
6541    }
6542
6543    @GraphQLField
6544    @GraphQLName("contentSections")
6545    @GraphQLNonNull
6546    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6547    static CountingPaginatedData<ContentSectionObject> contentSections(final DataFetchingEnvironment env,
6548            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6549            @GraphQLName("contentCollectionName") final String contentCollectionName,
6550            @GraphQLName("parentContentSectionName") final String parentContentSectionName,
6551            @GraphQLName("associateProgramName") final String associateProgramName,
6552            @GraphQLName("associateName") final String associateName,
6553            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6554        CountingPaginatedData<ContentSectionObject> data;
6555
6556        try {
6557            var commandForm = ContentUtil.getHome().getGetContentSectionsForm();
6558            var command = CDI.current().select(GetContentSectionsCommand.class).get();
6559
6560            commandForm.setContentWebAddressName(contentWebAddressName);
6561            commandForm.setContentCollectionName(contentCollectionName);
6562            commandForm.setParentContentSectionName(parentContentSectionName);
6563            commandForm.setAssociateProgramName(associateProgramName);
6564            commandForm.setAssociateName(associateName);
6565            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6566
6567            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6568            if(totalEntities == null) {
6569                data = Connections.emptyConnection();
6570            } else {
6571                try(var objectLimiter = new ObjectLimiter(env, ContentSectionConstants.COMPONENT_VENDOR_NAME, ContentSectionConstants.ENTITY_TYPE_NAME, totalEntities)) {
6572                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6573
6574                    var contentSections = entities.stream()
6575                            .map(ContentSectionObject::new)
6576                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6577
6578                    data = new CountedObjects<>(objectLimiter, contentSections);
6579                }
6580            }
6581        } catch (NamingException ex) {
6582            throw new RuntimeException(ex);
6583        }
6584
6585        return data;
6586    }
6587
6588    @GraphQLField
6589    @GraphQLName("contentPage")
6590    static ContentPageObject contentPage(final DataFetchingEnvironment env,
6591            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6592            @GraphQLName("contentCollectionName") final String contentCollectionName,
6593            @GraphQLName("contentSectionName") final String contentSectionName,
6594            @GraphQLName("contentPageName") final String contentPageName,
6595            @GraphQLName("associateProgramName") final String associateProgramName,
6596            @GraphQLName("associateName") final String associateName,
6597            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6598        ContentPage contentPage;
6599
6600        try {
6601            var commandForm = ContentUtil.getHome().getGetContentPageForm();
6602
6603            commandForm.setContentWebAddressName(contentWebAddressName);
6604            commandForm.setContentCollectionName(contentCollectionName);
6605            commandForm.setContentSectionName(contentSectionName);
6606            commandForm.setContentPageName(contentPageName);
6607            commandForm.setAssociateProgramName(associateProgramName);
6608            commandForm.setAssociateName(associateName);
6609            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6610
6611            contentPage = CDI.current().select(GetContentPageCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6612        } catch (NamingException ex) {
6613            throw new RuntimeException(ex);
6614        }
6615
6616        return contentPage == null ? null : new ContentPageObject(contentPage);
6617    }
6618
6619    @GraphQLField
6620    @GraphQLName("contentPages")
6621    @GraphQLNonNull
6622    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6623    static CountingPaginatedData<ContentPageObject> contentPages(final DataFetchingEnvironment env,
6624            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6625            @GraphQLName("contentCollectionName") final String contentCollectionName,
6626            @GraphQLName("contentSectionName") final String contentSectionName,
6627            @GraphQLName("associateProgramName") final String associateProgramName,
6628            @GraphQLName("associateName") final String associateName,
6629            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6630        CountingPaginatedData<ContentPageObject> data;
6631
6632        try {
6633            var commandForm = ContentUtil.getHome().getGetContentPagesForm();
6634            var command = CDI.current().select(GetContentPagesCommand.class).get();
6635
6636            commandForm.setContentWebAddressName(contentWebAddressName);
6637            commandForm.setContentCollectionName(contentCollectionName);
6638            commandForm.setContentSectionName(contentSectionName);
6639            commandForm.setAssociateProgramName(associateProgramName);
6640            commandForm.setAssociateName(associateName);
6641            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6642
6643            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6644            if(totalEntities == null) {
6645                data = Connections.emptyConnection();
6646            } else {
6647                try(var objectLimiter = new ObjectLimiter(env, ContentPageConstants.COMPONENT_VENDOR_NAME, ContentPageConstants.ENTITY_TYPE_NAME, totalEntities)) {
6648                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6649
6650                    var contentPages = entities.stream()
6651                            .map(ContentPageObject::new)
6652                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6653
6654                    data = new CountedObjects<>(objectLimiter, contentPages);
6655                }
6656            }
6657        } catch (NamingException ex) {
6658            throw new RuntimeException(ex);
6659        }
6660
6661        return data;
6662    }
6663
6664    @GraphQLField
6665    @GraphQLName("contentPageArea")
6666    static ContentPageAreaObject contentPageArea(final DataFetchingEnvironment env,
6667            @GraphQLName("contentCollectionName") @GraphQLNonNull final String contentCollectionName,
6668            @GraphQLName("contentSectionName") @GraphQLNonNull final String contentSectionName,
6669            @GraphQLName("contentPageName") @GraphQLNonNull final String contentPageName,
6670            @GraphQLName("sortOrder") @GraphQLNonNull final String sortOrder,
6671            @GraphQLName("languageIsoName") @GraphQLNonNull final String languageIsoName) {
6672        ContentPageArea contentPageArea;
6673
6674        try {
6675            var commandForm = ContentUtil.getHome().getGetContentPageAreaForm();
6676
6677            commandForm.setContentCollectionName(contentCollectionName);
6678            commandForm.setContentSectionName(contentSectionName);
6679            commandForm.setContentPageName(contentPageName);
6680            commandForm.setSortOrder(sortOrder);
6681            commandForm.setLanguageIsoName(languageIsoName);
6682
6683            contentPageArea = CDI.current().select(GetContentPageAreaCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6684        } catch (NamingException ex) {
6685            throw new RuntimeException(ex);
6686        }
6687
6688        return contentPageArea == null ? null : new ContentPageAreaObject(contentPageArea);
6689    }
6690
6691    @GraphQLField
6692    @GraphQLName("contentPageAreas")
6693    @GraphQLNonNull
6694    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6695    static CountingPaginatedData<ContentPageAreaObject> contentPageAreas(final DataFetchingEnvironment env,
6696            @GraphQLName("contentCollectionName") @GraphQLNonNull final String contentCollectionName,
6697            @GraphQLName("contentSectionName") @GraphQLNonNull final String contentSectionName,
6698            @GraphQLName("contentPageName") @GraphQLNonNull final String contentPageName) {
6699        CountingPaginatedData<ContentPageAreaObject> data;
6700
6701        try {
6702            var commandForm = ContentUtil.getHome().getGetContentPageAreasForm();
6703            var command = CDI.current().select(GetContentPageAreasCommand.class).get();
6704
6705
6706            commandForm.setContentCollectionName(contentCollectionName);
6707            commandForm.setContentSectionName(contentSectionName);
6708            commandForm.setContentPageName(contentPageName);
6709
6710            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6711            if(totalEntities == null) {
6712                data = Connections.emptyConnection();
6713            } else {
6714                try(var objectLimiter = new ObjectLimiter(env, ContentPageAreaConstants.COMPONENT_VENDOR_NAME, ContentPageAreaConstants.ENTITY_TYPE_NAME, totalEntities)) {
6715                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6716
6717                    var contentPageAreas = entities.stream()
6718                            .map(ContentPageAreaObject::new)
6719                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6720
6721                    data = new CountedObjects<>(objectLimiter, contentPageAreas);
6722                }
6723            }
6724        } catch (NamingException ex) {
6725            throw new RuntimeException(ex);
6726        }
6727
6728        return data;
6729    }
6730
6731
6732    @GraphQLField
6733    @GraphQLName("contentCatalog")
6734    static ContentCatalogObject contentCatalog(final DataFetchingEnvironment env,
6735            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6736            @GraphQLName("contentCollectionName") final String contentCollectionName,
6737            @GraphQLName("contentCatalogName") final String contentCatalogName,
6738            @GraphQLName("associateProgramName") final String associateProgramName,
6739            @GraphQLName("associateName") final String associateName,
6740            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6741        ContentCatalog contentCatalog;
6742
6743        try {
6744            var commandForm = ContentUtil.getHome().getGetContentCatalogForm();
6745
6746            commandForm.setContentWebAddressName(contentWebAddressName);
6747            commandForm.setContentCollectionName(contentCollectionName);
6748            commandForm.setContentCatalogName(contentCatalogName);
6749            commandForm.setAssociateProgramName(associateProgramName);
6750            commandForm.setAssociateName(associateName);
6751            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6752
6753            contentCatalog = CDI.current().select(GetContentCatalogCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6754        } catch (NamingException ex) {
6755            throw new RuntimeException(ex);
6756        }
6757
6758        return contentCatalog == null ? null : new ContentCatalogObject(contentCatalog);
6759    }
6760
6761    @GraphQLField
6762    @GraphQLName("contentCatalogs")
6763    @GraphQLNonNull
6764    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6765    static CountingPaginatedData<ContentCatalogObject> contentCatalogs(final DataFetchingEnvironment env,
6766            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6767            @GraphQLName("contentCollectionName") final String contentCollectionName,
6768            @GraphQLName("associateProgramName") final String associateProgramName,
6769            @GraphQLName("associateName") final String associateName,
6770            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6771        CountingPaginatedData<ContentCatalogObject> data;
6772
6773        try {
6774            var commandForm = ContentUtil.getHome().getGetContentCatalogsForm();
6775            var command = CDI.current().select(GetContentCatalogsCommand.class).get();
6776
6777            commandForm.setContentWebAddressName(contentWebAddressName);
6778            commandForm.setContentCollectionName(contentCollectionName);
6779            commandForm.setAssociateProgramName(associateProgramName);
6780            commandForm.setAssociateName(associateName);
6781            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6782
6783            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6784            if(totalEntities == null) {
6785                data = Connections.emptyConnection();
6786            } else {
6787                try(var objectLimiter = new ObjectLimiter(env, ContentCatalogConstants.COMPONENT_VENDOR_NAME, ContentCatalogConstants.ENTITY_TYPE_NAME, totalEntities)) {
6788                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6789
6790                    var contentCatalogs = entities.stream()
6791                            .map(ContentCatalogObject::new)
6792                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6793
6794                    data = new CountedObjects<>(objectLimiter, contentCatalogs);
6795                }
6796            }
6797        } catch (NamingException ex) {
6798            throw new RuntimeException(ex);
6799        }
6800
6801        return data;
6802    }
6803
6804    @GraphQLField
6805    @GraphQLName("contentCatalogItem")
6806    static ContentCatalogItemObject contentCatalogItem(final DataFetchingEnvironment env,
6807            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6808            @GraphQLName("contentCollectionName") final String contentCollectionName,
6809            @GraphQLName("contentCatalogName") final String contentCatalogName,
6810            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
6811            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
6812            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
6813            @GraphQLName("currencyIsoName") final String currencyIsoName,
6814            @GraphQLName("associateProgramName") final String associateProgramName,
6815            @GraphQLName("associateName") final String associateName,
6816            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6817        ContentCatalogItem contentCatalogItem;
6818
6819        try {
6820            var commandForm = ContentUtil.getHome().getGetContentCatalogItemForm();
6821
6822            commandForm.setContentWebAddressName(contentWebAddressName);
6823            commandForm.setContentCollectionName(contentCollectionName);
6824            commandForm.setContentCatalogName(contentCatalogName);
6825            commandForm.setItemName(itemName);
6826            commandForm.setInventoryConditionName(inventoryConditionName);
6827            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
6828            commandForm.setCurrencyIsoName(currencyIsoName);
6829            commandForm.setAssociateProgramName(associateProgramName);
6830            commandForm.setAssociateName(associateName);
6831            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6832
6833            contentCatalogItem = CDI.current().select(GetContentCatalogItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6834        } catch (NamingException ex) {
6835            throw new RuntimeException(ex);
6836        }
6837
6838        return contentCatalogItem == null ? null : new ContentCatalogItemObject(contentCatalogItem);
6839    }
6840
6841    @GraphQLField
6842    @GraphQLName("contentCatalogItems")
6843    @GraphQLNonNull
6844    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6845    static CountingPaginatedData<ContentCatalogItemObject> contentCatalogItems(final DataFetchingEnvironment env,
6846            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6847            @GraphQLName("contentCollectionName") final String contentCollectionName,
6848            @GraphQLName("contentCatalogName") final String contentCatalogName,
6849            @GraphQLName("associateProgramName") final String associateProgramName,
6850            @GraphQLName("associateName") final String associateName,
6851            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6852        CountingPaginatedData<ContentCatalogItemObject> data;
6853
6854        try {
6855            var commandForm = ContentUtil.getHome().getGetContentCatalogItemsForm();
6856            var command = CDI.current().select(GetContentCatalogItemsCommand.class).get();
6857
6858            commandForm.setContentWebAddressName(contentWebAddressName);
6859            commandForm.setContentCollectionName(contentCollectionName);
6860            commandForm.setContentCatalogName(contentCatalogName);
6861            commandForm.setAssociateProgramName(associateProgramName);
6862            commandForm.setAssociateName(associateName);
6863            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6864
6865            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6866            if(totalEntities == null) {
6867                data = Connections.emptyConnection();
6868            } else {
6869                try(var objectLimiter = new ObjectLimiter(env, ContentCatalogItemConstants.COMPONENT_VENDOR_NAME, ContentCatalogItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
6870                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6871
6872                    var contentCatalogItems = entities.stream()
6873                            .map(ContentCatalogItemObject::new)
6874                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6875
6876                    data = new CountedObjects<>(objectLimiter, contentCatalogItems);
6877                }
6878            }
6879        } catch (NamingException ex) {
6880            throw new RuntimeException(ex);
6881        }
6882
6883        return data;
6884    }
6885
6886    @GraphQLField
6887    @GraphQLName("contentCategory")
6888    static ContentCategoryObject contentCategory(final DataFetchingEnvironment env,
6889            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6890            @GraphQLName("contentCollectionName") final String contentCollectionName,
6891            @GraphQLName("contentCatalogName") final String contentCatalogName,
6892            @GraphQLName("contentCategoryName") final String contentCategoryName,
6893            @GraphQLName("associateProgramName") final String associateProgramName,
6894            @GraphQLName("associateName") final String associateName,
6895            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6896        ContentCategory contentCategory;
6897
6898        try {
6899            var commandForm = ContentUtil.getHome().getGetContentCategoryForm();
6900
6901            commandForm.setContentWebAddressName(contentWebAddressName);
6902            commandForm.setContentCollectionName(contentCollectionName);
6903            commandForm.setContentCatalogName(contentCatalogName);
6904            commandForm.setContentCategoryName(contentCategoryName);
6905            commandForm.setAssociateProgramName(associateProgramName);
6906            commandForm.setAssociateName(associateName);
6907            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6908
6909            contentCategory = CDI.current().select(GetContentCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6910        } catch (NamingException ex) {
6911            throw new RuntimeException(ex);
6912        }
6913
6914        return contentCategory == null ? null : new ContentCategoryObject(contentCategory);
6915    }
6916
6917    @GraphQLField
6918    @GraphQLName("contentCategories")
6919    @GraphQLNonNull
6920    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6921    static CountingPaginatedData<ContentCategoryObject> contentCategories(final DataFetchingEnvironment env,
6922            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6923            @GraphQLName("contentCollectionName") final String contentCollectionName,
6924            @GraphQLName("contentCatalogName") final String contentCatalogName,
6925            @GraphQLName("parentContentCategoryName") final String parentContentCategoryName,
6926            @GraphQLName("associateProgramName") final String associateProgramName,
6927            @GraphQLName("associateName") final String associateName,
6928            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6929        CountingPaginatedData<ContentCategoryObject> data;
6930
6931        try {
6932            var commandForm = ContentUtil.getHome().getGetContentCategoriesForm();
6933            var command = CDI.current().select(GetContentCategoriesCommand.class).get();
6934
6935            commandForm.setContentWebAddressName(contentWebAddressName);
6936            commandForm.setContentCollectionName(contentCollectionName);
6937            commandForm.setContentCatalogName(contentCatalogName);
6938            commandForm.setParentContentCategoryName(parentContentCategoryName);
6939            commandForm.setAssociateProgramName(associateProgramName);
6940            commandForm.setAssociateName(associateName);
6941            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6942
6943            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6944            if(totalEntities == null) {
6945                data = Connections.emptyConnection();
6946            } else {
6947                try(var objectLimiter = new ObjectLimiter(env, ContentCategoryConstants.COMPONENT_VENDOR_NAME, ContentCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
6948                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6949
6950                    var contentCategories = entities.stream()
6951                            .map(ContentCategoryObject::new)
6952                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6953
6954                    data = new CountedObjects<>(objectLimiter, contentCategories);
6955                }
6956            }
6957        } catch (NamingException ex) {
6958            throw new RuntimeException(ex);
6959        }
6960
6961        return data;
6962    }
6963
6964    @GraphQLField
6965    @GraphQLName("contentCategoryItem")
6966    static ContentCategoryItemObject contentCategoryItem(final DataFetchingEnvironment env,
6967            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6968            @GraphQLName("contentCollectionName") final String contentCollectionName,
6969            @GraphQLName("contentCatalogName") final String contentCatalogName,
6970            @GraphQLName("contentCategoryName") final String contentCategoryName,
6971            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
6972            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
6973            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
6974            @GraphQLName("currencyIsoName") final String currencyIsoName,
6975            @GraphQLName("associateProgramName") final String associateProgramName,
6976            @GraphQLName("associateName") final String associateName,
6977            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6978        ContentCategoryItem contentCategoryItem;
6979
6980        try {
6981            var commandForm = ContentUtil.getHome().getGetContentCategoryItemForm();
6982
6983            commandForm.setContentWebAddressName(contentWebAddressName);
6984            commandForm.setContentCollectionName(contentCollectionName);
6985            commandForm.setContentCatalogName(contentCatalogName);
6986            commandForm.setContentCategoryName(contentCategoryName);
6987            commandForm.setItemName(itemName);
6988            commandForm.setInventoryConditionName(inventoryConditionName);
6989            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
6990            commandForm.setCurrencyIsoName(currencyIsoName);
6991            commandForm.setAssociateProgramName(associateProgramName);
6992            commandForm.setAssociateName(associateName);
6993            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6994
6995            contentCategoryItem = CDI.current().select(GetContentCategoryItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6996        } catch (NamingException ex) {
6997            throw new RuntimeException(ex);
6998        }
6999
7000        return contentCategoryItem == null ? null : new ContentCategoryItemObject(contentCategoryItem);
7001    }
7002
7003    @GraphQLField
7004    @GraphQLName("contentCategoryItems")
7005    @GraphQLNonNull
7006    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7007    static CountingPaginatedData<ContentCategoryItemObject> contentCategoryItems(final DataFetchingEnvironment env,
7008            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
7009            @GraphQLName("contentCollectionName") final String contentCollectionName,
7010            @GraphQLName("contentCatalogName") final String contentCatalogName,
7011            @GraphQLName("contentCategoryName") final String contentCategoryName,
7012            @GraphQLName("associateProgramName") final String associateProgramName,
7013            @GraphQLName("associateName") final String associateName,
7014            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
7015        CountingPaginatedData<ContentCategoryItemObject> data;
7016
7017        try {
7018            var commandForm = ContentUtil.getHome().getGetContentCategoryItemsForm();
7019            var command = CDI.current().select(GetContentCategoryItemsCommand.class).get();
7020
7021            commandForm.setContentWebAddressName(contentWebAddressName);
7022            commandForm.setContentCollectionName(contentCollectionName);
7023            commandForm.setContentCatalogName(contentCatalogName);
7024            commandForm.setContentCategoryName(contentCategoryName);
7025            commandForm.setAssociateProgramName(associateProgramName);
7026            commandForm.setAssociateName(associateName);
7027            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
7028
7029            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7030            if(totalEntities == null) {
7031                data = Connections.emptyConnection();
7032            } else {
7033                try(var objectLimiter = new ObjectLimiter(env, ContentCategoryItemConstants.COMPONENT_VENDOR_NAME, ContentCategoryItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
7034                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7035
7036                    var contentCategoryItems = entities.stream()
7037                            .map(ContentCategoryItemObject::new)
7038                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7039
7040                    data = new CountedObjects<>(objectLimiter, contentCategoryItems);
7041                }
7042            }
7043        } catch (NamingException ex) {
7044            throw new RuntimeException(ex);
7045        }
7046
7047        return data;
7048    }
7049
7050    @GraphQLField
7051    @GraphQLName("mimeTypeFileExtension")
7052    static MimeTypeFileExtensionObject mimeTypeFileExtension(final DataFetchingEnvironment env,
7053            @GraphQLName("fileExtension") @GraphQLNonNull final String fileExtension) {
7054        MimeTypeFileExtension mimeTypeFileExtension;
7055
7056        try {
7057            var commandForm = CoreUtil.getHome().getGetMimeTypeFileExtensionForm();
7058
7059            commandForm.setFileExtension(fileExtension);
7060
7061            mimeTypeFileExtension = CDI.current().select(GetMimeTypeFileExtensionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7062        } catch (NamingException ex) {
7063            throw new RuntimeException(ex);
7064        }
7065
7066        return mimeTypeFileExtension == null ? null : new MimeTypeFileExtensionObject(mimeTypeFileExtension);
7067    }
7068
7069    @GraphQLField
7070    @GraphQLName("mimeTypeFileExtensions")
7071    @GraphQLNonNull
7072    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7073    static CountingPaginatedData<MimeTypeFileExtensionObject> mimeTypeFileExtensions(final DataFetchingEnvironment env) {
7074        CountingPaginatedData<MimeTypeFileExtensionObject> data;
7075
7076        try {
7077            var commandForm = CoreUtil.getHome().getGetMimeTypeFileExtensionsForm();
7078            var command = CDI.current().select(GetMimeTypeFileExtensionsCommand.class).get();
7079
7080            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7081            if(totalEntities == null) {
7082                data = Connections.emptyConnection();
7083            } else {
7084                try(var objectLimiter = new ObjectLimiter(env, MimeTypeFileExtensionConstants.COMPONENT_VENDOR_NAME, MimeTypeFileExtensionConstants.ENTITY_TYPE_NAME, totalEntities)) {
7085                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7086                    var mimeTypeFileExtensionObjects = entities.stream().map(MimeTypeFileExtensionObject::new).collect(Collectors.toList());
7087
7088                    data = new CountedObjects<>(objectLimiter, mimeTypeFileExtensionObjects);
7089                }
7090            }
7091        } catch (NamingException ex) {
7092            throw new RuntimeException(ex);
7093        }
7094
7095        return data;
7096    }
7097
7098    @GraphQLField
7099    @GraphQLName("mimeTypeUsageType")
7100    static MimeTypeUsageTypeObject mimeTypeUsageType(final DataFetchingEnvironment env,
7101            @GraphQLName("mimeTypeUsageTypeName") @GraphQLNonNull final String mimeTypeUsageTypeName) {
7102        MimeTypeUsageType mimeTypeUsageType;
7103
7104        try {
7105            var commandForm = CoreUtil.getHome().getGetMimeTypeUsageTypeForm();
7106
7107            commandForm.setMimeTypeUsageTypeName(mimeTypeUsageTypeName);
7108
7109            mimeTypeUsageType = CDI.current().select(GetMimeTypeUsageTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7110        } catch (NamingException ex) {
7111            throw new RuntimeException(ex);
7112        }
7113
7114        return mimeTypeUsageType == null ? null : new MimeTypeUsageTypeObject(mimeTypeUsageType);
7115    }
7116
7117    @GraphQLField
7118    @GraphQLName("mimeTypeUsageTypes")
7119    @GraphQLNonNull
7120    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7121    static CountingPaginatedData<MimeTypeUsageTypeObject> mimeTypeUsageTypes(final DataFetchingEnvironment env) {
7122        CountingPaginatedData<MimeTypeUsageTypeObject> data;
7123
7124        try {
7125            var commandForm = CoreUtil.getHome().getGetMimeTypeUsageTypesForm();
7126            var command = CDI.current().select(GetMimeTypeUsageTypesCommand.class).get();
7127
7128            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7129            if(totalEntities == null) {
7130                data = Connections.emptyConnection();
7131            } else {
7132                try(var objectLimiter = new ObjectLimiter(env, com.echothree.model.data.core.common.MimeTypeUsageTypeConstants.COMPONENT_VENDOR_NAME, com.echothree.model.data.core.common.MimeTypeUsageTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
7133                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7134
7135                    var mimeTypeUsageTypes = entities.stream()
7136                            .map(MimeTypeUsageTypeObject::new)
7137                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7138
7139                    data = new CountedObjects<>(objectLimiter, mimeTypeUsageTypes);
7140                }
7141            }
7142        } catch (NamingException ex) {
7143            throw new RuntimeException(ex);
7144        }
7145
7146        return data;
7147    }
7148
7149    @GraphQLField
7150    @GraphQLName("mimeType")
7151    static MimeTypeObject mimeType(final DataFetchingEnvironment env,
7152            @GraphQLName("mimeTypeName") @GraphQLNonNull final String mimeTypeName) {
7153        MimeType mimeType;
7154
7155        try {
7156            var commandForm = CoreUtil.getHome().getGetMimeTypeForm();
7157
7158            commandForm.setMimeTypeName(mimeTypeName);
7159
7160            mimeType = CDI.current().select(GetMimeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7161        } catch (NamingException ex) {
7162            throw new RuntimeException(ex);
7163        }
7164
7165        return mimeType == null ? null : new MimeTypeObject(mimeType);
7166    }
7167
7168    @GraphQLField
7169    @GraphQLName("mimeTypes")
7170    @GraphQLNonNull
7171    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7172    static CountingPaginatedData<MimeTypeObject> mimeTypes(final DataFetchingEnvironment env,
7173            @GraphQLName("mimeTypeUsageTypeName") final String mimeTypeUsageTypeName) {
7174        CountingPaginatedData<MimeTypeObject> data;
7175
7176        try {
7177            var commandForm = CoreUtil.getHome().getGetMimeTypesForm();
7178            var command = CDI.current().select(GetMimeTypesCommand.class).get();
7179
7180            commandForm.setMimeTypeUsageTypeName(mimeTypeUsageTypeName);
7181
7182            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7183            if(totalEntities == null) {
7184                data = Connections.emptyConnection();
7185            } else {
7186                try(var objectLimiter = new ObjectLimiter(env, MimeTypeConstants.COMPONENT_VENDOR_NAME, MimeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
7187                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7188
7189                    var mimeTypes = entities.stream()
7190                            .map(MimeTypeObject::new)
7191                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7192
7193                    data = new CountedObjects<>(objectLimiter, mimeTypes);
7194                }
7195            }
7196        } catch (NamingException ex) {
7197            throw new RuntimeException(ex);
7198        }
7199
7200        return data;
7201    }
7202
7203    @GraphQLField
7204    @GraphQLName("queueType")
7205    static QueueTypeObject queueType(final DataFetchingEnvironment env,
7206            @GraphQLName("queueTypeName") @GraphQLNonNull final String queueTypeName) {
7207        QueueType queueType;
7208
7209        try {
7210            var commandForm = QueueUtil.getHome().getGetQueueTypeForm();
7211
7212            commandForm.setQueueTypeName(queueTypeName);
7213
7214            queueType = CDI.current().select(GetQueueTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7215        } catch (NamingException ex) {
7216            throw new RuntimeException(ex);
7217        }
7218
7219        return queueType == null ? null : new QueueTypeObject(queueType);
7220    }
7221
7222    @GraphQLField
7223    @GraphQLName("queueTypes")
7224    @GraphQLNonNull
7225    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7226    static CountingPaginatedData<QueueTypeObject> queueTypes(final DataFetchingEnvironment env) {
7227        CountingPaginatedData<QueueTypeObject> data;
7228
7229        try {
7230            var commandForm = QueueUtil.getHome().getGetQueueTypesForm();
7231            var command = CDI.current().select(GetQueueTypesCommand.class).get();
7232
7233            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7234            if(totalEntities == null) {
7235                data = Connections.emptyConnection();
7236            } else {
7237                try(var objectLimiter = new ObjectLimiter(env, QueueTypeConstants.COMPONENT_VENDOR_NAME, QueueTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
7238                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7239
7240                    var queueTypes = entities.stream()
7241                            .map(QueueTypeObject::new)
7242                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7243
7244                    data = new CountedObjects<>(objectLimiter, queueTypes);
7245                }
7246            }
7247        } catch (NamingException ex) {
7248            throw new RuntimeException(ex);
7249        }
7250
7251        return data;
7252    }
7253
7254    @GraphQLField
7255    @GraphQLName("unitOfMeasureKindUse")
7256    static UnitOfMeasureKindUseObject unitOfMeasureKindUse(final DataFetchingEnvironment env,
7257            @GraphQLName("unitOfMeasureKindUseTypeName") @GraphQLNonNull final String unitOfMeasureKindUseTypeName,
7258            @GraphQLName("unitOfMeasureKindName") @GraphQLNonNull final String unitOfMeasureKindName) {
7259        UnitOfMeasureKindUse unitOfMeasureKindUse;
7260
7261        try {
7262            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindUseForm();
7263
7264            commandForm.setUnitOfMeasureKindUseTypeName(unitOfMeasureKindUseTypeName);
7265            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
7266
7267            unitOfMeasureKindUse = CDI.current().select(GetUnitOfMeasureKindUseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7268        } catch (NamingException ex) {
7269            throw new RuntimeException(ex);
7270        }
7271
7272        return unitOfMeasureKindUse == null ? null : new UnitOfMeasureKindUseObject(unitOfMeasureKindUse);
7273    }
7274
7275    @GraphQLField
7276    @GraphQLName("unitOfMeasureKindUses")
7277    @GraphQLNonNull
7278    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7279    static CountingPaginatedData<UnitOfMeasureKindUseObject> unitOfMeasureKindUses(final DataFetchingEnvironment env,
7280            @GraphQLName("unitOfMeasureKindUseTypeName") final String unitOfMeasureKindUseTypeName,
7281            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName) {
7282        CountingPaginatedData<UnitOfMeasureKindUseObject> data;
7283
7284        try {
7285            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindUsesForm();
7286            var command = CDI.current().select(GetUnitOfMeasureKindUsesCommand.class).get();
7287
7288            commandForm.setUnitOfMeasureKindUseTypeName(unitOfMeasureKindUseTypeName);
7289            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
7290
7291            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7292            if(totalEntities == null) {
7293                data = Connections.emptyConnection();
7294            } else {
7295                try(var objectLimiter = new ObjectLimiter(env, UnitOfMeasureKindUseConstants.COMPONENT_VENDOR_NAME, UnitOfMeasureKindUseConstants.ENTITY_TYPE_NAME, totalEntities)) {
7296                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7297
7298                    var unitOfMeasureKindUses = entities.stream()
7299                            .map(UnitOfMeasureKindUseObject::new)
7300                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7301
7302                    data = new CountedObjects<>(objectLimiter, unitOfMeasureKindUses);
7303                }
7304            }
7305        } catch (NamingException ex) {
7306            throw new RuntimeException(ex);
7307        }
7308
7309        return data;
7310    }
7311
7312    @GraphQLField
7313    @GraphQLName("unitOfMeasureType")
7314    static UnitOfMeasureTypeObject unitOfMeasureType(final DataFetchingEnvironment env,
7315            @GraphQLName("unitOfMeasureKindName") @GraphQLNonNull final String unitOfMeasureKindName,
7316            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName) {
7317        UnitOfMeasureType unitOfMeasureType;
7318
7319        try {
7320            var commandForm = UomUtil.getHome().getGetUnitOfMeasureTypeForm();
7321
7322            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
7323            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
7324
7325            unitOfMeasureType = CDI.current().select(GetUnitOfMeasureTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7326        } catch (NamingException ex) {
7327            throw new RuntimeException(ex);
7328        }
7329
7330        return unitOfMeasureType == null ? null : new UnitOfMeasureTypeObject(unitOfMeasureType);
7331    }
7332
7333    @GraphQLField
7334    @GraphQLName("unitOfMeasureTypes")
7335    @GraphQLNonNull
7336    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7337    static CountingPaginatedData<UnitOfMeasureTypeObject> unitOfMeasureTypes(final DataFetchingEnvironment env,
7338            @GraphQLName("unitOfMeasureKindName") @GraphQLNonNull final String unitOfMeasureKindName) {
7339        CountingPaginatedData<UnitOfMeasureTypeObject> data;
7340
7341        try {
7342            var commandForm = UomUtil.getHome().getGetUnitOfMeasureTypesForm();
7343            var command = CDI.current().select(GetUnitOfMeasureTypesCommand.class).get();
7344
7345            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
7346
7347            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7348            if(totalEntities == null) {
7349                data = Connections.emptyConnection();
7350            } else {
7351                try(var objectLimiter = new ObjectLimiter(env, UnitOfMeasureTypeConstants.COMPONENT_VENDOR_NAME, UnitOfMeasureTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
7352                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7353
7354                    var unitOfMeasureTypes = entities.stream()
7355                            .map(UnitOfMeasureTypeObject::new)
7356                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7357
7358                    data = new CountedObjects<>(objectLimiter, unitOfMeasureTypes);
7359                }
7360            }
7361        } catch (NamingException ex) {
7362            throw new RuntimeException(ex);
7363        }
7364
7365        return data;
7366    }
7367
7368    @GraphQLField
7369    @GraphQLName("unitOfMeasureKind")
7370    static UnitOfMeasureKindObject unitOfMeasureKind(final DataFetchingEnvironment env,
7371            @GraphQLName("unitOfMeasureKindName") @GraphQLNonNull final String unitOfMeasureKindName) {
7372        UnitOfMeasureKind unitOfMeasureKind;
7373
7374        try {
7375            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindForm();
7376
7377            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
7378
7379            unitOfMeasureKind = CDI.current().select(GetUnitOfMeasureKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7380        } catch (NamingException ex) {
7381            throw new RuntimeException(ex);
7382        }
7383
7384        return unitOfMeasureKind == null ? null : new UnitOfMeasureKindObject(unitOfMeasureKind);
7385    }
7386
7387    @GraphQLField
7388    @GraphQLName("unitOfMeasureKinds")
7389    @GraphQLNonNull
7390    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7391    static CountingPaginatedData<UnitOfMeasureKindObject> unitOfMeasureKinds(final DataFetchingEnvironment env) {
7392        CountingPaginatedData<UnitOfMeasureKindObject> data;
7393
7394        try {
7395            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindsForm();
7396            var command = CDI.current().select(GetUnitOfMeasureKindsCommand.class).get();
7397
7398            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7399            if(totalEntities == null) {
7400                data = Connections.emptyConnection();
7401            } else {
7402                try(var objectLimiter = new ObjectLimiter(env, UnitOfMeasureKindConstants.COMPONENT_VENDOR_NAME, UnitOfMeasureKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
7403                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7404
7405                    var unitOfMeasureKinds = entities.stream()
7406                            .map(UnitOfMeasureKindObject::new)
7407                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7408
7409                    data = new CountedObjects<>(objectLimiter, unitOfMeasureKinds);
7410                }
7411            }
7412        } catch (NamingException ex) {
7413            throw new RuntimeException(ex);
7414        }
7415
7416        return data;
7417    }
7418
7419    @GraphQLField
7420    @GraphQLName("unitOfMeasureKindUseType")
7421    static UnitOfMeasureKindUseTypeObject unitOfMeasureKindUseType(final DataFetchingEnvironment env,
7422            @GraphQLName("unitOfMeasureKindUseTypeName") @GraphQLNonNull final String unitOfMeasureKindUseTypeName) {
7423        UnitOfMeasureKindUseType unitOfMeasureKindUseType;
7424
7425        try {
7426            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindUseTypeForm();
7427
7428            commandForm.setUnitOfMeasureKindUseTypeName(unitOfMeasureKindUseTypeName);
7429
7430            unitOfMeasureKindUseType = CDI.current().select(GetUnitOfMeasureKindUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7431        } catch (NamingException ex) {
7432            throw new RuntimeException(ex);
7433        }
7434
7435        return unitOfMeasureKindUseType == null ? null : new UnitOfMeasureKindUseTypeObject(unitOfMeasureKindUseType);
7436    }
7437
7438    @GraphQLField
7439    @GraphQLName("unitOfMeasureKindUseTypes")
7440    @GraphQLNonNull
7441    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7442    static CountingPaginatedData<UnitOfMeasureKindUseTypeObject> unitOfMeasureKindUseTypes(final DataFetchingEnvironment env) {
7443        CountingPaginatedData<UnitOfMeasureKindUseTypeObject> data;
7444
7445        try {
7446            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindUseTypesForm();
7447            var command = CDI.current().select(GetUnitOfMeasureKindUseTypesCommand.class).get();
7448
7449            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7450            if(totalEntities == null) {
7451                data = Connections.emptyConnection();
7452            } else {
7453                try(var objectLimiter = new ObjectLimiter(env, UnitOfMeasureKindUseTypeConstants.COMPONENT_VENDOR_NAME, UnitOfMeasureKindUseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
7454                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7455
7456                    var objects = entities.stream()
7457                            .map(UnitOfMeasureKindUseTypeObject::new)
7458                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7459
7460                    data = new CountedObjects<>(objectLimiter, objects);
7461                }
7462            }
7463        } catch (NamingException ex) {
7464            throw new RuntimeException(ex);
7465        }
7466
7467        return data;
7468    }
7469
7470    @GraphQLField
7471    @GraphQLName("entityAttributeType")
7472    static EntityAttributeTypeObject entityAttributeType(final DataFetchingEnvironment env,
7473            @GraphQLName("entityAttributeTypeName") @GraphQLNonNull final String entityAttributeTypeName) {
7474        EntityAttributeType entityAttributeType;
7475
7476        try {
7477            var commandForm = CoreUtil.getHome().getGetEntityAttributeTypeForm();
7478
7479            commandForm.setEntityAttributeTypeName(entityAttributeTypeName);
7480
7481            entityAttributeType = CDI.current().select(GetEntityAttributeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7482        } catch (NamingException ex) {
7483            throw new RuntimeException(ex);
7484        }
7485
7486        return entityAttributeType == null ? null : new EntityAttributeTypeObject(entityAttributeType);
7487    }
7488
7489    @GraphQLField
7490    @GraphQLName("entityAttributeTypes")
7491    @GraphQLNonNull
7492    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7493    static CountingPaginatedData<EntityAttributeTypeObject> entityAttributeTypes(final DataFetchingEnvironment env) {
7494        CountingPaginatedData<EntityAttributeTypeObject> data;
7495
7496        try {
7497            var commandForm = CoreUtil.getHome().getGetEntityAttributeTypesForm();
7498            var command = CDI.current().select(GetEntityAttributeTypesCommand.class).get();
7499
7500            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7501            if(totalEntities == null) {
7502                data = Connections.emptyConnection();
7503            } else {
7504                try(var objectLimiter = new ObjectLimiter(env, EntityAttributeTypeConstants.COMPONENT_VENDOR_NAME, EntityAttributeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
7505                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7506
7507                    var entityAttributeTypes = entities.stream()
7508                            .map(EntityAttributeTypeObject::new)
7509                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7510
7511                    data = new CountedObjects<>(objectLimiter, entityAttributeTypes);
7512                }
7513            }
7514        } catch (NamingException ex) {
7515            throw new RuntimeException(ex);
7516        }
7517
7518        return data;
7519    }
7520
7521    @GraphQLField
7522    @GraphQLName("componentVendorResults")
7523    static ComponentVendorResultsObject componentVendorResults(final DataFetchingEnvironment env,
7524            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7525        ComponentVendorResultsObject componentVendorResultsObject = null;
7526
7527        try {
7528            var commandForm = SearchUtil.getHome().getGetComponentVendorResultsForm();
7529
7530            commandForm.setSearchTypeName(searchTypeName);
7531
7532            if(CDI.current().select(GetComponentVendorResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7533                componentVendorResultsObject = new ComponentVendorResultsObject(commandForm);
7534            }
7535        } catch (NamingException ex) {
7536            throw new RuntimeException(ex);
7537        }
7538
7539        return componentVendorResultsObject;
7540    }
7541
7542    @GraphQLField
7543    @GraphQLName("entityTypeResults")
7544    static EntityTypeResultsObject entityTypeResults(final DataFetchingEnvironment env,
7545            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7546        EntityTypeResultsObject entityTypeResultsObject = null;
7547
7548        try {
7549            var commandForm = SearchUtil.getHome().getGetEntityTypeResultsForm();
7550
7551            commandForm.setSearchTypeName(searchTypeName);
7552
7553            if(CDI.current().select(GetEntityTypeResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7554                entityTypeResultsObject = new EntityTypeResultsObject(commandForm);
7555            }
7556        } catch (NamingException ex) {
7557            throw new RuntimeException(ex);
7558        }
7559
7560        return entityTypeResultsObject;
7561    }
7562
7563    @GraphQLField
7564    @GraphQLName("entityAliasTypeResults")
7565    static EntityAliasTypeResultsObject entityAliasTypeResults(final DataFetchingEnvironment env,
7566            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7567        EntityAliasTypeResultsObject entityAliasTypeResultsObject = null;
7568
7569        try {
7570            var commandForm = SearchUtil.getHome().getGetEntityAliasTypeResultsForm();
7571
7572            commandForm.setSearchTypeName(searchTypeName);
7573
7574            if(CDI.current().select(GetEntityAliasTypeResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7575                entityAliasTypeResultsObject = new EntityAliasTypeResultsObject(commandForm);
7576            }
7577        } catch (NamingException ex) {
7578            throw new RuntimeException(ex);
7579        }
7580
7581        return entityAliasTypeResultsObject;
7582    }
7583
7584    @GraphQLField
7585    @GraphQLName("entityAttributeGroupResults")
7586    static EntityAttributeGroupResultsObject entityAttributeGroupResults(final DataFetchingEnvironment env,
7587            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7588        EntityAttributeGroupResultsObject entityAttributeGroupResultsObject = null;
7589
7590        try {
7591            var commandForm = SearchUtil.getHome().getGetEntityAttributeGroupResultsForm();
7592
7593            commandForm.setSearchTypeName(searchTypeName);
7594
7595            if(CDI.current().select(GetEntityAttributeGroupResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7596                entityAttributeGroupResultsObject = new EntityAttributeGroupResultsObject(commandForm);
7597            }
7598        } catch (NamingException ex) {
7599            throw new RuntimeException(ex);
7600        }
7601
7602        return entityAttributeGroupResultsObject;
7603    }
7604
7605    @GraphQLField
7606    @GraphQLName("entityAttributeResults")
7607    static EntityAttributeResultsObject entityAttributeResults(final DataFetchingEnvironment env,
7608            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7609        EntityAttributeResultsObject entityAttributeResultsObject = null;
7610
7611        try {
7612            var commandForm = SearchUtil.getHome().getGetEntityAttributeResultsForm();
7613
7614            commandForm.setSearchTypeName(searchTypeName);
7615
7616            if(CDI.current().select(GetEntityAttributeResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7617                entityAttributeResultsObject = new EntityAttributeResultsObject(commandForm);
7618            }
7619        } catch (NamingException ex) {
7620            throw new RuntimeException(ex);
7621        }
7622
7623        return entityAttributeResultsObject;
7624    }
7625
7626    @GraphQLField
7627    @GraphQLName("entityListItemResults")
7628    static EntityListItemResultsObject entityListItemResults(final DataFetchingEnvironment env,
7629            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7630        EntityListItemResultsObject entityListItemResultsObject = null;
7631
7632        try {
7633            var commandForm = SearchUtil.getHome().getGetEntityListItemResultsForm();
7634
7635            commandForm.setSearchTypeName(searchTypeName);
7636
7637            if(CDI.current().select(GetEntityListItemResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7638                entityListItemResultsObject = new EntityListItemResultsObject(commandForm);
7639            }
7640        } catch (NamingException ex) {
7641            throw new RuntimeException(ex);
7642        }
7643
7644        return entityListItemResultsObject;
7645    }
7646
7647    @GraphQLField
7648    @GraphQLName("customerResults")
7649    static CustomerResultsObject customerResults(final DataFetchingEnvironment env,
7650            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7651        CustomerResultsObject customerResultsObject = null;
7652
7653        try {
7654            var commandForm = SearchUtil.getHome().getGetCustomerResultsForm();
7655
7656            commandForm.setSearchTypeName(searchTypeName);
7657
7658            if(CDI.current().select(GetCustomerResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7659                customerResultsObject = new CustomerResultsObject(commandForm);
7660            }
7661        } catch (NamingException ex) {
7662            throw new RuntimeException(ex);
7663        }
7664
7665        return customerResultsObject;
7666    }
7667
7668    @GraphQLField
7669    @GraphQLName("employeeResults")
7670    static EmployeeResultsObject employeeResults(final DataFetchingEnvironment env,
7671            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7672        EmployeeResultsObject employeeResultsObject = null;
7673
7674        try {
7675            var commandForm = SearchUtil.getHome().getGetEmployeeResultsForm();
7676
7677            commandForm.setSearchTypeName(searchTypeName);
7678
7679            if(CDI.current().select(GetEmployeeResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7680                employeeResultsObject = new EmployeeResultsObject(commandForm);
7681            }
7682        } catch (NamingException ex) {
7683            throw new RuntimeException(ex);
7684        }
7685
7686        return employeeResultsObject;
7687    }
7688
7689    @GraphQLField
7690    @GraphQLName("itemResults")
7691    static ItemResultsObject itemResults(final DataFetchingEnvironment env,
7692            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7693        ItemResultsObject itemResultsObject = null;
7694
7695        try {
7696            var commandForm = SearchUtil.getHome().getGetItemResultsForm();
7697
7698            commandForm.setSearchTypeName(searchTypeName);
7699
7700            if(CDI.current().select(GetItemResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7701                itemResultsObject = new ItemResultsObject(commandForm);
7702            }
7703        } catch (NamingException ex) {
7704            throw new RuntimeException(ex);
7705        }
7706
7707        return itemResultsObject;
7708    }
7709
7710    @GraphQLField
7711    @GraphQLName("checkItemSpelling")
7712    static CheckItemSpellingObject checkItemSpelling(final DataFetchingEnvironment env,
7713            @GraphQLName("languageIsoName") final String languageIsoName,
7714            @GraphQLName("searchDefaultOperatorName") final String searchDefaultOperatorName,
7715            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName,
7716            @GraphQLName("q") final String q) {
7717        var checkItemSpellingObject = new CheckItemSpellingObject();
7718
7719        try {
7720            var commandForm = SearchUtil.getHome().getCheckItemSpellingForm();
7721
7722            commandForm.setLanguageIsoName(languageIsoName);
7723            commandForm.setSearchDefaultOperatorName(searchDefaultOperatorName);
7724            commandForm.setSearchTypeName(searchTypeName);
7725            commandForm.setQ(q);
7726
7727            var commandResult = SearchUtil.getHome().checkItemSpelling(getUserVisitPK(env), commandForm);
7728            checkItemSpellingObject.setCommandResult(commandResult);
7729            checkItemSpellingObject.setResult(commandResult.hasErrors() ? null : (CheckItemSpellingResult)commandResult.getExecutionResult().getResult());
7730        } catch (NamingException ex) {
7731            throw new RuntimeException(ex);
7732        }
7733
7734        return checkItemSpellingObject;
7735    }
7736
7737    @GraphQLField
7738    @GraphQLName("vendorResults")
7739    static VendorResultsObject vendorResults(final DataFetchingEnvironment env,
7740            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7741        VendorResultsObject vendorResultsObject = null;
7742
7743        try {
7744            var commandForm = SearchUtil.getHome().getGetVendorResultsForm();
7745
7746            commandForm.setSearchTypeName(searchTypeName);
7747
7748            if(CDI.current().select(GetVendorResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7749                vendorResultsObject = new VendorResultsObject(commandForm);
7750            }
7751        } catch (NamingException ex) {
7752            throw new RuntimeException(ex);
7753        }
7754
7755        return vendorResultsObject;
7756    }
7757
7758    @GraphQLField
7759    @GraphQLName("shippingMethodResults")
7760    static ShippingMethodResultsObject shippingMethodResults(final DataFetchingEnvironment env,
7761            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7762        ShippingMethodResultsObject shippingMethodResultsObject = null;
7763
7764        try {
7765            var commandForm = SearchUtil.getHome().getGetShippingMethodResultsForm();
7766
7767            commandForm.setSearchTypeName(searchTypeName);
7768
7769            if(CDI.current().select(GetShippingMethodResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7770                shippingMethodResultsObject = new ShippingMethodResultsObject(commandForm);
7771            }
7772        } catch (NamingException ex) {
7773            throw new RuntimeException(ex);
7774        }
7775
7776        return shippingMethodResultsObject;
7777    }
7778
7779    @GraphQLField
7780    @GraphQLName("warehouseResults")
7781    static WarehouseResultsObject warehouseResults(final DataFetchingEnvironment env,
7782            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7783        WarehouseResultsObject warehouseResultsObject = null;
7784
7785        try {
7786            var commandForm = SearchUtil.getHome().getGetWarehouseResultsForm();
7787
7788            commandForm.setSearchTypeName(searchTypeName);
7789
7790            if(CDI.current().select(GetWarehouseResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7791                warehouseResultsObject = new WarehouseResultsObject(commandForm);
7792            }
7793        } catch (NamingException ex) {
7794            throw new RuntimeException(ex);
7795        }
7796
7797        return warehouseResultsObject;
7798    }
7799
7800    @GraphQLField
7801    @GraphQLName("contentCatalogResults")
7802    static ContentCatalogResultsObject contentCatalogResults(final DataFetchingEnvironment env,
7803            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7804        ContentCatalogResultsObject contentCatalogResultsObject = null;
7805
7806        try {
7807            var commandForm = SearchUtil.getHome().getGetContentCatalogResultsForm();
7808
7809            commandForm.setSearchTypeName(searchTypeName);
7810
7811            if(CDI.current().select(GetContentCatalogResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7812                contentCatalogResultsObject = new ContentCatalogResultsObject(commandForm);
7813            }
7814        } catch (NamingException ex) {
7815            throw new RuntimeException(ex);
7816        }
7817
7818        return contentCatalogResultsObject;
7819    }
7820
7821    @GraphQLField
7822    @GraphQLName("contentCatalogItemResults")
7823    static ContentCatalogItemResultsObject contentCatalogItemResults(final DataFetchingEnvironment env,
7824            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7825        ContentCatalogItemResultsObject contentCatalogItemResultsObject = null;
7826
7827        try {
7828            var commandForm = SearchUtil.getHome().getGetContentCatalogItemResultsForm();
7829
7830            commandForm.setSearchTypeName(searchTypeName);
7831
7832            if(CDI.current().select(GetContentCatalogItemResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7833                contentCatalogItemResultsObject = new ContentCatalogItemResultsObject(commandForm);
7834            }
7835        } catch (NamingException ex) {
7836            throw new RuntimeException(ex);
7837        }
7838
7839        return contentCatalogItemResultsObject;
7840    }
7841
7842    @GraphQLField
7843    @GraphQLName("contentCategoryResults")
7844    static ContentCategoryResultsObject contentCategoryResults(final DataFetchingEnvironment env,
7845            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7846        ContentCategoryResultsObject contentCategoryResultsObject = null;
7847
7848        try {
7849            var commandForm = SearchUtil.getHome().getGetContentCategoryResultsForm();
7850
7851            commandForm.setSearchTypeName(searchTypeName);
7852
7853            if(CDI.current().select(GetContentCategoryResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7854                contentCategoryResultsObject = new ContentCategoryResultsObject(commandForm);
7855            }
7856        } catch (NamingException ex) {
7857            throw new RuntimeException(ex);
7858        }
7859
7860        return contentCategoryResultsObject;
7861    }
7862
7863    @GraphQLField
7864    @GraphQLName("color")
7865    static ColorObject color(final DataFetchingEnvironment env,
7866            @GraphQLName("colorName") final String colorName,
7867            @GraphQLName("id") @GraphQLID final String id) {
7868        Color color;
7869
7870        try {
7871            var commandForm = CoreUtil.getHome().getGetColorForm();
7872
7873            commandForm.setColorName(colorName);
7874            commandForm.setUuid(id);
7875
7876            color = CDI.current().select(GetColorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7877        } catch (NamingException ex) {
7878            throw new RuntimeException(ex);
7879        }
7880
7881        return color == null ? null : new ColorObject(color);
7882    }
7883
7884    @GraphQLField
7885    @GraphQLName("colors")
7886    @GraphQLNonNull
7887    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7888    static CountingPaginatedData<ColorObject> colors(final DataFetchingEnvironment env) {
7889        CountingPaginatedData<ColorObject> data;
7890
7891        try {
7892            var commandForm = CoreUtil.getHome().getGetColorsForm();
7893            var command = CDI.current().select(GetColorsCommand.class).get();
7894
7895            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7896            if(totalEntities == null) {
7897                data = Connections.emptyConnection();
7898            } else {
7899                try(var objectLimiter = new ObjectLimiter(env, ColorConstants.COMPONENT_VENDOR_NAME, ColorConstants.ENTITY_TYPE_NAME, totalEntities)) {
7900                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7901
7902                    var colors = entities.stream()
7903                            .map(ColorObject::new)
7904                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7905
7906                    data = new CountedObjects<>(objectLimiter, colors);
7907                }
7908            }
7909        } catch (NamingException ex) {
7910            throw new RuntimeException(ex);
7911        }
7912
7913        return data;
7914    }
7915
7916    @GraphQLField
7917    @GraphQLName("fontStyle")
7918    static FontStyleObject fontStyle(final DataFetchingEnvironment env,
7919            @GraphQLName("fontStyleName") final String fontStyleName,
7920            @GraphQLName("id") @GraphQLID final String id) {
7921        FontStyle fontStyle;
7922
7923        try {
7924            var commandForm = CoreUtil.getHome().getGetFontStyleForm();
7925
7926            commandForm.setFontStyleName(fontStyleName);
7927            commandForm.setUuid(id);
7928
7929            fontStyle = CDI.current().select(GetFontStyleCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7930        } catch (NamingException ex) {
7931            throw new RuntimeException(ex);
7932        }
7933
7934        return fontStyle == null ? null : new FontStyleObject(fontStyle);
7935    }
7936
7937    @GraphQLField
7938    @GraphQLName("fontStyles")
7939    @GraphQLNonNull
7940    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7941    static CountingPaginatedData<FontStyleObject> fontStyles(final DataFetchingEnvironment env) {
7942        CountingPaginatedData<FontStyleObject> data;
7943
7944        try {
7945            var commandForm = CoreUtil.getHome().getGetFontStylesForm();
7946            var command = CDI.current().select(GetFontStylesCommand.class).get();
7947
7948            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7949            if(totalEntities == null) {
7950                data = Connections.emptyConnection();
7951            } else {
7952                try(var objectLimiter = new ObjectLimiter(env, FontStyleConstants.COMPONENT_VENDOR_NAME, FontStyleConstants.ENTITY_TYPE_NAME, totalEntities)) {
7953                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7954
7955                    var fontStyles = entities.stream()
7956                            .map(FontStyleObject::new)
7957                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7958
7959                    data = new CountedObjects<>(objectLimiter, fontStyles);
7960                }
7961            }
7962        } catch (NamingException ex) {
7963            throw new RuntimeException(ex);
7964        }
7965
7966        return data;
7967    }
7968
7969    @GraphQLField
7970    @GraphQLName("fontWeight")
7971    static FontWeightObject fontWeight(final DataFetchingEnvironment env,
7972            @GraphQLName("fontWeightName") final String fontWeightName,
7973            @GraphQLName("id") @GraphQLID final String id) {
7974        FontWeight fontWeight;
7975
7976        try {
7977            var commandForm = CoreUtil.getHome().getGetFontWeightForm();
7978
7979            commandForm.setFontWeightName(fontWeightName);
7980            commandForm.setUuid(id);
7981
7982            fontWeight = CDI.current().select(GetFontWeightCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7983        } catch (NamingException ex) {
7984            throw new RuntimeException(ex);
7985        }
7986
7987        return fontWeight == null ? null : new FontWeightObject(fontWeight);
7988    }
7989
7990    @GraphQLField
7991    @GraphQLName("fontWeights")
7992    @GraphQLNonNull
7993    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7994    static CountingPaginatedData<FontWeightObject> fontWeights(final DataFetchingEnvironment env) {
7995        CountingPaginatedData<FontWeightObject> data;
7996
7997        try {
7998            var commandForm = CoreUtil.getHome().getGetFontWeightsForm();
7999            var command = CDI.current().select(GetFontWeightsCommand.class).get();
8000
8001            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8002            if(totalEntities == null) {
8003                data = Connections.emptyConnection();
8004            } else {
8005                try(var objectLimiter = new ObjectLimiter(env, FontWeightConstants.COMPONENT_VENDOR_NAME, FontWeightConstants.ENTITY_TYPE_NAME, totalEntities)) {
8006                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8007
8008                    var fontWeights = entities.stream()
8009                            .map(FontWeightObject::new)
8010                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8011
8012                    data = new CountedObjects<>(objectLimiter, fontWeights);
8013                }
8014            }
8015        } catch (NamingException ex) {
8016            throw new RuntimeException(ex);
8017        }
8018
8019        return data;
8020    }
8021
8022    @GraphQLField
8023    @GraphQLName("textDecoration")
8024    static TextDecorationObject textDecoration(final DataFetchingEnvironment env,
8025            @GraphQLName("textDecorationName") final String textDecorationName,
8026            @GraphQLName("id") @GraphQLID final String id) {
8027        TextDecoration textDecoration;
8028
8029        try {
8030            var commandForm = CoreUtil.getHome().getGetTextDecorationForm();
8031
8032            commandForm.setTextDecorationName(textDecorationName);
8033            commandForm.setUuid(id);
8034
8035            textDecoration = CDI.current().select(GetTextDecorationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8036        } catch (NamingException ex) {
8037            throw new RuntimeException(ex);
8038        }
8039
8040        return textDecoration == null ? null : new TextDecorationObject(textDecoration);
8041    }
8042
8043    @GraphQLField
8044    @GraphQLName("textDecorations")
8045    @GraphQLNonNull
8046    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8047    static CountingPaginatedData<TextDecorationObject> textDecorations(final DataFetchingEnvironment env) {
8048        CountingPaginatedData<TextDecorationObject> data;
8049
8050        try {
8051            var commandForm = CoreUtil.getHome().getGetTextDecorationsForm();
8052            var command = CDI.current().select(GetTextDecorationsCommand.class).get();
8053
8054            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8055            if(totalEntities == null) {
8056                data = Connections.emptyConnection();
8057            } else {
8058                try(var objectLimiter = new ObjectLimiter(env, TextDecorationConstants.COMPONENT_VENDOR_NAME, TextDecorationConstants.ENTITY_TYPE_NAME, totalEntities)) {
8059                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8060
8061                    var textDecorations = entities.stream()
8062                            .map(TextDecorationObject::new)
8063                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8064
8065                    data = new CountedObjects<>(objectLimiter, textDecorations);
8066                }
8067            }
8068        } catch (NamingException ex) {
8069            throw new RuntimeException(ex);
8070        }
8071
8072        return data;
8073    }
8074
8075    @GraphQLField
8076    @GraphQLName("textTransformation")
8077    static TextTransformationObject textTransformation(final DataFetchingEnvironment env,
8078            @GraphQLName("textTransformationName") final String textTransformationName,
8079            @GraphQLName("id") @GraphQLID final String id) {
8080        TextTransformation textTransformation;
8081
8082        try {
8083            var commandForm = CoreUtil.getHome().getGetTextTransformationForm();
8084
8085            commandForm.setTextTransformationName(textTransformationName);
8086            commandForm.setUuid(id);
8087
8088            textTransformation = CDI.current().select(GetTextTransformationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8089        } catch (NamingException ex) {
8090            throw new RuntimeException(ex);
8091        }
8092
8093        return textTransformation == null ? null : new TextTransformationObject(textTransformation);
8094    }
8095
8096    @GraphQLField
8097    @GraphQLName("textTransformations")
8098    @GraphQLNonNull
8099    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8100    static CountingPaginatedData<TextTransformationObject> textTransformations(final DataFetchingEnvironment env) {
8101        CountingPaginatedData<TextTransformationObject> data;
8102
8103        try {
8104            var commandForm = CoreUtil.getHome().getGetTextTransformationsForm();
8105            var command = CDI.current().select(GetTextTransformationsCommand.class).get();
8106
8107            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8108            if(totalEntities == null) {
8109                data = Connections.emptyConnection();
8110            } else {
8111                try(var objectLimiter = new ObjectLimiter(env, TextTransformationConstants.COMPONENT_VENDOR_NAME, TextTransformationConstants.ENTITY_TYPE_NAME, totalEntities)) {
8112                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8113
8114                    var textTransformations = entities.stream()
8115                            .map(TextTransformationObject::new)
8116                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8117
8118                    data = new CountedObjects<>(objectLimiter, textTransformations);
8119                }
8120            }
8121        } catch (NamingException ex) {
8122            throw new RuntimeException(ex);
8123        }
8124
8125        return data;
8126    }
8127
8128    @GraphQLField
8129    @GraphQLName("userLogin")
8130    static UserLoginObject userLogin(final DataFetchingEnvironment env,
8131            @GraphQLName("username") final String username,
8132            @GraphQLName("id") @GraphQLID final String id) {
8133        UserLogin userLogin;
8134
8135        try {
8136            var commandForm = UserUtil.getHome().getGetUserLoginForm();
8137
8138            commandForm.setUsername(username);
8139            commandForm.setUuid(id);
8140
8141            var getUserLoginCommand = CDI.current().select(GetUserLoginCommand.class).get();
8142            userLogin = getUserLoginCommand.getEntityForGraphQl(getUserVisitPK(env), commandForm);
8143        } catch (NamingException ex) {
8144            throw new RuntimeException(ex);
8145        }
8146
8147        return userLogin == null ? null : new UserLoginObject(userLogin);
8148    }
8149
8150    @GraphQLField
8151    @GraphQLName("recoveryQuestion")
8152    static RecoveryQuestionObject recoveryQuestion(final DataFetchingEnvironment env,
8153            @GraphQLName("recoveryQuestionName") final String recoveryQuestionName,
8154            @GraphQLName("id") @GraphQLID final String id,
8155            @GraphQLName("username") final String username) {
8156        RecoveryQuestion recoveryQuestion;
8157
8158        try {
8159            var commandForm = UserUtil.getHome().getGetRecoveryQuestionForm();
8160
8161            commandForm.setRecoveryQuestionName(recoveryQuestionName);
8162            commandForm.setUuid(id);
8163            commandForm.setUsername(username);
8164
8165            recoveryQuestion = CDI.current().select(GetRecoveryQuestionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8166        } catch (NamingException ex) {
8167            throw new RuntimeException(ex);
8168        }
8169
8170        return recoveryQuestion == null ? null : new RecoveryQuestionObject(recoveryQuestion);
8171    }
8172
8173    @GraphQLField
8174    @GraphQLName("recoveryQuestions")
8175    @GraphQLNonNull
8176    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8177    static CountingPaginatedData<RecoveryQuestionObject> recoveryQuestions(final DataFetchingEnvironment env) {
8178        CountingPaginatedData<RecoveryQuestionObject> data;
8179
8180        try {
8181            var commandForm = UserUtil.getHome().getGetRecoveryQuestionsForm();
8182            var command = CDI.current().select(GetRecoveryQuestionsCommand.class).get();
8183
8184            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8185            if(totalEntities == null) {
8186                data = Connections.emptyConnection();
8187            } else {
8188                try(var objectLimiter = new ObjectLimiter(env, RecoveryQuestionConstants.COMPONENT_VENDOR_NAME, RecoveryQuestionConstants.ENTITY_TYPE_NAME, totalEntities)) {
8189                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8190
8191                    var recoveryQuestions = entities.stream()
8192                            .map(RecoveryQuestionObject::new)
8193                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8194
8195                    data = new CountedObjects<>(objectLimiter, recoveryQuestions);
8196                }
8197            }
8198        } catch (NamingException ex) {
8199            throw new RuntimeException(ex);
8200        }
8201
8202        return data;
8203    }
8204
8205    @GraphQLField
8206    @GraphQLName("userSession")
8207    static UserSessionObject userSession(final DataFetchingEnvironment env) {
8208        var userSession = BaseGraphQl.getUserSession(env);
8209
8210        return userSession == null ? null : new UserSessionObject(userSession);
8211    }
8212
8213    @GraphQLField
8214    @GraphQLName("userVisitGroup")
8215    static UserVisitGroupObject userVisitGroup(final DataFetchingEnvironment env,
8216            @GraphQLName("userVisitGroupName") final String userVisitGroupName,
8217            @GraphQLName("id") @GraphQLID final String id) {
8218        UserVisitGroup userVisitGroup;
8219
8220        try {
8221            var commandForm = UserUtil.getHome().getGetUserVisitGroupForm();
8222
8223            commandForm.setUserVisitGroupName(userVisitGroupName);
8224            commandForm.setUuid(id);
8225
8226            userVisitGroup = CDI.current().select(GetUserVisitGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8227        } catch (NamingException ex) {
8228            throw new RuntimeException(ex);
8229        }
8230
8231        return userVisitGroup == null ? null : new UserVisitGroupObject(userVisitGroup);
8232    }
8233
8234    @GraphQLField
8235    @GraphQLName("userVisitGroups")
8236    @GraphQLNonNull
8237    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8238    static CountingPaginatedData<UserVisitGroupObject> userVisitGroups(final DataFetchingEnvironment env) {
8239        CountingPaginatedData<UserVisitGroupObject> data;
8240
8241        try {
8242            var commandForm = UserUtil.getHome().getGetUserVisitGroupsForm();
8243            var command = CDI.current().select(GetUserVisitGroupsCommand.class).get();
8244
8245            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8246            if(totalEntities == null) {
8247                data = Connections.emptyConnection();
8248            } else {
8249                try(var objectLimiter = new ObjectLimiter(env, UserVisitGroupConstants.COMPONENT_VENDOR_NAME, UserVisitGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
8250                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8251
8252                    var userVisitGroups = entities.stream()
8253                            .map(UserVisitGroupObject::new)
8254                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8255
8256                    data = new CountedObjects<>(objectLimiter, userVisitGroups);
8257                }
8258            }
8259        } catch (NamingException ex) {
8260            throw new RuntimeException(ex);
8261        }
8262
8263        return data;
8264    }
8265
8266    @GraphQLField
8267    @GraphQLName("userVisit")
8268    static UserVisitObject userVisit(final DataFetchingEnvironment env) {
8269        var userVisit = BaseGraphQl.getUserVisit(env);
8270
8271        return userVisit == null ? null : new UserVisitObject(userVisit);
8272    }
8273
8274    @GraphQLField
8275    @GraphQLName("symbolPosition")
8276    static SymbolPositionObject symbolPosition(final DataFetchingEnvironment env,
8277            @GraphQLName("symbolPositionName") final String symbolPositionName,
8278            @GraphQLName("id") @GraphQLID final String id) {
8279        SymbolPosition symbolPosition;
8280
8281        try {
8282            var commandForm = AccountingUtil.getHome().getGetSymbolPositionForm();
8283
8284            commandForm.setSymbolPositionName(symbolPositionName);
8285            commandForm.setUuid(id);
8286
8287            symbolPosition = CDI.current().select(GetSymbolPositionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8288        } catch (NamingException ex) {
8289            throw new RuntimeException(ex);
8290        }
8291
8292        return symbolPosition == null ? null : new SymbolPositionObject(symbolPosition);
8293    }
8294
8295    @GraphQLField
8296    @GraphQLName("symbolPositions")
8297    @GraphQLNonNull
8298    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8299    static CountingPaginatedData<SymbolPositionObject> symbolPositions(final DataFetchingEnvironment env) {
8300        CountingPaginatedData<SymbolPositionObject> data;
8301
8302        try {
8303            var commandForm = AccountingUtil.getHome().getGetSymbolPositionsForm();
8304            var command = CDI.current().select(GetSymbolPositionsCommand.class).get();
8305
8306            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8307            if(totalEntities == null) {
8308                data = Connections.emptyConnection();
8309            } else {
8310                try(var objectLimiter = new ObjectLimiter(env, SymbolPositionConstants.COMPONENT_VENDOR_NAME, SymbolPositionConstants.ENTITY_TYPE_NAME, totalEntities)) {
8311                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8312
8313                    var symbolPositions = entities.stream()
8314                            .map(SymbolPositionObject::new)
8315                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8316
8317                    data = new CountedObjects<>(objectLimiter, symbolPositions);
8318                }
8319            }
8320        } catch (NamingException ex) {
8321            throw new RuntimeException(ex);
8322        }
8323
8324        return data;
8325    }
8326
8327    @GraphQLField
8328    @GraphQLName("currency")
8329    static CurrencyObject currency(final DataFetchingEnvironment env,
8330            @GraphQLName("currencyIsoName") final String currencyIsoName,
8331            @GraphQLName("id") @GraphQLID final String id) {
8332        Currency currency;
8333
8334        try {
8335            var commandForm = AccountingUtil.getHome().getGetCurrencyForm();
8336
8337            commandForm.setCurrencyIsoName(currencyIsoName);
8338            commandForm.setUuid(id);
8339
8340            currency = CDI.current().select(GetCurrencyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8341        } catch (NamingException ex) {
8342            throw new RuntimeException(ex);
8343        }
8344
8345        return currency == null ? null : new CurrencyObject(currency);
8346    }
8347
8348    @GraphQLField
8349    @GraphQLName("currencies")
8350    @GraphQLNonNull
8351    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8352    static CountingPaginatedData<CurrencyObject> currencies(final DataFetchingEnvironment env) {
8353        CountingPaginatedData<CurrencyObject> data;
8354
8355        try {
8356            var commandForm = AccountingUtil.getHome().getGetCurrenciesForm();
8357            var command = CDI.current().select(GetCurrenciesCommand.class).get();
8358
8359            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8360            if(totalEntities == null) {
8361                data = Connections.emptyConnection();
8362            } else {
8363                try(var objectLimiter = new ObjectLimiter(env, CurrencyConstants.COMPONENT_VENDOR_NAME, CurrencyConstants.ENTITY_TYPE_NAME, totalEntities)) {
8364                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8365
8366                    var currencies = entities.stream()
8367                            .map(CurrencyObject::new)
8368                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8369
8370                    data = new CountedObjects<>(objectLimiter, currencies);
8371                }
8372            }
8373        } catch (NamingException ex) {
8374            throw new RuntimeException(ex);
8375        }
8376
8377        return data;
8378    }
8379
8380    @GraphQLField
8381    @GraphQLName("language")
8382    static LanguageObject language(final DataFetchingEnvironment env,
8383            @GraphQLName("languageIsoName") final String languageIsoName,
8384            @GraphQLName("id") @GraphQLID final String id) {
8385        Language language;
8386
8387        try {
8388            var commandForm = PartyUtil.getHome().getGetLanguageForm();
8389
8390            commandForm.setLanguageIsoName(languageIsoName);
8391            commandForm.setUuid(id);
8392
8393            language = CDI.current().select(GetLanguageCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8394        } catch (NamingException ex) {
8395            throw new RuntimeException(ex);
8396        }
8397
8398        return language == null ? null : new LanguageObject(language);
8399    }
8400
8401    @GraphQLField
8402    @GraphQLName("languages")
8403    @GraphQLNonNull
8404    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8405    static CountingPaginatedData<LanguageObject> languages(final DataFetchingEnvironment env) {
8406        CountingPaginatedData<LanguageObject> data;
8407
8408        try {
8409            var commandForm = PartyUtil.getHome().getGetLanguagesForm();
8410            var command = CDI.current().select(GetLanguagesCommand.class).get();
8411
8412            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8413            if(totalEntities == null) {
8414                data = Connections.emptyConnection();
8415            } else {
8416                try(var objectLimiter = new ObjectLimiter(env, LanguageConstants.COMPONENT_VENDOR_NAME, LanguageConstants.ENTITY_TYPE_NAME, totalEntities)) {
8417                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8418
8419                    var languages = entities.stream()
8420                            .map(LanguageObject::new)
8421                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8422
8423                    data = new CountedObjects<>(objectLimiter, languages);
8424                }
8425            }
8426        } catch (NamingException ex) {
8427            throw new RuntimeException(ex);
8428        }
8429
8430        return data;
8431    }
8432
8433    @GraphQLField
8434    @GraphQLName("dateTimeFormat")
8435    static DateTimeFormatObject dateTimeFormat(final DataFetchingEnvironment env,
8436            @GraphQLName("dateTimeFormatName") final String dateTimeFormatName,
8437            @GraphQLName("id") @GraphQLID final String id) {
8438        DateTimeFormat dateTimeFormat;
8439
8440        try {
8441            var commandForm = PartyUtil.getHome().getGetDateTimeFormatForm();
8442
8443            commandForm.setDateTimeFormatName(dateTimeFormatName);
8444            commandForm.setUuid(id);
8445
8446            dateTimeFormat = CDI.current().select(GetDateTimeFormatCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8447        } catch (NamingException ex) {
8448            throw new RuntimeException(ex);
8449        }
8450
8451        return dateTimeFormat == null ? null : new DateTimeFormatObject(dateTimeFormat);
8452    }
8453
8454    @GraphQLField
8455    @GraphQLName("dateTimeFormats")
8456    @GraphQLNonNull
8457    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8458    static CountingPaginatedData<DateTimeFormatObject> dateTimeFormats(final DataFetchingEnvironment env) {
8459        CountingPaginatedData<DateTimeFormatObject> data;
8460
8461        try {
8462            var commandForm = PartyUtil.getHome().getGetDateTimeFormatsForm();
8463            var command = CDI.current().select(GetDateTimeFormatsCommand.class).get();
8464
8465            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8466            if(totalEntities == null) {
8467                data = Connections.emptyConnection();
8468            } else {
8469                try(var objectLimiter = new ObjectLimiter(env, DateTimeFormatConstants.COMPONENT_VENDOR_NAME, DateTimeFormatConstants.ENTITY_TYPE_NAME, totalEntities)) {
8470                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8471
8472                    var dateTimeFormats = entities.stream()
8473                            .map(DateTimeFormatObject::new)
8474                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8475
8476                    data = new CountedObjects<>(objectLimiter, dateTimeFormats);
8477                }
8478            }
8479        } catch (NamingException ex) {
8480            throw new RuntimeException(ex);
8481        }
8482
8483        return data;
8484    }
8485
8486    @GraphQLField
8487    @GraphQLName("timeZone")
8488    static TimeZoneObject timeZone(final DataFetchingEnvironment env,
8489            @GraphQLName("javaTimeZoneName") final String javaTimeZoneName,
8490            @GraphQLName("id") @GraphQLID final String id) {
8491        TimeZone timeZone;
8492
8493        try {
8494            var commandForm = PartyUtil.getHome().getGetTimeZoneForm();
8495
8496            commandForm.setJavaTimeZoneName(javaTimeZoneName);
8497            commandForm.setUuid(id);
8498
8499            timeZone = CDI.current().select(GetTimeZoneCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8500        } catch (NamingException ex) {
8501            throw new RuntimeException(ex);
8502        }
8503
8504        return timeZone == null ? null : new TimeZoneObject(timeZone);
8505    }
8506
8507    @GraphQLField
8508    @GraphQLName("timeZones")
8509    @GraphQLNonNull
8510    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8511    static CountingPaginatedData<TimeZoneObject> timeZones(final DataFetchingEnvironment env) {
8512        CountingPaginatedData<TimeZoneObject> data;
8513
8514        try {
8515            var commandForm = PartyUtil.getHome().getGetTimeZonesForm();
8516            var command = CDI.current().select(GetTimeZonesCommand.class).get();
8517
8518            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8519            if(totalEntities == null) {
8520                data = Connections.emptyConnection();
8521            } else {
8522                try(var objectLimiter = new ObjectLimiter(env, TimeZoneConstants.COMPONENT_VENDOR_NAME, TimeZoneConstants.ENTITY_TYPE_NAME, totalEntities)) {
8523                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8524
8525                    var timeZones = entities.stream()
8526                            .map(TimeZoneObject::new)
8527                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8528
8529                    data = new CountedObjects<>(objectLimiter, timeZones);
8530                }
8531            }
8532        } catch (NamingException ex) {
8533            throw new RuntimeException(ex);
8534        }
8535
8536        return data;
8537    }
8538
8539    @GraphQLField
8540    @GraphQLName("customerType")
8541    static CustomerTypeObject customerType(final DataFetchingEnvironment env,
8542            @GraphQLName("customerTypeName") final String customerTypeName,
8543            @GraphQLName("id") @GraphQLID final String id) {
8544        CustomerType customerType;
8545
8546        try {
8547            var commandForm = CustomerUtil.getHome().getGetCustomerTypeForm();
8548
8549            commandForm.setCustomerTypeName(customerTypeName);
8550            commandForm.setUuid(id);
8551
8552            customerType = CDI.current().select(GetCustomerTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8553        } catch (NamingException ex) {
8554            throw new RuntimeException(ex);
8555        }
8556
8557        return customerType == null ? null : new CustomerTypeObject(customerType);
8558    }
8559
8560    @GraphQLField
8561    @GraphQLName("customerTypes")
8562    @GraphQLNonNull
8563    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8564    static CountingPaginatedData<CustomerTypeObject> customerTypes(final DataFetchingEnvironment env) {
8565        CountingPaginatedData<CustomerTypeObject> data;
8566
8567        try {
8568            var commandForm = CustomerUtil.getHome().getGetCustomerTypesForm();
8569            var command = CDI.current().select(GetCustomerTypesCommand.class).get();
8570
8571            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8572            if(totalEntities == null) {
8573                data = Connections.emptyConnection();
8574            } else {
8575                try(var objectLimiter = new ObjectLimiter(env, CustomerTypeConstants.COMPONENT_VENDOR_NAME, CustomerTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
8576                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8577
8578                    var customerTypes = entities.stream()
8579                            .map(CustomerTypeObject::new)
8580                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8581
8582                    data = new CountedObjects<>(objectLimiter, customerTypes);
8583                }
8584            }
8585        } catch (NamingException ex) {
8586            throw new RuntimeException(ex);
8587        }
8588
8589        return data;
8590    }
8591
8592    @GraphQLField
8593    @GraphQLName("customerTypePaymentMethod")
8594    static CustomerTypePaymentMethodObject customerTypePaymentMethod(final DataFetchingEnvironment env,
8595            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName,
8596            @GraphQLName("paymentMethodName") @GraphQLNonNull final String paymentMethodName) {
8597        CustomerTypePaymentMethod customerTypePaymentMethod;
8598
8599        try {
8600            var commandForm = CustomerUtil.getHome().getGetCustomerTypePaymentMethodForm();
8601
8602            commandForm.setCustomerTypeName(customerTypeName);
8603            commandForm.setPaymentMethodName(paymentMethodName);
8604
8605
8606            customerTypePaymentMethod = CDI.current().select(GetCustomerTypePaymentMethodCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8607        } catch (NamingException ex) {
8608            throw new RuntimeException(ex);
8609        }
8610
8611        return customerTypePaymentMethod == null ? null : new CustomerTypePaymentMethodObject(customerTypePaymentMethod);
8612    }
8613
8614    @GraphQLField
8615    @GraphQLName("customerTypePaymentMethods")
8616    @GraphQLNonNull
8617    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8618    static CountingPaginatedData<CustomerTypePaymentMethodObject> customerTypePaymentMethods(final DataFetchingEnvironment env,
8619            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName) {
8620        CountingPaginatedData<CustomerTypePaymentMethodObject> data;
8621
8622        try {
8623            var commandForm = CustomerUtil.getHome().getGetCustomerTypePaymentMethodsForm();
8624            var command = CDI.current().select(GetCustomerTypePaymentMethodsCommand.class).get();
8625
8626            commandForm.setCustomerTypeName(customerTypeName);
8627
8628            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8629            if(totalEntities == null) {
8630                data = Connections.emptyConnection();
8631            } else {
8632                try(var objectLimiter = new ObjectLimiter(env, CustomerTypePaymentMethodConstants.COMPONENT_VENDOR_NAME, CustomerTypePaymentMethodConstants.ENTITY_TYPE_NAME, totalEntities)) {
8633                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8634
8635                    var customerTypePaymentMethods = entities.stream()
8636                            .map(CustomerTypePaymentMethodObject::new)
8637                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8638
8639                    data = new CountedObjects<>(objectLimiter, customerTypePaymentMethods);
8640                }
8641            }
8642        } catch (NamingException ex) {
8643            throw new RuntimeException(ex);
8644        }
8645
8646        return data;
8647    }
8648
8649    @GraphQLField
8650    @GraphQLName("customerTypeShippingMethod")
8651    static CustomerTypeShippingMethodObject customerTypeShippingMethod(final DataFetchingEnvironment env,
8652            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName,
8653            @GraphQLName("shippingMethodName") @GraphQLNonNull final String shippingMethodName) {
8654        CustomerTypeShippingMethod customerTypeShippingMethod;
8655
8656        try {
8657            var commandForm = CustomerUtil.getHome().getGetCustomerTypeShippingMethodForm();
8658
8659            commandForm.setCustomerTypeName(customerTypeName);
8660            commandForm.setShippingMethodName(shippingMethodName);
8661
8662
8663            customerTypeShippingMethod = CDI.current().select(GetCustomerTypeShippingMethodCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8664        } catch (NamingException ex) {
8665            throw new RuntimeException(ex);
8666        }
8667
8668        return customerTypeShippingMethod == null ? null : new CustomerTypeShippingMethodObject(customerTypeShippingMethod);
8669    }
8670
8671    @GraphQLField
8672    @GraphQLName("customerTypeShippingMethods")
8673    @GraphQLNonNull
8674    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8675    static CountingPaginatedData<CustomerTypeShippingMethodObject> customerTypeShippingMethods(final DataFetchingEnvironment env,
8676            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName) {
8677        CountingPaginatedData<CustomerTypeShippingMethodObject> data;
8678
8679        try {
8680            var commandForm = CustomerUtil.getHome().getGetCustomerTypeShippingMethodsForm();
8681            var command = CDI.current().select(GetCustomerTypeShippingMethodsCommand.class).get();
8682
8683            commandForm.setCustomerTypeName(customerTypeName);
8684
8685            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8686            if(totalEntities == null) {
8687                data = Connections.emptyConnection();
8688            } else {
8689                try(var objectLimiter = new ObjectLimiter(env, CustomerTypeShippingMethodConstants.COMPONENT_VENDOR_NAME, CustomerTypeShippingMethodConstants.ENTITY_TYPE_NAME, totalEntities)) {
8690                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8691
8692                    var customerTypeShippingMethods = entities.stream()
8693                            .map(CustomerTypeShippingMethodObject::new)
8694                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8695
8696                    data = new CountedObjects<>(objectLimiter, customerTypeShippingMethods);
8697                }
8698            }
8699        } catch (NamingException ex) {
8700            throw new RuntimeException(ex);
8701        }
8702
8703        return data;
8704    }
8705
8706    @GraphQLField
8707    @GraphQLName("customer")
8708    static CustomerObject customer(final DataFetchingEnvironment env,
8709            @GraphQLName("customerName") final String customerName,
8710            @GraphQLName("partyName") final String partyName,
8711            @GraphQLName("id") @GraphQLID final String id) {
8712        Customer customer;
8713
8714        try {
8715            var commandForm = CustomerUtil.getHome().getGetCustomerForm();
8716
8717            commandForm.setCustomerName(customerName);
8718            commandForm.setPartyName(partyName);
8719            commandForm.setUuid(id);
8720
8721            customer = CDI.current().select(GetCustomerCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8722        } catch (NamingException ex) {
8723            throw new RuntimeException(ex);
8724        }
8725
8726        return customer == null ? null : new CustomerObject(customer);
8727    }
8728
8729    @GraphQLField
8730    @GraphQLName("customers")
8731    @GraphQLNonNull
8732    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8733    static CountingPaginatedData<CustomerObject> customers(final DataFetchingEnvironment env) {
8734        CountingPaginatedData<CustomerObject> data;
8735
8736        try {
8737            var commandForm = CustomerUtil.getHome().getGetCustomersForm();
8738            var command = CDI.current().select(GetCustomersCommand.class).get();
8739
8740            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8741            if(totalEntities == null) {
8742                data = Connections.emptyConnection();
8743            } else {
8744                try(var objectLimiter = new ObjectLimiter(env, CustomerConstants.COMPONENT_VENDOR_NAME, CustomerConstants.ENTITY_TYPE_NAME, totalEntities)) {
8745                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8746
8747                    var customers = entities.stream()
8748                            .map(CustomerObject::new)
8749                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8750
8751                    data = new CountedObjects<>(objectLimiter, customers);
8752                }
8753            }
8754        } catch (NamingException ex) {
8755            throw new RuntimeException(ex);
8756        }
8757
8758        return data;
8759    }
8760
8761    @GraphQLField
8762    @GraphQLName("employee")
8763    static EmployeeObject employee(final DataFetchingEnvironment env,
8764            @GraphQLName("employeeName") final String employeeName,
8765            @GraphQLName("partyName") final String partyName,
8766            @GraphQLName("id") @GraphQLID final String id) {
8767        PartyEmployee partyEmployee;
8768
8769        try {
8770            var commandForm = EmployeeUtil.getHome().getGetEmployeeForm();
8771
8772            commandForm.setEmployeeName(employeeName);
8773            commandForm.setPartyName(partyName);
8774            commandForm.setUuid(id);
8775
8776            partyEmployee = CDI.current().select(GetEmployeeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8777        } catch (NamingException ex) {
8778            throw new RuntimeException(ex);
8779        }
8780
8781        return partyEmployee == null ? null : new EmployeeObject(partyEmployee);
8782    }
8783
8784    @GraphQLField
8785    @GraphQLName("employees")
8786    @GraphQLNonNull
8787    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8788    static CountingPaginatedData<EmployeeObject> employees(final DataFetchingEnvironment env) {
8789        CountingPaginatedData<EmployeeObject> data;
8790
8791        try {
8792            var commandForm = EmployeeUtil.getHome().getGetEmployeesForm();
8793            var command = CDI.current().select(GetEmployeesCommand.class).get();
8794
8795            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8796            if(totalEntities == null) {
8797                data = Connections.emptyConnection();
8798            } else {
8799                try(var objectLimiter = new ObjectLimiter(env, PartyEmployeeConstants.COMPONENT_VENDOR_NAME, PartyEmployeeConstants.ENTITY_TYPE_NAME, totalEntities)) {
8800                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8801
8802                    var employees = entities.stream()
8803                            .map(EmployeeObject::new)
8804                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8805
8806                    data = new CountedObjects<>(objectLimiter, employees);
8807                }
8808            }
8809        } catch (NamingException ex) {
8810            throw new RuntimeException(ex);
8811        }
8812
8813        return data;
8814    }
8815
8816    @GraphQLField
8817    @GraphQLName("vendorType")
8818    static VendorTypeObject vendorType(final DataFetchingEnvironment env,
8819            @GraphQLName("vendorTypeName") final String vendorTypeName,
8820            @GraphQLName("id") @GraphQLID final String id) {
8821        VendorType vendorType;
8822
8823        try {
8824            var commandForm = VendorUtil.getHome().getGetVendorTypeForm();
8825
8826            commandForm.setVendorTypeName(vendorTypeName);
8827            commandForm.setUuid(id);
8828
8829            vendorType = CDI.current().select(GetVendorTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8830        } catch (NamingException ex) {
8831            throw new RuntimeException(ex);
8832        }
8833
8834        return vendorType == null ? null : new VendorTypeObject(vendorType);
8835    }
8836
8837    @GraphQLField
8838    @GraphQLName("vendorTypes")
8839    @GraphQLNonNull
8840    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8841    static CountingPaginatedData<VendorTypeObject> vendorTypes(final DataFetchingEnvironment env) {
8842        CountingPaginatedData<VendorTypeObject> data;
8843
8844        try {
8845            var commandForm = VendorUtil.getHome().getGetVendorTypesForm();
8846            var command = CDI.current().select(GetVendorTypesCommand.class).get();
8847
8848            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8849            if(totalEntities == null) {
8850                data = Connections.emptyConnection();
8851            } else {
8852                try(var objectLimiter = new ObjectLimiter(env, VendorTypeConstants.COMPONENT_VENDOR_NAME, VendorTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
8853                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8854
8855                    var vendorTypes = entities.stream()
8856                            .map(VendorTypeObject::new)
8857                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8858
8859                    data = new CountedObjects<>(objectLimiter, vendorTypes);
8860                }
8861            }
8862        } catch (NamingException ex) {
8863            throw new RuntimeException(ex);
8864        }
8865
8866        return data;
8867    }
8868
8869    @GraphQLField
8870    @GraphQLName("vendor")
8871    static VendorObject vendor(final DataFetchingEnvironment env,
8872            @GraphQLName("vendorName") final String vendorName,
8873            @GraphQLName("partyName") final String partyName,
8874            @GraphQLName("id") @GraphQLID final String id) {
8875        Vendor vendor;
8876
8877        try {
8878            var commandForm = VendorUtil.getHome().getGetVendorForm();
8879
8880            commandForm.setVendorName(vendorName);
8881            commandForm.setPartyName(partyName);
8882            commandForm.setUuid(id);
8883
8884            vendor = CDI.current().select(GetVendorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8885        } catch (NamingException ex) {
8886            throw new RuntimeException(ex);
8887        }
8888
8889        return vendor == null ? null : new VendorObject(vendor);
8890    }
8891
8892    @GraphQLField
8893    @GraphQLName("vendors")
8894    @GraphQLNonNull
8895    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8896    static CountingPaginatedData<VendorObject> vendors(final DataFetchingEnvironment env) {
8897        CountingPaginatedData<VendorObject> data;
8898
8899        try {
8900            var commandForm = VendorUtil.getHome().getGetVendorsForm();
8901            var command = CDI.current().select(GetVendorsCommand.class).get();
8902
8903            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8904            if(totalEntities == null) {
8905                data = Connections.emptyConnection();
8906            } else {
8907                try(var objectLimiter = new ObjectLimiter(env, VendorConstants.COMPONENT_VENDOR_NAME, VendorConstants.ENTITY_TYPE_NAME, totalEntities)) {
8908                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8909
8910                    var vendors = entities.stream()
8911                            .map(VendorObject::new)
8912                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8913
8914                    data = new CountedObjects<>(objectLimiter, vendors);
8915                }
8916            }
8917        } catch (NamingException ex) {
8918            throw new RuntimeException(ex);
8919        }
8920
8921        return data;
8922    }
8923
8924    @GraphQLField
8925    @GraphQLName("vendorItem")
8926    static VendorItemObject vendorItem(final DataFetchingEnvironment env,
8927            @GraphQLName("vendorName") final String vendorName,
8928            @GraphQLName("partyName") final String partyName,
8929            @GraphQLName("vendorItemName") final String vendorItemName,
8930            @GraphQLName("id") @GraphQLID final String id) {
8931        VendorItem vendorItem;
8932
8933        try {
8934            var commandForm = VendorUtil.getHome().getGetVendorItemForm();
8935
8936            commandForm.setVendorName(vendorName);
8937            commandForm.setPartyName(partyName);
8938            commandForm.setVendorItemName(vendorItemName);
8939            commandForm.setUuid(id);
8940
8941            vendorItem = CDI.current().select(GetVendorItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8942        } catch (NamingException ex) {
8943            throw new RuntimeException(ex);
8944        }
8945
8946        return vendorItem == null ? null : new VendorItemObject(vendorItem);
8947    }
8948
8949    @GraphQLField
8950    @GraphQLName("vendorItems")
8951    @GraphQLNonNull
8952    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8953    static CountingPaginatedData<VendorItemObject> vendorItems(final DataFetchingEnvironment env,
8954            @GraphQLName("vendorName") final String vendorName,
8955            @GraphQLName("itemName") final String itemName) {
8956        CountingPaginatedData<VendorItemObject> data;
8957
8958        try {
8959            var commandForm = VendorUtil.getHome().getGetVendorItemsForm();
8960            var command = CDI.current().select(GetVendorItemsCommand.class).get();
8961
8962            commandForm.setVendorName(vendorName);
8963            commandForm.setItemName(itemName);
8964
8965            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8966            if(totalEntities == null) {
8967                data = Connections.emptyConnection();
8968            } else {
8969                try(var objectLimiter = new ObjectLimiter(env, VendorItemConstants.COMPONENT_VENDOR_NAME, VendorItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
8970                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8971
8972                    var vendorItems = entities.stream()
8973                            .map(VendorItemObject::new)
8974                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8975
8976                    data = new CountedObjects<>(objectLimiter, vendorItems);
8977                }
8978            }
8979        } catch (NamingException ex) {
8980            throw new RuntimeException(ex);
8981        }
8982
8983        return data;
8984    }
8985
8986    @GraphQLField
8987    @GraphQLName("vendorItemCost")
8988    static VendorItemCostObject vendorItemCost(final DataFetchingEnvironment env,
8989            @GraphQLName("vendorName") final String vendorName,
8990            @GraphQLName("partyName") final String partyName,
8991            @GraphQLName("vendorItemName") @GraphQLNonNull final String vendorItemName,
8992            @GraphQLName("inventoryConditionName") @GraphQLNonNull final String inventoryConditionName,
8993            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName) {
8994        VendorItemCost vendorItemCost;
8995
8996        try {
8997            var commandForm = VendorUtil.getHome().getGetVendorItemCostForm();
8998
8999            commandForm.setVendorName(vendorName);
9000            commandForm.setPartyName(partyName);
9001            commandForm.setVendorItemName(vendorItemName);
9002            commandForm.setInventoryConditionName(inventoryConditionName);
9003            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
9004
9005            vendorItemCost = CDI.current().select(GetVendorItemCostCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9006        } catch (NamingException ex) {
9007            throw new RuntimeException(ex);
9008        }
9009
9010        return vendorItemCost == null ? null : new VendorItemCostObject(vendorItemCost);
9011    }
9012
9013    @GraphQLField
9014    @GraphQLName("vendorItemCosts")
9015    @GraphQLNonNull
9016    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9017    static CountingPaginatedData<VendorItemCostObject> vendorItemCosts(final DataFetchingEnvironment env,
9018            @GraphQLName("vendorName") @GraphQLNonNull final String vendorName,
9019            @GraphQLName("vendorItemName") @GraphQLNonNull final String vendorItemName) {
9020        CountingPaginatedData<VendorItemCostObject> data;
9021
9022        try {
9023            var commandForm = VendorUtil.getHome().getGetVendorItemCostsForm();
9024
9025            commandForm.setVendorName(vendorName);
9026            commandForm.setVendorItemName(vendorItemName);
9027
9028            var command = CDI.current().select(GetVendorItemCostsCommand.class).get();
9029
9030            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9031            if(totalEntities == null) {
9032                data = Connections.emptyConnection();
9033            } else {
9034                try(var objectLimiter = new ObjectLimiter(env, VendorItemCostConstants.COMPONENT_VENDOR_NAME, VendorItemCostConstants.ENTITY_TYPE_NAME, totalEntities)) {
9035                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9036
9037                    var vendorItemCosts = entities.stream()
9038                            .map(VendorItemCostObject::new)
9039                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9040
9041                    data = new CountedObjects<>(objectLimiter, vendorItemCosts);
9042                }
9043            }
9044        } catch (NamingException ex) {
9045            throw new RuntimeException(ex);
9046        }
9047
9048        return data;
9049    }
9050
9051    @GraphQLField
9052    @GraphQLName("roleType")
9053    static RoleTypeObject roleType(final DataFetchingEnvironment env,
9054            @GraphQLName("roleTypeName") final String roleTypeName,
9055            @GraphQLName("id") @GraphQLID final String id) {
9056        RoleType roleType;
9057
9058        try {
9059            var commandForm = PartyUtil.getHome().getGetRoleTypeForm();
9060
9061            commandForm.setRoleTypeName(roleTypeName);
9062            commandForm.setUuid(id);
9063
9064            roleType = CDI.current().select(GetRoleTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9065        } catch (NamingException ex) {
9066            throw new RuntimeException(ex);
9067        }
9068
9069        return roleType == null ? null : new RoleTypeObject(roleType);
9070    }
9071
9072    @GraphQLField
9073    @GraphQLName("roleTypes")
9074    @GraphQLNonNull
9075    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9076    static CountingPaginatedData<RoleTypeObject> roleTypes(final DataFetchingEnvironment env) {
9077        CountingPaginatedData<RoleTypeObject> data;
9078
9079        try {
9080            var commandForm = PartyUtil.getHome().getGetRoleTypesForm();
9081            var command = CDI.current().select(GetRoleTypesCommand.class).get();
9082
9083            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9084            if(totalEntities == null) {
9085                data = Connections.emptyConnection();
9086            } else {
9087                try(var objectLimiter = new ObjectLimiter(env, RoleTypeConstants.COMPONENT_VENDOR_NAME, RoleTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9088                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9089
9090                    var roleTypes = entities.stream()
9091                            .map(RoleTypeObject::new)
9092                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9093
9094                    data = new CountedObjects<>(objectLimiter, roleTypes);
9095                }
9096            }
9097        } catch (NamingException ex) {
9098            throw new RuntimeException(ex);
9099        }
9100
9101        return data;
9102    }
9103
9104    @GraphQLField
9105    @GraphQLName("partyType")
9106    static PartyTypeObject partyType(final DataFetchingEnvironment env,
9107            @GraphQLName("partyTypeName") final String partyTypeName,
9108            @GraphQLName("id") @GraphQLID final String id) {
9109        PartyType partyType;
9110
9111        try {
9112            var commandForm = PartyUtil.getHome().getGetPartyTypeForm();
9113
9114            commandForm.setPartyTypeName(partyTypeName);
9115            commandForm.setUuid(id);
9116
9117            partyType = CDI.current().select(GetPartyTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9118        } catch (NamingException ex) {
9119            throw new RuntimeException(ex);
9120        }
9121
9122        return partyType == null ? null : new PartyTypeObject(partyType);
9123    }
9124
9125    @GraphQLField
9126    @GraphQLName("partyTypes")
9127    @GraphQLNonNull
9128    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9129    static CountingPaginatedData<PartyTypeObject> partyTypes(final DataFetchingEnvironment env) {
9130        CountingPaginatedData<PartyTypeObject> data;
9131
9132        try {
9133            var commandForm = PartyUtil.getHome().getGetPartyTypesForm();
9134            var command = CDI.current().select(GetPartyTypesCommand.class).get();
9135
9136            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9137            if(totalEntities == null) {
9138                data = Connections.emptyConnection();
9139            } else {
9140                try(var objectLimiter = new ObjectLimiter(env, PartyTypeConstants.COMPONENT_VENDOR_NAME, PartyTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9141                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9142
9143                    var partyTypes = entities.stream()
9144                            .map(PartyTypeObject::new)
9145                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9146
9147                    data = new CountedObjects<>(objectLimiter, partyTypes);
9148                }
9149            }
9150        } catch (NamingException ex) {
9151            throw new RuntimeException(ex);
9152        }
9153
9154        return data;
9155    }
9156
9157    @GraphQLField
9158    @GraphQLName("partyAliasType")
9159    static PartyAliasTypeObject partyAliasType(final DataFetchingEnvironment env,
9160            @GraphQLName("partyTypeName") final String partyTypeName,
9161            @GraphQLName("partyAliasTypeName") final String partyAliasTypeName,
9162            @GraphQLName("id") @GraphQLID final String id) {
9163        PartyAliasType partyAliasType;
9164
9165        try {
9166            var commandForm = PartyUtil.getHome().getGetPartyAliasTypeForm();
9167
9168            commandForm.setPartyTypeName(partyTypeName);
9169            commandForm.setPartyAliasTypeName(partyAliasTypeName);
9170            commandForm.setUuid(id);
9171
9172            partyAliasType = CDI.current().select(GetPartyAliasTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9173        } catch (NamingException ex) {
9174            throw new RuntimeException(ex);
9175        }
9176
9177        return partyAliasType == null ? null : new PartyAliasTypeObject(partyAliasType);
9178    }
9179
9180    @GraphQLField
9181    @GraphQLName("partyAliasTypes")
9182    @GraphQLNonNull
9183    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9184    static CountingPaginatedData<PartyAliasTypeObject> partyAliasTypes(final DataFetchingEnvironment env,
9185            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
9186        CountingPaginatedData<PartyAliasTypeObject> data;
9187
9188        try {
9189            var commandForm = PartyUtil.getHome().getGetPartyAliasTypesForm();
9190            var command = CDI.current().select(GetPartyAliasTypesCommand.class).get();
9191
9192            commandForm.setPartyTypeName(partyTypeName);
9193
9194            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9195            if(totalEntities == null) {
9196                data = Connections.emptyConnection();
9197            } else {
9198                try(var objectLimiter = new ObjectLimiter(env, PartyAliasTypeConstants.COMPONENT_VENDOR_NAME, PartyAliasTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9199                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9200
9201                    var partyAliasTypes = entities.stream()
9202                            .map(PartyAliasTypeObject::new)
9203                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9204
9205                    data = new CountedObjects<>(objectLimiter, partyAliasTypes);
9206                }
9207            }
9208        } catch (NamingException ex) {
9209            throw new RuntimeException(ex);
9210        }
9211
9212        return data;
9213    }
9214
9215    @GraphQLField
9216    @GraphQLName("partyAlias")
9217    static PartyAliasObject partyAlias(final DataFetchingEnvironment env,
9218            @GraphQLName("partyName") final String partyName,
9219            @GraphQLName("partyTypeName") final String partyTypeName,
9220            @GraphQLName("partyAliasTypeName") final String partyAliasTypeName,
9221            @GraphQLName("alias") final String alias) {
9222        PartyAlias partyAlias;
9223
9224        try {
9225            var commandForm = PartyUtil.getHome().getGetPartyAliasForm();
9226
9227            commandForm.setPartyName(partyName);
9228            commandForm.setPartyTypeName(partyTypeName);
9229            commandForm.setPartyAliasTypeName(partyAliasTypeName);
9230            commandForm.setAlias(alias);
9231
9232            partyAlias = CDI.current().select(GetPartyAliasCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9233        } catch (NamingException ex) {
9234            throw new RuntimeException(ex);
9235        }
9236
9237        return partyAlias == null ? null : new PartyAliasObject(partyAlias);
9238    }
9239
9240    @GraphQLField
9241    @GraphQLName("partyAliases")
9242    static Collection<PartyAliasObject> partyAliases(final DataFetchingEnvironment env,
9243            @GraphQLName("partyName") final String partyName,
9244            @GraphQLName("partyTypeName") final String partyTypeName,
9245            @GraphQLName("partyAliasTypeName") final String partyAliasTypeName) {
9246        Collection<PartyAlias> partyAliases;
9247        Collection<PartyAliasObject> partyAliasObjects;
9248
9249        try {
9250            var commandForm = PartyUtil.getHome().getGetPartyAliasesForm();
9251
9252            commandForm.setPartyName(partyName);
9253            commandForm.setPartyTypeName(partyTypeName);
9254            commandForm.setPartyAliasTypeName(partyAliasTypeName);
9255
9256            partyAliases = CDI.current().select(GetPartyAliasesCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9257        } catch (NamingException ex) {
9258            throw new RuntimeException(ex);
9259        }
9260
9261        if(partyAliases == null) {
9262            partyAliasObjects = emptyList();
9263        } else {
9264            partyAliasObjects = new ArrayList<>(partyAliases.size());
9265
9266            partyAliases.stream()
9267                    .map(PartyAliasObject::new)
9268                    .forEachOrdered(partyAliasObjects::add);
9269        }
9270
9271        return partyAliasObjects;
9272    }
9273
9274    @GraphQLField
9275    @GraphQLName("party")
9276    static PartyObject party(final DataFetchingEnvironment env,
9277            @GraphQLName("partyName") final String partyName,
9278            @GraphQLName("id") @GraphQLID final String id) {
9279        Party party;
9280
9281        try {
9282            var commandForm = PartyUtil.getHome().getGetPartyForm();
9283
9284            commandForm.setPartyName(partyName);
9285            commandForm.setUuid(id);
9286
9287            party = CDI.current().select(GetPartyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9288        } catch (NamingException ex) {
9289            throw new RuntimeException(ex);
9290        }
9291
9292        return party == null ? null : new PartyObject(party);
9293    }
9294
9295    @GraphQLField
9296    @GraphQLName("parties")
9297    @GraphQLNonNull
9298    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9299    static CountingPaginatedData<PartyObject> parties(final DataFetchingEnvironment env) {
9300        CountingPaginatedData<PartyObject> data;
9301
9302        try {
9303            var commandForm = PartyUtil.getHome().getGetPartiesForm();
9304            var command = CDI.current().select(GetPartiesCommand.class).get();
9305
9306            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9307            if(totalEntities == null) {
9308                data = Connections.emptyConnection();
9309            } else {
9310                try(var objectLimiter = new ObjectLimiter(env, PartyConstants.COMPONENT_VENDOR_NAME, PartyConstants.ENTITY_TYPE_NAME, totalEntities)) {
9311                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9312
9313                    var parties = entities.stream()
9314                            .map(PartyObject::new)
9315                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9316
9317                    data = new CountedObjects<>(objectLimiter, parties);
9318                }
9319            }
9320        } catch (NamingException ex) {
9321            throw new RuntimeException(ex);
9322        }
9323
9324        return data;
9325    }
9326
9327    @GraphQLField
9328    @GraphQLName("company")
9329    static CompanyObject company(final DataFetchingEnvironment env,
9330            @GraphQLName("companyName") final String companyName,
9331            @GraphQLName("partyName") final String partyName,
9332            @GraphQLName("id") @GraphQLID final String id) {
9333        PartyCompany company;
9334
9335        try {
9336            var commandForm = PartyUtil.getHome().getGetCompanyForm();
9337
9338            commandForm.setCompanyName(companyName);
9339            commandForm.setPartyName(partyName);
9340            commandForm.setUuid(id);
9341
9342            company = CDI.current().select(GetCompanyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9343        } catch (NamingException ex) {
9344            throw new RuntimeException(ex);
9345        }
9346
9347        return company == null ? null : new CompanyObject(company);
9348    }
9349
9350    @GraphQLField
9351    @GraphQLName("companies")
9352    @GraphQLNonNull
9353    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9354    static CountingPaginatedData<CompanyObject> companies(final DataFetchingEnvironment env) {
9355        CountingPaginatedData<CompanyObject> data;
9356
9357        try {
9358            var commandForm = PartyUtil.getHome().getGetCompaniesForm();
9359            var command = CDI.current().select(GetCompaniesCommand.class).get();
9360
9361            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9362            if(totalEntities == null) {
9363                data = Connections.emptyConnection();
9364            } else {
9365                try(var objectLimiter = new ObjectLimiter(env, PartyCompanyConstants.COMPONENT_VENDOR_NAME, PartyCompanyConstants.ENTITY_TYPE_NAME, totalEntities)) {
9366                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9367
9368                    var companies = entities.stream()
9369                            .map(CompanyObject::new)
9370                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9371
9372                    data = new CountedObjects<>(objectLimiter, companies);
9373                }
9374            }
9375        } catch (NamingException ex) {
9376            throw new RuntimeException(ex);
9377        }
9378
9379        return data;
9380    }
9381
9382    @GraphQLField
9383    @GraphQLName("division")
9384    static DivisionObject division(final DataFetchingEnvironment env,
9385            @GraphQLName("companyName") final String companyName,
9386            @GraphQLName("divisionName") final String divisionName,
9387            @GraphQLName("partyName") final String partyName,
9388            @GraphQLName("id") @GraphQLID final String id) {
9389        PartyDivision division;
9390
9391        try {
9392            var commandForm = PartyUtil.getHome().getGetDivisionForm();
9393
9394            commandForm.setCompanyName(companyName);
9395            commandForm.setDivisionName(divisionName);
9396            commandForm.setPartyName(partyName);
9397            commandForm.setUuid(id);
9398
9399            division = CDI.current().select(GetDivisionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9400        } catch (NamingException ex) {
9401            throw new RuntimeException(ex);
9402        }
9403
9404        return division == null ? null : new DivisionObject(division);
9405    }
9406
9407    @GraphQLField
9408    @GraphQLName("divisions")
9409    @GraphQLNonNull
9410    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9411    static CountingPaginatedData<DivisionObject> divisions(final DataFetchingEnvironment env,
9412            @GraphQLName("companyName") @GraphQLNonNull final String companyName) {
9413        CountingPaginatedData<DivisionObject> data;
9414
9415        try {
9416            var commandForm = PartyUtil.getHome().getGetDivisionsForm();
9417            var command = CDI.current().select(GetDivisionsCommand.class).get();
9418
9419            commandForm.setCompanyName(companyName);
9420
9421            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9422            if(totalEntities == null) {
9423                data = Connections.emptyConnection();
9424            } else {
9425                try(var objectLimiter = new ObjectLimiter(env, PartyDivisionConstants.COMPONENT_VENDOR_NAME, PartyDivisionConstants.ENTITY_TYPE_NAME, totalEntities)) {
9426                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9427
9428                    var divisions = entities.stream()
9429                            .map(DivisionObject::new)
9430                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9431
9432                    data = new CountedObjects<>(objectLimiter, divisions);
9433                }
9434            }
9435        } catch (NamingException ex) {
9436            throw new RuntimeException(ex);
9437        }
9438
9439        return data;
9440    }
9441
9442    @GraphQLField
9443    @GraphQLName("department")
9444    static DepartmentObject department(final DataFetchingEnvironment env,
9445            @GraphQLName("companyName") final String companyName,
9446            @GraphQLName("divisionName") final String divisionName,
9447            @GraphQLName("departmentName") final String departmentName,
9448            @GraphQLName("partyName") final String partyName,
9449            @GraphQLName("id") @GraphQLID final String id) {
9450        PartyDepartment department;
9451
9452        try {
9453            var commandForm = PartyUtil.getHome().getGetDepartmentForm();
9454
9455            commandForm.setCompanyName(companyName);
9456            commandForm.setDivisionName(divisionName);
9457            commandForm.setDepartmentName(departmentName);
9458            commandForm.setPartyName(partyName);
9459            commandForm.setUuid(id);
9460
9461            department = CDI.current().select(GetDepartmentCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9462        } catch (NamingException ex) {
9463            throw new RuntimeException(ex);
9464        }
9465
9466        return department == null ? null : new DepartmentObject(department);
9467    }
9468
9469    @GraphQLField
9470    @GraphQLName("departments")
9471    @GraphQLNonNull
9472    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9473    static CountingPaginatedData<DepartmentObject> departments(final DataFetchingEnvironment env,
9474            @GraphQLName("companyName") @GraphQLNonNull final String companyName,
9475            @GraphQLName("divisionName") final String divisionName) {
9476        CountingPaginatedData<DepartmentObject> data;
9477
9478        try {
9479            var commandForm = PartyUtil.getHome().getGetDepartmentsForm();
9480            var command = CDI.current().select(GetDepartmentsCommand.class).get();
9481
9482            commandForm.setCompanyName(companyName);
9483            commandForm.setDivisionName(divisionName);
9484
9485            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9486            if(totalEntities == null) {
9487                data = Connections.emptyConnection();
9488            } else {
9489                try(var objectLimiter = new ObjectLimiter(env, PartyDepartmentConstants.COMPONENT_VENDOR_NAME, PartyDepartmentConstants.ENTITY_TYPE_NAME, totalEntities)) {
9490                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9491
9492                    var departments = entities.stream()
9493                            .map(DepartmentObject::new)
9494                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9495
9496                    data = new CountedObjects<>(objectLimiter, departments);
9497                }
9498            }
9499        } catch (NamingException ex) {
9500            throw new RuntimeException(ex);
9501        }
9502
9503        return data;
9504    }
9505
9506    @GraphQLField
9507    @GraphQLName("warehouseType")
9508    static WarehouseTypeObject warehouseType(final DataFetchingEnvironment env,
9509            @GraphQLName("warehouseTypeName") final String warehouseTypeName,
9510            @GraphQLName("id") @GraphQLID final String id) {
9511        WarehouseType warehouseType;
9512
9513        try {
9514            var commandForm = WarehouseUtil.getHome().getGetWarehouseTypeForm();
9515
9516            commandForm.setWarehouseTypeName(warehouseTypeName);
9517            commandForm.setUuid(id);
9518
9519            warehouseType = CDI.current().select(GetWarehouseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9520        } catch (NamingException ex) {
9521            throw new RuntimeException(ex);
9522        }
9523
9524        return warehouseType == null ? null : new WarehouseTypeObject(warehouseType);
9525    }
9526
9527    @GraphQLField
9528    @GraphQLName("warehouseTypes")
9529    @GraphQLNonNull
9530    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9531    static CountingPaginatedData<WarehouseTypeObject> warehouseTypes(final DataFetchingEnvironment env) {
9532        CountingPaginatedData<WarehouseTypeObject> data;
9533
9534        try {
9535            var commandForm = WarehouseUtil.getHome().getGetWarehouseTypesForm();
9536            var command = CDI.current().select(GetWarehouseTypesCommand.class).get();
9537
9538            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9539            if(totalEntities == null) {
9540                data = Connections.emptyConnection();
9541            } else {
9542                try(var objectLimiter = new ObjectLimiter(env, WarehouseTypeConstants.COMPONENT_VENDOR_NAME, WarehouseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9543                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9544
9545                    var warehouseTypes = entities.stream()
9546                            .map(WarehouseTypeObject::new)
9547                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9548
9549                    data = new CountedObjects<>(objectLimiter, warehouseTypes);
9550                }
9551            }
9552        } catch (NamingException ex) {
9553            throw new RuntimeException(ex);
9554        }
9555
9556        return data;
9557    }
9558
9559    @GraphQLField
9560    @GraphQLName("warehouse")
9561    static WarehouseObject warehouse(final DataFetchingEnvironment env,
9562            @GraphQLName("warehouseName") final String warehouseName,
9563            @GraphQLName("partyName") final String partyName,
9564            @GraphQLName("id") @GraphQLID final String id) {
9565        Warehouse warehouse;
9566
9567        try {
9568            var commandForm = WarehouseUtil.getHome().getGetWarehouseForm();
9569
9570            commandForm.setWarehouseName(warehouseName);
9571            commandForm.setPartyName(partyName);
9572            commandForm.setUuid(id);
9573
9574            warehouse = CDI.current().select(GetWarehouseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9575        } catch (NamingException ex) {
9576            throw new RuntimeException(ex);
9577        }
9578
9579        return warehouse == null ? null : new WarehouseObject(warehouse);
9580    }
9581
9582    @GraphQLField
9583    @GraphQLName("warehouses")
9584    @GraphQLNonNull
9585    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9586    static CountingPaginatedData<WarehouseObject> warehouses(final DataFetchingEnvironment env) {
9587        CountingPaginatedData<WarehouseObject> data;
9588
9589        try {
9590            var commandForm = WarehouseUtil.getHome().getGetWarehousesForm();
9591            var command = CDI.current().select(GetWarehousesCommand.class).get();
9592
9593            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9594            if(totalEntities == null) {
9595                data = Connections.emptyConnection();
9596            } else {
9597                try(var objectLimiter = new ObjectLimiter(env, WarehouseConstants.COMPONENT_VENDOR_NAME, WarehouseConstants.ENTITY_TYPE_NAME, totalEntities)) {
9598                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9599
9600                    var warehouses = entities.stream()
9601                            .map(WarehouseObject::new)
9602                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9603
9604                    data = new CountedObjects<>(objectLimiter, warehouses);
9605                }
9606            }
9607        } catch (NamingException ex) {
9608            throw new RuntimeException(ex);
9609        }
9610
9611        return data;
9612    }
9613
9614    @GraphQLField
9615    @GraphQLName("locationUseType")
9616    static LocationUseTypeObject locationUseType(final DataFetchingEnvironment env,
9617            @GraphQLName("locationUseTypeName") final String locationUseTypeName,
9618            @GraphQLName("id") @GraphQLID final String id) {
9619        LocationUseType locationUseType;
9620
9621        try {
9622            var commandForm = WarehouseUtil.getHome().getGetLocationUseTypeForm();
9623
9624            commandForm.setLocationUseTypeName(locationUseTypeName);
9625            commandForm.setUuid(id);
9626
9627            locationUseType = CDI.current().select(GetLocationUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9628        } catch (NamingException ex) {
9629            throw new RuntimeException(ex);
9630        }
9631
9632        return locationUseType == null ? null : new LocationUseTypeObject(locationUseType);
9633    }
9634
9635    @GraphQLField
9636    @GraphQLName("locationUseTypes")
9637    @GraphQLNonNull
9638    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9639    static CountingPaginatedData<LocationUseTypeObject> locationUseTypes(final DataFetchingEnvironment env) {
9640        CountingPaginatedData<LocationUseTypeObject> data;
9641
9642        try {
9643            var commandForm = WarehouseUtil.getHome().getGetLocationUseTypesForm();
9644            var command = CDI.current().select(GetLocationUseTypesCommand.class).get();
9645
9646            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9647            if(totalEntities == null) {
9648                data = Connections.emptyConnection();
9649            } else {
9650                try(var objectLimiter = new ObjectLimiter(env, LocationUseTypeConstants.COMPONENT_VENDOR_NAME, LocationUseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9651                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9652
9653                    var locationUseTypes = entities.stream()
9654                            .map(LocationUseTypeObject::new)
9655                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9656
9657                    data = new CountedObjects<>(objectLimiter, locationUseTypes);
9658                }
9659            }
9660        } catch (NamingException ex) {
9661            throw new RuntimeException(ex);
9662        }
9663
9664        return data;
9665    }
9666
9667    @GraphQLField
9668    @GraphQLName("inventoryLocation")
9669    static InventoryLocationObject inventoryLocation(final DataFetchingEnvironment env,
9670            @GraphQLName("partyName") final String partyName,
9671            @GraphQLName("warehouseName") final String warehouseName,
9672            @GraphQLName("locationName") @GraphQLNonNull final String locationName,
9673            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
9674        InventoryLocation inventoryLocation;
9675
9676        try {
9677            var commandForm = InventoryUtil.getHome().getGetInventoryLocationForm();
9678
9679            commandForm.setPartyName(partyName);
9680            commandForm.setWarehouseName(warehouseName);
9681            commandForm.setLocationName(locationName);
9682            commandForm.setItemName(itemName);
9683
9684            inventoryLocation = CDI.current().select(GetInventoryLocationCommand.class).get()
9685                    .getEntityForGraphQl(getUserVisitPK(env), commandForm);
9686        } catch (NamingException ex) {
9687            throw new RuntimeException(ex);
9688        }
9689
9690        return inventoryLocation == null ? null : new InventoryLocationObject(inventoryLocation);
9691    }
9692
9693    @GraphQLField
9694    @GraphQLName("inventoryLocations")
9695    @GraphQLNonNull
9696    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9697    static CountingPaginatedData<InventoryLocationObject> inventoryLocations(final DataFetchingEnvironment env,
9698            @GraphQLName("partyName") final String partyName,
9699            @GraphQLName("warehouseName") final String warehouseName,
9700            @GraphQLName("locationName") final String locationName,
9701            @GraphQLName("ownerPartyName") final String ownerPartyName,
9702            @GraphQLName("itemName") final String itemName,
9703            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName,
9704            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
9705            @GraphQLName("inventoryConditionName") final String inventoryConditionName) {
9706        CountingPaginatedData<InventoryLocationObject> data;
9707
9708        try {
9709            var commandForm = InventoryUtil.getHome().getGetInventoryLocationsForm();
9710            var command = CDI.current().select(GetInventoryLocationsCommand.class).get();
9711
9712            commandForm.setPartyName(partyName);
9713            commandForm.setWarehouseName(warehouseName);
9714            commandForm.setLocationName(locationName);
9715            commandForm.setOwnerPartyName(ownerPartyName);
9716            commandForm.setItemName(itemName);
9717            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
9718            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
9719            commandForm.setInventoryConditionName(inventoryConditionName);
9720
9721            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9722            if(totalEntities == null) {
9723                data = Connections.emptyConnection();
9724            } else {
9725                try(var objectLimiter = new ObjectLimiter(env, InventoryLocationConstants.COMPONENT_VENDOR_NAME,
9726                        InventoryLocationConstants.ENTITY_TYPE_NAME, totalEntities)) {
9727                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9728                    var inventoryLocations = entities.stream()
9729                            .map(InventoryLocationObject::new)
9730                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9731
9732                    data = new CountedObjects<>(objectLimiter, inventoryLocations);
9733                }
9734            }
9735        } catch (NamingException ex) {
9736            throw new RuntimeException(ex);
9737        }
9738
9739        return data;
9740    }
9741
9742    @GraphQLField
9743    @GraphQLName("inventoryLocationBucket")
9744    static InventoryLocationBucketObject inventoryLocationBucket(final DataFetchingEnvironment env,
9745            @GraphQLName("partyName") final String partyName,
9746            @GraphQLName("warehouseName") final String warehouseName,
9747            @GraphQLName("locationName") @GraphQLNonNull final String locationName,
9748            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
9749            @GraphQLName("inventoryBucketTypeName") @GraphQLNonNull final String inventoryBucketTypeName) {
9750        InventoryLocationBucket inventoryLocationBucket;
9751
9752        try {
9753            var commandForm = InventoryUtil.getHome().getGetInventoryLocationBucketForm();
9754
9755            commandForm.setPartyName(partyName);
9756            commandForm.setWarehouseName(warehouseName);
9757            commandForm.setLocationName(locationName);
9758            commandForm.setItemName(itemName);
9759            commandForm.setInventoryBucketTypeName(inventoryBucketTypeName);
9760
9761            inventoryLocationBucket = CDI.current().select(GetInventoryLocationBucketCommand.class).get()
9762                    .getEntityForGraphQl(getUserVisitPK(env), commandForm);
9763        } catch (NamingException ex) {
9764            throw new RuntimeException(ex);
9765        }
9766
9767        return inventoryLocationBucket == null ? null : new InventoryLocationBucketObject(inventoryLocationBucket);
9768    }
9769
9770    @GraphQLField
9771    @GraphQLName("inventoryLocationBuckets")
9772    @GraphQLNonNull
9773    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9774    static CountingPaginatedData<InventoryLocationBucketObject> inventoryLocationBuckets(final DataFetchingEnvironment env,
9775            @GraphQLName("partyName") final String partyName,
9776            @GraphQLName("warehouseName") final String warehouseName,
9777            @GraphQLName("locationName") final String locationName,
9778            @GraphQLName("itemName") final String itemName,
9779            @GraphQLName("inventoryBucketTypeName") final String inventoryBucketTypeName) {
9780        CountingPaginatedData<InventoryLocationBucketObject> data;
9781
9782        try {
9783            var commandForm = InventoryUtil.getHome().getGetInventoryLocationBucketsForm();
9784            var command = CDI.current().select(GetInventoryLocationBucketsCommand.class).get();
9785
9786            commandForm.setPartyName(partyName);
9787            commandForm.setWarehouseName(warehouseName);
9788            commandForm.setLocationName(locationName);
9789            commandForm.setItemName(itemName);
9790            commandForm.setInventoryBucketTypeName(inventoryBucketTypeName);
9791
9792            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9793            if(totalEntities == null) {
9794                data = Connections.emptyConnection();
9795            } else {
9796                try(var objectLimiter = new ObjectLimiter(env, InventoryLocationBucketConstants.COMPONENT_VENDOR_NAME,
9797                        InventoryLocationBucketConstants.ENTITY_TYPE_NAME, totalEntities)) {
9798                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9799                    var inventoryLocationBuckets = entities.stream()
9800                            .map(InventoryLocationBucketObject::new)
9801                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9802
9803                    data = new CountedObjects<>(objectLimiter, inventoryLocationBuckets);
9804                }
9805            }
9806        } catch (NamingException ex) {
9807            throw new RuntimeException(ex);
9808        }
9809
9810        return data;
9811    }
9812
9813    @GraphQLField
9814    @GraphQLName("inventoryLocationGroup")
9815    static InventoryLocationGroupObject inventoryLocationGroup(final DataFetchingEnvironment env,
9816            @GraphQLName("warehouseName") final String warehouseName,
9817            @GraphQLName("inventoryLocationGroupName") final String inventoryLocationGroupName) {
9818        InventoryLocationGroup inventoryLocationGroup;
9819
9820        try {
9821            var commandForm = InventoryUtil.getHome().getGetInventoryLocationGroupForm();
9822
9823            commandForm.setWarehouseName(warehouseName);
9824            commandForm.setInventoryLocationGroupName(inventoryLocationGroupName);
9825
9826            inventoryLocationGroup = CDI.current().select(GetInventoryLocationGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9827        } catch (NamingException ex) {
9828            throw new RuntimeException(ex);
9829        }
9830
9831        return inventoryLocationGroup == null ? null : new InventoryLocationGroupObject(inventoryLocationGroup);
9832    }
9833
9834    @GraphQLField
9835    @GraphQLName("inventoryLocationGroups")
9836    @GraphQLNonNull
9837    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9838    static CountingPaginatedData<InventoryLocationGroupObject> inventoryLocationGroups(final DataFetchingEnvironment env,
9839            @GraphQLName("warehouseName") final String warehouseName) {
9840        CountingPaginatedData<InventoryLocationGroupObject> data;
9841
9842        try {
9843            var commandForm = InventoryUtil.getHome().getGetInventoryLocationGroupsForm();
9844            var command = CDI.current().select(GetInventoryLocationGroupsCommand.class).get();
9845
9846            commandForm.setWarehouseName(warehouseName);
9847
9848            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9849            if(totalEntities == null) {
9850                data = Connections.emptyConnection();
9851            } else {
9852                try(var objectLimiter = new ObjectLimiter(env, InventoryLocationGroupConstants.COMPONENT_VENDOR_NAME, InventoryLocationGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
9853                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9854
9855                    var inventoryLocationGroups = entities.stream()
9856                            .map(InventoryLocationGroupObject::new)
9857                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9858
9859                    data = new CountedObjects<>(objectLimiter, inventoryLocationGroups);
9860                }
9861            }
9862        } catch (NamingException ex) {
9863            throw new RuntimeException(ex);
9864        }
9865
9866        return data;
9867    }
9868
9869    @GraphQLField
9870    @GraphQLName("locationType")
9871    static LocationTypeObject locationType(final DataFetchingEnvironment env,
9872            @GraphQLName("warehouseName") final String warehouseName,
9873            @GraphQLName("locationTypeName") final String locationTypeName) {
9874        LocationType locationType;
9875
9876        try {
9877            var commandForm = WarehouseUtil.getHome().getGetLocationTypeForm();
9878
9879            commandForm.setWarehouseName(warehouseName);
9880            commandForm.setLocationTypeName(locationTypeName);
9881
9882            locationType = CDI.current().select(GetLocationTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9883        } catch (NamingException ex) {
9884            throw new RuntimeException(ex);
9885        }
9886
9887        return locationType == null ? null : new LocationTypeObject(locationType);
9888    }
9889
9890    @GraphQLField
9891    @GraphQLName("locationTypes")
9892    @GraphQLNonNull
9893    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9894    static CountingPaginatedData<LocationTypeObject> locationTypes(final DataFetchingEnvironment env,
9895            @GraphQLName("warehouseName") final String warehouseName) {
9896        CountingPaginatedData<LocationTypeObject> data;
9897
9898        try {
9899            var commandForm = WarehouseUtil.getHome().getGetLocationTypesForm();
9900            var command = CDI.current().select(GetLocationTypesCommand.class).get();
9901
9902            commandForm.setWarehouseName(warehouseName);
9903
9904            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9905            if(totalEntities == null) {
9906                data = Connections.emptyConnection();
9907            } else {
9908                try(var objectLimiter = new ObjectLimiter(env, LocationTypeConstants.COMPONENT_VENDOR_NAME, LocationTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9909                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9910
9911                    var locationTypes = entities.stream()
9912                            .map(LocationTypeObject::new)
9913                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9914
9915                    data = new CountedObjects<>(objectLimiter, locationTypes);
9916                }
9917            }
9918        } catch (NamingException ex) {
9919            throw new RuntimeException(ex);
9920        }
9921
9922        return data;
9923    }
9924
9925    @GraphQLField
9926    @GraphQLName("locationNameElement")
9927    static LocationNameElementObject locationNameElement(final DataFetchingEnvironment env,
9928            @GraphQLName("warehouseName") final String warehouseName,
9929            @GraphQLName("locationTypeName") final String locationTypeName,
9930            @GraphQLName("locationNameElementName") final String locationNameElementName) {
9931        LocationNameElement locationNameElement;
9932
9933        try {
9934            var commandForm = WarehouseUtil.getHome().getGetLocationNameElementForm();
9935
9936            commandForm.setWarehouseName(warehouseName);
9937            commandForm.setLocationTypeName(locationTypeName);
9938            commandForm.setLocationNameElementName(locationNameElementName);
9939
9940            locationNameElement = CDI.current().select(GetLocationNameElementCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9941        } catch (NamingException ex) {
9942            throw new RuntimeException(ex);
9943        }
9944
9945        return locationNameElement == null ? null : new LocationNameElementObject(locationNameElement);
9946    }
9947
9948    @GraphQLField
9949    @GraphQLName("locationNameElements")
9950    @GraphQLNonNull
9951    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9952    static CountingPaginatedData<LocationNameElementObject> locationNameElements(final DataFetchingEnvironment env,
9953            @GraphQLName("warehouseName") final String warehouseName,
9954            @GraphQLName("locationTypeName") final String locationTypeName) {
9955        CountingPaginatedData<LocationNameElementObject> data;
9956
9957        try {
9958            var commandForm = WarehouseUtil.getHome().getGetLocationNameElementsForm();
9959            var command = CDI.current().select(GetLocationNameElementsCommand.class).get();
9960
9961            commandForm.setWarehouseName(warehouseName);
9962            commandForm.setLocationTypeName(locationTypeName);
9963
9964            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9965            if(totalEntities == null) {
9966                data = Connections.emptyConnection();
9967            } else {
9968                try(var objectLimiter = new ObjectLimiter(env, LocationNameElementConstants.COMPONENT_VENDOR_NAME, LocationNameElementConstants.ENTITY_TYPE_NAME, totalEntities)) {
9969                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9970
9971                    var locationNameElements = entities.stream()
9972                            .map(LocationNameElementObject::new)
9973                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9974
9975                    data = new CountedObjects<>(objectLimiter, locationNameElements);
9976                }
9977            }
9978        } catch (NamingException ex) {
9979            throw new RuntimeException(ex);
9980        }
9981
9982        return data;
9983    }
9984
9985    @GraphQLField
9986    @GraphQLName("location")
9987    static LocationObject location(final DataFetchingEnvironment env,
9988            @GraphQLName("warehouseName") final String warehouseName,
9989            @GraphQLName("locationName") final String locationName) {
9990        Location location;
9991
9992        try {
9993            var commandForm = WarehouseUtil.getHome().getGetLocationForm();
9994
9995            commandForm.setWarehouseName(warehouseName);
9996            commandForm.setLocationName(locationName);
9997
9998            location = CDI.current().select(GetLocationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9999        } catch (NamingException ex) {
10000            throw new RuntimeException(ex);
10001        }
10002
10003        return location == null ? null : new LocationObject(location);
10004    }
10005
10006    @GraphQLField
10007    @GraphQLName("locations")
10008    @GraphQLNonNull
10009    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10010    static CountingPaginatedData<LocationObject> locations(final DataFetchingEnvironment env,
10011            @GraphQLName("warehouseName") final String warehouseName) {
10012        CountingPaginatedData<LocationObject> data;
10013
10014        try {
10015            var commandForm = WarehouseUtil.getHome().getGetLocationsForm();
10016            var command = CDI.current().select(GetLocationsCommand.class).get();
10017
10018            commandForm.setWarehouseName(warehouseName);
10019
10020            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10021            if(totalEntities == null) {
10022                data = Connections.emptyConnection();
10023            } else {
10024                try(var objectLimiter = new ObjectLimiter(env, LocationConstants.COMPONENT_VENDOR_NAME, LocationConstants.ENTITY_TYPE_NAME, totalEntities)) {
10025                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10026
10027                    var locations = entities.stream()
10028                            .map(LocationObject::new)
10029                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10030
10031                    data = new CountedObjects<>(objectLimiter, locations);
10032                }
10033            }
10034        } catch (NamingException ex) {
10035            throw new RuntimeException(ex);
10036        }
10037
10038        return data;
10039    }
10040
10041    @GraphQLField
10042    @GraphQLName("cancellationKind")
10043    static CancellationKindObject cancellationKind(final DataFetchingEnvironment env,
10044            @GraphQLName("cancellationKindName") final String cancellationKindName,
10045            @GraphQLName("id") @GraphQLID final String id) {
10046        CancellationKind cancellationKind;
10047
10048        try {
10049            var commandForm = CancellationPolicyUtil.getHome().getGetCancellationKindForm();
10050
10051            commandForm.setCancellationKindName(cancellationKindName);
10052            commandForm.setUuid(id);
10053
10054            cancellationKind = CDI.current().select(GetCancellationKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10055        } catch (NamingException ex) {
10056            throw new RuntimeException(ex);
10057        }
10058
10059        return cancellationKind == null ? null : new CancellationKindObject(cancellationKind);
10060    }
10061
10062    @GraphQLField
10063    @GraphQLName("cancellationKinds")
10064    @GraphQLNonNull
10065    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10066    static CountingPaginatedData<CancellationKindObject> cancellationKinds(final DataFetchingEnvironment env) {
10067        CountingPaginatedData<CancellationKindObject> data;
10068
10069        try {
10070            var commandForm = CancellationPolicyUtil.getHome().getGetCancellationKindsForm();
10071            var command = CDI.current().select(GetCancellationKindsCommand.class).get();
10072
10073            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10074            if(totalEntities == null) {
10075                data = Connections.emptyConnection();
10076            } else {
10077                try(var objectLimiter = new ObjectLimiter(env, CancellationKindConstants.COMPONENT_VENDOR_NAME, CancellationKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
10078                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10079
10080                    var cancellationKinds = entities.stream()
10081                            .map(CancellationKindObject::new)
10082                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10083
10084                    data = new CountedObjects<>(objectLimiter, cancellationKinds);
10085                }
10086            }
10087        } catch (NamingException ex) {
10088            throw new RuntimeException(ex);
10089        }
10090
10091        return data;
10092    }
10093
10094    @GraphQLField
10095    @GraphQLName("cancellationPolicy")
10096    static CancellationPolicyObject cancellationPolicy(final DataFetchingEnvironment env,
10097            @GraphQLName("cancellationKindName") final String cancellationKindName,
10098            @GraphQLName("cancellationPolicyName") final String cancellationPolicyName,
10099            @GraphQLName("id") @GraphQLID final String id) {
10100        CancellationPolicy cancellationPolicy;
10101
10102        try {
10103            var commandForm = CancellationPolicyUtil.getHome().getGetCancellationPolicyForm();
10104
10105            commandForm.setCancellationKindName(cancellationKindName);
10106            commandForm.setCancellationPolicyName(cancellationPolicyName);
10107            commandForm.setUuid(id);
10108
10109            cancellationPolicy = CDI.current().select(GetCancellationPolicyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10110        } catch (NamingException ex) {
10111            throw new RuntimeException(ex);
10112        }
10113
10114        return cancellationPolicy == null ? null : new CancellationPolicyObject(cancellationPolicy);
10115    }
10116
10117    @GraphQLField
10118    @GraphQLName("cancellationPolicies")
10119    @GraphQLNonNull
10120    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10121    static CountingPaginatedData<CancellationPolicyObject> cancellationPolicies(final DataFetchingEnvironment env,
10122            @GraphQLName("cancellationKindName") final String cancellationKindName) {
10123        CountingPaginatedData<CancellationPolicyObject> data;
10124
10125        try {
10126            var commandForm = CancellationPolicyUtil.getHome().getGetCancellationPoliciesForm();
10127            var command = CDI.current().select(GetCancellationPoliciesCommand.class).get();
10128
10129            commandForm.setCancellationKindName(cancellationKindName);
10130
10131            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10132            if(totalEntities == null) {
10133                data = Connections.emptyConnection();
10134            } else {
10135                try(var objectLimiter = new ObjectLimiter(env, CancellationPolicyConstants.COMPONENT_VENDOR_NAME, CancellationPolicyConstants.ENTITY_TYPE_NAME, totalEntities)) {
10136                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10137
10138                    var cancellationPolicies = entities.stream()
10139                            .map(CancellationPolicyObject::new)
10140                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10141
10142                    data = new CountedObjects<>(objectLimiter, cancellationPolicies);
10143                }
10144            }
10145        } catch (NamingException ex) {
10146            throw new RuntimeException(ex);
10147        }
10148
10149        return data;
10150    }
10151
10152    @GraphQLField
10153    @GraphQLName("returnKind")
10154    static ReturnKindObject returnKind(final DataFetchingEnvironment env,
10155            @GraphQLName("returnKindName") final String returnKindName,
10156            @GraphQLName("id") @GraphQLID final String id) {
10157        ReturnKind returnKind;
10158
10159        try {
10160            var commandForm = ReturnPolicyUtil.getHome().getGetReturnKindForm();
10161
10162            commandForm.setReturnKindName(returnKindName);
10163            commandForm.setUuid(id);
10164
10165            returnKind = CDI.current().select(GetReturnKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10166        } catch (NamingException ex) {
10167            throw new RuntimeException(ex);
10168        }
10169
10170        return returnKind == null ? null : new ReturnKindObject(returnKind);
10171    }
10172
10173    @GraphQLField
10174    @GraphQLName("returnKinds")
10175    @GraphQLNonNull
10176    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10177    static CountingPaginatedData<ReturnKindObject> returnKinds(final DataFetchingEnvironment env) {
10178        CountingPaginatedData<ReturnKindObject> data;
10179
10180        try {
10181            var commandForm = ReturnPolicyUtil.getHome().getGetReturnKindsForm();
10182            var command = CDI.current().select(GetReturnKindsCommand.class).get();
10183
10184            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10185            if(totalEntities == null) {
10186                data = Connections.emptyConnection();
10187            } else {
10188                try(var objectLimiter = new ObjectLimiter(env, ReturnKindConstants.COMPONENT_VENDOR_NAME, ReturnKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
10189                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10190
10191                    var returnKinds = entities.stream()
10192                            .map(ReturnKindObject::new)
10193                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10194
10195                    data = new CountedObjects<>(objectLimiter, returnKinds);
10196                }
10197            }
10198        } catch (NamingException ex) {
10199            throw new RuntimeException(ex);
10200        }
10201
10202        return data;
10203    }
10204
10205    @GraphQLField
10206    @GraphQLName("returnPolicy")
10207    static ReturnPolicyObject returnPolicy(final DataFetchingEnvironment env,
10208            @GraphQLName("returnKindName") final String returnKindName,
10209            @GraphQLName("returnPolicyName") final String returnPolicyName,
10210            @GraphQLName("id") @GraphQLID final String id) {
10211        ReturnPolicy returnPolicy;
10212
10213        try {
10214            var commandForm = ReturnPolicyUtil.getHome().getGetReturnPolicyForm();
10215
10216            commandForm.setReturnKindName(returnKindName);
10217            commandForm.setReturnPolicyName(returnPolicyName);
10218            commandForm.setUuid(id);
10219
10220            returnPolicy = CDI.current().select(GetReturnPolicyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10221        } catch (NamingException ex) {
10222            throw new RuntimeException(ex);
10223        }
10224
10225        return returnPolicy == null ? null : new ReturnPolicyObject(returnPolicy);
10226    }
10227
10228    @GraphQLField
10229    @GraphQLName("returnPolicies")
10230    @GraphQLNonNull
10231    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10232    static CountingPaginatedData<ReturnPolicyObject> returnPolicies(final DataFetchingEnvironment env,
10233            @GraphQLName("returnKindName") final String returnKindName) {
10234        CountingPaginatedData<ReturnPolicyObject> data;
10235
10236        try {
10237            var commandForm = ReturnPolicyUtil.getHome().getGetReturnPoliciesForm();
10238            var command = CDI.current().select(GetReturnPoliciesCommand.class).get();
10239
10240            commandForm.setReturnKindName(returnKindName);
10241
10242            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10243            if(totalEntities == null) {
10244                data = Connections.emptyConnection();
10245            } else {
10246                try(var objectLimiter = new ObjectLimiter(env, ReturnPolicyConstants.COMPONENT_VENDOR_NAME, ReturnPolicyConstants.ENTITY_TYPE_NAME, totalEntities)) {
10247                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10248
10249                    var returnPolicies = entities.stream()
10250                            .map(ReturnPolicyObject::new)
10251                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10252
10253                    data = new CountedObjects<>(objectLimiter, returnPolicies);
10254                }
10255            }
10256        } catch(NamingException ex) {
10257            throw new RuntimeException(ex);
10258        }
10259
10260        return data;
10261    }
10262
10263    @GraphQLField
10264    @GraphQLName("item")
10265    static ItemObject item(final DataFetchingEnvironment env,
10266            @GraphQLName("itemName") final String itemName,
10267            @GraphQLName("itemNameOrAlias") final String itemNameOrAlias,
10268            @GraphQLName("id") @GraphQLID final String id) {
10269        Item item;
10270
10271        try {
10272            var commandForm = ItemUtil.getHome().getGetItemForm();
10273
10274            commandForm.setItemName(itemName);
10275            commandForm.setItemNameOrAlias(itemNameOrAlias);
10276            commandForm.setUuid(id);
10277
10278            item = CDI.current().select(GetItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10279        } catch (NamingException ex) {
10280            throw new RuntimeException(ex);
10281        }
10282
10283        return item == null ? null : new ItemObject(item);
10284    }
10285
10286    @GraphQLField
10287    @GraphQLName("items")
10288    @GraphQLNonNull
10289    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10290    static CountingPaginatedData<ItemObject> items(final DataFetchingEnvironment env) {
10291        CountingPaginatedData<ItemObject> data;
10292
10293        try {
10294            var commandForm = ItemUtil.getHome().getGetItemsForm();
10295            var command = CDI.current().select(GetItemsCommand.class).get();
10296
10297            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10298            if(totalEntities == null) {
10299                data = Connections.emptyConnection();
10300            } else {
10301                try(var objectLimiter = new ObjectLimiter(env, ItemConstants.COMPONENT_VENDOR_NAME, ItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
10302                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10303
10304                    var items = entities.stream()
10305                            .map(ItemObject::new)
10306                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10307
10308                    data = new CountedObjects<>(objectLimiter, items);
10309                }
10310            }
10311        } catch (NamingException ex) {
10312            throw new RuntimeException(ex);
10313        }
10314
10315        return data;
10316    }
10317
10318    @GraphQLField
10319    @GraphQLName("itemUnitOfMeasureType")
10320    static ItemUnitOfMeasureTypeObject itemUnitOfMeasureType(final DataFetchingEnvironment env,
10321            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
10322            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName) {
10323        ItemUnitOfMeasureType itemUnitOfMeasureType;
10324
10325        try {
10326            var commandForm = ItemUtil.getHome().getGetItemUnitOfMeasureTypeForm();
10327
10328            commandForm.setItemName(itemName);
10329            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
10330
10331            itemUnitOfMeasureType = CDI.current().select(GetItemUnitOfMeasureTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10332        } catch (NamingException ex) {
10333            throw new RuntimeException(ex);
10334        }
10335
10336        return itemUnitOfMeasureType == null ? null : new ItemUnitOfMeasureTypeObject(itemUnitOfMeasureType);
10337    }
10338
10339    @GraphQLField
10340    @GraphQLName("itemUnitOfMeasureTypes")
10341    @GraphQLNonNull
10342    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10343    static CountingPaginatedData<ItemUnitOfMeasureTypeObject> itemUnitOfMeasureTypes(final DataFetchingEnvironment env,
10344            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
10345        CountingPaginatedData<ItemUnitOfMeasureTypeObject> data;
10346
10347        try {
10348            var commandForm = ItemUtil.getHome().getGetItemUnitOfMeasureTypesForm();
10349            var command = CDI.current().select(GetItemUnitOfMeasureTypesCommand.class).get();
10350
10351            commandForm.setItemName(itemName);
10352
10353            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10354            if(totalEntities == null) {
10355                data = Connections.emptyConnection();
10356            } else {
10357                try(var objectLimiter = new ObjectLimiter(env, ItemUnitOfMeasureTypeConstants.COMPONENT_VENDOR_NAME, ItemUnitOfMeasureTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10358                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10359
10360                    var itemUnitOfMeasureTypeObjects = entities.stream()
10361                            .map(ItemUnitOfMeasureTypeObject::new)
10362                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10363
10364                    data = new CountedObjects<>(objectLimiter, itemUnitOfMeasureTypeObjects);
10365                }
10366            }
10367        } catch (NamingException ex) {
10368            throw new RuntimeException(ex);
10369        }
10370
10371        return data;
10372    }
10373
10374
10375    @GraphQLField
10376    @GraphQLName("itemDescription")
10377    static ItemDescriptionObject itemDescription(final DataFetchingEnvironment env,
10378            @GraphQLName("itemDescriptionTypeName") final String itemDescriptionTypeName,
10379            @GraphQLName("itemName") final String itemName,
10380            @GraphQLName("languageIsoName") final String languageIsoName,
10381            @GraphQLName("id") @GraphQLID final String id,
10382            @GraphQLName("referrer") final String referrer) {
10383        ItemDescription itemDescription;
10384
10385        try {
10386            var commandForm = ItemUtil.getHome().getGetItemDescriptionForm();
10387
10388            commandForm.setItemDescriptionTypeName(itemDescriptionTypeName);
10389            commandForm.setItemName(itemName);
10390            commandForm.setLanguageIsoName(languageIsoName);
10391            commandForm.setUuid(id);
10392            commandForm.setReferrer(referrer);
10393
10394            itemDescription = CDI.current().select(GetItemDescriptionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10395        } catch (NamingException ex) {
10396            throw new RuntimeException(ex);
10397        }
10398
10399        return itemDescription == null ? null : new ItemDescriptionObject(itemDescription);
10400    }
10401
10402    @GraphQLField
10403    @GraphQLName("itemDescriptions")
10404    @GraphQLNonNull
10405    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10406    static CountingPaginatedData<ItemDescriptionObject> itemDescriptions(final DataFetchingEnvironment env,
10407            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
10408            @GraphQLName("itemDescriptionTypeUseTypeName") final String itemDescriptionTypeUseTypeName,
10409            @GraphQLName("languageIsoName") final String languageIsoName) {
10410        CountingPaginatedData<ItemDescriptionObject> data;
10411
10412        try {
10413            var commandForm = ItemUtil.getHome().getGetItemDescriptionsForm();
10414            var command = CDI.current().select(GetItemDescriptionsCommand.class).get();
10415
10416            commandForm.setItemName(itemName);
10417            commandForm.setItemDescriptionTypeUseTypeName(itemDescriptionTypeUseTypeName);
10418            commandForm.setLanguageIsoName(languageIsoName);
10419
10420            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10421            if(totalEntities == null) {
10422                data = Connections.emptyConnection();
10423            } else {
10424                try(var objectLimiter = new ObjectLimiter(env, ItemDescriptionConstants.COMPONENT_VENDOR_NAME, ItemDescriptionConstants.ENTITY_TYPE_NAME, totalEntities)) {
10425                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10426                    var limitOffset = objectLimiter.getLimitOffset();
10427                    var limitCount = objectLimiter.getLimitCount();
10428
10429                    Collection<ItemDescription> limitedEntities;
10430                    if(itemDescriptionTypeUseTypeName != null) {
10431                        // A Limit must be manually applied.
10432                        limitedEntities = entities.stream()
10433                                .skip(limitOffset)
10434                                .limit(limitCount)
10435                                .toList();
10436                    } else {
10437                        // A Limit was applied in the SQL Query.
10438                        limitedEntities = entities;
10439                    }
10440
10441                    var itemDescriptions = limitedEntities.stream()
10442                            .skip(limitOffset)
10443                            .limit(limitCount)
10444                            .map(ItemDescriptionObject::new)
10445                            .collect(Collectors.toCollection(() -> new ArrayList<>(limitedEntities.size())));
10446
10447                    data = new CountedObjects<>(objectLimiter, itemDescriptions);
10448                }
10449            }
10450        } catch (NamingException ex) {
10451            throw new RuntimeException(ex);
10452        }
10453
10454        return data;
10455    }
10456
10457    @GraphQLField
10458    @GraphQLName("itemType")
10459    static ItemTypeObject itemType(final DataFetchingEnvironment env,
10460            @GraphQLName("itemTypeName") final String itemTypeName,
10461            @GraphQLName("id") @GraphQLID final String id) {
10462        ItemType itemType;
10463
10464        try {
10465            var commandForm = ItemUtil.getHome().getGetItemTypeForm();
10466
10467            commandForm.setItemTypeName(itemTypeName);
10468            commandForm.setUuid(id);
10469
10470            itemType = CDI.current().select(GetItemTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10471        } catch (NamingException ex) {
10472            throw new RuntimeException(ex);
10473        }
10474
10475        return itemType == null ? null : new ItemTypeObject(itemType);
10476    }
10477
10478    @GraphQLField
10479    @GraphQLName("itemTypes")
10480    @GraphQLNonNull
10481    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10482    static CountingPaginatedData<ItemTypeObject> itemTypes(final DataFetchingEnvironment env) {
10483        CountingPaginatedData<ItemTypeObject> data;
10484
10485        try {
10486            var commandForm = ItemUtil.getHome().getGetItemTypesForm();
10487            var command = CDI.current().select(GetItemTypesCommand.class).get();
10488
10489            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10490            if(totalEntities == null) {
10491                data = Connections.emptyConnection();
10492            } else {
10493                try(var objectLimiter = new ObjectLimiter(env, ItemTypeConstants.COMPONENT_VENDOR_NAME, ItemTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10494                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10495
10496                    var itemTypes = entities.stream()
10497                            .map(ItemTypeObject::new)
10498                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10499
10500                    data = new CountedObjects<>(objectLimiter, itemTypes);
10501                }
10502            }
10503        } catch (NamingException ex) {
10504            throw new RuntimeException(ex);
10505        }
10506
10507        return data;
10508    }
10509
10510    @GraphQLField
10511    @GraphQLName("itemUseType")
10512    static ItemUseTypeObject itemUseType(final DataFetchingEnvironment env,
10513            @GraphQLName("itemUseTypeName") final String itemUseTypeName,
10514            @GraphQLName("id") @GraphQLID final String id) {
10515        ItemUseType itemUseType;
10516
10517        try {
10518            var commandForm = ItemUtil.getHome().getGetItemUseTypeForm();
10519
10520            commandForm.setItemUseTypeName(itemUseTypeName);
10521            commandForm.setUuid(id);
10522
10523            itemUseType = CDI.current().select(GetItemUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10524        } catch (NamingException ex) {
10525            throw new RuntimeException(ex);
10526        }
10527
10528        return itemUseType == null ? null : new ItemUseTypeObject(itemUseType);
10529    }
10530
10531    @GraphQLField
10532    @GraphQLName("itemUseTypes")
10533    @GraphQLNonNull
10534    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10535    static CountingPaginatedData<ItemUseTypeObject> itemUseTypes(final DataFetchingEnvironment env) {
10536        CountingPaginatedData<ItemUseTypeObject> data;
10537
10538        try {
10539            var commandForm = ItemUtil.getHome().getGetItemUseTypesForm();
10540            var command = CDI.current().select(GetItemUseTypesCommand.class).get();
10541
10542            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10543            if(totalEntities == null) {
10544                data = Connections.emptyConnection();
10545            } else {
10546                try(var objectLimiter = new ObjectLimiter(env, ItemUseTypeConstants.COMPONENT_VENDOR_NAME, ItemUseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10547                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10548
10549                    var itemUseTypes = entities.stream()
10550                            .map(ItemUseTypeObject::new)
10551                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10552
10553                    data = new CountedObjects<>(objectLimiter, itemUseTypes);
10554                }
10555            }
10556        } catch (NamingException ex) {
10557            throw new RuntimeException(ex);
10558        }
10559
10560        return data;
10561    }
10562
10563    @GraphQLField
10564    @GraphQLName("itemPriceType")
10565    static ItemPriceTypeObject itemPriceType(final DataFetchingEnvironment env,
10566            @GraphQLName("itemPriceTypeName") final String itemPriceTypeName,
10567            @GraphQLName("id") @GraphQLID final String id) {
10568        ItemPriceType itemPriceType;
10569
10570        try {
10571            var commandForm = ItemUtil.getHome().getGetItemPriceTypeForm();
10572
10573            commandForm.setItemPriceTypeName(itemPriceTypeName);
10574            commandForm.setUuid(id);
10575
10576            itemPriceType = CDI.current().select(GetItemPriceTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10577        } catch (NamingException ex) {
10578            throw new RuntimeException(ex);
10579        }
10580
10581        return itemPriceType == null ? null : new ItemPriceTypeObject(itemPriceType);
10582    }
10583
10584    @GraphQLField
10585    @GraphQLName("itemPriceTypes")
10586    @GraphQLNonNull
10587    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10588    static CountingPaginatedData<ItemPriceTypeObject> itemPriceTypes(final DataFetchingEnvironment env) {
10589        CountingPaginatedData<ItemPriceTypeObject> data;
10590
10591        try {
10592            var commandForm = ItemUtil.getHome().getGetItemPriceTypesForm();
10593            var command = CDI.current().select(GetItemPriceTypesCommand.class).get();
10594
10595            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10596            if(totalEntities == null) {
10597                data = Connections.emptyConnection();
10598            } else {
10599                try(var objectLimiter = new ObjectLimiter(env, ItemPriceTypeConstants.COMPONENT_VENDOR_NAME, ItemPriceTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10600                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10601
10602                    var itemPriceTypes = entities.stream()
10603                            .map(ItemPriceTypeObject::new)
10604                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10605
10606                    data = new CountedObjects<>(objectLimiter, itemPriceTypes);
10607                }
10608            }
10609        } catch (NamingException ex) {
10610            throw new RuntimeException(ex);
10611        }
10612
10613        return data;
10614    }
10615
10616    @GraphQLField
10617    @GraphQLName("itemDeliveryType")
10618    static ItemDeliveryTypeObject itemDeliveryType(final DataFetchingEnvironment env,
10619            @GraphQLName("itemDeliveryTypeName") final String itemDeliveryTypeName,
10620            @GraphQLName("id") @GraphQLID final String id) {
10621        ItemDeliveryType itemDeliveryType;
10622
10623        try {
10624            var commandForm = ItemUtil.getHome().getGetItemDeliveryTypeForm();
10625
10626            commandForm.setItemDeliveryTypeName(itemDeliveryTypeName);
10627            commandForm.setUuid(id);
10628
10629            itemDeliveryType = CDI.current().select(GetItemDeliveryTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10630        } catch (NamingException ex) {
10631            throw new RuntimeException(ex);
10632        }
10633
10634        return itemDeliveryType == null ? null : new ItemDeliveryTypeObject(itemDeliveryType);
10635    }
10636
10637    @GraphQLField
10638    @GraphQLName("itemDeliveryTypes")
10639    @GraphQLNonNull
10640    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10641    static CountingPaginatedData<ItemDeliveryTypeObject> itemDeliveryTypes(final DataFetchingEnvironment env) {
10642        CountingPaginatedData<ItemDeliveryTypeObject> data;
10643
10644        try {
10645            var commandForm = ItemUtil.getHome().getGetItemDeliveryTypesForm();
10646            var command = CDI.current().select(GetItemDeliveryTypesCommand.class).get();
10647
10648            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10649            if(totalEntities == null) {
10650                data = Connections.emptyConnection();
10651            } else {
10652                try(var objectLimiter = new ObjectLimiter(env, ItemDeliveryTypeConstants.COMPONENT_VENDOR_NAME, ItemDeliveryTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10653                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10654
10655                    var itemDeliveryTypes = entities.stream()
10656                            .map(ItemDeliveryTypeObject::new)
10657                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10658
10659                    data = new CountedObjects<>(objectLimiter, itemDeliveryTypes);
10660                }
10661            }
10662        } catch (NamingException ex) {
10663            throw new RuntimeException(ex);
10664        }
10665
10666        return data;
10667    }
10668
10669    @GraphQLField
10670    @GraphQLName("itemInventoryType")
10671    static ItemInventoryTypeObject itemInventoryType(final DataFetchingEnvironment env,
10672            @GraphQLName("itemInventoryTypeName") final String itemInventoryTypeName,
10673            @GraphQLName("id") @GraphQLID final String id) {
10674        ItemInventoryType itemInventoryType;
10675
10676        try {
10677            var commandForm = ItemUtil.getHome().getGetItemInventoryTypeForm();
10678
10679            commandForm.setItemInventoryTypeName(itemInventoryTypeName);
10680            commandForm.setUuid(id);
10681
10682            itemInventoryType = CDI.current().select(GetItemInventoryTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10683        } catch (NamingException ex) {
10684            throw new RuntimeException(ex);
10685        }
10686
10687        return itemInventoryType == null ? null : new ItemInventoryTypeObject(itemInventoryType);
10688    }
10689
10690    @GraphQLField
10691    @GraphQLName("itemInventoryTypes")
10692    @GraphQLNonNull
10693    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10694    static CountingPaginatedData<ItemInventoryTypeObject> itemInventoryTypes(final DataFetchingEnvironment env) {
10695        CountingPaginatedData<ItemInventoryTypeObject> data;
10696
10697        try {
10698            var commandForm = ItemUtil.getHome().getGetItemInventoryTypesForm();
10699            var command = CDI.current().select(GetItemInventoryTypesCommand.class).get();
10700
10701            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10702            if(totalEntities == null) {
10703                data = Connections.emptyConnection();
10704            } else {
10705                try(var objectLimiter = new ObjectLimiter(env, ItemInventoryTypeConstants.COMPONENT_VENDOR_NAME, ItemInventoryTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10706                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10707
10708                    var itemInventoryTypes = entities.stream()
10709                            .map(ItemInventoryTypeObject::new)
10710                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10711
10712                    data = new CountedObjects<>(objectLimiter, itemInventoryTypes);
10713                }
10714            }
10715        } catch (NamingException ex) {
10716            throw new RuntimeException(ex);
10717        }
10718
10719        return data;
10720    }
10721
10722    @GraphQLField
10723    @GraphQLName("itemPrice")
10724    static ItemPriceObject itemPrice(final DataFetchingEnvironment env,
10725            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
10726            @GraphQLName("inventoryConditionName") @GraphQLNonNull final String inventoryConditionName,
10727            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName,
10728            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
10729        ItemPrice itemPrice;
10730
10731        try {
10732            var commandForm = ItemUtil.getHome().getGetItemPriceForm();
10733
10734            commandForm.setItemName(itemName);
10735            commandForm.setInventoryConditionName(inventoryConditionName);
10736            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
10737            commandForm.setCurrencyIsoName(currencyIsoName);
10738
10739            itemPrice = CDI.current().select(GetItemPriceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10740        } catch (NamingException ex) {
10741            throw new RuntimeException(ex);
10742        }
10743
10744        return itemPrice == null ? null : new ItemPriceObject(itemPrice);
10745    }
10746
10747    @GraphQLField
10748    @GraphQLName("itemPrices")
10749    @GraphQLNonNull
10750    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10751    static CountingPaginatedData<ItemPriceObject> itemPrices(final DataFetchingEnvironment env,
10752            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
10753        CountingPaginatedData<ItemPriceObject> data;
10754
10755        try {
10756            var commandForm = ItemUtil.getHome().getGetItemPricesForm();
10757            var command = CDI.current().select(GetItemPricesCommand.class).get();
10758
10759            commandForm.setItemName(itemName);
10760
10761            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10762            if(totalEntities == null) {
10763                data = Connections.emptyConnection();
10764            } else {
10765                try(var objectLimiter = new ObjectLimiter(env, ItemPriceConstants.COMPONENT_VENDOR_NAME, ItemPriceConstants.ENTITY_TYPE_NAME, totalEntities)) {
10766                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10767
10768                    var itemPriceObjects = entities.stream()
10769                            .map(ItemPriceObject::new)
10770                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10771
10772                    data = new CountedObjects<>(objectLimiter, itemPriceObjects);
10773                }
10774            }
10775        } catch (NamingException ex) {
10776            throw new RuntimeException(ex);
10777        }
10778
10779        return data;
10780    }
10781
10782    @GraphQLField
10783    @GraphQLName("itemAliasChecksumType")
10784    static ItemAliasChecksumTypeObject itemAliasChecksumType(final DataFetchingEnvironment env,
10785            @GraphQLName("itemAliasChecksumTypeName") final String itemAliasChecksumTypeName,
10786            @GraphQLName("id") @GraphQLID final String id) {
10787        ItemAliasChecksumType itemAliasChecksumType;
10788
10789        try {
10790            var commandForm = ItemUtil.getHome().getGetItemAliasChecksumTypeForm();
10791
10792            commandForm.setItemAliasChecksumTypeName(itemAliasChecksumTypeName);
10793            commandForm.setUuid(id);
10794
10795            itemAliasChecksumType = CDI.current().select(GetItemAliasChecksumTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10796        } catch (NamingException ex) {
10797            throw new RuntimeException(ex);
10798        }
10799
10800        return itemAliasChecksumType == null ? null : new ItemAliasChecksumTypeObject(itemAliasChecksumType);
10801    }
10802
10803    @GraphQLField
10804    @GraphQLName("itemAliasChecksumTypes")
10805    @GraphQLNonNull
10806    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10807    static CountingPaginatedData<ItemAliasChecksumTypeObject> itemAliasChecksumTypes(final DataFetchingEnvironment env) {
10808        CountingPaginatedData<ItemAliasChecksumTypeObject> data;
10809
10810        try {
10811            var commandForm = ItemUtil.getHome().getGetItemAliasChecksumTypesForm();
10812            var command = CDI.current().select(GetItemAliasChecksumTypesCommand.class).get();
10813
10814            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10815            if(totalEntities == null) {
10816                data = Connections.emptyConnection();
10817            } else {
10818                try(var objectLimiter = new ObjectLimiter(env, ItemAliasChecksumTypeConstants.COMPONENT_VENDOR_NAME, ItemAliasChecksumTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10819                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10820
10821                    var itemAliasChecksumTypes = entities.stream()
10822                            .map(ItemAliasChecksumTypeObject::new)
10823                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10824
10825                    data = new CountedObjects<>(objectLimiter, itemAliasChecksumTypes);
10826                }
10827            }
10828        } catch (NamingException ex) {
10829            throw new RuntimeException(ex);
10830        }
10831
10832        return data;
10833    }
10834
10835    @GraphQLField
10836    @GraphQLName("itemAlias")
10837    static ItemAliasObject itemAlias(final DataFetchingEnvironment env,
10838            @GraphQLName("alias") @GraphQLNonNull final String alias) {
10839        ItemAlias itemAlias;
10840
10841        try {
10842            var commandForm = ItemUtil.getHome().getGetItemAliasForm();
10843
10844            commandForm.setAlias(alias);
10845
10846            itemAlias = CDI.current().select(GetItemAliasCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10847        } catch (NamingException ex) {
10848            throw new RuntimeException(ex);
10849        }
10850
10851        return itemAlias == null ? null : new ItemAliasObject(itemAlias);
10852    }
10853
10854    @GraphQLField
10855    @GraphQLName("itemAliases")
10856    @GraphQLNonNull
10857    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10858    static CountingPaginatedData<ItemAliasObject> itemAliases(final DataFetchingEnvironment env,
10859            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
10860        CountingPaginatedData<ItemAliasObject> data;
10861
10862        try {
10863            var commandForm = ItemUtil.getHome().getGetItemAliasesForm();
10864            var command = CDI.current().select(GetItemAliasesCommand.class).get();
10865
10866            commandForm.setItemName(itemName);
10867
10868            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10869            if(totalEntities == null) {
10870                data = Connections.emptyConnection();
10871            } else {
10872                try(var objectLimiter = new ObjectLimiter(env, ItemAliasConstants.COMPONENT_VENDOR_NAME, ItemAliasConstants.ENTITY_TYPE_NAME, totalEntities)) {
10873                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10874
10875                    var itemAliasObjects = entities.stream()
10876                            .map(ItemAliasObject::new)
10877                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10878
10879                    data = new CountedObjects<>(objectLimiter, itemAliasObjects);
10880                }
10881            }
10882        } catch (NamingException ex) {
10883            throw new RuntimeException(ex);
10884        }
10885
10886        return data;
10887    }
10888
10889    @GraphQLField
10890    @GraphQLName("itemCategory")
10891    static ItemCategoryObject itemCategory(final DataFetchingEnvironment env,
10892            @GraphQLName("itemCategoryName") final String itemCategoryName,
10893            @GraphQLName("id") @GraphQLID final String id) {
10894        ItemCategory itemCategory;
10895
10896        try {
10897            var commandForm = ItemUtil.getHome().getGetItemCategoryForm();
10898
10899            commandForm.setItemCategoryName(itemCategoryName);
10900            commandForm.setUuid(id);
10901
10902            itemCategory = CDI.current().select(GetItemCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10903        } catch (NamingException ex) {
10904            throw new RuntimeException(ex);
10905        }
10906
10907        return itemCategory == null ? null : new ItemCategoryObject(itemCategory);
10908    }
10909
10910    @GraphQLField
10911    @GraphQLName("itemCategories")
10912    @GraphQLNonNull
10913    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10914    static CountingPaginatedData<ItemCategoryObject> itemCategories(final DataFetchingEnvironment env,
10915            @GraphQLName("parentItemCategoryName") final String parentItemCategoryName) {
10916        CountingPaginatedData<ItemCategoryObject> data;
10917
10918        try {
10919            var commandForm = ItemUtil.getHome().getGetItemCategoriesForm();
10920            var command = CDI.current().select(GetItemCategoriesCommand.class).get();
10921
10922            commandForm.setParentItemCategoryName(parentItemCategoryName);
10923
10924            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10925            if(totalEntities == null) {
10926                data = Connections.emptyConnection();
10927            } else {
10928                try(var objectLimiter = new ObjectLimiter(env, ItemCategoryConstants.COMPONENT_VENDOR_NAME, ItemCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
10929                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10930
10931                    var itemCategories = entities.stream()
10932                            .map(ItemCategoryObject::new)
10933                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10934
10935                    data = new CountedObjects<>(objectLimiter, itemCategories);
10936                }
10937            }
10938        } catch (NamingException ex) {
10939            throw new RuntimeException(ex);
10940        }
10941
10942        return data;
10943    }
10944
10945    @GraphQLField
10946    @GraphQLName("itemAccountingCategory")
10947    static ItemAccountingCategoryObject itemAccountingCategory(final DataFetchingEnvironment env,
10948            @GraphQLName("itemAccountingCategoryName") final String itemAccountingCategoryName,
10949            @GraphQLName("id") @GraphQLID final String id) {
10950        ItemAccountingCategory itemAccountingCategory;
10951
10952        try {
10953            var commandForm = AccountingUtil.getHome().getGetItemAccountingCategoryForm();
10954
10955            commandForm.setItemAccountingCategoryName(itemAccountingCategoryName);
10956            commandForm.setUuid(id);
10957
10958            itemAccountingCategory = CDI.current().select(GetItemAccountingCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10959        } catch (NamingException ex) {
10960            throw new RuntimeException(ex);
10961        }
10962
10963        return itemAccountingCategory == null ? null : new ItemAccountingCategoryObject(itemAccountingCategory);
10964    }
10965
10966    @GraphQLField
10967    @GraphQLName("itemAccountingCategories")
10968    @GraphQLNonNull
10969    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10970    static CountingPaginatedData<ItemAccountingCategoryObject> itemAccountingCategories(final DataFetchingEnvironment env) {
10971        CountingPaginatedData<ItemAccountingCategoryObject> data;
10972
10973        try {
10974            var commandForm = AccountingUtil.getHome().getGetItemAccountingCategoriesForm();
10975            var command = CDI.current().select(GetItemAccountingCategoriesCommand.class).get();
10976
10977            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10978            if(totalEntities == null) {
10979                data = Connections.emptyConnection();
10980            } else {
10981                try(var objectLimiter = new ObjectLimiter(env, ItemAccountingCategoryConstants.COMPONENT_VENDOR_NAME, ItemAccountingCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
10982                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10983
10984                    var itemAccountingCategories = entities.stream()
10985                            .map(ItemAccountingCategoryObject::new)
10986                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10987
10988                    data = new CountedObjects<>(objectLimiter, itemAccountingCategories);
10989                }
10990            }
10991        } catch (NamingException ex) {
10992            throw new RuntimeException(ex);
10993        }
10994
10995        return data;
10996    }
10997
10998    @GraphQLField
10999    @GraphQLName("glAccount")
11000    static GlAccountObject glAccount(final DataFetchingEnvironment env,
11001            @GraphQLName("glAccountName") final String glAccountName,
11002            @GraphQLName("id") @GraphQLID final String id) {
11003        GlAccount glAccount;
11004
11005        try {
11006            var commandForm = AccountingUtil.getHome().getGetGlAccountForm();
11007
11008            commandForm.setGlAccountName(glAccountName);
11009            commandForm.setUuid(id);
11010
11011            glAccount = CDI.current().select(GetGlAccountCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11012        } catch (NamingException ex) {
11013            throw new RuntimeException(ex);
11014        }
11015
11016        return glAccount == null ? null : new GlAccountObject(glAccount);
11017    }
11018
11019    @GraphQLField
11020    @GraphQLName("glAccounts")
11021    @GraphQLNonNull
11022    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11023    static CountingPaginatedData<GlAccountObject> glAccounts(final DataFetchingEnvironment env,
11024            @GraphQLName("glAccountCategoryName") final String glAccountCategoryName) {
11025        CountingPaginatedData<GlAccountObject> data;
11026
11027        try {
11028            var commandForm = AccountingUtil.getHome().getGetGlAccountsForm();
11029            var command = CDI.current().select(GetGlAccountsCommand.class).get();
11030
11031            commandForm.setGlAccountCategoryName(glAccountCategoryName);
11032
11033            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11034            if(totalEntities == null) {
11035                data = Connections.emptyConnection();
11036            } else {
11037                try(var objectLimiter = new ObjectLimiter(env, GlAccountConstants.COMPONENT_VENDOR_NAME, GlAccountConstants.ENTITY_TYPE_NAME, totalEntities)) {
11038                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11039
11040                    var glAccounts = entities.stream()
11041                            .map(GlAccountObject::new)
11042                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11043
11044                    data = new CountedObjects<>(objectLimiter, glAccounts);
11045                }
11046            }
11047        } catch (NamingException ex) {
11048            throw new RuntimeException(ex);
11049        }
11050
11051        return data;
11052    }
11053
11054    @GraphQLField
11055    @GraphQLName("glAccountType")
11056    static GlAccountTypeObject glAccountType(final DataFetchingEnvironment env,
11057            @GraphQLName("glAccountTypeName") final String glAccountTypeName,
11058            @GraphQLName("id") @GraphQLID final String id) {
11059        GlAccountType glAccountType;
11060
11061        try {
11062            var commandForm = AccountingUtil.getHome().getGetGlAccountTypeForm();
11063
11064            commandForm.setGlAccountTypeName(glAccountTypeName);
11065            commandForm.setUuid(id);
11066
11067            glAccountType = CDI.current().select(GetGlAccountTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11068        } catch (NamingException ex) {
11069            throw new RuntimeException(ex);
11070        }
11071
11072        return glAccountType == null ? null : new GlAccountTypeObject(glAccountType);
11073    }
11074
11075    @GraphQLField
11076    @GraphQLName("glAccountTypes")
11077    @GraphQLNonNull
11078    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11079    static CountingPaginatedData<GlAccountTypeObject> glAccountTypes(final DataFetchingEnvironment env) {
11080        CountingPaginatedData<GlAccountTypeObject> data;
11081
11082        try {
11083            var commandForm = AccountingUtil.getHome().getGetGlAccountTypesForm();
11084            var command = CDI.current().select(GetGlAccountTypesCommand.class).get();
11085
11086            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11087            if(totalEntities == null) {
11088                data = Connections.emptyConnection();
11089            } else {
11090                try(var objectLimiter = new ObjectLimiter(env, GlAccountTypeConstants.COMPONENT_VENDOR_NAME, GlAccountTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11091                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11092
11093                    var glAccountTypes = entities.stream()
11094                            .map(GlAccountTypeObject::new)
11095                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11096
11097                    data = new CountedObjects<>(objectLimiter, glAccountTypes);
11098                }
11099            }
11100        } catch (NamingException ex) {
11101            throw new RuntimeException(ex);
11102        }
11103
11104        return data;
11105    }
11106
11107    @GraphQLField
11108    @GraphQLName("glAccountClass")
11109    static GlAccountClassObject glAccountClass(final DataFetchingEnvironment env,
11110            @GraphQLName("glAccountClassName") final String glAccountClassName,
11111            @GraphQLName("id") @GraphQLID final String id) {
11112        GlAccountClass glAccountClass;
11113
11114        try {
11115            var commandForm = AccountingUtil.getHome().getGetGlAccountClassForm();
11116
11117            commandForm.setGlAccountClassName(glAccountClassName);
11118            commandForm.setUuid(id);
11119
11120            glAccountClass = CDI.current().select(GetGlAccountClassCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11121        } catch (NamingException ex) {
11122            throw new RuntimeException(ex);
11123        }
11124
11125        return glAccountClass == null ? null : new GlAccountClassObject(glAccountClass);
11126    }
11127
11128    @GraphQLField
11129    @GraphQLName("glAccountClasses")
11130    @GraphQLNonNull
11131    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11132    static CountingPaginatedData<GlAccountClassObject> glAccountClasses(final DataFetchingEnvironment env) {
11133        CountingPaginatedData<GlAccountClassObject> data;
11134
11135        try {
11136            var commandForm = AccountingUtil.getHome().getGetGlAccountClassesForm();
11137            var command = CDI.current().select(GetGlAccountClassesCommand.class).get();
11138
11139            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11140            if(totalEntities == null) {
11141                data = Connections.emptyConnection();
11142            } else {
11143                try(var objectLimiter = new ObjectLimiter(env, GlAccountClassConstants.COMPONENT_VENDOR_NAME, GlAccountClassConstants.ENTITY_TYPE_NAME, totalEntities)) {
11144                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11145
11146                    var glAccountClasses = entities.stream()
11147                            .map(GlAccountClassObject::new)
11148                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11149
11150                    data = new CountedObjects<>(objectLimiter, glAccountClasses);
11151                }
11152            }
11153        } catch (NamingException ex) {
11154            throw new RuntimeException(ex);
11155        }
11156
11157        return data;
11158    }
11159
11160    @GraphQLField
11161    @GraphQLName("glAccountCategory")
11162    static GlAccountCategoryObject glAccountCategory(final DataFetchingEnvironment env,
11163            @GraphQLName("glAccountCategoryName") final String glAccountCategoryName,
11164            @GraphQLName("id") @GraphQLID final String id) {
11165        GlAccountCategory glAccountCategory;
11166
11167        try {
11168            var commandForm = AccountingUtil.getHome().getGetGlAccountCategoryForm();
11169
11170            commandForm.setGlAccountCategoryName(glAccountCategoryName);
11171            commandForm.setUuid(id);
11172
11173            glAccountCategory = CDI.current().select(GetGlAccountCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11174        } catch (NamingException ex) {
11175            throw new RuntimeException(ex);
11176        }
11177
11178        return glAccountCategory == null ? null : new GlAccountCategoryObject(glAccountCategory);
11179    }
11180
11181    @GraphQLField
11182    @GraphQLName("glAccountCategories")
11183    @GraphQLNonNull
11184    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11185    static CountingPaginatedData<GlAccountCategoryObject> glAccountCategories(final DataFetchingEnvironment env) {
11186        CountingPaginatedData<GlAccountCategoryObject> data;
11187
11188        try {
11189            var commandForm = AccountingUtil.getHome().getGetGlAccountCategoriesForm();
11190            var command = CDI.current().select(GetGlAccountCategoriesCommand.class).get();
11191
11192            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11193            if(totalEntities == null) {
11194                data = Connections.emptyConnection();
11195            } else {
11196                try(var objectLimiter = new ObjectLimiter(env, GlAccountCategoryConstants.COMPONENT_VENDOR_NAME, GlAccountCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
11197                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11198
11199                    var glAccountCategories = entities.stream()
11200                            .map(GlAccountCategoryObject::new)
11201                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11202
11203                    data = new CountedObjects<>(objectLimiter, glAccountCategories);
11204                }
11205            }
11206        } catch (NamingException ex) {
11207            throw new RuntimeException(ex);
11208        }
11209
11210        return data;
11211    }
11212
11213    @GraphQLField
11214    @GraphQLName("glResourceType")
11215    static GlResourceTypeObject glResourceType(final DataFetchingEnvironment env,
11216            @GraphQLName("glResourceTypeName") final String glResourceTypeName,
11217            @GraphQLName("id") @GraphQLID final String id) {
11218        GlResourceType glResourceType;
11219
11220        try {
11221            var commandForm = AccountingUtil.getHome().getGetGlResourceTypeForm();
11222
11223            commandForm.setGlResourceTypeName(glResourceTypeName);
11224            commandForm.setUuid(id);
11225
11226            glResourceType = CDI.current().select(GetGlResourceTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11227        } catch (NamingException ex) {
11228            throw new RuntimeException(ex);
11229        }
11230
11231        return glResourceType == null ? null : new GlResourceTypeObject(glResourceType);
11232    }
11233
11234    @GraphQLField
11235    @GraphQLName("glResourceTypes")
11236    @GraphQLNonNull
11237    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11238    static CountingPaginatedData<GlResourceTypeObject> glResourceTypes(final DataFetchingEnvironment env) {
11239        CountingPaginatedData<GlResourceTypeObject> data;
11240
11241        try {
11242            var commandForm = AccountingUtil.getHome().getGetGlResourceTypesForm();
11243            var command = CDI.current().select(GetGlResourceTypesCommand.class).get();
11244
11245            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11246            if(totalEntities == null) {
11247                data = Connections.emptyConnection();
11248            } else {
11249                try(var objectLimiter = new ObjectLimiter(env, GlResourceTypeConstants.COMPONENT_VENDOR_NAME, GlResourceTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11250                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11251
11252                    var glResourceTypes = entities.stream()
11253                            .map(GlResourceTypeObject::new)
11254                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11255
11256                    data = new CountedObjects<>(objectLimiter, glResourceTypes);
11257                }
11258            }
11259        } catch (NamingException ex) {
11260            throw new RuntimeException(ex);
11261        }
11262
11263        return data;
11264    }
11265
11266    @GraphQLField
11267    @GraphQLName("itemPurchasingCategory")
11268    static ItemPurchasingCategoryObject itemPurchasingCategory(final DataFetchingEnvironment env,
11269            @GraphQLName("itemPurchasingCategoryName") final String itemPurchasingCategoryName,
11270            @GraphQLName("id") @GraphQLID final String id) {
11271        ItemPurchasingCategory itemPurchasingCategory;
11272
11273        try {
11274            var commandForm = VendorUtil.getHome().getGetItemPurchasingCategoryForm();
11275
11276            commandForm.setItemPurchasingCategoryName(itemPurchasingCategoryName);
11277            commandForm.setUuid(id);
11278
11279            itemPurchasingCategory = CDI.current().select(GetItemPurchasingCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11280        } catch (NamingException ex) {
11281            throw new RuntimeException(ex);
11282        }
11283
11284        return itemPurchasingCategory == null ? null : new ItemPurchasingCategoryObject(itemPurchasingCategory);
11285    }
11286
11287    @GraphQLField
11288    @GraphQLName("itemPurchasingCategories")
11289    @GraphQLNonNull
11290    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11291    static CountingPaginatedData<ItemPurchasingCategoryObject> itemPurchasingCategories(final DataFetchingEnvironment env) {
11292        CountingPaginatedData<ItemPurchasingCategoryObject> data;
11293
11294        try {
11295            var commandForm = VendorUtil.getHome().getGetItemPurchasingCategoriesForm();
11296            var command = CDI.current().select(GetItemPurchasingCategoriesCommand.class).get();
11297
11298            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11299            if(totalEntities == null) {
11300                data = Connections.emptyConnection();
11301            } else {
11302                try(var objectLimiter = new ObjectLimiter(env, ItemPurchasingCategoryConstants.COMPONENT_VENDOR_NAME, ItemPurchasingCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
11303                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11304
11305                    var itemPurchasingCategories = entities.stream()
11306                            .map(ItemPurchasingCategoryObject::new)
11307                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11308
11309                    data = new CountedObjects<>(objectLimiter, itemPurchasingCategories);
11310                }
11311            }
11312        } catch (NamingException ex) {
11313            throw new RuntimeException(ex);
11314        }
11315
11316        return data;
11317    }
11318
11319    @GraphQLField
11320    @GraphQLName("itemDescriptionType")
11321    static ItemDescriptionTypeObject itemDescriptionType(final DataFetchingEnvironment env,
11322            @GraphQLName("itemDescriptionTypeName") final String itemDescriptionTypeName,
11323            @GraphQLName("id") @GraphQLID final String id) {
11324        ItemDescriptionType itemDescriptionType;
11325
11326        try {
11327            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeForm();
11328
11329            commandForm.setItemDescriptionTypeName(itemDescriptionTypeName);
11330            commandForm.setUuid(id);
11331
11332            itemDescriptionType = CDI.current().select(GetItemDescriptionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11333        } catch (NamingException ex) {
11334            throw new RuntimeException(ex);
11335        }
11336
11337        return itemDescriptionType == null ? null : new ItemDescriptionTypeObject(itemDescriptionType);
11338    }
11339
11340    @GraphQLField
11341    @GraphQLName("itemDescriptionTypes")
11342    @GraphQLNonNull
11343    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11344    static CountingPaginatedData<ItemDescriptionTypeObject> itemDescriptionTypes(final DataFetchingEnvironment env,
11345            @GraphQLName("parentItemDescriptionTypeName") final String parentItemDescriptionTypeName) {
11346        CountingPaginatedData<ItemDescriptionTypeObject> data;
11347
11348        try {
11349            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypesForm();
11350            var command = CDI.current().select(GetItemDescriptionTypesCommand.class).get();
11351
11352            commandForm.setParentItemDescriptionTypeName(parentItemDescriptionTypeName);
11353
11354            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11355            if(totalEntities == null) {
11356                data = Connections.emptyConnection();
11357            } else {
11358                try(var objectLimiter = new ObjectLimiter(env, ItemDescriptionTypeConstants.COMPONENT_VENDOR_NAME, ItemDescriptionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11359                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11360
11361                    var itemDescriptionTypes = entities.stream()
11362                            .map(ItemDescriptionTypeObject::new)
11363                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11364
11365                    data = new CountedObjects<>(objectLimiter, itemDescriptionTypes);
11366                }
11367            }
11368        } catch (NamingException ex) {
11369            throw new RuntimeException(ex);
11370        }
11371
11372        return data;
11373    }
11374
11375    @GraphQLField
11376    @GraphQLName("itemImageType")
11377    static ItemImageTypeObject itemImageType(final DataFetchingEnvironment env,
11378            @GraphQLName("itemImageTypeName") final String itemImageTypeName,
11379            @GraphQLName("id") @GraphQLID final String id) {
11380        ItemImageType itemImageType;
11381
11382        try {
11383            var commandForm = ItemUtil.getHome().getGetItemImageTypeForm();
11384
11385            commandForm.setItemImageTypeName(itemImageTypeName);
11386            commandForm.setUuid(id);
11387
11388            itemImageType = CDI.current().select(GetItemImageTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11389        } catch (NamingException ex) {
11390            throw new RuntimeException(ex);
11391        }
11392
11393        return itemImageType == null ? null : new ItemImageTypeObject(itemImageType);
11394    }
11395
11396    @GraphQLField
11397    @GraphQLName("itemImageTypes")
11398    @GraphQLNonNull
11399    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11400    static CountingPaginatedData<ItemImageTypeObject> itemImageTypes(final DataFetchingEnvironment env) {
11401        CountingPaginatedData<ItemImageTypeObject> data;
11402
11403        try {
11404            var commandForm = ItemUtil.getHome().getGetItemImageTypesForm();
11405            var command = CDI.current().select(GetItemImageTypesCommand.class).get();
11406
11407            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11408            if(totalEntities == null) {
11409                data = Connections.emptyConnection();
11410            } else {
11411                try(var objectLimiter = new ObjectLimiter(env, ItemImageTypeConstants.COMPONENT_VENDOR_NAME, ItemImageTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11412                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11413
11414                    var itemImageTypes = entities.stream()
11415                            .map(ItemImageTypeObject::new)
11416                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11417
11418                    data = new CountedObjects<>(objectLimiter, itemImageTypes);
11419                }
11420            }
11421        } catch (NamingException ex) {
11422            throw new RuntimeException(ex);
11423        }
11424
11425        return data;
11426    }
11427
11428    @GraphQLField
11429    @GraphQLName("itemDescriptionTypeUseType")
11430    static ItemDescriptionTypeUseTypeObject itemDescriptionTypeUseType(final DataFetchingEnvironment env,
11431            @GraphQLName("itemDescriptionTypeUseTypeName") final String itemDescriptionTypeUseTypeName,
11432            @GraphQLName("id") @GraphQLID final String id) {
11433        ItemDescriptionTypeUseType itemDescriptionTypeUseType;
11434
11435        try {
11436            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeUseTypeForm();
11437
11438            commandForm.setItemDescriptionTypeUseTypeName(itemDescriptionTypeUseTypeName);
11439            commandForm.setUuid(id);
11440
11441            itemDescriptionTypeUseType = CDI.current().select(GetItemDescriptionTypeUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11442        } catch (NamingException ex) {
11443            throw new RuntimeException(ex);
11444        }
11445
11446        return itemDescriptionTypeUseType == null ? null : new ItemDescriptionTypeUseTypeObject(itemDescriptionTypeUseType);
11447    }
11448
11449    @GraphQLField
11450    @GraphQLName("itemDescriptionTypeUseTypes")
11451    @GraphQLNonNull
11452    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11453    static CountingPaginatedData<ItemDescriptionTypeUseTypeObject> itemDescriptionTypeUseTypes(final DataFetchingEnvironment env) {
11454        CountingPaginatedData<ItemDescriptionTypeUseTypeObject> data;
11455
11456        try {
11457            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeUseTypesForm();
11458            var command = CDI.current().select(GetItemDescriptionTypeUseTypesCommand.class).get();
11459
11460            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11461            if(totalEntities == null) {
11462                data = Connections.emptyConnection();
11463            } else {
11464                try(var objectLimiter = new ObjectLimiter(env, ItemDescriptionTypeUseTypeConstants.COMPONENT_VENDOR_NAME, ItemDescriptionTypeUseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11465                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11466
11467                    var itemDescriptionTypeUseTypes = entities.stream()
11468                            .map(ItemDescriptionTypeUseTypeObject::new)
11469                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11470
11471                    data = new CountedObjects<>(objectLimiter, itemDescriptionTypeUseTypes);
11472                }
11473            }
11474        } catch (NamingException ex) {
11475            throw new RuntimeException(ex);
11476        }
11477
11478        return data;
11479    }
11480
11481    @GraphQLField
11482    @GraphQLName("itemDescriptionTypeUse")
11483    static ItemDescriptionTypeUseObject itemDescriptionTypeUse(final DataFetchingEnvironment env,
11484            @GraphQLName("itemDescriptionTypeUseTypeName") @GraphQLNonNull final String itemDescriptionTypeUseTypeName,
11485            @GraphQLName("itemDescriptionTypeName") @GraphQLNonNull final String itemDescriptionTypeName) {
11486        ItemDescriptionTypeUse itemDescriptionTypeUse;
11487
11488        try {
11489            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeUseForm();
11490
11491            commandForm.setItemDescriptionTypeUseTypeName(itemDescriptionTypeUseTypeName);
11492            commandForm.setItemDescriptionTypeName(itemDescriptionTypeName);
11493
11494            itemDescriptionTypeUse = CDI.current().select(GetItemDescriptionTypeUseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11495        } catch (NamingException ex) {
11496            throw new RuntimeException(ex);
11497        }
11498
11499        return itemDescriptionTypeUse == null ? null : new ItemDescriptionTypeUseObject(itemDescriptionTypeUse);
11500    }
11501
11502    @GraphQLField
11503    @GraphQLName("itemDescriptionTypeUses")
11504    @GraphQLNonNull
11505    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11506    static CountingPaginatedData<ItemDescriptionTypeUseObject> itemDescriptionTypeUses(final DataFetchingEnvironment env,
11507            @GraphQLName("itemDescriptionTypeUseTypeName") final String itemDescriptionTypeUseTypeName,
11508            @GraphQLName("itemDescriptionTypeName") final String itemDescriptionTypeName) {
11509        CountingPaginatedData<ItemDescriptionTypeUseObject> data;
11510
11511        try {
11512            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeUsesForm();
11513            var command = CDI.current().select(GetItemDescriptionTypeUsesCommand.class).get();
11514
11515            commandForm.setItemDescriptionTypeUseTypeName(itemDescriptionTypeUseTypeName);
11516            commandForm.setItemDescriptionTypeName(itemDescriptionTypeName);
11517
11518            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11519            if(totalEntities == null) {
11520                data = Connections.emptyConnection();
11521            } else {
11522                try(var objectLimiter = new ObjectLimiter(env, com.echothree.model.data.item.common.ItemDescriptionTypeUseConstants.COMPONENT_VENDOR_NAME, com.echothree.model.data.item.common.ItemDescriptionTypeUseConstants.ENTITY_TYPE_NAME, totalEntities)) {
11523                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11524
11525                    var objects = entities.stream()
11526                            .map(ItemDescriptionTypeUseObject::new)
11527                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11528
11529                    data = new CountedObjects<>(objectLimiter, objects);
11530                }
11531            }
11532        } catch (NamingException ex) {
11533            throw new RuntimeException(ex);
11534        }
11535
11536        return data;
11537    }
11538
11539    @GraphQLField
11540    @GraphQLName("itemAliasType")
11541    static ItemAliasTypeObject itemAliasType(final DataFetchingEnvironment env,
11542            @GraphQLName("itemAliasTypeName") final String itemAliasTypeName,
11543            @GraphQLName("id") @GraphQLID final String id) {
11544        ItemAliasType itemAliasType;
11545
11546        try {
11547            var commandForm = ItemUtil.getHome().getGetItemAliasTypeForm();
11548
11549            commandForm.setItemAliasTypeName(itemAliasTypeName);
11550            commandForm.setUuid(id);
11551
11552            itemAliasType = CDI.current().select(GetItemAliasTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11553        } catch (NamingException ex) {
11554            throw new RuntimeException(ex);
11555        }
11556
11557        return itemAliasType == null ? null : new ItemAliasTypeObject(itemAliasType);
11558    }
11559
11560    @GraphQLField
11561    @GraphQLName("itemAliasTypes")
11562    @GraphQLNonNull
11563    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11564    static CountingPaginatedData<ItemAliasTypeObject> itemAliasTypes(final DataFetchingEnvironment env) {
11565        CountingPaginatedData<ItemAliasTypeObject> data;
11566
11567        try {
11568            var commandForm = ItemUtil.getHome().getGetItemAliasTypesForm();
11569            var command = CDI.current().select(GetItemAliasTypesCommand.class).get();
11570
11571            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11572            if(totalEntities == null) {
11573                data = Connections.emptyConnection();
11574            } else {
11575                try(var objectLimiter = new ObjectLimiter(env, ItemAliasTypeConstants.COMPONENT_VENDOR_NAME, ItemAliasTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11576                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11577
11578                    var itemAliasTypes = entities.stream()
11579                            .map(ItemAliasTypeObject::new)
11580                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11581
11582                    data = new CountedObjects<>(objectLimiter, itemAliasTypes);
11583                }
11584            }
11585        } catch (NamingException ex) {
11586            throw new RuntimeException(ex);
11587        }
11588
11589        return data;
11590    }
11591
11592    @GraphQLField
11593    @GraphQLName("itemWeightType")
11594    static ItemWeightTypeObject itemWeightType(final DataFetchingEnvironment env,
11595            @GraphQLName("itemWeightTypeName") final String itemWeightTypeName,
11596            @GraphQLName("id") @GraphQLID final String id) {
11597        ItemWeightType itemWeightType;
11598
11599        try {
11600            var commandForm = ItemUtil.getHome().getGetItemWeightTypeForm();
11601
11602            commandForm.setItemWeightTypeName(itemWeightTypeName);
11603            commandForm.setUuid(id);
11604
11605            itemWeightType = CDI.current().select(GetItemWeightTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11606        } catch (NamingException ex) {
11607            throw new RuntimeException(ex);
11608        }
11609
11610        return itemWeightType == null ? null : new ItemWeightTypeObject(itemWeightType);
11611    }
11612
11613    @GraphQLField
11614    @GraphQLName("itemWeightTypes")
11615    @GraphQLNonNull
11616    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11617    static CountingPaginatedData<ItemWeightTypeObject> itemWeightTypes(final DataFetchingEnvironment env) {
11618        CountingPaginatedData<ItemWeightTypeObject> data;
11619
11620        try {
11621            var commandForm = ItemUtil.getHome().getGetItemWeightTypesForm();
11622            var command = CDI.current().select(GetItemWeightTypesCommand.class).get();
11623
11624            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11625            if(totalEntities == null) {
11626                data = Connections.emptyConnection();
11627            } else {
11628                try(var objectLimiter = new ObjectLimiter(env, ItemWeightTypeConstants.COMPONENT_VENDOR_NAME, ItemWeightTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11629                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11630
11631                    var itemWeightTypes = entities.stream()
11632                            .map(ItemWeightTypeObject::new)
11633                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11634
11635                    data = new CountedObjects<>(objectLimiter, itemWeightTypes);
11636                }
11637            }
11638        } catch (NamingException ex) {
11639            throw new RuntimeException(ex);
11640        }
11641
11642        return data;
11643    }
11644
11645    @GraphQLField
11646    @GraphQLName("itemVolumeType")
11647    static ItemVolumeTypeObject itemVolumeType(final DataFetchingEnvironment env,
11648            @GraphQLName("itemVolumeTypeName") final String itemVolumeTypeName,
11649            @GraphQLName("id") @GraphQLID final String id) {
11650        ItemVolumeType itemVolumeType;
11651
11652        try {
11653            var commandForm = ItemUtil.getHome().getGetItemVolumeTypeForm();
11654
11655            commandForm.setItemVolumeTypeName(itemVolumeTypeName);
11656            commandForm.setUuid(id);
11657
11658            itemVolumeType = CDI.current().select(GetItemVolumeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11659        } catch (NamingException ex) {
11660            throw new RuntimeException(ex);
11661        }
11662
11663        return itemVolumeType == null ? null : new ItemVolumeTypeObject(itemVolumeType);
11664    }
11665
11666    @GraphQLField
11667    @GraphQLName("itemVolumeTypes")
11668    @GraphQLNonNull
11669    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11670    static CountingPaginatedData<ItemVolumeTypeObject> itemVolumeTypes(final DataFetchingEnvironment env) {
11671        CountingPaginatedData<ItemVolumeTypeObject> data;
11672
11673        try {
11674            var commandForm = ItemUtil.getHome().getGetItemVolumeTypesForm();
11675            var command = CDI.current().select(GetItemVolumeTypesCommand.class).get();
11676
11677            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11678            if(totalEntities == null) {
11679                data = Connections.emptyConnection();
11680            } else {
11681                try(var objectLimiter = new ObjectLimiter(env, ItemVolumeTypeConstants.COMPONENT_VENDOR_NAME, ItemVolumeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11682                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11683
11684                    var itemVolumeTypes = entities.stream()
11685                            .map(ItemVolumeTypeObject::new)
11686                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11687
11688                    data = new CountedObjects<>(objectLimiter, itemVolumeTypes);
11689                }
11690            }
11691        } catch (NamingException ex) {
11692            throw new RuntimeException(ex);
11693        }
11694
11695        return data;
11696    }
11697
11698    @GraphQLField
11699    @GraphQLName("relatedItemType")
11700    static RelatedItemTypeObject relatedItemType(final DataFetchingEnvironment env,
11701            @GraphQLName("relatedItemTypeName") final String relatedItemTypeName,
11702            @GraphQLName("id") @GraphQLID final String id) {
11703        RelatedItemType relatedItemType;
11704
11705        try {
11706            var commandForm = ItemUtil.getHome().getGetRelatedItemTypeForm();
11707
11708            commandForm.setRelatedItemTypeName(relatedItemTypeName);
11709            commandForm.setUuid(id);
11710
11711            relatedItemType = CDI.current().select(GetRelatedItemTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11712        } catch (NamingException ex) {
11713            throw new RuntimeException(ex);
11714        }
11715
11716        return relatedItemType == null ? null : new RelatedItemTypeObject(relatedItemType, null);
11717    }
11718
11719    @GraphQLField
11720    @GraphQLName("relatedItemTypes")
11721    @GraphQLNonNull
11722    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11723    static CountingPaginatedData<RelatedItemTypeObject> relatedItemTypes(final DataFetchingEnvironment env) {
11724        CountingPaginatedData<RelatedItemTypeObject> data;
11725
11726        try {
11727            var commandForm = ItemUtil.getHome().getGetRelatedItemTypesForm();
11728            var command = CDI.current().select(GetRelatedItemTypesCommand.class).get();
11729
11730            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11731            if(totalEntities == null) {
11732                data = Connections.emptyConnection();
11733            } else {
11734                try(var objectLimiter = new ObjectLimiter(env, RelatedItemTypeConstants.COMPONENT_VENDOR_NAME, RelatedItemTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11735                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11736
11737                    var relatedItemTypes = entities.stream()
11738                            .map((RelatedItemType relatedItemType) -> new RelatedItemTypeObject(relatedItemType, null))
11739                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11740
11741                    data = new CountedObjects<>(objectLimiter, relatedItemTypes);
11742                }
11743            }
11744        } catch (NamingException ex) {
11745            throw new RuntimeException(ex);
11746        }
11747
11748        return data;
11749    }
11750
11751    @GraphQLField
11752    @GraphQLName("relatedItem")
11753    static RelatedItemObject relatedItem(final DataFetchingEnvironment env,
11754            @GraphQLName("relatedItemTypeName") @GraphQLNonNull final String relatedItemTypeName,
11755            @GraphQLName("fromItemName") @GraphQLNonNull final String fromItemName,
11756            @GraphQLName("toItemName") @GraphQLNonNull final String toItemName) {
11757        RelatedItem relatedItem;
11758
11759        try {
11760            var commandForm = ItemUtil.getHome().getGetRelatedItemForm();
11761
11762            commandForm.setRelatedItemTypeName(relatedItemTypeName);
11763            commandForm.setFromItemName(fromItemName);
11764            commandForm.setToItemName(toItemName);
11765
11766            relatedItem = CDI.current().select(GetRelatedItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11767        } catch (NamingException ex) {
11768            throw new RuntimeException(ex);
11769        }
11770
11771        return relatedItem == null ? null : new RelatedItemObject(relatedItem);
11772    }
11773
11774    @GraphQLField
11775    @GraphQLName("relatedItems")
11776    @GraphQLNonNull
11777    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11778    static CountingPaginatedData<RelatedItemObject> relatedItems(final DataFetchingEnvironment env,
11779            @GraphQLName("relatedItemTypeName") final String relatedItemTypeName,
11780            @GraphQLName("fromItemName") final String fromItemName,
11781            @GraphQLName("toItemName") final String toItemName) {
11782        CountingPaginatedData<RelatedItemObject> data;
11783
11784        try {
11785            var commandForm = ItemUtil.getHome().getGetRelatedItemsForm();
11786            var command = CDI.current().select(GetRelatedItemsCommand.class).get();
11787
11788            commandForm.setRelatedItemTypeName(relatedItemTypeName);
11789            commandForm.setFromItemName(fromItemName);
11790            commandForm.setToItemName(toItemName);
11791
11792            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11793            if(totalEntities == null) {
11794                data = Connections.emptyConnection();
11795            } else {
11796                try(var objectLimiter = new ObjectLimiter(env, RelatedItemConstants.COMPONENT_VENDOR_NAME, RelatedItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
11797                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11798
11799                    var relatedItemObjects = entities.stream()
11800                            .map(RelatedItemObject::new)
11801                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11802
11803                    data = new CountedObjects<>(objectLimiter, relatedItemObjects);
11804                }
11805            }
11806        } catch (NamingException ex) {
11807            throw new RuntimeException(ex);
11808        }
11809
11810        return data;
11811    }
11812
11813    @GraphQLField
11814    @GraphQLName("orderType")
11815    static OrderTypeObject orderType(final DataFetchingEnvironment env,
11816            @GraphQLName("orderTypeName") final String orderTypeName,
11817            @GraphQLName("id") @GraphQLID final String id) {
11818        OrderType orderType;
11819
11820        try {
11821            var commandForm = OrderUtil.getHome().getGetOrderTypeForm();
11822
11823            commandForm.setOrderTypeName(orderTypeName);
11824            commandForm.setUuid(id);
11825
11826            orderType = CDI.current().select(GetOrderTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11827        } catch (NamingException ex) {
11828            throw new RuntimeException(ex);
11829        }
11830
11831        return orderType == null ? null : new OrderTypeObject(orderType);
11832    }
11833
11834    @GraphQLField
11835    @GraphQLName("orderTypes")
11836    @GraphQLNonNull
11837    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11838    static CountingPaginatedData<OrderTypeObject> orderTypes(final DataFetchingEnvironment env) {
11839        CountingPaginatedData<OrderTypeObject> data;
11840
11841        try {
11842            var commandForm = OrderUtil.getHome().getGetOrderTypesForm();
11843            var command = CDI.current().select(GetOrderTypesCommand.class).get();
11844
11845            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11846            if(totalEntities == null) {
11847                data = Connections.emptyConnection();
11848            } else {
11849                try(var objectLimiter = new ObjectLimiter(env, OrderTypeConstants.COMPONENT_VENDOR_NAME, OrderTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11850                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11851
11852                    var orderTypes = entities.stream()
11853                            .map(OrderTypeObject::new)
11854                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11855
11856                    data = new CountedObjects<>(objectLimiter, orderTypes);
11857                }
11858            }
11859        } catch (NamingException ex) {
11860            throw new RuntimeException(ex);
11861        }
11862
11863        return data;
11864    }
11865
11866    @GraphQLField
11867    @GraphQLName("orderPriority")
11868    static OrderPriorityObject orderPriority(final DataFetchingEnvironment env,
11869            @GraphQLName("orderTypeName") final String orderTypeName,
11870            @GraphQLName("orderPriorityName") final String orderPriorityName,
11871            @GraphQLName("id") @GraphQLID final String id) {
11872        OrderPriority orderPriority;
11873
11874        try {
11875            var commandForm = OrderUtil.getHome().getGetOrderPriorityForm();
11876
11877            commandForm.setOrderTypeName(orderTypeName);
11878            commandForm.setOrderPriorityName(orderPriorityName);
11879            commandForm.setUuid(id);
11880
11881            orderPriority = CDI.current().select(GetOrderPriorityCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11882        } catch (NamingException ex) {
11883            throw new RuntimeException(ex);
11884        }
11885
11886        return orderPriority == null ? null : new OrderPriorityObject(orderPriority);
11887    }
11888
11889    @GraphQLField
11890    @GraphQLName("orderPriorities")
11891    @GraphQLNonNull
11892    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11893    static CountingPaginatedData<OrderPriorityObject> orderPriorities(final DataFetchingEnvironment env,
11894            @GraphQLName("orderTypeName") final String orderTypeName) {
11895        CountingPaginatedData<OrderPriorityObject> data;
11896
11897        try {
11898            var commandForm = OrderUtil.getHome().getGetOrderPrioritiesForm();
11899            var command = CDI.current().select(GetOrderPrioritiesCommand.class).get();
11900
11901            commandForm.setOrderTypeName(orderTypeName);
11902
11903            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11904            if(totalEntities == null) {
11905                data = Connections.emptyConnection();
11906            } else {
11907                try(var objectLimiter = new ObjectLimiter(env, OrderPriorityConstants.COMPONENT_VENDOR_NAME, OrderPriorityConstants.ENTITY_TYPE_NAME, totalEntities)) {
11908                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11909
11910                    var orderPriorities = entities.stream()
11911                            .map(OrderPriorityObject::new)
11912                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11913
11914                    data = new CountedObjects<>(objectLimiter, orderPriorities);
11915                }
11916            }
11917        } catch (NamingException ex) {
11918            throw new RuntimeException(ex);
11919        }
11920
11921        return data;
11922    }
11923
11924    @GraphQLField
11925    @GraphQLName("orderTimeType")
11926    static OrderTimeTypeObject orderTimeType(final DataFetchingEnvironment env,
11927            @GraphQLName("orderTypeName") final String orderTypeName,
11928            @GraphQLName("orderTimeTypeName") final String orderTimeTypeName,
11929            @GraphQLName("id") @GraphQLID final String id) {
11930        OrderTimeType orderTimeType;
11931
11932        try {
11933            var commandForm = OrderUtil.getHome().getGetOrderTimeTypeForm();
11934
11935            commandForm.setOrderTypeName(orderTypeName);
11936            commandForm.setOrderTimeTypeName(orderTimeTypeName);
11937            commandForm.setUuid(id);
11938
11939            orderTimeType = CDI.current().select(GetOrderTimeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11940        } catch (NamingException ex) {
11941            throw new RuntimeException(ex);
11942        }
11943
11944        return orderTimeType == null ? null : new OrderTimeTypeObject(orderTimeType);
11945    }
11946
11947    @GraphQLField
11948    @GraphQLName("orderTimeTypes")
11949    @GraphQLNonNull
11950    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11951    static CountingPaginatedData<OrderTimeTypeObject> orderTimeTypes(final DataFetchingEnvironment env,
11952            @GraphQLName("orderTypeName") final String orderTypeName) {
11953        CountingPaginatedData<OrderTimeTypeObject> data;
11954
11955        try {
11956            var commandForm = OrderUtil.getHome().getGetOrderTimeTypesForm();
11957            var command = CDI.current().select(GetOrderTimeTypesCommand.class).get();
11958
11959            commandForm.setOrderTypeName(orderTypeName);
11960
11961            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11962            if(totalEntities == null) {
11963                data = Connections.emptyConnection();
11964            } else {
11965                try(var objectLimiter = new ObjectLimiter(env, OrderTimeTypeConstants.COMPONENT_VENDOR_NAME, OrderTimeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11966                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11967
11968                    var orderTimeTypes = entities.stream()
11969                            .map(OrderTimeTypeObject::new)
11970                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11971
11972                    data = new CountedObjects<>(objectLimiter, orderTimeTypes);
11973                }
11974            }
11975        } catch (NamingException ex) {
11976            throw new RuntimeException(ex);
11977        }
11978
11979        return data;
11980    }
11981
11982    @GraphQLField
11983    @GraphQLName("wishlistType")
11984    static WishlistTypeObject wishlistType(final DataFetchingEnvironment env,
11985            @GraphQLName("wishlistTypeName") final String wishlistTypeName,
11986            @GraphQLName("id") @GraphQLID final String id) {
11987        WishlistType wishlistType;
11988
11989        try {
11990            var commandForm = WishlistUtil.getHome().getGetWishlistTypeForm();
11991
11992            commandForm.setWishlistTypeName(wishlistTypeName);
11993            commandForm.setUuid(id);
11994
11995            wishlistType = CDI.current().select(GetWishlistTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11996        } catch (NamingException ex) {
11997            throw new RuntimeException(ex);
11998        }
11999
12000        return wishlistType == null ? null : new WishlistTypeObject(wishlistType);
12001    }
12002
12003    @GraphQLField
12004    @GraphQLName("wishlistTypes")
12005    @GraphQLNonNull
12006    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12007    static CountingPaginatedData<WishlistTypeObject> wishlistTypes(final DataFetchingEnvironment env) {
12008        CountingPaginatedData<WishlistTypeObject> data;
12009
12010        try {
12011            var commandForm = WishlistUtil.getHome().getGetWishlistTypesForm();
12012            var command = CDI.current().select(GetWishlistTypesCommand.class).get();
12013
12014            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12015            if(totalEntities == null) {
12016                data = Connections.emptyConnection();
12017            } else {
12018                try(var objectLimiter = new ObjectLimiter(env, WishlistTypeConstants.COMPONENT_VENDOR_NAME, WishlistTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12019                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12020
12021                    var wishlistTypes = entities.stream()
12022                            .map(WishlistTypeObject::new)
12023                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12024
12025                    data = new CountedObjects<>(objectLimiter, wishlistTypes);
12026                }
12027            }
12028        } catch (NamingException ex) {
12029            throw new RuntimeException(ex);
12030        }
12031
12032        return data;
12033    }
12034
12035    @GraphQLField
12036    @GraphQLName("wishlistPriority")
12037    static WishlistPriorityObject wishlistPriority(final DataFetchingEnvironment env,
12038            @GraphQLName("wishlistTypeName") final String wishlistTypeName,
12039            @GraphQLName("wishlistPriorityName") final String wishlistPriorityName,
12040            @GraphQLName("id") @GraphQLID final String id) {
12041        WishlistPriority wishlistPriority;
12042
12043        try {
12044            var commandForm = WishlistUtil.getHome().getGetWishlistPriorityForm();
12045
12046            commandForm.setWishlistTypeName(wishlistTypeName);
12047            commandForm.setWishlistPriorityName(wishlistPriorityName);
12048            commandForm.setUuid(id);
12049
12050            wishlistPriority = CDI.current().select(GetWishlistPriorityCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12051        } catch (NamingException ex) {
12052            throw new RuntimeException(ex);
12053        }
12054
12055        return wishlistPriority == null ? null : new WishlistPriorityObject(wishlistPriority);
12056    }
12057
12058    @GraphQLField
12059    @GraphQLName("wishlistPriorities")
12060    @GraphQLNonNull
12061    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12062    static CountingPaginatedData<WishlistPriorityObject> wishlistPriorities(final DataFetchingEnvironment env,
12063            @GraphQLName("wishlistTypeName") @GraphQLNonNull final String wishlistTypeName) {
12064        CountingPaginatedData<WishlistPriorityObject> data;
12065
12066        try {
12067            var commandForm = WishlistUtil.getHome().getGetWishlistPrioritiesForm();
12068            var command = CDI.current().select(GetWishlistPrioritiesCommand.class).get();
12069
12070            commandForm.setWishlistTypeName(wishlistTypeName);
12071
12072            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12073            if(totalEntities == null) {
12074                data = Connections.emptyConnection();
12075            } else {
12076                try(var objectLimiter = new ObjectLimiter(env, WishlistPriorityConstants.COMPONENT_VENDOR_NAME, WishlistPriorityConstants.ENTITY_TYPE_NAME, totalEntities)) {
12077                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12078
12079                    var wishlistPriorities = entities.stream()
12080                            .map(WishlistPriorityObject::new)
12081                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12082
12083                    data = new CountedObjects<>(objectLimiter, wishlistPriorities);
12084                }
12085            }
12086        } catch (NamingException ex) {
12087            throw new RuntimeException(ex);
12088        }
12089
12090        return data;
12091    }
12092
12093    @GraphQLField
12094    @GraphQLName("termType")
12095    static TermTypeObject termType(final DataFetchingEnvironment env,
12096            @GraphQLName("termTypeName") final String termTypeName,
12097            @GraphQLName("id") @GraphQLID final String id) {
12098        TermType termType;
12099
12100        try {
12101            var commandForm = TermUtil.getHome().getGetTermTypeForm();
12102
12103            commandForm.setTermTypeName(termTypeName);
12104            commandForm.setUuid(id);
12105
12106            termType = CDI.current().select(GetTermTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12107        } catch (NamingException ex) {
12108            throw new RuntimeException(ex);
12109        }
12110
12111        return termType == null ? null : new TermTypeObject(termType);
12112    }
12113
12114    @GraphQLField
12115    @GraphQLName("termTypes")
12116    @GraphQLNonNull
12117    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12118    static CountingPaginatedData<TermTypeObject> termTypes(final DataFetchingEnvironment env) {
12119        CountingPaginatedData<TermTypeObject> data;
12120
12121        try {
12122            var commandForm = TermUtil.getHome().getGetTermTypesForm();
12123            var command = CDI.current().select(GetTermTypesCommand.class).get();
12124
12125            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12126            if(totalEntities == null) {
12127                data = Connections.emptyConnection();
12128            } else {
12129                try(var objectLimiter = new ObjectLimiter(env, TermTypeConstants.COMPONENT_VENDOR_NAME, TermTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12130                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12131
12132                    var termTypes = entities.stream()
12133                            .map(TermTypeObject::new)
12134                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12135
12136                    data = new CountedObjects<>(objectLimiter, termTypes);
12137                }
12138            }
12139        } catch (NamingException ex) {
12140            throw new RuntimeException(ex);
12141        }
12142
12143        return data;
12144    }
12145
12146    @GraphQLField
12147    @GraphQLName("term")
12148    static TermObject term(final DataFetchingEnvironment env,
12149            @GraphQLName("termName") final String termName,
12150            @GraphQLName("id") @GraphQLID final String id) {
12151        Term term;
12152
12153        try {
12154            var commandForm = TermUtil.getHome().getGetTermForm();
12155
12156            commandForm.setTermName(termName);
12157            commandForm.setUuid(id);
12158
12159            term = CDI.current().select(GetTermCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12160        } catch (NamingException ex) {
12161            throw new RuntimeException(ex);
12162        }
12163
12164        return term == null ? null : new TermObject(term);
12165    }
12166
12167    @GraphQLField
12168    @GraphQLName("terms")
12169    @GraphQLNonNull
12170    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12171    static CountingPaginatedData<TermObject> terms(final DataFetchingEnvironment env) {
12172        CountingPaginatedData<TermObject> data;
12173
12174        try {
12175            var commandForm = TermUtil.getHome().getGetTermsForm();
12176            var command = CDI.current().select(GetTermsCommand.class).get();
12177
12178            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12179            if(totalEntities == null) {
12180                data = Connections.emptyConnection();
12181            } else {
12182                try(var objectLimiter = new ObjectLimiter(env, TermConstants.COMPONENT_VENDOR_NAME, TermConstants.ENTITY_TYPE_NAME, totalEntities)) {
12183                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12184
12185                    var terms = entities.stream()
12186                            .map(TermObject::new)
12187                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12188
12189                    data = new CountedObjects<>(objectLimiter, terms);
12190                }
12191            }
12192        } catch (NamingException ex) {
12193            throw new RuntimeException(ex);
12194        }
12195
12196        return data;
12197    }
12198
12199    @GraphQLField
12200    @GraphQLName("securityRoleGroup")
12201    static SecurityRoleGroupObject securityRoleGroup(final DataFetchingEnvironment env,
12202            @GraphQLName("securityRoleGroupName") final String securityRoleGroupName,
12203            @GraphQLName("id") @GraphQLID final String id) {
12204        SecurityRoleGroup securityRoleGroup;
12205
12206        try {
12207            var commandForm = SecurityUtil.getHome().getGetSecurityRoleGroupForm();
12208
12209            commandForm.setSecurityRoleGroupName(securityRoleGroupName);
12210            commandForm.setUuid(id);
12211
12212            securityRoleGroup = CDI.current().select(GetSecurityRoleGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12213        } catch (NamingException ex) {
12214            throw new RuntimeException(ex);
12215        }
12216
12217        return securityRoleGroup == null ? null : new SecurityRoleGroupObject(securityRoleGroup);
12218    }
12219
12220    @GraphQLField
12221    @GraphQLName("securityRoleGroups")
12222    @GraphQLNonNull
12223    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12224    static CountingPaginatedData<SecurityRoleGroupObject> securityRoleGroups(final DataFetchingEnvironment env,
12225            @GraphQLName("parentSecurityRoleGroupName") final String parentSecurityRoleGroupName) {
12226        CountingPaginatedData<SecurityRoleGroupObject> data;
12227
12228        try {
12229            var commandForm = SecurityUtil.getHome().getGetSecurityRoleGroupsForm();
12230            var command = CDI.current().select(GetSecurityRoleGroupsCommand.class).get();
12231
12232            commandForm.setParentSecurityRoleGroupName(parentSecurityRoleGroupName);
12233
12234            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12235            if(totalEntities == null) {
12236                data = Connections.emptyConnection();
12237            } else {
12238                try(var objectLimiter = new ObjectLimiter(env, SecurityRoleGroupConstants.COMPONENT_VENDOR_NAME, SecurityRoleGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
12239                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12240
12241                    var securityRoleGroups = entities.stream()
12242                            .map(SecurityRoleGroupObject::new)
12243                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12244
12245                    data = new CountedObjects<>(objectLimiter, securityRoleGroups);
12246                }
12247            }
12248        } catch (NamingException ex) {
12249            throw new RuntimeException(ex);
12250        }
12251
12252        return data;
12253    }
12254
12255    @GraphQLField
12256    @GraphQLName("securityRole")
12257    static SecurityRoleObject securityRole(final DataFetchingEnvironment env,
12258            @GraphQLName("securityRoleGroupName") final String securityRoleGroupName,
12259            @GraphQLName("securityRoleName") final String securityRoleName,
12260            @GraphQLName("id") @GraphQLID final String id) {
12261        SecurityRole securityRole;
12262
12263        try {
12264            var commandForm = SecurityUtil.getHome().getGetSecurityRoleForm();
12265
12266            commandForm.setSecurityRoleGroupName(securityRoleGroupName);
12267            commandForm.setSecurityRoleName(securityRoleName);
12268            commandForm.setUuid(id);
12269
12270            securityRole = CDI.current().select(GetSecurityRoleCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12271        } catch (NamingException ex) {
12272            throw new RuntimeException(ex);
12273        }
12274
12275        return securityRole == null ? null : new SecurityRoleObject(securityRole);
12276    }
12277
12278    @GraphQLField
12279    @GraphQLName("securityRoles")
12280    @GraphQLNonNull
12281    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12282    static CountingPaginatedData<SecurityRoleObject> securityRoles(final DataFetchingEnvironment env,
12283            @GraphQLName("securityRoleGroupName") @GraphQLNonNull final String securityRoleGroupName) {
12284        CountingPaginatedData<SecurityRoleObject> data;
12285
12286        try {
12287            var commandForm = SecurityUtil.getHome().getGetSecurityRolesForm();
12288            var command = CDI.current().select(GetSecurityRolesCommand.class).get();
12289
12290            commandForm.setSecurityRoleGroupName(securityRoleGroupName);
12291
12292            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12293            if(totalEntities == null) {
12294                data = Connections.emptyConnection();
12295            } else {
12296                try(var objectLimiter = new ObjectLimiter(env, SecurityRoleConstants.COMPONENT_VENDOR_NAME, SecurityRoleConstants.ENTITY_TYPE_NAME, totalEntities)) {
12297                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12298
12299                    var securityRoles = entities.stream()
12300                            .map(SecurityRoleObject::new)
12301                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12302
12303                    data = new CountedObjects<>(objectLimiter, securityRoles);
12304                }
12305            }
12306        } catch (NamingException ex) {
12307            throw new RuntimeException(ex);
12308        }
12309
12310        return data;
12311    }
12312
12313    @GraphQLField
12314    @GraphQLName("personalTitles")
12315    @GraphQLNonNull
12316    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12317    static CountingPaginatedData<PersonalTitleObject> personalTitles(final DataFetchingEnvironment env) {
12318        CountingPaginatedData<PersonalTitleObject> data;
12319
12320        try {
12321            var commandForm = PartyUtil.getHome().getGetPersonalTitlesForm();
12322            var command = CDI.current().select(GetPersonalTitlesCommand.class).get();
12323
12324            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12325            if(totalEntities == null) {
12326                data = Connections.emptyConnection();
12327            } else {
12328                try(var objectLimiter = new ObjectLimiter(env, PersonalTitleConstants.COMPONENT_VENDOR_NAME, PersonalTitleConstants.ENTITY_TYPE_NAME, totalEntities)) {
12329                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12330
12331                    var personalTitles = entities.stream()
12332                            .map(PersonalTitleObject::new)
12333                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12334
12335                    data = new CountedObjects<>(objectLimiter, personalTitles);
12336                }
12337            }
12338        } catch (NamingException ex) {
12339            throw new RuntimeException(ex);
12340        }
12341
12342        return data;
12343    }
12344
12345    @GraphQLField
12346    @GraphQLName("nameSuffixes")
12347    @GraphQLNonNull
12348    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12349    static CountingPaginatedData<NameSuffixObject> nameSuffixes(final DataFetchingEnvironment env) {
12350        CountingPaginatedData<NameSuffixObject> data;
12351
12352        try {
12353            var commandForm = PartyUtil.getHome().getGetNameSuffixesForm();
12354            var command = CDI.current().select(GetNameSuffixesCommand.class).get();
12355
12356            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12357            if(totalEntities == null) {
12358                data = Connections.emptyConnection();
12359            } else {
12360                try(var objectLimiter = new ObjectLimiter(env, NameSuffixConstants.COMPONENT_VENDOR_NAME, NameSuffixConstants.ENTITY_TYPE_NAME, totalEntities)) {
12361                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12362
12363                    var nameSuffixes = entities.stream()
12364                            .map(NameSuffixObject::new)
12365                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12366
12367                    data = new CountedObjects<>(objectLimiter, nameSuffixes);
12368                }
12369            }
12370        } catch (NamingException ex) {
12371            throw new RuntimeException(ex);
12372        }
12373
12374        return data;
12375    }
12376
12377    @GraphQLField
12378    @GraphQLName("tagScope")
12379    static TagScopeObject tagScope(final DataFetchingEnvironment env,
12380            @GraphQLName("tagScopeName") final String tagScopeName,
12381            @GraphQLName("id") @GraphQLID final String id) {
12382        TagScope tagScope;
12383
12384        try {
12385            var commandForm = TagUtil.getHome().getGetTagScopeForm();
12386
12387            commandForm.setTagScopeName(tagScopeName);
12388            commandForm.setUuid(id);
12389
12390            tagScope = CDI.current().select(GetTagScopeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12391        } catch (NamingException ex) {
12392            throw new RuntimeException(ex);
12393        }
12394
12395        return tagScope == null ? null : new TagScopeObject(tagScope, null);
12396    }
12397
12398    @GraphQLField
12399    @GraphQLName("tagScopes")
12400    @GraphQLNonNull
12401    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12402    static CountingPaginatedData<TagScopeObject> tagScopes(final DataFetchingEnvironment env) {
12403        CountingPaginatedData<TagScopeObject> data;
12404
12405        try {
12406            var commandForm = TagUtil.getHome().getGetTagScopesForm();
12407            var command = CDI.current().select(GetTagScopesCommand.class).get();
12408
12409            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12410            if(totalEntities == null) {
12411                data = Connections.emptyConnection();
12412            } else {
12413                try(var objectLimiter = new ObjectLimiter(env, TagScopeConstants.COMPONENT_VENDOR_NAME, TagScopeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12414                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12415
12416                    var tagScopes = entities.stream()
12417                            .map(TagScopeObject::new)
12418                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12419
12420                    data = new CountedObjects<>(objectLimiter, tagScopes);
12421                }
12422            }
12423        } catch (NamingException ex) {
12424            throw new RuntimeException(ex);
12425        }
12426
12427        return data;
12428    }
12429
12430    @GraphQLField
12431    @GraphQLName("tagScopeEntityType")
12432    static TagScopeEntityTypeObject tagScopeEntityType(final DataFetchingEnvironment env,
12433            @GraphQLName("tagScopeName") @GraphQLNonNull final String tagScopeName,
12434            @GraphQLName("componentVendorName") @GraphQLNonNull final String componentVendorName,
12435            @GraphQLName("entityTypeName") @GraphQLNonNull final String entityTypeName) {
12436        TagScopeEntityType tagScopeEntityType;
12437
12438        try {
12439            var commandForm = TagUtil.getHome().getGetTagScopeEntityTypeForm();
12440
12441            commandForm.setTagScopeName(tagScopeName);
12442            commandForm.setComponentVendorName(componentVendorName);
12443            commandForm.setEntityTypeName(entityTypeName);
12444
12445            tagScopeEntityType = CDI.current().select(GetTagScopeEntityTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12446        } catch (NamingException ex) {
12447            throw new RuntimeException(ex);
12448        }
12449
12450        return tagScopeEntityType == null ? null : new TagScopeEntityTypeObject(tagScopeEntityType);
12451    }
12452
12453    @GraphQLField
12454    @GraphQLName("tagScopeEntityTypes")
12455    @GraphQLNonNull
12456    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12457    static CountingPaginatedData<TagScopeEntityTypeObject> tagScopeEntityTypes(final DataFetchingEnvironment env,
12458            @GraphQLName("tagScopeName") final String tagScopeName,
12459            @GraphQLName("componentVendorName") final String componentVendorName,
12460            @GraphQLName("entityTypeName") final String entityTypeName) {
12461        try {
12462            var commandForm = TagUtil.getHome().getGetTagScopeEntityTypesForm();
12463            var command = CDI.current().select(GetTagScopeEntityTypesCommand.class).get();
12464
12465            commandForm.setTagScopeName(tagScopeName);
12466            commandForm.setComponentVendorName(componentVendorName);
12467            commandForm.setEntityTypeName(entityTypeName);
12468
12469            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12470            if(totalEntities == null) {
12471                return Connections.emptyConnection();
12472            } else {
12473                try(var objectLimiter = new ObjectLimiter(env, TagScopeEntityTypeConstants.COMPONENT_VENDOR_NAME, TagScopeEntityTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12474                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12475
12476                    return new CountedObjects<>(objectLimiter, entities.stream().map(TagScopeEntityTypeObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size()))));
12477                }
12478            }
12479        } catch (NamingException ex) {
12480            throw new RuntimeException(ex);
12481        }
12482    }
12483
12484    @GraphQLField
12485    @GraphQLName("tag")
12486    static TagObject tag(final DataFetchingEnvironment env,
12487            @GraphQLName("tagScopeName") final String tagScopeName,
12488            @GraphQLName("tagName") final String tagName,
12489            @GraphQLName("id") @GraphQLID final String id) {
12490        Tag tag;
12491
12492        try {
12493            var commandForm = TagUtil.getHome().getGetTagForm();
12494
12495            commandForm.setTagScopeName(tagScopeName);
12496            commandForm.setTagName(tagName);
12497            commandForm.setUuid(id);
12498
12499            tag = CDI.current().select(GetTagCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12500        } catch (NamingException ex) {
12501            throw new RuntimeException(ex);
12502        }
12503
12504        return tag == null ? null : new TagObject(tag);
12505    }
12506
12507    @GraphQLField
12508    @GraphQLName("tags")
12509    @GraphQLNonNull
12510    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12511    static CountingPaginatedData<TagObject> tags(final DataFetchingEnvironment env,
12512            @GraphQLName("tagScopeName") @GraphQLNonNull final String tagScopeName) {
12513        CountingPaginatedData<TagObject> data;
12514
12515        try {
12516            var commandForm = TagUtil.getHome().getGetTagsForm();
12517            var command = CDI.current().select(GetTagsCommand.class).get();
12518
12519            commandForm.setTagScopeName(tagScopeName);
12520
12521            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12522            if(totalEntities == null) {
12523                data = Connections.emptyConnection();
12524            } else {
12525                try(var objectLimiter = new ObjectLimiter(env, TagConstants.COMPONENT_VENDOR_NAME, TagConstants.ENTITY_TYPE_NAME, totalEntities)) {
12526                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12527
12528                    var tagObjects = entities.stream()
12529                            .map(TagObject::new)
12530                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12531
12532                    data = new CountedObjects<>(objectLimiter, tagObjects);
12533                }
12534            }
12535        } catch (NamingException ex) {
12536            throw new RuntimeException(ex);
12537        }
12538
12539        return data;
12540    }
12541
12542    @GraphQLField
12543    @GraphQLName("entityTag")
12544    static EntityTagObject entityTag(final DataFetchingEnvironment env,
12545            @GraphQLName("id") @GraphQLNonNull final String id,
12546            @GraphQLName("tagScopeName") @GraphQLNonNull final String tagScopeName,
12547            @GraphQLName("tagName") @GraphQLNonNull final String tagName) {
12548        EntityTag entityTag;
12549
12550        try {
12551            var commandForm = TagUtil.getHome().getGetEntityTagForm();
12552
12553            commandForm.setUuid(id);
12554            commandForm.setTagScopeName(tagScopeName);
12555            commandForm.setTagName(tagName);
12556
12557            entityTag = CDI.current().select(GetEntityTagCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12558        } catch (NamingException ex) {
12559            throw new RuntimeException(ex);
12560        }
12561
12562        return entityTag == null ? null : new EntityTagObject(entityTag);
12563    }
12564
12565    @GraphQLField
12566    @GraphQLName("entityTags")
12567    @GraphQLNonNull
12568    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12569    static CountingPaginatedData<EntityTagObject> entityTags(final DataFetchingEnvironment env,
12570            @GraphQLName("id") final String id,
12571            @GraphQLName("tagScopeName") final String tagScopeName,
12572            @GraphQLName("tagName") final String tagName) {
12573        CountingPaginatedData<EntityTagObject> data;
12574
12575        try {
12576            var commandForm = TagUtil.getHome().getGetEntityTagsForm();
12577            var command = CDI.current().select(GetEntityTagsCommand.class).get();
12578
12579            commandForm.setUuid(id);
12580            commandForm.setTagScopeName(tagScopeName);
12581            commandForm.setTagName(tagName);
12582
12583            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12584            if(totalEntities == null) {
12585                data = Connections.emptyConnection();
12586            } else {
12587                try(var objectLimiter = new ObjectLimiter(env, EntityTagConstants.COMPONENT_VENDOR_NAME, EntityTagConstants.ENTITY_TYPE_NAME, totalEntities)) {
12588                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12589
12590                    var entityTags = entities.stream()
12591                            .map(EntityTagObject::new)
12592                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12593
12594                    data = new CountedObjects<>(objectLimiter, entityTags);
12595                }
12596            }
12597        } catch (NamingException ex) {
12598            throw new RuntimeException(ex);
12599        }
12600
12601        return data;
12602    }
12603
12604    @GraphQLField
12605    @GraphQLName("geoCodeType")
12606    static GeoCodeTypeObject geoCodeType(final DataFetchingEnvironment env,
12607            @GraphQLName("geoCodeTypeName") final String geoCodeTypeName,
12608            @GraphQLName("id") @GraphQLID final String id) {
12609        GeoCodeType geoCodeType;
12610
12611        try {
12612            var commandForm = GeoUtil.getHome().getGetGeoCodeTypeForm();
12613
12614            commandForm.setGeoCodeTypeName(geoCodeTypeName);
12615            commandForm.setUuid(id);
12616
12617            geoCodeType = CDI.current().select(GetGeoCodeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12618        } catch (NamingException ex) {
12619            throw new RuntimeException(ex);
12620        }
12621
12622        return geoCodeType == null ? null : new GeoCodeTypeObject(geoCodeType);
12623    }
12624
12625    @GraphQLField
12626    @GraphQLName("geoCodeTypes")
12627    @GraphQLNonNull
12628    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12629    static CountingPaginatedData<GeoCodeTypeObject> geoCodeTypes(final DataFetchingEnvironment env) {
12630        CountingPaginatedData<GeoCodeTypeObject> data;
12631
12632        try {
12633            var commandForm = GeoUtil.getHome().getGetGeoCodeTypesForm();
12634            var command = CDI.current().select(GetGeoCodeTypesCommand.class).get();
12635
12636            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12637            if(totalEntities == null) {
12638                data = Connections.emptyConnection();
12639            } else {
12640                try(var objectLimiter = new ObjectLimiter(env, GeoCodeTypeConstants.COMPONENT_VENDOR_NAME, GeoCodeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12641                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12642
12643                    var geoCodeTypes = entities.stream()
12644                            .map(GeoCodeTypeObject::new)
12645                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12646
12647                    data = new CountedObjects<>(objectLimiter, geoCodeTypes);
12648                }
12649            }
12650        } catch (NamingException ex) {
12651            throw new RuntimeException(ex);
12652        }
12653
12654        return data;
12655    }
12656
12657    @GraphQLField
12658    @GraphQLName("geoCodeAliasType")
12659    static GeoCodeAliasTypeObject geoCodeAliasType(final DataFetchingEnvironment env,
12660            @GraphQLName("geoCodeTypeName") @GraphQLNonNull final String geoCodeTypeName,
12661            @GraphQLName("geoCodeAliasTypeName") @GraphQLNonNull final String geoCodeAliasTypeName) {
12662        GeoCodeAliasType geoCodeAliasType;
12663
12664        try {
12665            var commandForm = GeoUtil.getHome().getGetGeoCodeAliasTypeForm();
12666
12667            commandForm.setGeoCodeTypeName(geoCodeTypeName);
12668            commandForm.setGeoCodeAliasTypeName(geoCodeAliasTypeName);
12669
12670            geoCodeAliasType = CDI.current().select(GetGeoCodeAliasTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12671        } catch (NamingException ex) {
12672            throw new RuntimeException(ex);
12673        }
12674
12675        return geoCodeAliasType == null ? null : new GeoCodeAliasTypeObject(geoCodeAliasType);
12676    }
12677
12678    @GraphQLField
12679    @GraphQLName("geoCodeAliasTypes")
12680    @GraphQLNonNull
12681    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12682    static CountingPaginatedData<GeoCodeAliasTypeObject> geoCodeAliasTypes(final DataFetchingEnvironment env,
12683            @GraphQLName("geoCodeTypeName") @GraphQLNonNull final String geoCodeTypeName) {
12684        CountingPaginatedData<GeoCodeAliasTypeObject> data;
12685
12686        try {
12687            var commandForm = GeoUtil.getHome().getGetGeoCodeAliasTypesForm();
12688            var command = CDI.current().select(GetGeoCodeAliasTypesCommand.class).get();
12689
12690            commandForm.setGeoCodeTypeName(geoCodeTypeName);
12691
12692            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12693            if(totalEntities == null) {
12694                data = Connections.emptyConnection();
12695            } else {
12696                try(var objectLimiter = new ObjectLimiter(env, GeoCodeAliasTypeConstants.COMPONENT_VENDOR_NAME, GeoCodeAliasTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12697                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12698
12699                    var geoCodeAliasTypes = entities.stream()
12700                            .map(GeoCodeAliasTypeObject::new)
12701                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12702
12703                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
12704                }
12705            }
12706        } catch (NamingException ex) {
12707            throw new RuntimeException(ex);
12708        }
12709
12710        return data;
12711    }
12712
12713    @GraphQLField
12714    @GraphQLName("geoCodeScope")
12715    static GeoCodeScopeObject geoCodeScope(final DataFetchingEnvironment env,
12716            @GraphQLName("geoCodeScopeName") final String geoCodeScopeName,
12717            @GraphQLName("id") @GraphQLID final String id) {
12718        GeoCodeScope geoCodeScope;
12719
12720        try {
12721            var commandForm = GeoUtil.getHome().getGetGeoCodeScopeForm();
12722
12723            commandForm.setGeoCodeScopeName(geoCodeScopeName);
12724            commandForm.setUuid(id);
12725
12726            geoCodeScope = CDI.current().select(GetGeoCodeScopeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12727        } catch (NamingException ex) {
12728            throw new RuntimeException(ex);
12729        }
12730
12731        return geoCodeScope == null ? null : new GeoCodeScopeObject(geoCodeScope);
12732    }
12733
12734    @GraphQLField
12735    @GraphQLName("geoCodeScopes")
12736    @GraphQLNonNull
12737    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12738    static CountingPaginatedData<GeoCodeScopeObject> geoCodeScopes(final DataFetchingEnvironment env) {
12739        CountingPaginatedData<GeoCodeScopeObject> data;
12740
12741        try {
12742            var commandForm = GeoUtil.getHome().getGetGeoCodeScopesForm();
12743            var command = CDI.current().select(GetGeoCodeScopesCommand.class).get();
12744
12745            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12746            if(totalEntities == null) {
12747                data = Connections.emptyConnection();
12748            } else {
12749                try(var objectLimiter = new ObjectLimiter(env, GeoCodeScopeConstants.COMPONENT_VENDOR_NAME, GeoCodeScopeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12750                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12751
12752                    var geoCodeScopes = entities.stream()
12753                            .map(GeoCodeScopeObject::new)
12754                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12755
12756                    data = new CountedObjects<>(objectLimiter, geoCodeScopes);
12757                }
12758            }
12759        } catch (NamingException ex) {
12760            throw new RuntimeException(ex);
12761        }
12762
12763        return data;
12764    }
12765
12766    @GraphQLField
12767    @GraphQLName("geoCode")
12768    static GeoCodeObject geoCode(final DataFetchingEnvironment env,
12769            @GraphQLName("geoCodeName") final String geoCodeName,
12770            @GraphQLName("id") @GraphQLID final String id) {
12771        GeoCode geoCode;
12772
12773        try {
12774            var commandForm = GeoUtil.getHome().getGetGeoCodeForm();
12775
12776            commandForm.setGeoCodeName(geoCodeName);
12777            commandForm.setUuid(id);
12778
12779            geoCode = CDI.current().select(GetGeoCodeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12780        } catch (NamingException ex) {
12781            throw new RuntimeException(ex);
12782        }
12783
12784        return geoCode == null ? null : new GeoCodeObject(geoCode);
12785    }
12786
12787    @GraphQLField
12788    @GraphQLName("geoCodeAlias")
12789    static GeoCodeAliasObject geoCodeAlias(final DataFetchingEnvironment env,
12790            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
12791            @GraphQLName("geoCodeAliasTypeName") @GraphQLNonNull final String geoCodeAliasTypeName) {
12792        GeoCodeAlias geoCodeAlias;
12793
12794        try {
12795            var commandForm = GeoUtil.getHome().getGetGeoCodeAliasForm();
12796
12797            commandForm.setGeoCodeName(geoCodeName);
12798            commandForm.setGeoCodeAliasTypeName(geoCodeAliasTypeName);
12799
12800            geoCodeAlias = CDI.current().select(GetGeoCodeAliasCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12801        } catch (NamingException ex) {
12802            throw new RuntimeException(ex);
12803        }
12804
12805        return geoCodeAlias == null ? null : new GeoCodeAliasObject(geoCodeAlias);
12806    }
12807
12808    @GraphQLField
12809    @GraphQLName("geoCodeAliases")
12810    @GraphQLNonNull
12811    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12812    static CountingPaginatedData<GeoCodeAliasObject> geoCodeAliases(final DataFetchingEnvironment env,
12813            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName) {
12814        CountingPaginatedData<GeoCodeAliasObject> data;
12815
12816        try {
12817            var commandForm = GeoUtil.getHome().getGetGeoCodeAliasesForm();
12818            var command = CDI.current().select(GetGeoCodeAliasesCommand.class).get();
12819
12820            commandForm.setGeoCodeName(geoCodeName);
12821
12822            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12823            if(totalEntities == null) {
12824                data = Connections.emptyConnection();
12825            } else {
12826                try(var objectLimiter = new ObjectLimiter(env, GeoCodeAliasConstants.COMPONENT_VENDOR_NAME, GeoCodeAliasConstants.ENTITY_TYPE_NAME, totalEntities)) {
12827                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12828
12829                    var geoCodeAliass = entities.stream()
12830                            .map(GeoCodeAliasObject::new)
12831                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12832
12833                    data = new CountedObjects<>(objectLimiter, geoCodeAliass);
12834                }
12835            }
12836        } catch (NamingException ex) {
12837            throw new RuntimeException(ex);
12838        }
12839
12840        return data;
12841    }
12842
12843    @GraphQLField
12844    @GraphQLName("geoCodeLanguage")
12845    static GeoCodeLanguageObject geoCodeLanguage(final DataFetchingEnvironment env,
12846            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
12847            @GraphQLName("languageIsoName") @GraphQLNonNull final String languageIsoName) {
12848        GeoCodeLanguage geoCodeLanguage;
12849
12850        try {
12851            var commandForm = GeoUtil.getHome().getGetGeoCodeLanguageForm();
12852
12853            commandForm.setGeoCodeName(geoCodeName);
12854            commandForm.setLanguageIsoName(languageIsoName);
12855
12856            geoCodeLanguage = CDI.current().select(GetGeoCodeLanguageCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12857        } catch (NamingException ex) {
12858            throw new RuntimeException(ex);
12859        }
12860
12861        return geoCodeLanguage == null ? null : new GeoCodeLanguageObject(geoCodeLanguage);
12862    }
12863
12864    @GraphQLField
12865    @GraphQLName("geoCodeLanguages")
12866    @GraphQLNonNull
12867    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12868    static CountingPaginatedData<GeoCodeLanguageObject> geoCodeLanguages(final DataFetchingEnvironment env,
12869            @GraphQLName("geoCodeName") final String geoCodeName,
12870            @GraphQLName("languageIsoName") final String languageIsoName) {
12871        CountingPaginatedData<GeoCodeLanguageObject> data;
12872
12873        try {
12874            var commandForm = GeoUtil.getHome().getGetGeoCodeLanguagesForm();
12875            var command = CDI.current().select(GetGeoCodeLanguagesCommand.class).get();
12876
12877            commandForm.setGeoCodeName(geoCodeName);
12878            commandForm.setLanguageIsoName(languageIsoName);
12879
12880            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12881            if(totalEntities == null) {
12882                data = Connections.emptyConnection();
12883            } else {
12884                try(var objectLimiter = new ObjectLimiter(env, GeoCodeLanguageConstants.COMPONENT_VENDOR_NAME, GeoCodeLanguageConstants.ENTITY_TYPE_NAME, totalEntities)) {
12885                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12886
12887                    var transactionTypes = entities.stream()
12888                            .map(GeoCodeLanguageObject::new)
12889                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12890
12891                    data = new CountedObjects<>(objectLimiter, transactionTypes);
12892                }
12893            }
12894        } catch (NamingException ex) {
12895            throw new RuntimeException(ex);
12896        }
12897
12898        return data;
12899    }
12900
12901    @GraphQLField
12902    @GraphQLName("geoCodeCurrency")
12903    static GeoCodeCurrencyObject geoCodeCurrency(final DataFetchingEnvironment env,
12904            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
12905            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
12906        GeoCodeCurrency geoCodeCurrency;
12907
12908        try {
12909            var commandForm = GeoUtil.getHome().getGetGeoCodeCurrencyForm();
12910
12911            commandForm.setGeoCodeName(geoCodeName);
12912            commandForm.setCurrencyIsoName(currencyIsoName);
12913
12914            geoCodeCurrency = CDI.current().select(GetGeoCodeCurrencyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12915        } catch (NamingException ex) {
12916            throw new RuntimeException(ex);
12917        }
12918
12919        return geoCodeCurrency == null ? null : new GeoCodeCurrencyObject(geoCodeCurrency);
12920    }
12921
12922    @GraphQLField
12923    @GraphQLName("geoCodeCurrencies")
12924    @GraphQLNonNull
12925    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12926    static CountingPaginatedData<GeoCodeCurrencyObject> geoCodeCurrencies(final DataFetchingEnvironment env,
12927            @GraphQLName("geoCodeName") final String geoCodeName,
12928            @GraphQLName("currencyIsoName") final String currencyIsoName) {
12929        CountingPaginatedData<GeoCodeCurrencyObject> data;
12930
12931        try {
12932            var commandForm = GeoUtil.getHome().getGetGeoCodeCurrenciesForm();
12933            var command = CDI.current().select(GetGeoCodeCurrenciesCommand.class).get();
12934
12935            commandForm.setGeoCodeName(geoCodeName);
12936            commandForm.setCurrencyIsoName(currencyIsoName);
12937
12938            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12939            if(totalEntities == null) {
12940                data = Connections.emptyConnection();
12941            } else {
12942                try(var objectLimiter = new ObjectLimiter(env, GeoCodeCurrencyConstants.COMPONENT_VENDOR_NAME, GeoCodeCurrencyConstants.ENTITY_TYPE_NAME, totalEntities)) {
12943                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12944
12945                    var transactionTypes = entities.stream()
12946                            .map(GeoCodeCurrencyObject::new)
12947                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12948
12949                    data = new CountedObjects<>(objectLimiter, transactionTypes);
12950                }
12951            }
12952        } catch (NamingException ex) {
12953            throw new RuntimeException(ex);
12954        }
12955
12956        return data;
12957    }
12958
12959    @GraphQLField
12960    @GraphQLName("geoCodeTimeZone")
12961    static GeoCodeTimeZoneObject geoCodeTimeZone(final DataFetchingEnvironment env,
12962            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
12963            @GraphQLName("javaTimeZoneName") @GraphQLNonNull final String javaTimeZoneName) {
12964        GeoCodeTimeZone geoCodeTimeZone;
12965
12966        try {
12967            var commandForm = GeoUtil.getHome().getGetGeoCodeTimeZoneForm();
12968
12969            commandForm.setGeoCodeName(geoCodeName);
12970            commandForm.setJavaTimeZoneName(javaTimeZoneName);
12971
12972            geoCodeTimeZone = CDI.current().select(GetGeoCodeTimeZoneCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12973        } catch (NamingException ex) {
12974            throw new RuntimeException(ex);
12975        }
12976
12977        return geoCodeTimeZone == null ? null : new GeoCodeTimeZoneObject(geoCodeTimeZone);
12978    }
12979
12980    @GraphQLField
12981    @GraphQLName("geoCodeTimeZones")
12982    @GraphQLNonNull
12983    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12984    static CountingPaginatedData<GeoCodeTimeZoneObject> geoCodeTimeZones(final DataFetchingEnvironment env,
12985            @GraphQLName("geoCodeName") final String geoCodeName,
12986            @GraphQLName("javaTimeZoneName") final String javaTimeZoneName) {
12987        CountingPaginatedData<GeoCodeTimeZoneObject> data;
12988
12989        try {
12990            var commandForm = GeoUtil.getHome().getGetGeoCodeTimeZonesForm();
12991            var command = CDI.current().select(GetGeoCodeTimeZonesCommand.class).get();
12992
12993            commandForm.setGeoCodeName(geoCodeName);
12994            commandForm.setJavaTimeZoneName(javaTimeZoneName);
12995
12996            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12997            if(totalEntities == null) {
12998                data = Connections.emptyConnection();
12999            } else {
13000                try(var objectLimiter = new ObjectLimiter(env, GeoCodeTimeZoneConstants.COMPONENT_VENDOR_NAME, GeoCodeTimeZoneConstants.ENTITY_TYPE_NAME, totalEntities)) {
13001                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13002
13003                    var transactionTypes = entities.stream()
13004                            .map(GeoCodeTimeZoneObject::new)
13005                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13006
13007                    data = new CountedObjects<>(objectLimiter, transactionTypes);
13008                }
13009            }
13010        } catch (NamingException ex) {
13011            throw new RuntimeException(ex);
13012        }
13013
13014        return data;
13015    }
13016
13017    @GraphQLField
13018    @GraphQLName("geoCodeDateTimeFormat")
13019    static GeoCodeDateTimeFormatObject geoCodeDateTimeFormat(final DataFetchingEnvironment env,
13020            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
13021            @GraphQLName("dateTimeFormatName") @GraphQLNonNull final String dateTimeFormatName) {
13022        GeoCodeDateTimeFormat geoCodeDateTimeFormat;
13023
13024        try {
13025            var commandForm = GeoUtil.getHome().getGetGeoCodeDateTimeFormatForm();
13026
13027            commandForm.setGeoCodeName(geoCodeName);
13028            commandForm.setDateTimeFormatName(dateTimeFormatName);
13029
13030            geoCodeDateTimeFormat = CDI.current().select(GetGeoCodeDateTimeFormatCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13031        } catch (NamingException ex) {
13032            throw new RuntimeException(ex);
13033        }
13034
13035        return geoCodeDateTimeFormat == null ? null : new GeoCodeDateTimeFormatObject(geoCodeDateTimeFormat);
13036    }
13037
13038    @GraphQLField
13039    @GraphQLName("geoCodeDateTimeFormats")
13040    @GraphQLNonNull
13041    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13042    static CountingPaginatedData<GeoCodeDateTimeFormatObject> geoCodeDateTimeFormats(final DataFetchingEnvironment env,
13043            @GraphQLName("geoCodeName") final String geoCodeName,
13044            @GraphQLName("dateTimeFormatName") final String dateTimeFormatName) {
13045        CountingPaginatedData<GeoCodeDateTimeFormatObject> data;
13046
13047        try {
13048            var commandForm = GeoUtil.getHome().getGetGeoCodeDateTimeFormatsForm();
13049            var command = CDI.current().select(GetGeoCodeDateTimeFormatsCommand.class).get();
13050
13051            commandForm.setGeoCodeName(geoCodeName);
13052            commandForm.setDateTimeFormatName(dateTimeFormatName);
13053
13054            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13055            if(totalEntities == null) {
13056                data = Connections.emptyConnection();
13057            } else {
13058                try(var objectLimiter = new ObjectLimiter(env, GeoCodeDateTimeFormatConstants.COMPONENT_VENDOR_NAME, GeoCodeDateTimeFormatConstants.ENTITY_TYPE_NAME, totalEntities)) {
13059                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13060
13061                    var transactionTypes = entities.stream()
13062                            .map(GeoCodeDateTimeFormatObject::new)
13063                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13064
13065                    data = new CountedObjects<>(objectLimiter, transactionTypes);
13066                }
13067            }
13068        } catch (NamingException ex) {
13069            throw new RuntimeException(ex);
13070        }
13071
13072        return data;
13073    }
13074
13075    @GraphQLField
13076    @GraphQLName("country")
13077    static GeoCodeObject country(final DataFetchingEnvironment env,
13078            @GraphQLName("geoCodeName") final String geoCodeName,
13079            @GraphQLName("countryName") final String countryName,
13080            @GraphQLName("iso3Number") final String iso3Number,
13081            @GraphQLName("iso3Letter") final String iso3Letter,
13082            @GraphQLName("iso2Letter") final String iso2Letter,
13083            @GraphQLName("alias") final String alias) {
13084        GeoCode geoCode;
13085
13086        try {
13087            var commandForm = GeoUtil.getHome().getGetCountryForm();
13088
13089            commandForm.setGeoCodeName(geoCodeName);
13090            commandForm.setCountryName(countryName);
13091            commandForm.setIso3Number(iso3Number);
13092            commandForm.setIso3Letter(iso3Letter);
13093            commandForm.setIso2Letter(iso2Letter);
13094            commandForm.setAlias(alias);
13095
13096            geoCode = CDI.current().select(GetCountryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13097        } catch (NamingException ex) {
13098            throw new RuntimeException(ex);
13099        }
13100
13101        return geoCode == null ? null : new GeoCodeObject(geoCode);
13102    }
13103
13104    @GraphQLField
13105    @GraphQLName("countries")
13106    @GraphQLNonNull
13107    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13108    static CountingPaginatedData<GeoCodeObject> countries(final DataFetchingEnvironment env) {
13109        CountingPaginatedData<GeoCodeObject> data;
13110
13111        try {
13112            var commandForm = GeoUtil.getHome().getGetCountriesForm();
13113            var command = CDI.current().select(GetCountriesCommand.class).get();
13114
13115            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13116            if(totalEntities == null) {
13117                data = Connections.emptyConnection();
13118            } else {
13119                try(var objectLimiter = new ObjectLimiter(env, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13120                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13121
13122                    var geoCodeAliasTypes = entities.stream()
13123                            .map(GeoCodeObject::new)
13124                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13125
13126                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
13127                }
13128            }
13129        } catch (NamingException ex) {
13130            throw new RuntimeException(ex);
13131        }
13132
13133        return data;
13134    }
13135
13136    @GraphQLField
13137    @GraphQLName("zipCode")
13138    static GeoCodeObject zipCode(final DataFetchingEnvironment env,
13139            @GraphQLName("countryGeoCodeName") @GraphQLNonNull final String countryGeoCodeName,
13140            @GraphQLName("zipCodeName") @GraphQLNonNull final String zipCodeName) {
13141        GeoCode geoCode;
13142
13143        try {
13144            var commandForm = GeoUtil.getHome().getGetZipCodeForm();
13145
13146            commandForm.setCountryGeoCodeName(countryGeoCodeName);
13147            commandForm.setZipCodeName(zipCodeName);
13148
13149            geoCode = CDI.current().select(GetZipCodeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13150        } catch (NamingException ex) {
13151            throw new RuntimeException(ex);
13152        }
13153
13154        return geoCode == null ? null : new GeoCodeObject(geoCode);
13155    }
13156
13157    @GraphQLField
13158    @GraphQLName("zipCodes")
13159    @GraphQLNonNull
13160    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13161    static CountingPaginatedData<GeoCodeObject> zipCodes(final DataFetchingEnvironment env,
13162            @GraphQLName("countryName") @GraphQLNonNull final String countryName) {
13163        CountingPaginatedData<GeoCodeObject> data;
13164
13165        try {
13166            var commandForm = GeoUtil.getHome().getGetZipCodesForm();
13167            var command = CDI.current().select(GetZipCodesCommand.class).get();
13168
13169            commandForm.setCountryName(countryName);
13170
13171            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13172            if(totalEntities == null) {
13173                data = Connections.emptyConnection();
13174            } else {
13175                try(var objectLimiter = new ObjectLimiter(env, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13176                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13177
13178                    var geoCodeAliasTypes = entities.stream()
13179                            .map(GeoCodeObject::new)
13180                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13181
13182                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
13183                }
13184            }
13185        } catch (NamingException ex) {
13186            throw new RuntimeException(ex);
13187        }
13188
13189        return data;
13190    }
13191
13192    @GraphQLField
13193    @GraphQLName("state")
13194    static GeoCodeObject state(final DataFetchingEnvironment env,
13195            @GraphQLName("countryGeoCodeName") @GraphQLNonNull final String countryGeoCodeName,
13196            @GraphQLName("stateName") final String stateName,
13197            @GraphQLName("postal2Letter") final String postal2Letter) {
13198        GeoCode geoCode;
13199
13200        try {
13201            var commandForm = GeoUtil.getHome().getGetStateForm();
13202
13203            commandForm.setCountryGeoCodeName(countryGeoCodeName);
13204            commandForm.setStateName(stateName);
13205            commandForm.setPostal2Letter(postal2Letter);
13206
13207            geoCode = CDI.current().select(GetStateCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13208        } catch (NamingException ex) {
13209            throw new RuntimeException(ex);
13210        }
13211
13212        return geoCode == null ? null : new GeoCodeObject(geoCode);
13213    }
13214
13215    @GraphQLField
13216    @GraphQLName("states")
13217    @GraphQLNonNull
13218    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13219    static CountingPaginatedData<GeoCodeObject> states(final DataFetchingEnvironment env,
13220            @GraphQLName("countryName") @GraphQLNonNull final String countryName) {
13221        CountingPaginatedData<GeoCodeObject> data;
13222
13223        try {
13224            var commandForm = GeoUtil.getHome().getGetStatesForm();
13225            var command = CDI.current().select(GetStatesCommand.class).get();
13226
13227            commandForm.setCountryName(countryName);
13228
13229            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13230            if(totalEntities == null) {
13231                data = Connections.emptyConnection();
13232            } else {
13233                try(var objectLimiter = new ObjectLimiter(env, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13234                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13235
13236                    var geoCodeAliasTypes = entities.stream()
13237                            .map(GeoCodeObject::new)
13238                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13239
13240                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
13241                }
13242            }
13243        } catch (NamingException ex) {
13244            throw new RuntimeException(ex);
13245        }
13246
13247        return data;
13248    }
13249
13250    @GraphQLField
13251    @GraphQLName("county")
13252    static GeoCodeObject county(final DataFetchingEnvironment env,
13253            @GraphQLName("stateGeoCodeName") @GraphQLNonNull final String stateGeoCodeName,
13254            @GraphQLName("countyName") final String countyName,
13255            @GraphQLName("countyNumber") final String countyNumber) {
13256        GeoCode geoCode;
13257
13258        try {
13259            var commandForm = GeoUtil.getHome().getGetCountyForm();
13260
13261            commandForm.setStateGeoCodeName(stateGeoCodeName);
13262            commandForm.setCountyName(countyName);
13263            commandForm.setCountyNumber(countyNumber);
13264
13265            geoCode = CDI.current().select(GetCountyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13266        } catch (NamingException ex) {
13267            throw new RuntimeException(ex);
13268        }
13269
13270        return geoCode == null ? null : new GeoCodeObject(geoCode);
13271    }
13272
13273    @GraphQLField
13274    @GraphQLName("counties")
13275    @GraphQLNonNull
13276    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13277    static CountingPaginatedData<GeoCodeObject> counties(final DataFetchingEnvironment env,
13278            @GraphQLName("countryName") @GraphQLNonNull final String countryName,
13279            @GraphQLName("stateName") @GraphQLNonNull final String stateName) {
13280        CountingPaginatedData<GeoCodeObject> data;
13281
13282        try {
13283            var commandForm = GeoUtil.getHome().getGetCountiesForm();
13284            var command = CDI.current().select(GetCountiesCommand.class).get();
13285
13286            commandForm.setCountryName(countryName);
13287            commandForm.setStateName(stateName);
13288
13289            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13290            if(totalEntities == null) {
13291                data = Connections.emptyConnection();
13292            } else {
13293                try(var objectLimiter = new ObjectLimiter(env, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13294                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13295
13296                    var geoCodeAliasTypes = entities.stream()
13297                            .map(GeoCodeObject::new)
13298                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13299
13300                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
13301                }
13302            }
13303        } catch (NamingException ex) {
13304            throw new RuntimeException(ex);
13305        }
13306
13307        return data;
13308    }
13309
13310    @GraphQLField
13311    @GraphQLName("city")
13312    static GeoCodeObject city(final DataFetchingEnvironment env,
13313            @GraphQLName("stateGeoCodeName") @GraphQLNonNull final String stateGeoCodeName,
13314            @GraphQLName("cityName") @GraphQLNonNull final String cityName) {
13315        GeoCode geoCode;
13316
13317        try {
13318            var commandForm = GeoUtil.getHome().getGetCityForm();
13319
13320            commandForm.setStateGeoCodeName(stateGeoCodeName);
13321            commandForm.setCityName(cityName);
13322
13323            geoCode = CDI.current().select(GetCityCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13324        } catch (NamingException ex) {
13325            throw new RuntimeException(ex);
13326        }
13327
13328        return geoCode == null ? null : new GeoCodeObject(geoCode);
13329    }
13330
13331    @GraphQLField
13332    @GraphQLName("cities")
13333    @GraphQLNonNull
13334    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13335    static CountingPaginatedData<GeoCodeObject> cities(final DataFetchingEnvironment env,
13336            @GraphQLName("countryName") @GraphQLNonNull final String countryName,
13337            @GraphQLName("stateName") @GraphQLNonNull final String stateName) {
13338        CountingPaginatedData<GeoCodeObject> data;
13339
13340        try {
13341            var commandForm = GeoUtil.getHome().getGetCitiesForm();
13342            var command = CDI.current().select(GetCitiesCommand.class).get();
13343
13344            commandForm.setCountryName(countryName);
13345            commandForm.setStateName(stateName);
13346
13347            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13348            if(totalEntities == null) {
13349                data = Connections.emptyConnection();
13350            } else {
13351                try(var objectLimiter = new ObjectLimiter(env, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13352                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13353
13354                    var geoCodeAliasTypes = entities.stream()
13355                            .map(GeoCodeObject::new)
13356                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13357
13358                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
13359                }
13360            }
13361        } catch (NamingException ex) {
13362            throw new RuntimeException(ex);
13363        }
13364
13365        return data;
13366    }
13367
13368    @GraphQLField
13369    @GraphQLName("shippingMethod")
13370    static ShippingMethodObject shippingMethod(final DataFetchingEnvironment env,
13371            @GraphQLName("shippingMethodName") final String shippingMethodName,
13372            @GraphQLName("id") @GraphQLID final String id) {
13373        ShippingMethod shippingMethod;
13374
13375        try {
13376            var commandForm = ShippingUtil.getHome().getGetShippingMethodForm();
13377
13378            commandForm.setShippingMethodName(shippingMethodName);
13379            commandForm.setUuid(id);
13380
13381            shippingMethod = CDI.current().select(GetShippingMethodCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13382        } catch (NamingException ex) {
13383            throw new RuntimeException(ex);
13384        }
13385
13386        return shippingMethod == null ? null : new ShippingMethodObject(shippingMethod);
13387    }
13388
13389    @GraphQLField
13390    @GraphQLName("shippingMethods")
13391    @GraphQLNonNull
13392    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13393    static CountingPaginatedData<ShippingMethodObject> shippingMethods(final DataFetchingEnvironment env) {
13394        CountingPaginatedData<ShippingMethodObject> data;
13395
13396        try {
13397            var shippingControl = Session.getModelController(ShippingControl.class);
13398            var totalCount = shippingControl.countShippingMethods();
13399
13400            try(var objectLimiter = new ObjectLimiter(env, ShippingMethodConstants.COMPONENT_VENDOR_NAME, ShippingMethodConstants.ENTITY_TYPE_NAME, totalCount)) {
13401                var commandForm = ShippingUtil.getHome().getGetShippingMethodsForm();
13402                var entities = CDI.current().select(GetShippingMethodsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13403
13404                if(entities == null) {
13405                    data = Connections.emptyConnection();
13406                } else {
13407                    var shippingMethods = entities.stream().map(ShippingMethodObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13408
13409                    data = new CountedObjects<>(objectLimiter, shippingMethods);
13410                }
13411            }
13412        } catch (NamingException ex) {
13413            throw new RuntimeException(ex);
13414        }
13415
13416        return data;
13417    }
13418
13419    @GraphQLField
13420    @GraphQLName("transactionTimeType")
13421    static TransactionTimeTypeObject transactionTimeType(final DataFetchingEnvironment env,
13422            @GraphQLName("transactionTimeTypeName") final String transactionTimeTypeName,
13423            @GraphQLName("id") @GraphQLID final String id) {
13424        TransactionTimeType transactionTimeType;
13425
13426        try {
13427            var commandForm = AccountingUtil.getHome().getGetTransactionTimeTypeForm();
13428
13429            commandForm.setTransactionTimeTypeName(transactionTimeTypeName);
13430            commandForm.setUuid(id);
13431
13432            transactionTimeType = CDI.current().select(GetTransactionTimeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13433        } catch (NamingException ex) {
13434            throw new RuntimeException(ex);
13435        }
13436
13437        return transactionTimeType == null ? null : new TransactionTimeTypeObject(transactionTimeType);
13438    }
13439
13440    @GraphQLField
13441    @GraphQLName("transactionTimeTypes")
13442    @GraphQLNonNull
13443    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13444    static CountingPaginatedData<TransactionTimeTypeObject> transactionTimeTypes(final DataFetchingEnvironment env) {
13445        CountingPaginatedData<TransactionTimeTypeObject> data;
13446
13447        try {
13448            var commandForm = AccountingUtil.getHome().getGetTransactionTimeTypesForm();
13449            var command = CDI.current().select(GetTransactionTimeTypesCommand.class).get();
13450
13451            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13452            if(totalEntities == null) {
13453                data = Connections.emptyConnection();
13454            } else {
13455                try(var objectLimiter = new ObjectLimiter(env, TransactionTimeTypeConstants.COMPONENT_VENDOR_NAME, TransactionTimeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13456                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13457
13458                    var transactionTimeTypes = entities.stream()
13459                            .map(TransactionTimeTypeObject::new)
13460                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13461
13462                    data = new CountedObjects<>(objectLimiter, transactionTimeTypes);
13463                }
13464            }
13465        } catch (NamingException ex) {
13466            throw new RuntimeException(ex);
13467        }
13468
13469        return data;
13470    }
13471
13472    @GraphQLField
13473    @GraphQLName("transactionType")
13474    static TransactionTypeObject transactionType(final DataFetchingEnvironment env,
13475            @GraphQLName("transactionTypeName") final String transactionTypeName,
13476            @GraphQLName("id") @GraphQLID final String id) {
13477        TransactionType transactionType;
13478
13479        try {
13480            var commandForm = AccountingUtil.getHome().getGetTransactionTypeForm();
13481
13482            commandForm.setTransactionTypeName(transactionTypeName);
13483            commandForm.setUuid(id);
13484
13485            transactionType = CDI.current().select(GetTransactionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13486        } catch (NamingException ex) {
13487            throw new RuntimeException(ex);
13488        }
13489
13490        return transactionType == null ? null : new TransactionTypeObject(transactionType);
13491    }
13492
13493    @GraphQLField
13494    @GraphQLName("transactionTypes")
13495    @GraphQLNonNull
13496    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13497    static CountingPaginatedData<TransactionTypeObject> transactionTypes(final DataFetchingEnvironment env) {
13498        CountingPaginatedData<TransactionTypeObject> data;
13499
13500        try {
13501            var commandForm = AccountingUtil.getHome().getGetTransactionTypesForm();
13502            var command = CDI.current().select(GetTransactionTypesCommand.class).get();
13503
13504            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13505            if(totalEntities == null) {
13506                data = Connections.emptyConnection();
13507            } else {
13508                try(var objectLimiter = new ObjectLimiter(env, TransactionTypeConstants.COMPONENT_VENDOR_NAME, TransactionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13509                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13510
13511                    var transactionTypes = entities.stream()
13512                            .map(TransactionTypeObject::new)
13513                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13514
13515                    data = new CountedObjects<>(objectLimiter, transactionTypes);
13516                }
13517            }
13518        } catch (NamingException ex) {
13519            throw new RuntimeException(ex);
13520        }
13521
13522        return data;
13523    }
13524
13525    @GraphQLField
13526    @GraphQLName("transactionGlAccountCategory")
13527    static TransactionGlAccountCategoryObject transactionGlAccountCategory(final DataFetchingEnvironment env,
13528            @GraphQLName("transactionTypeName") final String transactionTypeName,
13529            @GraphQLName("transactionGlAccountCategoryName") final String transactionGlAccountCategoryName,
13530            @GraphQLName("id") @GraphQLID final String id) {
13531        TransactionGlAccountCategory transactionGlAccountCategory;
13532
13533        try {
13534            var commandForm = AccountingUtil.getHome().getGetTransactionGlAccountCategoryForm();
13535
13536            commandForm.setTransactionTypeName(transactionTypeName);
13537            commandForm.setTransactionGlAccountCategoryName(transactionGlAccountCategoryName);
13538            commandForm.setUuid(id);
13539
13540            transactionGlAccountCategory = CDI.current().select(GetTransactionGlAccountCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13541        } catch (NamingException ex) {
13542            throw new RuntimeException(ex);
13543        }
13544
13545        return transactionGlAccountCategory == null ? null : new TransactionGlAccountCategoryObject(transactionGlAccountCategory);
13546    }
13547
13548    @GraphQLField
13549    @GraphQLName("transactionGlAccountCategories")
13550    @GraphQLNonNull
13551    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13552    static CountingPaginatedData<TransactionGlAccountCategoryObject> transactionGlAccountCategories(final DataFetchingEnvironment env,
13553            @GraphQLName("transactionTypeName") final String transactionTypeName) {
13554        CountingPaginatedData<TransactionGlAccountCategoryObject> data;
13555
13556        try {
13557            var commandForm = AccountingUtil.getHome().getGetTransactionGlAccountCategoriesForm();
13558            var command = CDI.current().select(GetTransactionGlAccountCategoriesCommand.class).get();
13559
13560            commandForm.setTransactionTypeName(transactionTypeName);
13561
13562            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13563            if(totalEntities == null) {
13564                data = Connections.emptyConnection();
13565            } else {
13566                try(var objectLimiter = new ObjectLimiter(env, TransactionGlAccountCategoryConstants.COMPONENT_VENDOR_NAME, TransactionGlAccountCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
13567                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13568
13569                    var transactionGlAccountCategories = entities.stream()
13570                            .map(TransactionGlAccountCategoryObject::new)
13571                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13572
13573                    data = new CountedObjects<>(objectLimiter, transactionGlAccountCategories);
13574                }
13575            }
13576        } catch (NamingException ex) {
13577            throw new RuntimeException(ex);
13578        }
13579
13580        return data;
13581    }
13582
13583    @GraphQLField
13584    @GraphQLName("transactionEntityRoleType")
13585    static TransactionEntityRoleTypeObject transactionEntityRoleType(final DataFetchingEnvironment env,
13586            @GraphQLName("transactionTypeName") final String transactionTypeName,
13587            @GraphQLName("transactionEntityRoleTypeName") final String transactionEntityRoleTypeName,
13588            @GraphQLName("id") @GraphQLID final String id) {
13589        TransactionEntityRoleType transactionEntityRoleType;
13590
13591        try {
13592            var commandForm = AccountingUtil.getHome().getGetTransactionEntityRoleTypeForm();
13593
13594            commandForm.setTransactionTypeName(transactionTypeName);
13595            commandForm.setTransactionEntityRoleTypeName(transactionEntityRoleTypeName);
13596            commandForm.setUuid(id);
13597
13598            transactionEntityRoleType = CDI.current().select(GetTransactionEntityRoleTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13599        } catch (NamingException ex) {
13600            throw new RuntimeException(ex);
13601        }
13602
13603        return transactionEntityRoleType == null ? null : new TransactionEntityRoleTypeObject(transactionEntityRoleType);
13604    }
13605
13606    @GraphQLField
13607    @GraphQLName("transactionEntityRoleTypes")
13608    @GraphQLNonNull
13609    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13610    static CountingPaginatedData<TransactionEntityRoleTypeObject> transactionEntityRoleTypes(final DataFetchingEnvironment env,
13611            @GraphQLName("transactionTypeName") final String transactionTypeName) {
13612        CountingPaginatedData<TransactionEntityRoleTypeObject> data;
13613
13614        try {
13615            var commandForm = AccountingUtil.getHome().getGetTransactionEntityRoleTypesForm();
13616            var command = CDI.current().select(GetTransactionEntityRoleTypesCommand.class).get();
13617
13618            commandForm.setTransactionTypeName(transactionTypeName);
13619
13620            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13621            if(totalEntities == null) {
13622                data = Connections.emptyConnection();
13623            } else {
13624                try(var objectLimiter = new ObjectLimiter(env, TransactionEntityRoleTypeConstants.COMPONENT_VENDOR_NAME, TransactionEntityRoleTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13625                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13626
13627                    var transactionEntityRoleTypes = entities.stream()
13628                            .map(TransactionEntityRoleTypeObject::new)
13629                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13630
13631                    data = new CountedObjects<>(objectLimiter, transactionEntityRoleTypes);
13632                }
13633            }
13634        } catch (NamingException ex) {
13635            throw new RuntimeException(ex);
13636        }
13637
13638        return data;
13639    }
13640
13641    @GraphQLField
13642    @GraphQLName("transactionGroup")
13643    static TransactionGroupObject transactionGroup(final DataFetchingEnvironment env,
13644            @GraphQLName("transactionGroupName") final String transactionGroupName,
13645            @GraphQLName("id") @GraphQLID final String id) {
13646        TransactionGroup transactionGroup;
13647
13648        try {
13649            var commandForm = AccountingUtil.getHome().getGetTransactionGroupForm();
13650
13651            commandForm.setTransactionGroupName(transactionGroupName);
13652            commandForm.setUuid(id);
13653
13654            transactionGroup = CDI.current().select(GetTransactionGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13655        } catch (NamingException ex) {
13656            throw new RuntimeException(ex);
13657        }
13658
13659        return transactionGroup == null ? null : new TransactionGroupObject(transactionGroup);
13660    }
13661
13662    @GraphQLField
13663    @GraphQLName("transactionGroups")
13664    @GraphQLNonNull
13665    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13666    static CountingPaginatedData<TransactionGroupObject> transactionGroups(final DataFetchingEnvironment env) {
13667        CountingPaginatedData<TransactionGroupObject> data;
13668
13669        try {
13670            var commandForm = AccountingUtil.getHome().getGetTransactionGroupsForm();
13671            var command = CDI.current().select(GetTransactionGroupsCommand.class).get();
13672
13673            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13674            if(totalEntities == null) {
13675                data = Connections.emptyConnection();
13676            } else {
13677                try(var objectLimiter = new ObjectLimiter(env, TransactionGroupConstants.COMPONENT_VENDOR_NAME, TransactionGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
13678                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13679
13680                    var transactionGroups = entities.stream()
13681                            .map(TransactionGroupObject::new)
13682                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13683
13684                    data = new CountedObjects<>(objectLimiter, transactionGroups);
13685                }
13686            }
13687        } catch (NamingException ex) {
13688            throw new RuntimeException(ex);
13689        }
13690
13691        return data;
13692    }
13693
13694    @GraphQLField
13695    @GraphQLName("transaction")
13696    static TransactionObject transaction(final DataFetchingEnvironment env,
13697            @GraphQLName("transactionName") final String transactionName,
13698            @GraphQLName("id") @GraphQLID final String id) {
13699        Transaction transaction;
13700
13701        try {
13702            var commandForm = AccountingUtil.getHome().getGetTransactionForm();
13703
13704            commandForm.setTransactionName(transactionName);
13705            commandForm.setUuid(id);
13706
13707            transaction = CDI.current().select(GetTransactionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13708        } catch (NamingException ex) {
13709            throw new RuntimeException(ex);
13710        }
13711
13712        return transaction == null ? null : new TransactionObject(transaction);
13713    }
13714
13715    @GraphQLField
13716    @GraphQLName("transactions")
13717    @GraphQLNonNull
13718    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13719    static CountingPaginatedData<TransactionObject> transactions(final DataFetchingEnvironment env,
13720            @GraphQLName("transactionGroupName") final String transactionGroupName) {
13721        CountingPaginatedData<TransactionObject> data;
13722
13723        try {
13724            var commandForm = AccountingUtil.getHome().getGetTransactionsForm();
13725            var command = CDI.current().select(GetTransactionsCommand.class).get();
13726
13727            commandForm.setTransactionGroupName(transactionGroupName);
13728
13729            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13730            if(totalEntities == null) {
13731                data = Connections.emptyConnection();
13732            } else {
13733                try(var objectLimiter = new ObjectLimiter(env, TransactionConstants.COMPONENT_VENDOR_NAME, TransactionConstants.ENTITY_TYPE_NAME, totalEntities)) {
13734                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13735
13736                    var transactions = entities.stream()
13737                            .map(TransactionObject::new)
13738                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13739
13740                    data = new CountedObjects<>(objectLimiter, transactions);
13741                }
13742            }
13743        } catch (NamingException ex) {
13744            throw new RuntimeException(ex);
13745        }
13746
13747        return data;
13748    }
13749
13750    @GraphQLField
13751    @GraphQLName("campaign")
13752    static CampaignObject campaign(final DataFetchingEnvironment env,
13753            @GraphQLName("campaignName") final String campaignName,
13754            @GraphQLName("id") @GraphQLID final String id) {
13755        Campaign campaign;
13756
13757        try {
13758            var commandForm = CampaignUtil.getHome().getGetCampaignForm();
13759
13760            commandForm.setCampaignName(campaignName);
13761            commandForm.setUuid(id);
13762
13763            campaign = CDI.current().select(GetCampaignCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13764        } catch (NamingException ex) {
13765            throw new RuntimeException(ex);
13766        }
13767
13768        return campaign == null ? null : new CampaignObject(campaign);
13769    }
13770
13771    @GraphQLField
13772    @GraphQLName("campaigns")
13773    @GraphQLNonNull
13774    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13775    static CountingPaginatedData<CampaignObject> campaigns(final DataFetchingEnvironment env) {
13776        CountingPaginatedData<CampaignObject> data;
13777
13778        try {
13779            var commandForm = CampaignUtil.getHome().getGetCampaignsForm();
13780            var command = CDI.current().select(GetCampaignsCommand.class).get();
13781
13782            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13783            if(totalEntities == null) {
13784                data = Connections.emptyConnection();
13785            } else {
13786                try(var objectLimiter = new ObjectLimiter(env, CampaignConstants.COMPONENT_VENDOR_NAME, CampaignConstants.ENTITY_TYPE_NAME, totalEntities)) {
13787                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13788
13789                    var campaigns = entities.stream()
13790                            .map(CampaignObject::new)
13791                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13792
13793                    data = new CountedObjects<>(objectLimiter, campaigns);
13794                }
13795            }
13796        } catch (NamingException ex) {
13797            throw new RuntimeException(ex);
13798        }
13799
13800        return data;
13801    }
13802
13803    @GraphQLField
13804    @GraphQLName("campaignContent")
13805    static CampaignContentObject campaignContent(final DataFetchingEnvironment env,
13806            @GraphQLName("campaignContentName") final String campaignContentName,
13807            @GraphQLName("id") @GraphQLID final String id) {
13808        CampaignContent campaignContent;
13809
13810        try {
13811            var commandForm = CampaignUtil.getHome().getGetCampaignContentForm();
13812
13813            commandForm.setCampaignContentName(campaignContentName);
13814            commandForm.setUuid(id);
13815
13816            campaignContent = CDI.current().select(GetCampaignContentCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13817        } catch (NamingException ex) {
13818            throw new RuntimeException(ex);
13819        }
13820
13821        return campaignContent == null ? null : new CampaignContentObject(campaignContent);
13822    }
13823
13824    @GraphQLField
13825    @GraphQLName("campaignContents")
13826    @GraphQLNonNull
13827    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13828    static CountingPaginatedData<CampaignContentObject> campaignContents(final DataFetchingEnvironment env) {
13829        CountingPaginatedData<CampaignContentObject> data;
13830
13831        try {
13832            var commandForm = CampaignUtil.getHome().getGetCampaignContentsForm();
13833            var command = CDI.current().select(GetCampaignContentsCommand.class).get();
13834
13835            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13836            if(totalEntities == null) {
13837                data = Connections.emptyConnection();
13838            } else {
13839                try(var objectLimiter = new ObjectLimiter(env, CampaignContentConstants.COMPONENT_VENDOR_NAME, CampaignContentConstants.ENTITY_TYPE_NAME, totalEntities)) {
13840                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13841
13842                    var campaignContents = entities.stream()
13843                            .map(CampaignContentObject::new)
13844                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13845
13846                    data = new CountedObjects<>(objectLimiter, campaignContents);
13847                }
13848            }
13849        } catch (NamingException ex) {
13850            throw new RuntimeException(ex);
13851        }
13852
13853        return data;
13854    }
13855
13856    @GraphQLField
13857    @GraphQLName("campaignMedium")
13858    static CampaignMediumObject campaignMedium(final DataFetchingEnvironment env,
13859            @GraphQLName("campaignMediumName") final String campaignMediumName,
13860            @GraphQLName("id") @GraphQLID final String id) {
13861        CampaignMedium campaignMedium;
13862
13863        try {
13864            var commandForm = CampaignUtil.getHome().getGetCampaignMediumForm();
13865
13866            commandForm.setCampaignMediumName(campaignMediumName);
13867            commandForm.setUuid(id);
13868
13869            campaignMedium = CDI.current().select(GetCampaignMediumCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13870        } catch (NamingException ex) {
13871            throw new RuntimeException(ex);
13872        }
13873
13874        return campaignMedium == null ? null : new CampaignMediumObject(campaignMedium);
13875    }
13876
13877    @GraphQLField
13878    @GraphQLName("campaignMediums")
13879    @GraphQLNonNull
13880    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13881    static CountingPaginatedData<CampaignMediumObject> campaignMediums(final DataFetchingEnvironment env) {
13882        CountingPaginatedData<CampaignMediumObject> data;
13883
13884        try {
13885            var commandForm = CampaignUtil.getHome().getGetCampaignMediumsForm();
13886            var command = CDI.current().select(GetCampaignMediumsCommand.class).get();
13887
13888            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13889            if(totalEntities == null) {
13890                data = Connections.emptyConnection();
13891            } else {
13892                try(var objectLimiter = new ObjectLimiter(env, CampaignMediumConstants.COMPONENT_VENDOR_NAME, CampaignMediumConstants.ENTITY_TYPE_NAME, totalEntities)) {
13893                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13894
13895                    var campaignMediums = entities.stream()
13896                            .map(CampaignMediumObject::new)
13897                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13898
13899                    data = new CountedObjects<>(objectLimiter, campaignMediums);
13900                }
13901            }
13902        } catch (NamingException ex) {
13903            throw new RuntimeException(ex);
13904        }
13905
13906        return data;
13907    }
13908
13909    @GraphQLField
13910    @GraphQLName("campaignTerm")
13911    static CampaignTermObject campaignTerm(final DataFetchingEnvironment env,
13912            @GraphQLName("campaignTermName") final String campaignTermName,
13913            @GraphQLName("id") @GraphQLID final String id) {
13914        CampaignTerm campaignTerm;
13915
13916        try {
13917            var commandForm = CampaignUtil.getHome().getGetCampaignTermForm();
13918
13919            commandForm.setCampaignTermName(campaignTermName);
13920            commandForm.setUuid(id);
13921
13922            campaignTerm = CDI.current().select(GetCampaignTermCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13923        } catch (NamingException ex) {
13924            throw new RuntimeException(ex);
13925        }
13926
13927        return campaignTerm == null ? null : new CampaignTermObject(campaignTerm);
13928    }
13929
13930    @GraphQLField
13931    @GraphQLName("campaignTerms")
13932    @GraphQLNonNull
13933    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13934    static CountingPaginatedData<CampaignTermObject> campaignTerms(final DataFetchingEnvironment env) {
13935        CountingPaginatedData<CampaignTermObject> data;
13936
13937        try {
13938            var commandForm = CampaignUtil.getHome().getGetCampaignTermsForm();
13939            var command = CDI.current().select(GetCampaignTermsCommand.class).get();
13940
13941            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13942            if(totalEntities == null) {
13943                data = Connections.emptyConnection();
13944            } else {
13945                try(var objectLimiter = new ObjectLimiter(env, CampaignTermConstants.COMPONENT_VENDOR_NAME, CampaignTermConstants.ENTITY_TYPE_NAME, totalEntities)) {
13946                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13947
13948                    var campaignTerms = entities.stream()
13949                            .map(CampaignTermObject::new)
13950                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13951
13952                    data = new CountedObjects<>(objectLimiter, campaignTerms);
13953                }
13954            }
13955        } catch (NamingException ex) {
13956            throw new RuntimeException(ex);
13957        }
13958
13959        return data;
13960    }
13961
13962    @GraphQLField
13963    @GraphQLName("campaignSource")
13964    static CampaignSourceObject campaignSource(final DataFetchingEnvironment env,
13965            @GraphQLName("campaignSourceName") final String campaignSourceName,
13966            @GraphQLName("id") @GraphQLID final String id) {
13967        CampaignSource campaignSource;
13968
13969        try {
13970            var commandForm = CampaignUtil.getHome().getGetCampaignSourceForm();
13971
13972            commandForm.setCampaignSourceName(campaignSourceName);
13973            commandForm.setUuid(id);
13974
13975            campaignSource = CDI.current().select(GetCampaignSourceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13976        } catch (NamingException ex) {
13977            throw new RuntimeException(ex);
13978        }
13979
13980        return campaignSource == null ? null : new CampaignSourceObject(campaignSource);
13981    }
13982
13983    @GraphQLField
13984    @GraphQLName("campaignSources")
13985    @GraphQLNonNull
13986    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13987    static CountingPaginatedData<CampaignSourceObject> campaignSources(final DataFetchingEnvironment env) {
13988        CountingPaginatedData<CampaignSourceObject> data;
13989
13990        try {
13991            var commandForm = CampaignUtil.getHome().getGetCampaignSourcesForm();
13992            var command = CDI.current().select(GetCampaignSourcesCommand.class).get();
13993
13994            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13995            if(totalEntities == null) {
13996                data = Connections.emptyConnection();
13997            } else {
13998                try(var objectLimiter = new ObjectLimiter(env, CampaignSourceConstants.COMPONENT_VENDOR_NAME, CampaignSourceConstants.ENTITY_TYPE_NAME, totalEntities)) {
13999                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14000
14001                    var campaignSources = entities.stream()
14002                            .map(CampaignSourceObject::new)
14003                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14004
14005                    data = new CountedObjects<>(objectLimiter, campaignSources);
14006                }
14007            }
14008        } catch (NamingException ex) {
14009            throw new RuntimeException(ex);
14010        }
14011
14012        return data;
14013    }
14014
14015    @GraphQLField
14016    @GraphQLName("subscriptionKind")
14017    static SubscriptionKindObject subscriptionKind(final DataFetchingEnvironment env,
14018            @GraphQLName("subscriptionKindName") final String subscriptionKindName,
14019            @GraphQLName("id") @GraphQLID final String id) {
14020        SubscriptionKind subscriptionKind;
14021
14022        try {
14023            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionKindForm();
14024
14025            commandForm.setSubscriptionKindName(subscriptionKindName);
14026            commandForm.setUuid(id);
14027
14028            subscriptionKind = CDI.current().select(GetSubscriptionKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14029        } catch (NamingException ex) {
14030            throw new RuntimeException(ex);
14031        }
14032
14033        return subscriptionKind == null ? null : new SubscriptionKindObject(subscriptionKind);
14034    }
14035
14036    @GraphQLField
14037    @GraphQLName("subscriptionKinds")
14038    @GraphQLNonNull
14039    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14040    static CountingPaginatedData<SubscriptionKindObject> subscriptionKinds(final DataFetchingEnvironment env) {
14041        CountingPaginatedData<SubscriptionKindObject> data;
14042
14043        try {
14044            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionKindsForm();
14045            var command = CDI.current().select(GetSubscriptionKindsCommand.class).get();
14046
14047            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14048            if(totalEntities == null) {
14049                data = Connections.emptyConnection();
14050            } else {
14051                try(var objectLimiter = new ObjectLimiter(env, SubscriptionKindConstants.COMPONENT_VENDOR_NAME, SubscriptionKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
14052                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14053
14054                    var subscriptionKinds = entities.stream()
14055                            .map(SubscriptionKindObject::new)
14056                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14057
14058                    data = new CountedObjects<>(objectLimiter, subscriptionKinds);
14059                }
14060            }
14061        } catch (NamingException ex) {
14062            throw new RuntimeException(ex);
14063        }
14064
14065        return data;
14066    }
14067
14068    @GraphQLField
14069    @GraphQLName("subscriptionType")
14070    static SubscriptionTypeObject subscriptionType(final DataFetchingEnvironment env,
14071            @GraphQLName("subscriptionKindName") final String subscriptionKindName,
14072            @GraphQLName("subscriptionTypeName") final String subscriptionTypeName,
14073            @GraphQLName("id") @GraphQLID final String id) {
14074        SubscriptionType subscriptionType;
14075
14076        try {
14077            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionTypeForm();
14078
14079            commandForm.setSubscriptionKindName(subscriptionKindName);
14080            commandForm.setSubscriptionTypeName(subscriptionTypeName);
14081            commandForm.setUuid(id);
14082
14083            subscriptionType = CDI.current().select(GetSubscriptionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14084        } catch (NamingException ex) {
14085            throw new RuntimeException(ex);
14086        }
14087
14088        return subscriptionType == null ? null : new SubscriptionTypeObject(subscriptionType);
14089    }
14090
14091    @GraphQLField
14092    @GraphQLName("subscriptionTypes")
14093    @GraphQLNonNull
14094    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14095    static CountingPaginatedData<SubscriptionTypeObject> subscriptionTypes(final DataFetchingEnvironment env,
14096            @GraphQLName("subscriptionKindName") @GraphQLNonNull final String subscriptionKindName) {
14097        CountingPaginatedData<SubscriptionTypeObject> data;
14098
14099        try {
14100            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionTypesForm();
14101            var command = CDI.current().select(GetSubscriptionTypesCommand.class).get();
14102
14103            commandForm.setSubscriptionKindName(subscriptionKindName);
14104
14105            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14106            if(totalEntities == null) {
14107                data = Connections.emptyConnection();
14108            } else {
14109                try(var objectLimiter = new ObjectLimiter(env, SubscriptionTypeConstants.COMPONENT_VENDOR_NAME, SubscriptionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
14110                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14111
14112                    var subscriptionTypes = entities.stream()
14113                            .map(SubscriptionTypeObject::new)
14114                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14115
14116                    data = new CountedObjects<>(objectLimiter, subscriptionTypes);
14117                }
14118            }
14119        } catch (NamingException ex) {
14120            throw new RuntimeException(ex);
14121        }
14122
14123        return data;
14124    }
14125
14126    @GraphQLField
14127    @GraphQLName("subscription")
14128    static SubscriptionObject subscription(final DataFetchingEnvironment env,
14129            @GraphQLName("subscriptionName") final String subscriptionName,
14130            @GraphQLName("id") @GraphQLID final String id) {
14131        Subscription subscription;
14132
14133        try {
14134            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionForm();
14135
14136            commandForm.setSubscriptionName(subscriptionName);
14137            commandForm.setUuid(id);
14138
14139            subscription = CDI.current().select(GetSubscriptionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14140        } catch (NamingException ex) {
14141            throw new RuntimeException(ex);
14142        }
14143
14144        return subscription == null ? null : new SubscriptionObject(subscription);
14145    }
14146
14147    @GraphQLField
14148    @GraphQLName("subscriptions")
14149    @GraphQLNonNull
14150    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14151    static CountingPaginatedData<SubscriptionObject> subscriptions(final DataFetchingEnvironment env,
14152            @GraphQLName("subscriptionKindName") @GraphQLNonNull final String subscriptionKindName,
14153            @GraphQLName("subscriptionTypeName") @GraphQLNonNull final String subscriptionTypeName) {
14154        CountingPaginatedData<SubscriptionObject> data;
14155
14156        try {
14157            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionsForm();
14158            var command = CDI.current().select(GetSubscriptionsCommand.class).get();
14159
14160            commandForm.setSubscriptionKindName(subscriptionKindName);
14161            commandForm.setSubscriptionTypeName(subscriptionTypeName);
14162
14163            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14164            if(totalEntities == null) {
14165                data = Connections.emptyConnection();
14166            } else {
14167                try(var objectLimiter = new ObjectLimiter(env, SubscriptionConstants.COMPONENT_VENDOR_NAME, SubscriptionConstants.ENTITY_TYPE_NAME, totalEntities)) {
14168                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14169
14170                    var subscriptions = entities.stream()
14171                            .map(SubscriptionObject::new)
14172                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14173
14174                    data = new CountedObjects<>(objectLimiter, subscriptions);
14175                }
14176            }
14177        } catch (NamingException ex) {
14178            throw new RuntimeException(ex);
14179        }
14180
14181        return data;
14182    }
14183
14184    @GraphQLField
14185    @GraphQLName("chainKind")
14186    static ChainKindObject chainKind(final DataFetchingEnvironment env,
14187            @GraphQLName("chainKindName") final String chainKindName,
14188            @GraphQLName("id") @GraphQLID final String id) {
14189        ChainKind chainKind;
14190
14191        try {
14192            var commandForm = ChainUtil.getHome().getGetChainKindForm();
14193
14194            commandForm.setChainKindName(chainKindName);
14195            commandForm.setUuid(id);
14196
14197            chainKind = CDI.current().select(GetChainKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14198        } catch (NamingException ex) {
14199            throw new RuntimeException(ex);
14200        }
14201
14202        return chainKind == null ? null : new ChainKindObject(chainKind);
14203    }
14204
14205    @GraphQLField
14206    @GraphQLName("chainKinds")
14207    @GraphQLNonNull
14208    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14209    static CountingPaginatedData<ChainKindObject> chainKinds(final DataFetchingEnvironment env) {
14210        CountingPaginatedData<ChainKindObject> data;
14211
14212        try {
14213            var commandForm = ChainUtil.getHome().getGetChainKindsForm();
14214            var command = CDI.current().select(GetChainKindsCommand.class).get();
14215
14216            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14217            if(totalEntities == null) {
14218                data = Connections.emptyConnection();
14219            } else {
14220                try(var objectLimiter = new ObjectLimiter(env, ChainKindConstants.COMPONENT_VENDOR_NAME, ChainKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
14221                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14222
14223                    var chainKinds = entities.stream()
14224                            .map(ChainKindObject::new)
14225                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14226
14227                    data = new CountedObjects<>(objectLimiter, chainKinds);
14228                }
14229            }
14230        } catch (NamingException ex) {
14231            throw new RuntimeException(ex);
14232        }
14233
14234        return data;
14235    }
14236
14237    @GraphQLField
14238    @GraphQLName("chainType")
14239    static ChainTypeObject chainType(final DataFetchingEnvironment env,
14240            @GraphQLName("chainKindName") final String chainKindName,
14241            @GraphQLName("chainTypeName") final String chainTypeName,
14242            @GraphQLName("id") @GraphQLID final String id) {
14243        ChainType chainType;
14244
14245        try {
14246            var commandForm = ChainUtil.getHome().getGetChainTypeForm();
14247
14248            commandForm.setChainKindName(chainKindName);
14249            commandForm.setChainTypeName(chainTypeName);
14250            commandForm.setUuid(id);
14251
14252            chainType = CDI.current().select(GetChainTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14253        } catch (NamingException ex) {
14254            throw new RuntimeException(ex);
14255        }
14256
14257        return chainType == null ? null : new ChainTypeObject(chainType);
14258    }
14259
14260    @GraphQLField
14261    @GraphQLName("chainTypes")
14262    @GraphQLNonNull
14263    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14264    static CountingPaginatedData<ChainTypeObject> chainTypes(final DataFetchingEnvironment env,
14265            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName) {
14266        CountingPaginatedData<ChainTypeObject> data;
14267
14268        try {
14269            var commandForm = ChainUtil.getHome().getGetChainTypesForm();
14270            var command = CDI.current().select(GetChainTypesCommand.class).get();
14271
14272            commandForm.setChainKindName(chainKindName);
14273
14274            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14275            if(totalEntities == null) {
14276                data = Connections.emptyConnection();
14277            } else {
14278                try(var objectLimiter = new ObjectLimiter(env, ChainTypeConstants.COMPONENT_VENDOR_NAME, ChainTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
14279                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14280
14281                    var chainTypes = entities.stream()
14282                            .map(ChainTypeObject::new)
14283                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14284
14285                    data = new CountedObjects<>(objectLimiter, chainTypes);
14286                }
14287            }
14288        } catch (NamingException ex) {
14289            throw new RuntimeException(ex);
14290        }
14291
14292        return data;
14293    }
14294
14295    @GraphQLField
14296    @GraphQLName("chain")
14297    static ChainObject chain(final DataFetchingEnvironment env,
14298            @GraphQLName("chainKindName") final String chainKindName,
14299            @GraphQLName("chainTypeName") final String chainTypeName,
14300            @GraphQLName("chainName") final String chainName,
14301            @GraphQLName("id") @GraphQLID final String id) {
14302        Chain chain;
14303
14304        try {
14305            var commandForm = ChainUtil.getHome().getGetChainForm();
14306
14307            commandForm.setChainKindName(chainKindName);
14308            commandForm.setChainTypeName(chainTypeName);
14309            commandForm.setChainName(chainName);
14310            commandForm.setUuid(id);
14311
14312            chain = CDI.current().select(GetChainCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14313        } catch (NamingException ex) {
14314            throw new RuntimeException(ex);
14315        }
14316
14317        return chain == null ? null : new ChainObject(chain);
14318    }
14319
14320    @GraphQLField
14321    @GraphQLName("chains")
14322    @GraphQLNonNull
14323    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14324    static CountingPaginatedData<ChainObject> chains(final DataFetchingEnvironment env,
14325            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName,
14326            @GraphQLName("chainTypeName") @GraphQLNonNull final String chainTypeName) {
14327        CountingPaginatedData<ChainObject> data;
14328
14329        try {
14330            var commandForm = ChainUtil.getHome().getGetChainsForm();
14331            var command = CDI.current().select(GetChainsCommand.class).get();
14332
14333            commandForm.setChainKindName(chainKindName);
14334            commandForm.setChainTypeName(chainTypeName);
14335
14336            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14337            if(totalEntities == null) {
14338                data = Connections.emptyConnection();
14339            } else {
14340                try(var objectLimiter = new ObjectLimiter(env, ChainConstants.COMPONENT_VENDOR_NAME, ChainConstants.ENTITY_TYPE_NAME, totalEntities)) {
14341                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14342
14343                    var chains = entities.stream()
14344                            .map(ChainObject::new)
14345                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14346
14347                    data = new CountedObjects<>(objectLimiter, chains);
14348                }
14349            }
14350        } catch (NamingException ex) {
14351            throw new RuntimeException(ex);
14352        }
14353
14354        return data;
14355    }
14356
14357    @GraphQLField
14358    @GraphQLName("chainActionSet")
14359    static ChainActionSetObject chainActionSet(final DataFetchingEnvironment env,
14360            @GraphQLName("chainKindName") final String chainKindName,
14361            @GraphQLName("chainTypeName") final String chainTypeName,
14362            @GraphQLName("chainName") final String chainName,
14363            @GraphQLName("chainActionSetName") final String chainActionSetName,
14364            @GraphQLName("id") @GraphQLID final String id) {
14365        ChainActionSet chainActionSet;
14366
14367        try {
14368            var commandForm = ChainUtil.getHome().getGetChainActionSetForm();
14369
14370            commandForm.setChainKindName(chainKindName);
14371            commandForm.setChainTypeName(chainTypeName);
14372            commandForm.setChainName(chainName);
14373            commandForm.setChainActionSetName(chainActionSetName);
14374            commandForm.setUuid(id);
14375
14376            chainActionSet = CDI.current().select(GetChainActionSetCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14377        } catch (NamingException ex) {
14378            throw new RuntimeException(ex);
14379        }
14380
14381        return chainActionSet == null ? null : new ChainActionSetObject(chainActionSet);
14382    }
14383
14384    @GraphQLField
14385    @GraphQLName("chainActionSets")
14386    @GraphQLNonNull
14387    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14388    static CountingPaginatedData<ChainActionSetObject> chainActionSets(final DataFetchingEnvironment env,
14389            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName,
14390            @GraphQLName("chainTypeName") @GraphQLNonNull final String chainTypeName,
14391            @GraphQLName("chainName") @GraphQLNonNull final String chainName) {
14392        CountingPaginatedData<ChainActionSetObject> data;
14393
14394        try {
14395            var commandForm = ChainUtil.getHome().getGetChainActionSetsForm();
14396            var command = CDI.current().select(GetChainActionSetsCommand.class).get();
14397
14398            commandForm.setChainKindName(chainKindName);
14399            commandForm.setChainTypeName(chainTypeName);
14400            commandForm.setChainName(chainName);
14401
14402            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14403            if(totalEntities == null) {
14404                data = Connections.emptyConnection();
14405            } else {
14406                try(var objectLimiter = new ObjectLimiter(env, ChainActionSetConstants.COMPONENT_VENDOR_NAME, ChainActionSetConstants.ENTITY_TYPE_NAME, totalEntities)) {
14407                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14408
14409                    var chainActionSets = entities.stream()
14410                            .map(ChainActionSetObject::new)
14411                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14412
14413                    data = new CountedObjects<>(objectLimiter, chainActionSets);
14414                }
14415            }
14416        } catch (NamingException ex) {
14417            throw new RuntimeException(ex);
14418        }
14419
14420        return data;
14421    }
14422
14423    @GraphQLField
14424    @GraphQLName("chainActionType")
14425    static ChainActionTypeObject chainActionType(final DataFetchingEnvironment env,
14426            @GraphQLName("chainActionTypeName") final String chainActionTypeName,
14427            @GraphQLName("id") @GraphQLID final String id) {
14428        ChainActionType chainActionType;
14429
14430        try {
14431            var commandForm = ChainUtil.getHome().getGetChainActionTypeForm();
14432
14433            commandForm.setChainActionTypeName(chainActionTypeName);
14434            commandForm.setUuid(id);
14435
14436            chainActionType = CDI.current().select(GetChainActionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14437        } catch (NamingException ex) {
14438            throw new RuntimeException(ex);
14439        }
14440
14441        return chainActionType == null ? null : new ChainActionTypeObject(chainActionType);
14442    }
14443
14444    @GraphQLField
14445    @GraphQLName("chainActionTypes")
14446    @GraphQLNonNull
14447    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14448    static CountingPaginatedData<ChainActionTypeObject> chainActionTypes(final DataFetchingEnvironment env) {
14449        CountingPaginatedData<ChainActionTypeObject> data;
14450
14451        try {
14452            var commandForm = ChainUtil.getHome().getGetChainActionTypesForm();
14453            var command = CDI.current().select(GetChainActionTypesCommand.class).get();
14454
14455            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14456            if(totalEntities == null) {
14457                data = Connections.emptyConnection();
14458            } else {
14459                try(var objectLimiter = new ObjectLimiter(env, ChainActionTypeConstants.COMPONENT_VENDOR_NAME, ChainActionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
14460                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14461
14462                    var chainActionTypes = entities.stream()
14463                            .map(ChainActionTypeObject::new)
14464                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14465
14466                    data = new CountedObjects<>(objectLimiter, chainActionTypes);
14467                }
14468            }
14469        } catch (NamingException ex) {
14470            throw new RuntimeException(ex);
14471        }
14472
14473        return data;
14474    }
14475
14476    @GraphQLField
14477    @GraphQLName("chainEntityTypeRole")
14478    static ChainEntityRoleTypeObject chainEntityTypeRole(final DataFetchingEnvironment env,
14479            @GraphQLName("chainKindName") final String chainKindName,
14480            @GraphQLName("chainTypeName") final String chainTypeName,
14481            @GraphQLName("chainEntityRoleTypeName") final String chainEntityRoleTypeName,
14482            @GraphQLName("id") @GraphQLID final String id) {
14483        ChainEntityRoleType chainEntityRoleType;
14484
14485        try {
14486            var commandForm = ChainUtil.getHome().getGetChainEntityRoleTypeForm();
14487
14488            commandForm.setChainKindName(chainKindName);
14489            commandForm.setChainTypeName(chainTypeName);
14490            commandForm.setChainEntityRoleTypeName(chainEntityRoleTypeName);
14491            commandForm.setUuid(id);
14492
14493            chainEntityRoleType = CDI.current().select(GetChainEntityRoleTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14494        } catch (NamingException ex) {
14495            throw new RuntimeException(ex);
14496        }
14497
14498        return chainEntityRoleType == null ? null : new ChainEntityRoleTypeObject(chainEntityRoleType);
14499    }
14500
14501    @GraphQLField
14502    @GraphQLName("chainEntityTypeRoles")
14503    @GraphQLNonNull
14504    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14505    static CountingPaginatedData<ChainEntityRoleTypeObject> chainEntityTypeRoles(final DataFetchingEnvironment env,
14506            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName,
14507            @GraphQLName("chainTypeName") @GraphQLNonNull final String chainTypeName) {
14508        CountingPaginatedData<ChainEntityRoleTypeObject> data;
14509
14510        try {
14511            var commandForm = ChainUtil.getHome().getGetChainEntityRoleTypesForm();
14512            var command = CDI.current().select(GetChainEntityRoleTypesCommand.class).get();
14513
14514            commandForm.setChainKindName(chainKindName);
14515            commandForm.setChainTypeName(chainTypeName);
14516
14517            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14518            if(totalEntities == null) {
14519                data = Connections.emptyConnection();
14520            } else {
14521                try(var objectLimiter = new ObjectLimiter(env, ChainEntityRoleTypeConstants.COMPONENT_VENDOR_NAME, ChainEntityRoleTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
14522                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14523
14524                    var chainEntityTypeRoles = entities.stream()
14525                            .map(ChainEntityRoleTypeObject::new)
14526                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14527
14528                    data = new CountedObjects<>(objectLimiter, chainEntityTypeRoles);
14529                }
14530            }
14531        } catch (NamingException ex) {
14532            throw new RuntimeException(ex);
14533        }
14534
14535        return data;
14536    }
14537
14538    @GraphQLField
14539    @GraphQLName("chainAction")
14540    static ChainActionObject chainAction(final DataFetchingEnvironment env,
14541            @GraphQLName("chainKindName") final String chainKindName,
14542            @GraphQLName("chainTypeName") final String chainTypeName,
14543            @GraphQLName("chainName") final String chainName,
14544            @GraphQLName("chainActionSetName") final String chainActionSetName,
14545            @GraphQLName("chainActionName") final String chainActionName,
14546            @GraphQLName("id") @GraphQLID final String id) {
14547        ChainAction chainAction;
14548
14549        try {
14550            var commandForm = ChainUtil.getHome().getGetChainActionForm();
14551
14552            commandForm.setChainKindName(chainKindName);
14553            commandForm.setChainTypeName(chainTypeName);
14554            commandForm.setChainName(chainName);
14555            commandForm.setChainActionSetName(chainActionSetName);
14556            commandForm.setChainActionName(chainActionName);
14557            commandForm.setUuid(id);
14558
14559            chainAction = CDI.current().select(GetChainActionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14560        } catch (NamingException ex) {
14561            throw new RuntimeException(ex);
14562        }
14563
14564        return chainAction == null ? null : new ChainActionObject(chainAction);
14565    }
14566
14567    @GraphQLField
14568    @GraphQLName("chainActions")
14569    @GraphQLNonNull
14570    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14571    static CountingPaginatedData<ChainActionObject> chainActions(final DataFetchingEnvironment env,
14572            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName,
14573            @GraphQLName("chainTypeName") @GraphQLNonNull final String chainTypeName,
14574            @GraphQLName("chainName") @GraphQLNonNull final String chainName,
14575            @GraphQLName("chainActionSetName") @GraphQLNonNull final String chainActionSetName) {
14576        CountingPaginatedData<ChainActionObject> data;
14577
14578        try {
14579            var commandForm = ChainUtil.getHome().getGetChainActionsForm();
14580            var command = CDI.current().select(GetChainActionsCommand.class).get();
14581
14582            commandForm.setChainKindName(chainKindName);
14583            commandForm.setChainTypeName(chainTypeName);
14584            commandForm.setChainName(chainName);
14585            commandForm.setChainActionSetName(chainActionSetName);
14586
14587            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14588            if(totalEntities == null) {
14589                data = Connections.emptyConnection();
14590            } else {
14591                try(var objectLimiter = new ObjectLimiter(env, ChainActionConstants.COMPONENT_VENDOR_NAME, ChainActionConstants.ENTITY_TYPE_NAME, totalEntities)) {
14592                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14593
14594                    var chainActions = entities.stream()
14595                            .map(ChainActionObject::new)
14596                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14597
14598                    data = new CountedObjects<>(objectLimiter, chainActions);
14599                }
14600            }
14601        } catch (NamingException ex) {
14602            throw new RuntimeException(ex);
14603        }
14604
14605        return data;
14606    }
14607
14608    @GraphQLField
14609    @GraphQLName("chainInstance")
14610    static ChainInstanceObject chainInstance(final DataFetchingEnvironment env,
14611            @GraphQLName("chainInstanceName") final String chainInstanceName,
14612            @GraphQLName("id") @GraphQLID final String id) {
14613        ChainInstance chainInstance;
14614
14615        try {
14616            var commandForm = ChainUtil.getHome().getGetChainInstanceForm();
14617
14618            commandForm.setChainInstanceName(chainInstanceName);
14619            commandForm.setUuid(id);
14620
14621            chainInstance = CDI.current().select(GetChainInstanceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14622        } catch (NamingException ex) {
14623            throw new RuntimeException(ex);
14624        }
14625
14626        return chainInstance == null ? null : new ChainInstanceObject(chainInstance);
14627    }
14628
14629    @GraphQLField
14630    @GraphQLName("chainInstances")
14631    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14632    static CountingPaginatedData<ChainInstanceObject> chainInstances(final DataFetchingEnvironment env,
14633            @GraphQLName("chainKindName") final String chainKindName,
14634            @GraphQLName("chainTypeName") final String chainTypeName,
14635            @GraphQLName("chainName") final String chainName) {
14636        CountingPaginatedData<ChainInstanceObject> data;
14637
14638        try {
14639            var commandForm = ChainUtil.getHome().getGetChainInstancesForm();
14640            var command = CDI.current().select(GetChainInstancesCommand.class).get();
14641
14642            commandForm.setChainKindName(chainKindName);
14643            commandForm.setChainTypeName(chainTypeName);
14644            commandForm.setChainName(chainName);
14645
14646            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14647            if(totalEntities == null) {
14648                data = Connections.emptyConnection();
14649            } else {
14650                try(var objectLimiter = new ObjectLimiter(env, ChainInstanceConstants.COMPONENT_VENDOR_NAME, ChainInstanceConstants.ENTITY_TYPE_NAME, totalEntities)) {
14651                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14652
14653                    var chainInstances = entities.stream()
14654                            .map(ChainInstanceObject::new)
14655                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14656
14657                    data = new CountedObjects<>(objectLimiter, chainInstances);
14658                }
14659            }
14660        } catch (NamingException ex) {
14661            throw new RuntimeException(ex);
14662        }
14663
14664        return data;
14665    }
14666
14667
14668    @GraphQLField
14669    @GraphQLName("contactListFrequency")
14670    static ContactListFrequencyObject contactListFrequency(final DataFetchingEnvironment env,
14671            @GraphQLName("contactListFrequencyName") final String contactListFrequencyName,
14672            @GraphQLName("id") @GraphQLID final String id) {
14673        ContactListFrequency contactListFrequency;
14674
14675        try {
14676            var commandForm = ContactListUtil.getHome().getGetContactListFrequencyForm();
14677
14678            commandForm.setContactListFrequencyName(contactListFrequencyName);
14679            commandForm.setUuid(id);
14680
14681            contactListFrequency = CDI.current().select(GetContactListFrequencyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14682        } catch (NamingException ex) {
14683            throw new RuntimeException(ex);
14684        }
14685
14686        return contactListFrequency == null ? null : new ContactListFrequencyObject(contactListFrequency);
14687    }
14688
14689    @GraphQLField
14690    @GraphQLName("contactListFrequencies")
14691    @GraphQLNonNull
14692    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14693    static CountingPaginatedData<ContactListFrequencyObject> contactListFrequencies(final DataFetchingEnvironment env) {
14694        CountingPaginatedData<ContactListFrequencyObject> data;
14695
14696        try {
14697            var commandForm = ContactListUtil.getHome().getGetContactListFrequenciesForm();
14698            var command = CDI.current().select(GetContactListFrequenciesCommand.class).get();
14699
14700            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14701            if(totalEntities == null) {
14702                data = Connections.emptyConnection();
14703            } else {
14704                try(var objectLimiter = new ObjectLimiter(env, ContactListFrequencyConstants.COMPONENT_VENDOR_NAME, ContactListFrequencyConstants.ENTITY_TYPE_NAME, totalEntities)) {
14705                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14706
14707                    var contactListFrequencies = entities.stream()
14708                            .map(ContactListFrequencyObject::new)
14709                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14710
14711                    data = new CountedObjects<>(objectLimiter, contactListFrequencies);
14712                }
14713            }
14714        } catch (NamingException ex) {
14715            throw new RuntimeException(ex);
14716        }
14717
14718        return data;
14719    }
14720
14721    @GraphQLField
14722    @GraphQLName("contactMechanismPurpose")
14723    static ContactMechanismPurposeObject contactMechanismPurpose(final DataFetchingEnvironment env,
14724            @GraphQLName("contactMechanismPurposeName") final String contactMechanismPurposeName,
14725            @GraphQLName("id") @GraphQLID final String id) {
14726        ContactMechanismPurpose contactMechanismPurpose;
14727
14728        try {
14729            var commandForm = ContactUtil.getHome().getGetContactMechanismPurposeForm();
14730
14731            commandForm.setContactMechanismPurposeName(contactMechanismPurposeName);
14732            commandForm.setUuid(id);
14733
14734            contactMechanismPurpose = CDI.current().select(GetContactMechanismPurposeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14735        } catch (NamingException ex) {
14736            throw new RuntimeException(ex);
14737        }
14738
14739        return contactMechanismPurpose == null ? null : new ContactMechanismPurposeObject(contactMechanismPurpose);
14740    }
14741
14742    @GraphQLField
14743    @GraphQLName("contactMechanismPurposes")
14744    @GraphQLNonNull
14745    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14746    static CountingPaginatedData<ContactMechanismPurposeObject> contactMechanismPurposes(final DataFetchingEnvironment env) {
14747        CountingPaginatedData<ContactMechanismPurposeObject> data;
14748
14749        try {
14750            var commandForm = ContactUtil.getHome().getGetContactMechanismPurposesForm();
14751            var command = CDI.current().select(GetContactMechanismPurposesCommand.class).get();
14752
14753            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14754            if(totalEntities == null) {
14755                data = Connections.emptyConnection();
14756            } else {
14757                try(var objectLimiter = new ObjectLimiter(env, ContactMechanismPurposeConstants.COMPONENT_VENDOR_NAME, ContactMechanismPurposeConstants.ENTITY_TYPE_NAME, totalEntities)) {
14758                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14759
14760                    var contactMechanismPurposes = entities.stream()
14761                            .map(ContactMechanismPurposeObject::new)
14762                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14763
14764                    data = new CountedObjects<>(objectLimiter, contactMechanismPurposes);
14765                }
14766            }
14767        } catch (NamingException ex) {
14768            throw new RuntimeException(ex);
14769        }
14770
14771        return data;
14772    }
14773
14774    @GraphQLField
14775    @GraphQLName("contactListGroup")
14776    static ContactListGroupObject contactListGroup(final DataFetchingEnvironment env,
14777            @GraphQLName("contactListGroupName") final String contactListGroupName,
14778            @GraphQLName("id") @GraphQLID final String id) {
14779        ContactListGroup contactListGroup;
14780
14781        try {
14782            var commandForm = ContactListUtil.getHome().getGetContactListGroupForm();
14783
14784            commandForm.setContactListGroupName(contactListGroupName);
14785            commandForm.setUuid(id);
14786
14787            contactListGroup = CDI.current().select(GetContactListGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14788        } catch (NamingException ex) {
14789            throw new RuntimeException(ex);
14790        }
14791
14792        return contactListGroup == null ? null : new ContactListGroupObject(contactListGroup);
14793    }
14794
14795    @GraphQLField
14796    @GraphQLName("contactListGroups")
14797    @GraphQLNonNull
14798    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14799    static CountingPaginatedData<ContactListGroupObject> contactListGroups(final DataFetchingEnvironment env) {
14800        CountingPaginatedData<ContactListGroupObject> data;
14801
14802        try {
14803            var commandForm = ContactListUtil.getHome().getGetContactListGroupsForm();
14804            var command = CDI.current().select(GetContactListGroupsCommand.class).get();
14805
14806            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14807            if(totalEntities == null) {
14808                data = Connections.emptyConnection();
14809            } else {
14810                try(var objectLimiter = new ObjectLimiter(env, ContactListGroupConstants.COMPONENT_VENDOR_NAME, ContactListGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
14811                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14812
14813                    var contactListGroups = entities.stream()
14814                            .map(ContactListGroupObject::new)
14815                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14816
14817                    data = new CountedObjects<>(objectLimiter, contactListGroups);
14818                }
14819            }
14820        } catch (NamingException ex) {
14821            throw new RuntimeException(ex);
14822        }
14823
14824        return data;
14825    }
14826
14827    @GraphQLField
14828    @GraphQLName("customerTypeContactListGroup")
14829    static CustomerTypeContactListGroupObject customerTypeContactListGroup(final DataFetchingEnvironment env,
14830            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName,
14831            @GraphQLName("contactListGroupName") @GraphQLNonNull final String contactListGroupName) {
14832        CustomerTypeContactListGroup customerTypeContactListGroup;
14833
14834        try {
14835            var commandForm = ContactListUtil.getHome().getGetCustomerTypeContactListGroupForm();
14836
14837            commandForm.setCustomerTypeName(customerTypeName);
14838            commandForm.setContactListGroupName(contactListGroupName);
14839
14840            customerTypeContactListGroup = CDI.current().select(GetCustomerTypeContactListGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14841        } catch (NamingException ex) {
14842            throw new RuntimeException(ex);
14843        }
14844
14845        return customerTypeContactListGroup == null ? null : new CustomerTypeContactListGroupObject(customerTypeContactListGroup);
14846    }
14847
14848    @GraphQLField
14849    @GraphQLName("customerTypeContactListGroups")
14850    @GraphQLNonNull
14851    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14852    static CountingPaginatedData<CustomerTypeContactListGroupObject> customerTypeContactListGroups(final DataFetchingEnvironment env,
14853            @GraphQLName("customerTypeName") final String customerTypeName,
14854            @GraphQLName("contactListGroupName") final String contactListGroupName) {
14855        CountingPaginatedData<CustomerTypeContactListGroupObject> data;
14856
14857        try {
14858            var commandForm = ContactListUtil.getHome().getGetCustomerTypeContactListGroupsForm();
14859            var command = CDI.current().select(GetCustomerTypeContactListGroupsCommand.class).get();
14860
14861            commandForm.setCustomerTypeName(customerTypeName);
14862            commandForm.setContactListGroupName(contactListGroupName);
14863
14864            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14865            if(totalEntities == null) {
14866                data = Connections.emptyConnection();
14867            } else {
14868                try(var objectLimiter = new ObjectLimiter(env, CustomerTypeContactListGroupConstants.COMPONENT_VENDOR_NAME, CustomerTypeContactListGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
14869                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14870
14871                    var customerTypeContactListGroups = entities.stream()
14872                            .map(CustomerTypeContactListGroupObject::new)
14873                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14874
14875                    data = new CountedObjects<>(objectLimiter, customerTypeContactListGroups);
14876                }
14877            }
14878        } catch (NamingException ex) {
14879            throw new RuntimeException(ex);
14880        }
14881
14882        return data;
14883    }
14884
14885    @GraphQLField
14886    @GraphQLName("partyTypeContactListGroup")
14887    static PartyTypeContactListGroupObject partyTypeContactListGroup(final DataFetchingEnvironment env,
14888            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName,
14889            @GraphQLName("contactListGroupName") @GraphQLNonNull final String contactListGroupName) {
14890        PartyTypeContactListGroup partyTypeContactListGroup;
14891
14892        try {
14893            var commandForm = ContactListUtil.getHome().getGetPartyTypeContactListGroupForm();
14894
14895            commandForm.setPartyTypeName(partyTypeName);
14896            commandForm.setContactListGroupName(contactListGroupName);
14897
14898            partyTypeContactListGroup = CDI.current().select(GetPartyTypeContactListGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14899        } catch (NamingException ex) {
14900            throw new RuntimeException(ex);
14901        }
14902
14903        return partyTypeContactListGroup == null ? null : new PartyTypeContactListGroupObject(partyTypeContactListGroup);
14904    }
14905
14906    @GraphQLField
14907    @GraphQLName("partyTypeContactListGroups")
14908    @GraphQLNonNull
14909    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14910    static CountingPaginatedData<PartyTypeContactListGroupObject> partyTypeContactListGroups(final DataFetchingEnvironment env,
14911            @GraphQLName("partyTypeName") final String partyTypeName,
14912            @GraphQLName("contactListGroupName") final String contactListGroupName) {
14913        CountingPaginatedData<PartyTypeContactListGroupObject> data;
14914
14915        try {
14916            var commandForm = ContactListUtil.getHome().getGetPartyTypeContactListGroupsForm();
14917            var command = CDI.current().select(GetPartyTypeContactListGroupsCommand.class).get();
14918
14919            commandForm.setPartyTypeName(partyTypeName);
14920            commandForm.setContactListGroupName(contactListGroupName);
14921
14922            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14923            if(totalEntities == null) {
14924                data = Connections.emptyConnection();
14925            } else {
14926                try(var objectLimiter = new ObjectLimiter(env, PartyTypeContactListGroupConstants.COMPONENT_VENDOR_NAME, PartyTypeContactListGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
14927                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14928
14929                    var partyTypeContactListGroups = entities.stream()
14930                            .map(PartyTypeContactListGroupObject::new)
14931                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14932
14933                    data = new CountedObjects<>(objectLimiter, partyTypeContactListGroups);
14934                }
14935            }
14936        } catch (NamingException ex) {
14937            throw new RuntimeException(ex);
14938        }
14939
14940        return data;
14941    }
14942
14943    @GraphQLField
14944    @GraphQLName("contactListType")
14945    static ContactListTypeObject contactListType(final DataFetchingEnvironment env,
14946            @GraphQLName("contactListTypeName") final String contactListTypeName,
14947            @GraphQLName("id") @GraphQLID final String id) {
14948        ContactListType contactListType;
14949
14950        try {
14951            var commandForm = ContactListUtil.getHome().getGetContactListTypeForm();
14952
14953            commandForm.setContactListTypeName(contactListTypeName);
14954            commandForm.setUuid(id);
14955
14956            contactListType = CDI.current().select(GetContactListTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14957        } catch (NamingException ex) {
14958            throw new RuntimeException(ex);
14959        }
14960
14961        return contactListType == null ? null : new ContactListTypeObject(contactListType);
14962    }
14963
14964    @GraphQLField
14965    @GraphQLName("contactListTypes")
14966    @GraphQLNonNull
14967    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14968    static CountingPaginatedData<ContactListTypeObject> contactListTypes(final DataFetchingEnvironment env) {
14969        CountingPaginatedData<ContactListTypeObject> data;
14970
14971        try {
14972            var commandForm = ContactListUtil.getHome().getGetContactListTypesForm();
14973            var command = CDI.current().select(GetContactListTypesCommand.class).get();
14974
14975            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14976            if(totalEntities == null) {
14977                data = Connections.emptyConnection();
14978            } else {
14979                try(var objectLimiter = new ObjectLimiter(env, ContactListTypeConstants.COMPONENT_VENDOR_NAME, ContactListTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
14980                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14981
14982                    var contactListTypes = entities.stream()
14983                            .map(ContactListTypeObject::new)
14984                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14985
14986                    data = new CountedObjects<>(objectLimiter, contactListTypes);
14987                }
14988            }
14989        } catch (NamingException ex) {
14990            throw new RuntimeException(ex);
14991        }
14992
14993        return data;
14994    }
14995
14996    @GraphQLField
14997    @GraphQLName("contactList")
14998    static ContactListObject contactList(final DataFetchingEnvironment env,
14999            @GraphQLName("contactListName") final String contactListName,
15000            @GraphQLName("id") @GraphQLID final String id) {
15001        ContactList contactList;
15002
15003        try {
15004            var commandForm = ContactListUtil.getHome().getGetContactListForm();
15005
15006            commandForm.setContactListName(contactListName);
15007            commandForm.setUuid(id);
15008
15009            contactList = CDI.current().select(GetContactListCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15010        } catch (NamingException ex) {
15011            throw new RuntimeException(ex);
15012        }
15013
15014        return contactList == null ? null : new ContactListObject(contactList);
15015    }
15016
15017    @GraphQLField
15018    @GraphQLName("contactLists")
15019    @GraphQLNonNull
15020    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15021    static CountingPaginatedData<ContactListObject> contactLists(final DataFetchingEnvironment env) {
15022        CountingPaginatedData<ContactListObject> data;
15023
15024        try {
15025            var commandForm = ContactListUtil.getHome().getGetContactListsForm();
15026            var command = CDI.current().select(GetContactListsCommand.class).get();
15027
15028            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15029            if(totalEntities == null) {
15030                data = Connections.emptyConnection();
15031            } else {
15032                try(var objectLimiter = new ObjectLimiter(env, ContactListConstants.COMPONENT_VENDOR_NAME, ContactListConstants.ENTITY_TYPE_NAME, totalEntities)) {
15033                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15034
15035                    var contactLists = entities.stream()
15036                            .map(ContactListObject::new)
15037                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15038
15039                    data = new CountedObjects<>(objectLimiter, contactLists);
15040                }
15041            }
15042        } catch (NamingException ex) {
15043            throw new RuntimeException(ex);
15044        }
15045
15046        return data;
15047    }
15048
15049    @GraphQLField
15050    @GraphQLName("customerTypeContactList")
15051    static CustomerTypeContactListObject customerTypeContactList(final DataFetchingEnvironment env,
15052            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName,
15053            @GraphQLName("contactListName") @GraphQLNonNull final String contactListName) {
15054        CustomerTypeContactList customerTypeContactList;
15055
15056        try {
15057            var commandForm = ContactListUtil.getHome().getGetCustomerTypeContactListForm();
15058
15059            commandForm.setCustomerTypeName(customerTypeName);
15060            commandForm.setContactListName(contactListName);
15061
15062            customerTypeContactList = CDI.current().select(GetCustomerTypeContactListCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15063        } catch (NamingException ex) {
15064            throw new RuntimeException(ex);
15065        }
15066
15067        return customerTypeContactList == null ? null : new CustomerTypeContactListObject(customerTypeContactList);
15068    }
15069
15070    @GraphQLField
15071    @GraphQLName("customerTypeContactLists")
15072    @GraphQLNonNull
15073    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15074    static CountingPaginatedData<CustomerTypeContactListObject> customerTypeContactLists(final DataFetchingEnvironment env,
15075            @GraphQLName("customerTypeName") final String customerTypeName,
15076            @GraphQLName("contactListName") final String contactListName) {
15077        CountingPaginatedData<CustomerTypeContactListObject> data;
15078
15079        try {
15080            var commandForm = ContactListUtil.getHome().getGetCustomerTypeContactListsForm();
15081            var command = CDI.current().select(GetCustomerTypeContactListsCommand.class).get();
15082
15083            commandForm.setCustomerTypeName(customerTypeName);
15084            commandForm.setContactListName(contactListName);
15085
15086            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15087            if(totalEntities == null) {
15088                data = Connections.emptyConnection();
15089            } else {
15090                try(var objectLimiter = new ObjectLimiter(env, CustomerTypeContactListConstants.COMPONENT_VENDOR_NAME, CustomerTypeContactListConstants.ENTITY_TYPE_NAME, totalEntities)) {
15091                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15092
15093                    var customerTypeContactLists = entities.stream()
15094                            .map(CustomerTypeContactListObject::new)
15095                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15096
15097                    data = new CountedObjects<>(objectLimiter, customerTypeContactLists);
15098                }
15099            }
15100        } catch (NamingException ex) {
15101            throw new RuntimeException(ex);
15102        }
15103
15104        return data;
15105    }
15106
15107    @GraphQLField
15108    @GraphQLName("partyTypeContactList")
15109    static PartyTypeContactListObject partyTypeContactList(final DataFetchingEnvironment env,
15110            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName,
15111            @GraphQLName("contactListName") @GraphQLNonNull final String contactListName) {
15112        PartyTypeContactList partyTypeContactList;
15113
15114        try {
15115            var commandForm = ContactListUtil.getHome().getGetPartyTypeContactListForm();
15116
15117            commandForm.setPartyTypeName(partyTypeName);
15118            commandForm.setContactListName(contactListName);
15119
15120            partyTypeContactList = CDI.current().select(GetPartyTypeContactListCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15121        } catch (NamingException ex) {
15122            throw new RuntimeException(ex);
15123        }
15124
15125        return partyTypeContactList == null ? null : new PartyTypeContactListObject(partyTypeContactList);
15126    }
15127
15128    @GraphQLField
15129    @GraphQLName("partyTypeContactLists")
15130    @GraphQLNonNull
15131    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15132    static CountingPaginatedData<PartyTypeContactListObject> partyTypeContactLists(final DataFetchingEnvironment env,
15133            @GraphQLName("partyTypeName") final String partyTypeName,
15134            @GraphQLName("contactListName") final String contactListName) {
15135        CountingPaginatedData<PartyTypeContactListObject> data;
15136
15137        try {
15138            var commandForm = ContactListUtil.getHome().getGetPartyTypeContactListsForm();
15139            var command = CDI.current().select(GetPartyTypeContactListsCommand.class).get();
15140
15141            commandForm.setPartyTypeName(partyTypeName);
15142            commandForm.setContactListName(contactListName);
15143
15144            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15145            if(totalEntities == null) {
15146                data = Connections.emptyConnection();
15147            } else {
15148                try(var objectLimiter = new ObjectLimiter(env, PartyTypeContactListConstants.COMPONENT_VENDOR_NAME, PartyTypeContactListConstants.ENTITY_TYPE_NAME, totalEntities)) {
15149                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15150
15151                    var partyTypeContactLists = entities.stream()
15152                            .map(PartyTypeContactListObject::new)
15153                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15154
15155                    data = new CountedObjects<>(objectLimiter, partyTypeContactLists);
15156                }
15157            }
15158        } catch (NamingException ex) {
15159            throw new RuntimeException(ex);
15160        }
15161
15162        return data;
15163    }
15164
15165    @GraphQLField
15166    @GraphQLName("partyContactList")
15167    static PartyContactListObject partyContactList(final DataFetchingEnvironment env,
15168            @GraphQLName("partyName") final String partyName,
15169            @GraphQLName("contactListName") final String contactListName,
15170            @GraphQLName("id") @GraphQLID final String id) {
15171        PartyContactList partyContactList;
15172
15173        try {
15174            var commandForm = ContactListUtil.getHome().getGetPartyContactListForm();
15175
15176            commandForm.setPartyName(partyName);
15177            commandForm.setContactListName(contactListName);
15178            commandForm.setUuid(id);
15179
15180            partyContactList = CDI.current().select(GetPartyContactListCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15181        } catch (NamingException ex) {
15182            throw new RuntimeException(ex);
15183        }
15184
15185        return partyContactList == null ? null : new PartyContactListObject(partyContactList);
15186    }
15187
15188    @GraphQLField
15189    @GraphQLName("partyContactLists")
15190    @GraphQLNonNull
15191    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15192    static CountingPaginatedData<PartyContactListObject> partyContactLists(final DataFetchingEnvironment env,
15193            @GraphQLName("partyName") final String partyName,
15194            @GraphQLName("contactListName") final String contactListName) {
15195        CountingPaginatedData<PartyContactListObject> data;
15196
15197        try {
15198            var commandForm = ContactListUtil.getHome().getGetPartyContactListsForm();
15199            var command = CDI.current().select(GetPartyContactListsCommand.class).get();
15200
15201            commandForm.setPartyName(partyName);
15202            commandForm.setContactListName(contactListName);
15203
15204            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15205            if(totalEntities == null) {
15206                data = Connections.emptyConnection();
15207            } else {
15208                try(var objectLimiter = new ObjectLimiter(env, PartyContactListConstants.COMPONENT_VENDOR_NAME, PartyContactListConstants.ENTITY_TYPE_NAME, totalEntities)) {
15209                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15210
15211                    var partyContactLists = entities.stream()
15212                            .map(PartyContactListObject::new)
15213                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15214
15215                    data = new CountedObjects<>(objectLimiter, partyContactLists);
15216                }
15217            }
15218        } catch (NamingException ex) {
15219            throw new RuntimeException(ex);
15220        }
15221
15222        return data;
15223    }
15224
15225    @GraphQLField
15226    @GraphQLName("contactListContactMechanismPurpose")
15227    static ContactListContactMechanismPurposeObject contactListContactMechanismPurpose(final DataFetchingEnvironment env,
15228            @GraphQLName("contactListName") final String contactListName,
15229            @GraphQLName("contactMechanismPurposeName") final String contactMechanismPurposeName) {
15230        ContactListContactMechanismPurpose contactListContactMechanismPurpose = null;
15231
15232        try {
15233            var commandForm = ContactListUtil.getHome().getGetContactListContactMechanismPurposeForm();
15234
15235            commandForm.setContactListName(contactListName);
15236            commandForm.setContactMechanismPurposeName(contactMechanismPurposeName);
15237
15238            contactListContactMechanismPurpose = CDI.current().select(GetContactListContactMechanismPurposeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15239        } catch (NamingException ex) {
15240            throw new RuntimeException(ex);
15241        }
15242
15243        return contactListContactMechanismPurpose == null ? null : new ContactListContactMechanismPurposeObject(contactListContactMechanismPurpose);
15244    }
15245
15246    @GraphQLField
15247    @GraphQLName("contactListContactMechanismPurposes")
15248    @GraphQLNonNull
15249    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15250    static CountingPaginatedData<ContactListContactMechanismPurposeObject> contactListContactMechanismPurposes(final DataFetchingEnvironment env,
15251            @GraphQLName("contactListName") final String contactListName) {
15252        CountingPaginatedData<ContactListContactMechanismPurposeObject> data;
15253
15254        try {
15255            var commandForm = ContactListUtil.getHome().getGetContactListContactMechanismPurposesForm();
15256            var command = CDI.current().select(GetContactListContactMechanismPurposesCommand.class).get();
15257
15258            commandForm.setContactListName(contactListName);
15259
15260            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15261            if(totalEntities == null) {
15262                data = Connections.emptyConnection();
15263            } else {
15264                try(var objectLimiter = new ObjectLimiter(env, ContactListContactMechanismPurposeConstants.COMPONENT_VENDOR_NAME, ContactListContactMechanismPurposeConstants.ENTITY_TYPE_NAME, totalEntities)) {
15265                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15266
15267                    var contactListContactMechanismPurposes = entities.stream()
15268                            .map(ContactListContactMechanismPurposeObject::new)
15269                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15270
15271                    data = new CountedObjects<>(objectLimiter, contactListContactMechanismPurposes);
15272                }
15273            }
15274        } catch (NamingException ex) {
15275            throw new RuntimeException(ex);
15276        }
15277
15278        return data;
15279    }
15280
15281}