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.accounting.common.AccountingUtil;
020import com.echothree.control.user.accounting.server.command.GetCurrenciesCommand;
021import com.echothree.control.user.accounting.server.command.GetCurrencyCommand;
022import com.echothree.control.user.accounting.server.command.GetGlAccountCategoriesCommand;
023import com.echothree.control.user.accounting.server.command.GetGlAccountCategoryCommand;
024import com.echothree.control.user.accounting.server.command.GetGlAccountClassCommand;
025import com.echothree.control.user.accounting.server.command.GetGlAccountClassesCommand;
026import com.echothree.control.user.accounting.server.command.GetGlAccountCommand;
027import com.echothree.control.user.accounting.server.command.GetGlAccountTypeCommand;
028import com.echothree.control.user.accounting.server.command.GetGlAccountTypesCommand;
029import com.echothree.control.user.accounting.server.command.GetGlAccountsCommand;
030import com.echothree.control.user.accounting.server.command.GetGlResourceTypeCommand;
031import com.echothree.control.user.accounting.server.command.GetGlResourceTypesCommand;
032import com.echothree.control.user.accounting.server.command.GetItemAccountingCategoriesCommand;
033import com.echothree.control.user.accounting.server.command.GetItemAccountingCategoryCommand;
034import com.echothree.control.user.accounting.server.command.GetSymbolPositionCommand;
035import com.echothree.control.user.accounting.server.command.GetSymbolPositionsCommand;
036import com.echothree.control.user.accounting.server.command.GetTransactionCommand;
037import com.echothree.control.user.accounting.server.command.GetTransactionEntityRoleTypeCommand;
038import com.echothree.control.user.accounting.server.command.GetTransactionEntityRoleTypesCommand;
039import com.echothree.control.user.accounting.server.command.GetTransactionGlAccountCategoriesCommand;
040import com.echothree.control.user.accounting.server.command.GetTransactionGlAccountCategoryCommand;
041import com.echothree.control.user.accounting.server.command.GetTransactionGroupCommand;
042import com.echothree.control.user.accounting.server.command.GetTransactionGroupsCommand;
043import com.echothree.control.user.accounting.server.command.GetTransactionTimeTypeCommand;
044import com.echothree.control.user.accounting.server.command.GetTransactionTimeTypesCommand;
045import com.echothree.control.user.accounting.server.command.GetTransactionTypeCommand;
046import com.echothree.control.user.accounting.server.command.GetTransactionTypesCommand;
047import com.echothree.control.user.accounting.server.command.GetTransactionsCommand;
048import com.echothree.control.user.campaign.common.CampaignUtil;
049import com.echothree.control.user.campaign.server.command.GetCampaignCommand;
050import com.echothree.control.user.campaign.server.command.GetCampaignContentCommand;
051import com.echothree.control.user.campaign.server.command.GetCampaignContentsCommand;
052import com.echothree.control.user.campaign.server.command.GetCampaignMediumCommand;
053import com.echothree.control.user.campaign.server.command.GetCampaignMediumsCommand;
054import com.echothree.control.user.campaign.server.command.GetCampaignSourceCommand;
055import com.echothree.control.user.campaign.server.command.GetCampaignSourcesCommand;
056import com.echothree.control.user.campaign.server.command.GetCampaignTermCommand;
057import com.echothree.control.user.campaign.server.command.GetCampaignTermsCommand;
058import com.echothree.control.user.campaign.server.command.GetCampaignsCommand;
059import com.echothree.control.user.cancellationpolicy.common.CancellationPolicyUtil;
060import com.echothree.control.user.cancellationpolicy.server.command.GetCancellationKindCommand;
061import com.echothree.control.user.cancellationpolicy.server.command.GetCancellationKindsCommand;
062import com.echothree.control.user.cancellationpolicy.server.command.GetCancellationPoliciesCommand;
063import com.echothree.control.user.cancellationpolicy.server.command.GetCancellationPolicyCommand;
064import com.echothree.control.user.chain.common.ChainUtil;
065import com.echothree.control.user.chain.server.command.GetChainActionCommand;
066import com.echothree.control.user.chain.server.command.GetChainActionSetCommand;
067import com.echothree.control.user.chain.server.command.GetChainActionSetsCommand;
068import com.echothree.control.user.chain.server.command.GetChainActionTypeCommand;
069import com.echothree.control.user.chain.server.command.GetChainActionTypesCommand;
070import com.echothree.control.user.chain.server.command.GetChainActionsCommand;
071import com.echothree.control.user.chain.server.command.GetChainCommand;
072import com.echothree.control.user.chain.server.command.GetChainEntityRoleTypeCommand;
073import com.echothree.control.user.chain.server.command.GetChainEntityRoleTypesCommand;
074import com.echothree.control.user.chain.server.command.GetChainInstanceCommand;
075import com.echothree.control.user.chain.server.command.GetChainInstancesCommand;
076import com.echothree.control.user.chain.server.command.GetChainKindCommand;
077import com.echothree.control.user.chain.server.command.GetChainKindsCommand;
078import com.echothree.control.user.chain.server.command.GetChainTypeCommand;
079import com.echothree.control.user.chain.server.command.GetChainTypesCommand;
080import com.echothree.control.user.chain.server.command.GetChainsCommand;
081import com.echothree.control.user.contact.common.ContactUtil;
082import com.echothree.control.user.contact.server.command.GetContactMechanismPurposeCommand;
083import com.echothree.control.user.contact.server.command.GetContactMechanismPurposesCommand;
084import com.echothree.control.user.contactlist.common.ContactListUtil;
085import com.echothree.control.user.contactlist.server.command.GetContactListCommand;
086import com.echothree.control.user.contactlist.server.command.GetContactListContactMechanismPurposeCommand;
087import com.echothree.control.user.contactlist.server.command.GetContactListContactMechanismPurposesCommand;
088import com.echothree.control.user.contactlist.server.command.GetContactListFrequenciesCommand;
089import com.echothree.control.user.contactlist.server.command.GetContactListFrequencyCommand;
090import com.echothree.control.user.contactlist.server.command.GetContactListGroupCommand;
091import com.echothree.control.user.contactlist.server.command.GetContactListGroupsCommand;
092import com.echothree.control.user.contactlist.server.command.GetContactListTypeCommand;
093import com.echothree.control.user.contactlist.server.command.GetContactListTypesCommand;
094import com.echothree.control.user.contactlist.server.command.GetContactListsCommand;
095import com.echothree.control.user.contactlist.server.command.GetCustomerTypeContactListCommand;
096import com.echothree.control.user.contactlist.server.command.GetCustomerTypeContactListGroupCommand;
097import com.echothree.control.user.contactlist.server.command.GetCustomerTypeContactListGroupsCommand;
098import com.echothree.control.user.contactlist.server.command.GetCustomerTypeContactListsCommand;
099import com.echothree.control.user.contactlist.server.command.GetPartyContactListCommand;
100import com.echothree.control.user.contactlist.server.command.GetPartyContactListsCommand;
101import com.echothree.control.user.contactlist.server.command.GetPartyTypeContactListCommand;
102import com.echothree.control.user.contactlist.server.command.GetPartyTypeContactListGroupCommand;
103import com.echothree.control.user.contactlist.server.command.GetPartyTypeContactListGroupsCommand;
104import com.echothree.control.user.contactlist.server.command.GetPartyTypeContactListsCommand;
105import com.echothree.control.user.content.common.ContentUtil;
106import com.echothree.control.user.content.server.command.GetContentCatalogCommand;
107import com.echothree.control.user.content.server.command.GetContentCatalogItemCommand;
108import com.echothree.control.user.content.server.command.GetContentCatalogItemsCommand;
109import com.echothree.control.user.content.server.command.GetContentCatalogsCommand;
110import com.echothree.control.user.content.server.command.GetContentCategoriesCommand;
111import com.echothree.control.user.content.server.command.GetContentCategoryCommand;
112import com.echothree.control.user.content.server.command.GetContentCategoryItemCommand;
113import com.echothree.control.user.content.server.command.GetContentCategoryItemsCommand;
114import com.echothree.control.user.content.server.command.GetContentCollectionCommand;
115import com.echothree.control.user.content.server.command.GetContentCollectionsCommand;
116import com.echothree.control.user.content.server.command.GetContentPageAreaCommand;
117import com.echothree.control.user.content.server.command.GetContentPageAreaTypeCommand;
118import com.echothree.control.user.content.server.command.GetContentPageAreaTypesCommand;
119import com.echothree.control.user.content.server.command.GetContentPageAreasCommand;
120import com.echothree.control.user.content.server.command.GetContentPageCommand;
121import com.echothree.control.user.content.server.command.GetContentPageLayoutAreaCommand;
122import com.echothree.control.user.content.server.command.GetContentPageLayoutAreasCommand;
123import com.echothree.control.user.content.server.command.GetContentPageLayoutCommand;
124import com.echothree.control.user.content.server.command.GetContentPageLayoutsCommand;
125import com.echothree.control.user.content.server.command.GetContentPagesCommand;
126import com.echothree.control.user.content.server.command.GetContentSectionCommand;
127import com.echothree.control.user.content.server.command.GetContentSectionsCommand;
128import com.echothree.control.user.content.server.command.GetContentWebAddressCommand;
129import com.echothree.control.user.content.server.command.GetContentWebAddressesCommand;
130import com.echothree.control.user.core.common.CoreUtil;
131import com.echothree.control.user.core.server.command.GetAppearanceCommand;
132import com.echothree.control.user.core.server.command.GetAppearancesCommand;
133import com.echothree.control.user.core.server.command.GetColorCommand;
134import com.echothree.control.user.core.server.command.GetColorsCommand;
135import com.echothree.control.user.core.server.command.GetComponentVendorCommand;
136import com.echothree.control.user.core.server.command.GetComponentVendorsCommand;
137import com.echothree.control.user.core.server.command.GetEntityAliasCommand;
138import com.echothree.control.user.core.server.command.GetEntityAliasTypeCommand;
139import com.echothree.control.user.core.server.command.GetEntityAliasTypesCommand;
140import com.echothree.control.user.core.server.command.GetEntityAliasesCommand;
141import com.echothree.control.user.core.server.command.GetEntityAttributeCommand;
142import com.echothree.control.user.core.server.command.GetEntityAttributeEntityAttributeGroupCommand;
143import com.echothree.control.user.core.server.command.GetEntityAttributeEntityAttributeGroupsCommand;
144import com.echothree.control.user.core.server.command.GetEntityAttributeGroupCommand;
145import com.echothree.control.user.core.server.command.GetEntityAttributeGroupsCommand;
146import com.echothree.control.user.core.server.command.GetEntityAttributeTypeCommand;
147import com.echothree.control.user.core.server.command.GetEntityAttributeTypesCommand;
148import com.echothree.control.user.core.server.command.GetEntityAttributesCommand;
149import com.echothree.control.user.core.server.command.GetEntityInstanceCommand;
150import com.echothree.control.user.core.server.command.GetEntityInstancesCommand;
151import com.echothree.control.user.core.server.command.GetEntityTypeCommand;
152import com.echothree.control.user.core.server.command.GetEntityTypesCommand;
153import com.echothree.control.user.core.server.command.GetEventTypeCommand;
154import com.echothree.control.user.core.server.command.GetEventTypesCommand;
155import com.echothree.control.user.core.server.command.GetEventsCommand;
156import com.echothree.control.user.core.server.command.GetFontStyleCommand;
157import com.echothree.control.user.core.server.command.GetFontStylesCommand;
158import com.echothree.control.user.core.server.command.GetFontWeightCommand;
159import com.echothree.control.user.core.server.command.GetFontWeightsCommand;
160import com.echothree.control.user.core.server.command.GetMimeTypeCommand;
161import com.echothree.control.user.core.server.command.GetMimeTypeFileExtensionCommand;
162import com.echothree.control.user.core.server.command.GetMimeTypeFileExtensionsCommand;
163import com.echothree.control.user.core.server.command.GetMimeTypeUsageTypeCommand;
164import com.echothree.control.user.core.server.command.GetMimeTypeUsageTypesCommand;
165import com.echothree.control.user.core.server.command.GetMimeTypesCommand;
166import com.echothree.control.user.core.server.command.GetTextDecorationCommand;
167import com.echothree.control.user.core.server.command.GetTextDecorationsCommand;
168import com.echothree.control.user.core.server.command.GetTextTransformationCommand;
169import com.echothree.control.user.core.server.command.GetTextTransformationsCommand;
170import com.echothree.control.user.customer.common.CustomerUtil;
171import com.echothree.control.user.customer.server.command.GetCustomerCommand;
172import com.echothree.control.user.customer.server.command.GetCustomerTypeCommand;
173import com.echothree.control.user.customer.server.command.GetCustomerTypePaymentMethodCommand;
174import com.echothree.control.user.customer.server.command.GetCustomerTypePaymentMethodsCommand;
175import com.echothree.control.user.customer.server.command.GetCustomerTypeShippingMethodCommand;
176import com.echothree.control.user.customer.server.command.GetCustomerTypeShippingMethodsCommand;
177import com.echothree.control.user.customer.server.command.GetCustomerTypesCommand;
178import com.echothree.control.user.customer.server.command.GetCustomersCommand;
179import com.echothree.control.user.employee.common.EmployeeUtil;
180import com.echothree.control.user.employee.server.command.GetEmployeeCommand;
181import com.echothree.control.user.employee.server.command.GetEmployeesCommand;
182import com.echothree.control.user.filter.common.FilterUtil;
183import com.echothree.control.user.filter.server.command.GetFilterAdjustmentAmountCommand;
184import com.echothree.control.user.filter.server.command.GetFilterAdjustmentAmountsCommand;
185import com.echothree.control.user.filter.server.command.GetFilterAdjustmentCommand;
186import com.echothree.control.user.filter.server.command.GetFilterAdjustmentFixedAmountCommand;
187import com.echothree.control.user.filter.server.command.GetFilterAdjustmentFixedAmountsCommand;
188import com.echothree.control.user.filter.server.command.GetFilterAdjustmentPercentCommand;
189import com.echothree.control.user.filter.server.command.GetFilterAdjustmentPercentsCommand;
190import com.echothree.control.user.filter.server.command.GetFilterAdjustmentSourceCommand;
191import com.echothree.control.user.filter.server.command.GetFilterAdjustmentSourcesCommand;
192import com.echothree.control.user.filter.server.command.GetFilterAdjustmentTypeCommand;
193import com.echothree.control.user.filter.server.command.GetFilterAdjustmentTypesCommand;
194import com.echothree.control.user.filter.server.command.GetFilterAdjustmentsCommand;
195import com.echothree.control.user.filter.server.command.GetFilterCommand;
196import com.echothree.control.user.filter.server.command.GetFilterEntranceStepCommand;
197import com.echothree.control.user.filter.server.command.GetFilterEntranceStepsCommand;
198import com.echothree.control.user.filter.server.command.GetFilterKindCommand;
199import com.echothree.control.user.filter.server.command.GetFilterKindsCommand;
200import com.echothree.control.user.filter.server.command.GetFilterStepCommand;
201import com.echothree.control.user.filter.server.command.GetFilterStepDestinationCommand;
202import com.echothree.control.user.filter.server.command.GetFilterStepDestinationsCommand;
203import com.echothree.control.user.filter.server.command.GetFilterStepElementCommand;
204import com.echothree.control.user.filter.server.command.GetFilterStepElementsCommand;
205import com.echothree.control.user.filter.server.command.GetFilterStepsCommand;
206import com.echothree.control.user.filter.server.command.GetFilterTypeCommand;
207import com.echothree.control.user.filter.server.command.GetFilterTypesCommand;
208import com.echothree.control.user.filter.server.command.GetFiltersCommand;
209import com.echothree.control.user.geo.common.GeoUtil;
210import com.echothree.control.user.geo.server.command.GetCitiesCommand;
211import com.echothree.control.user.geo.server.command.GetCityCommand;
212import com.echothree.control.user.geo.server.command.GetCountiesCommand;
213import com.echothree.control.user.geo.server.command.GetCountriesCommand;
214import com.echothree.control.user.geo.server.command.GetCountryCommand;
215import com.echothree.control.user.geo.server.command.GetCountyCommand;
216import com.echothree.control.user.geo.server.command.GetGeoCodeAliasCommand;
217import com.echothree.control.user.geo.server.command.GetGeoCodeAliasTypeCommand;
218import com.echothree.control.user.geo.server.command.GetGeoCodeAliasTypesCommand;
219import com.echothree.control.user.geo.server.command.GetGeoCodeAliasesCommand;
220import com.echothree.control.user.geo.server.command.GetGeoCodeCommand;
221import com.echothree.control.user.geo.server.command.GetGeoCodeCurrenciesCommand;
222import com.echothree.control.user.geo.server.command.GetGeoCodeCurrencyCommand;
223import com.echothree.control.user.geo.server.command.GetGeoCodeDateTimeFormatCommand;
224import com.echothree.control.user.geo.server.command.GetGeoCodeDateTimeFormatsCommand;
225import com.echothree.control.user.geo.server.command.GetGeoCodeLanguageCommand;
226import com.echothree.control.user.geo.server.command.GetGeoCodeLanguagesCommand;
227import com.echothree.control.user.geo.server.command.GetGeoCodeScopeCommand;
228import com.echothree.control.user.geo.server.command.GetGeoCodeScopesCommand;
229import com.echothree.control.user.geo.server.command.GetGeoCodeTimeZoneCommand;
230import com.echothree.control.user.geo.server.command.GetGeoCodeTimeZonesCommand;
231import com.echothree.control.user.geo.server.command.GetGeoCodeTypeCommand;
232import com.echothree.control.user.geo.server.command.GetGeoCodeTypesCommand;
233import com.echothree.control.user.geo.server.command.GetStateCommand;
234import com.echothree.control.user.geo.server.command.GetStatesCommand;
235import com.echothree.control.user.geo.server.command.GetZipCodeCommand;
236import com.echothree.control.user.geo.server.command.GetZipCodesCommand;
237import com.echothree.control.user.inventory.common.InventoryUtil;
238import com.echothree.control.user.inventory.server.command.GetAllocationPrioritiesCommand;
239import com.echothree.control.user.inventory.server.command.GetAllocationPriorityCommand;
240import com.echothree.control.user.inventory.server.command.GetInventoryAdjustmentTypeCommand;
241import com.echothree.control.user.inventory.server.command.GetInventoryAdjustmentTypesCommand;
242import com.echothree.control.user.inventory.server.command.GetInventoryBucketTypeCommand;
243import com.echothree.control.user.inventory.server.command.GetInventoryBucketTypesCommand;
244import com.echothree.control.user.inventory.server.command.GetInventoryConditionCommand;
245import com.echothree.control.user.inventory.server.command.GetInventoryConditionsCommand;
246import com.echothree.control.user.inventory.server.command.GetInventoryCostingMethodCommand;
247import com.echothree.control.user.inventory.server.command.GetInventoryCostingMethodsCommand;
248import com.echothree.control.user.inventory.server.command.GetInventoryCostingPoolCommand;
249import com.echothree.control.user.inventory.server.command.GetInventoryCostingPoolsCommand;
250import com.echothree.control.user.inventory.server.command.GetInventoryDispositionAdjustmentCommand;
251import com.echothree.control.user.inventory.server.command.GetInventoryDispositionAdjustmentsCommand;
252import com.echothree.control.user.inventory.server.command.GetInventoryDispositionCommand;
253import com.echothree.control.user.inventory.server.command.GetInventoryDispositionsCommand;
254import com.echothree.control.user.inventory.server.command.GetInventoryLayerBucketCommand;
255import com.echothree.control.user.inventory.server.command.GetInventoryLayerBucketsCommand;
256import com.echothree.control.user.inventory.server.command.GetInventoryLayerCommand;
257import com.echothree.control.user.inventory.server.command.GetInventoryLayersCommand;
258import com.echothree.control.user.inventory.server.command.GetInventoryLocationBucketCommand;
259import com.echothree.control.user.inventory.server.command.GetInventoryLocationBucketsCommand;
260import com.echothree.control.user.inventory.server.command.GetInventoryLocationCommand;
261import com.echothree.control.user.inventory.server.command.GetInventoryLocationGroupCommand;
262import com.echothree.control.user.inventory.server.command.GetInventoryLocationGroupsCommand;
263import com.echothree.control.user.inventory.server.command.GetInventoryLocationsCommand;
264import com.echothree.control.user.inventory.server.command.GetInventoryTransactionReasonCommand;
265import com.echothree.control.user.inventory.server.command.GetInventoryTransactionReasonsCommand;
266import com.echothree.control.user.inventory.server.command.GetInventoryTransactionRoleTypeCommand;
267import com.echothree.control.user.inventory.server.command.GetInventoryTransactionRoleTypesCommand;
268import com.echothree.control.user.inventory.server.command.GetInventoryTransactionTimeTypeCommand;
269import com.echothree.control.user.inventory.server.command.GetInventoryTransactionTimeTypesCommand;
270import com.echothree.control.user.inventory.server.command.GetInventoryTransactionTypeCommand;
271import com.echothree.control.user.inventory.server.command.GetInventoryTransactionTypesCommand;
272import com.echothree.control.user.inventory.server.command.GetLotCommand;
273import com.echothree.control.user.inventory.server.command.GetLotsCommand;
274import com.echothree.control.user.inventory.server.command.GetPartyBucketCommand;
275import com.echothree.control.user.inventory.server.command.GetPartyBucketsCommand;
276import com.echothree.control.user.inventory.server.command.GetPartyInventoryCostingMethodCommand;
277import com.echothree.control.user.inventory.server.command.GetPartyInventoryCostingMethodsCommand;
278import com.echothree.control.user.item.common.ItemUtil;
279import com.echothree.control.user.item.server.command.GetItemAliasChecksumTypeCommand;
280import com.echothree.control.user.item.server.command.GetItemAliasChecksumTypesCommand;
281import com.echothree.control.user.item.server.command.GetItemAliasCommand;
282import com.echothree.control.user.item.server.command.GetItemAliasTypeCommand;
283import com.echothree.control.user.item.server.command.GetItemAliasTypesCommand;
284import com.echothree.control.user.item.server.command.GetItemAliasesCommand;
285import com.echothree.control.user.item.server.command.GetItemCategoriesCommand;
286import com.echothree.control.user.item.server.command.GetItemCategoryCommand;
287import com.echothree.control.user.item.server.command.GetItemCommand;
288import com.echothree.control.user.item.server.command.GetItemDeliveryTypeCommand;
289import com.echothree.control.user.item.server.command.GetItemDeliveryTypesCommand;
290import com.echothree.control.user.item.server.command.GetItemDescriptionCommand;
291import com.echothree.control.user.item.server.command.GetItemDescriptionTypeCommand;
292import com.echothree.control.user.item.server.command.GetItemDescriptionTypeUseCommand;
293import com.echothree.control.user.item.server.command.GetItemDescriptionTypeUseTypeCommand;
294import com.echothree.control.user.item.server.command.GetItemDescriptionTypeUseTypesCommand;
295import com.echothree.control.user.item.server.command.GetItemDescriptionTypeUsesCommand;
296import com.echothree.control.user.item.server.command.GetItemDescriptionTypesCommand;
297import com.echothree.control.user.item.server.command.GetItemDescriptionsCommand;
298import com.echothree.control.user.item.server.command.GetItemImageTypeCommand;
299import com.echothree.control.user.item.server.command.GetItemImageTypesCommand;
300import com.echothree.control.user.item.server.command.GetItemInventoryTypeCommand;
301import com.echothree.control.user.item.server.command.GetItemInventoryTypesCommand;
302import com.echothree.control.user.item.server.command.GetItemPriceCommand;
303import com.echothree.control.user.item.server.command.GetItemPriceTypeCommand;
304import com.echothree.control.user.item.server.command.GetItemPriceTypesCommand;
305import com.echothree.control.user.item.server.command.GetItemPricesCommand;
306import com.echothree.control.user.item.server.command.GetItemTypeCommand;
307import com.echothree.control.user.item.server.command.GetItemTypesCommand;
308import com.echothree.control.user.item.server.command.GetItemUnitOfMeasureTypeCommand;
309import com.echothree.control.user.item.server.command.GetItemUnitOfMeasureTypesCommand;
310import com.echothree.control.user.item.server.command.GetItemUseTypeCommand;
311import com.echothree.control.user.item.server.command.GetItemUseTypesCommand;
312import com.echothree.control.user.item.server.command.GetItemVolumeTypeCommand;
313import com.echothree.control.user.item.server.command.GetItemVolumeTypesCommand;
314import com.echothree.control.user.item.server.command.GetItemWeightTypeCommand;
315import com.echothree.control.user.item.server.command.GetItemWeightTypesCommand;
316import com.echothree.control.user.item.server.command.GetItemsCommand;
317import com.echothree.control.user.item.server.command.GetRelatedItemCommand;
318import com.echothree.control.user.item.server.command.GetRelatedItemTypeCommand;
319import com.echothree.control.user.item.server.command.GetRelatedItemTypesCommand;
320import com.echothree.control.user.item.server.command.GetRelatedItemsCommand;
321import com.echothree.control.user.offer.common.OfferUtil;
322import com.echothree.control.user.offer.server.command.GetOfferCommand;
323import com.echothree.control.user.offer.server.command.GetOfferCustomerTypeCommand;
324import com.echothree.control.user.offer.server.command.GetOfferCustomerTypesCommand;
325import com.echothree.control.user.offer.server.command.GetOfferItemCommand;
326import com.echothree.control.user.offer.server.command.GetOfferItemPriceCommand;
327import com.echothree.control.user.offer.server.command.GetOfferItemPricesCommand;
328import com.echothree.control.user.offer.server.command.GetOfferItemsCommand;
329import com.echothree.control.user.offer.server.command.GetOfferNameElementCommand;
330import com.echothree.control.user.offer.server.command.GetOfferNameElementsCommand;
331import com.echothree.control.user.offer.server.command.GetOfferUseCommand;
332import com.echothree.control.user.offer.server.command.GetOfferUsesCommand;
333import com.echothree.control.user.offer.server.command.GetOffersCommand;
334import com.echothree.control.user.offer.server.command.GetUseCommand;
335import com.echothree.control.user.offer.server.command.GetUseNameElementCommand;
336import com.echothree.control.user.offer.server.command.GetUseNameElementsCommand;
337import com.echothree.control.user.offer.server.command.GetUseTypeCommand;
338import com.echothree.control.user.offer.server.command.GetUseTypesCommand;
339import com.echothree.control.user.offer.server.command.GetUsesCommand;
340import com.echothree.control.user.order.common.OrderUtil;
341import com.echothree.control.user.order.server.command.GetOrderPrioritiesCommand;
342import com.echothree.control.user.order.server.command.GetOrderPriorityCommand;
343import com.echothree.control.user.order.server.command.GetOrderTimeTypeCommand;
344import com.echothree.control.user.order.server.command.GetOrderTimeTypesCommand;
345import com.echothree.control.user.order.server.command.GetOrderTypeCommand;
346import com.echothree.control.user.order.server.command.GetOrderTypesCommand;
347import com.echothree.control.user.party.common.PartyUtil;
348import com.echothree.control.user.party.server.command.GetCompaniesCommand;
349import com.echothree.control.user.party.server.command.GetCompanyCommand;
350import com.echothree.control.user.party.server.command.GetDateTimeFormatCommand;
351import com.echothree.control.user.party.server.command.GetDateTimeFormatsCommand;
352import com.echothree.control.user.party.server.command.GetDepartmentCommand;
353import com.echothree.control.user.party.server.command.GetDepartmentsCommand;
354import com.echothree.control.user.party.server.command.GetDivisionCommand;
355import com.echothree.control.user.party.server.command.GetDivisionsCommand;
356import com.echothree.control.user.party.server.command.GetLanguageCommand;
357import com.echothree.control.user.party.server.command.GetLanguagesCommand;
358import com.echothree.control.user.party.server.command.GetNameSuffixesCommand;
359import com.echothree.control.user.party.server.command.GetPartiesCommand;
360import com.echothree.control.user.party.server.command.GetPartyAliasCommand;
361import com.echothree.control.user.party.server.command.GetPartyAliasTypeCommand;
362import com.echothree.control.user.party.server.command.GetPartyAliasTypesCommand;
363import com.echothree.control.user.party.server.command.GetPartyAliasesCommand;
364import com.echothree.control.user.party.server.command.GetPartyCommand;
365import com.echothree.control.user.party.server.command.GetPartyTypeCommand;
366import com.echothree.control.user.party.server.command.GetPartyTypesCommand;
367import com.echothree.control.user.party.server.command.GetPersonalTitlesCommand;
368import com.echothree.control.user.party.server.command.GetRoleTypeCommand;
369import com.echothree.control.user.party.server.command.GetRoleTypesCommand;
370import com.echothree.control.user.party.server.command.GetTimeZoneCommand;
371import com.echothree.control.user.party.server.command.GetTimeZonesCommand;
372import com.echothree.control.user.payment.common.PaymentUtil;
373import com.echothree.control.user.payment.server.command.GetPaymentMethodCommand;
374import com.echothree.control.user.payment.server.command.GetPaymentMethodTypeCommand;
375import com.echothree.control.user.payment.server.command.GetPaymentMethodTypesCommand;
376import com.echothree.control.user.payment.server.command.GetPaymentMethodsCommand;
377import com.echothree.control.user.payment.server.command.GetPaymentProcessorActionTypeCommand;
378import com.echothree.control.user.payment.server.command.GetPaymentProcessorActionTypesCommand;
379import com.echothree.control.user.payment.server.command.GetPaymentProcessorCommand;
380import com.echothree.control.user.payment.server.command.GetPaymentProcessorResultCodeCommand;
381import com.echothree.control.user.payment.server.command.GetPaymentProcessorResultCodesCommand;
382import com.echothree.control.user.payment.server.command.GetPaymentProcessorTransactionCommand;
383import com.echothree.control.user.payment.server.command.GetPaymentProcessorTransactionsCommand;
384import com.echothree.control.user.payment.server.command.GetPaymentProcessorTypeCodeCommand;
385import com.echothree.control.user.payment.server.command.GetPaymentProcessorTypeCodeTypeCommand;
386import com.echothree.control.user.payment.server.command.GetPaymentProcessorTypeCommand;
387import com.echothree.control.user.payment.server.command.GetPaymentProcessorTypesCommand;
388import com.echothree.control.user.payment.server.command.GetPaymentProcessorsCommand;
389import com.echothree.control.user.period.common.PeriodUtil;
390import com.echothree.control.user.period.server.command.GetPeriodKindCommand;
391import com.echothree.control.user.period.server.command.GetPeriodKindsCommand;
392import com.echothree.control.user.queue.common.QueueUtil;
393import com.echothree.control.user.queue.server.command.GetQueueTypeCommand;
394import com.echothree.control.user.queue.server.command.GetQueueTypesCommand;
395import com.echothree.control.user.returnpolicy.common.ReturnPolicyUtil;
396import com.echothree.control.user.returnpolicy.server.command.GetReturnKindCommand;
397import com.echothree.control.user.returnpolicy.server.command.GetReturnKindsCommand;
398import com.echothree.control.user.returnpolicy.server.command.GetReturnPoliciesCommand;
399import com.echothree.control.user.returnpolicy.server.command.GetReturnPolicyCommand;
400import com.echothree.control.user.search.common.SearchUtil;
401import com.echothree.control.user.search.server.command.GetComponentVendorResultsCommand;
402import com.echothree.control.user.search.server.command.GetContentCatalogItemResultsCommand;
403import com.echothree.control.user.search.server.command.GetContentCatalogResultsCommand;
404import com.echothree.control.user.search.server.command.GetContentCategoryResultsCommand;
405import com.echothree.control.user.search.server.command.GetCustomerResultsCommand;
406import com.echothree.control.user.search.server.command.GetEmployeeResultsCommand;
407import com.echothree.control.user.search.server.command.GetEntityAliasTypeResultsCommand;
408import com.echothree.control.user.search.server.command.GetEntityAttributeGroupResultsCommand;
409import com.echothree.control.user.search.server.command.GetEntityAttributeResultsCommand;
410import com.echothree.control.user.search.server.command.GetEntityListItemResultsCommand;
411import com.echothree.control.user.search.server.command.GetEntityTypeResultsCommand;
412import com.echothree.control.user.search.server.command.GetItemResultsCommand;
413import com.echothree.control.user.search.server.command.GetSearchCheckSpellingActionTypeCommand;
414import com.echothree.control.user.search.server.command.GetSearchCheckSpellingActionTypesCommand;
415import com.echothree.control.user.search.server.command.GetSearchDefaultOperatorCommand;
416import com.echothree.control.user.search.server.command.GetSearchDefaultOperatorsCommand;
417import com.echothree.control.user.search.server.command.GetSearchKindCommand;
418import com.echothree.control.user.search.server.command.GetSearchKindsCommand;
419import com.echothree.control.user.search.server.command.GetSearchResultActionTypeCommand;
420import com.echothree.control.user.search.server.command.GetSearchResultActionTypesCommand;
421import com.echothree.control.user.search.server.command.GetSearchSortDirectionCommand;
422import com.echothree.control.user.search.server.command.GetSearchSortDirectionsCommand;
423import com.echothree.control.user.search.server.command.GetSearchSortOrderCommand;
424import com.echothree.control.user.search.server.command.GetSearchSortOrdersCommand;
425import com.echothree.control.user.search.server.command.GetSearchTypeCommand;
426import com.echothree.control.user.search.server.command.GetSearchTypesCommand;
427import com.echothree.control.user.search.server.command.GetSearchUseTypeCommand;
428import com.echothree.control.user.search.server.command.GetSearchUseTypesCommand;
429import com.echothree.control.user.search.server.command.GetShippingMethodResultsCommand;
430import com.echothree.control.user.search.server.command.GetVendorResultsCommand;
431import com.echothree.control.user.search.server.command.GetWarehouseResultsCommand;
432import com.echothree.control.user.security.common.SecurityUtil;
433import com.echothree.control.user.security.server.command.GetSecurityRoleCommand;
434import com.echothree.control.user.security.server.command.GetSecurityRoleGroupCommand;
435import com.echothree.control.user.security.server.command.GetSecurityRoleGroupsCommand;
436import com.echothree.control.user.security.server.command.GetSecurityRolesCommand;
437import com.echothree.control.user.selector.common.SelectorUtil;
438import com.echothree.control.user.selector.server.command.GetSelectorCommand;
439import com.echothree.control.user.selector.server.command.GetSelectorKindCommand;
440import com.echothree.control.user.selector.server.command.GetSelectorKindsCommand;
441import com.echothree.control.user.selector.server.command.GetSelectorTypeCommand;
442import com.echothree.control.user.selector.server.command.GetSelectorTypesCommand;
443import com.echothree.control.user.selector.server.command.GetSelectorsCommand;
444import com.echothree.control.user.sequence.common.SequenceUtil;
445import com.echothree.control.user.sequence.server.command.GetSequenceChecksumTypeCommand;
446import com.echothree.control.user.sequence.server.command.GetSequenceChecksumTypesCommand;
447import com.echothree.control.user.sequence.server.command.GetSequenceCommand;
448import com.echothree.control.user.sequence.server.command.GetSequenceEncoderTypeCommand;
449import com.echothree.control.user.sequence.server.command.GetSequenceEncoderTypesCommand;
450import com.echothree.control.user.sequence.server.command.GetSequenceTypeCommand;
451import com.echothree.control.user.sequence.server.command.GetSequenceTypesCommand;
452import com.echothree.control.user.sequence.server.command.GetSequencesCommand;
453import com.echothree.control.user.shipment.common.ShipmentUtil;
454import com.echothree.control.user.shipment.server.command.GetFreeOnBoardCommand;
455import com.echothree.control.user.shipment.server.command.GetFreeOnBoardsCommand;
456import com.echothree.control.user.shipping.common.ShippingUtil;
457import com.echothree.control.user.shipping.server.command.GetShippingMethodCommand;
458import com.echothree.control.user.shipping.server.command.GetShippingMethodsCommand;
459import com.echothree.control.user.subscription.common.SubscriptionUtil;
460import com.echothree.control.user.subscription.server.command.GetSubscriptionCommand;
461import com.echothree.control.user.subscription.server.command.GetSubscriptionKindCommand;
462import com.echothree.control.user.subscription.server.command.GetSubscriptionKindsCommand;
463import com.echothree.control.user.subscription.server.command.GetSubscriptionTypeCommand;
464import com.echothree.control.user.subscription.server.command.GetSubscriptionTypesCommand;
465import com.echothree.control.user.subscription.server.command.GetSubscriptionsCommand;
466import com.echothree.control.user.tag.common.TagUtil;
467import com.echothree.control.user.tag.server.command.GetEntityTagCommand;
468import com.echothree.control.user.tag.server.command.GetEntityTagsCommand;
469import com.echothree.control.user.tag.server.command.GetTagCommand;
470import com.echothree.control.user.tag.server.command.GetTagScopeCommand;
471import com.echothree.control.user.tag.server.command.GetTagScopeEntityTypeCommand;
472import com.echothree.control.user.tag.server.command.GetTagScopeEntityTypesCommand;
473import com.echothree.control.user.tag.server.command.GetTagScopesCommand;
474import com.echothree.control.user.tag.server.command.GetTagsCommand;
475import com.echothree.control.user.term.common.TermUtil;
476import com.echothree.control.user.term.server.command.GetTermCommand;
477import com.echothree.control.user.term.server.command.GetTermTypeCommand;
478import com.echothree.control.user.term.server.command.GetTermTypesCommand;
479import com.echothree.control.user.term.server.command.GetTermsCommand;
480import com.echothree.control.user.uom.common.UomUtil;
481import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindCommand;
482import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindUseCommand;
483import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindUseTypeCommand;
484import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindUseTypesCommand;
485import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindUsesCommand;
486import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindsCommand;
487import com.echothree.control.user.uom.server.command.GetUnitOfMeasureTypeCommand;
488import com.echothree.control.user.uom.server.command.GetUnitOfMeasureTypesCommand;
489import com.echothree.control.user.user.common.UserUtil;
490import com.echothree.control.user.user.server.command.GetRecoveryQuestionCommand;
491import com.echothree.control.user.user.server.command.GetRecoveryQuestionsCommand;
492import com.echothree.control.user.user.server.command.GetUserLoginCommand;
493import com.echothree.control.user.user.server.command.GetUserVisitGroupCommand;
494import com.echothree.control.user.user.server.command.GetUserVisitGroupsCommand;
495import com.echothree.control.user.vendor.common.VendorUtil;
496import com.echothree.control.user.vendor.server.command.GetItemPurchasingCategoriesCommand;
497import com.echothree.control.user.vendor.server.command.GetItemPurchasingCategoryCommand;
498import com.echothree.control.user.vendor.server.command.GetVendorCommand;
499import com.echothree.control.user.vendor.server.command.GetVendorItemCommand;
500import com.echothree.control.user.vendor.server.command.GetVendorItemCostCommand;
501import com.echothree.control.user.vendor.server.command.GetVendorItemCostsCommand;
502import com.echothree.control.user.vendor.server.command.GetVendorItemsCommand;
503import com.echothree.control.user.vendor.server.command.GetVendorTypeCommand;
504import com.echothree.control.user.vendor.server.command.GetVendorTypesCommand;
505import com.echothree.control.user.vendor.server.command.GetVendorsCommand;
506import com.echothree.control.user.warehouse.common.WarehouseUtil;
507import com.echothree.control.user.warehouse.server.command.GetLocationCommand;
508import com.echothree.control.user.warehouse.server.command.GetLocationNameElementCommand;
509import com.echothree.control.user.warehouse.server.command.GetLocationNameElementsCommand;
510import com.echothree.control.user.warehouse.server.command.GetLocationTypeCommand;
511import com.echothree.control.user.warehouse.server.command.GetLocationTypesCommand;
512import com.echothree.control.user.warehouse.server.command.GetLocationUseTypeCommand;
513import com.echothree.control.user.warehouse.server.command.GetLocationUseTypesCommand;
514import com.echothree.control.user.warehouse.server.command.GetLocationsCommand;
515import com.echothree.control.user.warehouse.server.command.GetWarehouseCommand;
516import com.echothree.control.user.warehouse.server.command.GetWarehouseTypeCommand;
517import com.echothree.control.user.warehouse.server.command.GetWarehouseTypesCommand;
518import com.echothree.control.user.warehouse.server.command.GetWarehousesCommand;
519import com.echothree.control.user.wishlist.common.WishlistUtil;
520import com.echothree.control.user.wishlist.server.command.GetWishlistPrioritiesCommand;
521import com.echothree.control.user.wishlist.server.command.GetWishlistPriorityCommand;
522import com.echothree.control.user.wishlist.server.command.GetWishlistTypeCommand;
523import com.echothree.control.user.wishlist.server.command.GetWishlistTypesCommand;
524import com.echothree.control.user.workflow.common.WorkflowUtil;
525import com.echothree.control.user.workflow.server.command.GetWorkflowCommand;
526import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationCommand;
527import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationPartyTypeCommand;
528import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationPartyTypesCommand;
529import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationSecurityRoleCommand;
530import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationSecurityRolesCommand;
531import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationSelectorCommand;
532import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationSelectorsCommand;
533import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationStepCommand;
534import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationStepsCommand;
535import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationsCommand;
536import com.echothree.control.user.workflow.server.command.GetWorkflowEntityStatusesCommand;
537import com.echothree.control.user.workflow.server.command.GetWorkflowEntityTypeCommand;
538import com.echothree.control.user.workflow.server.command.GetWorkflowEntityTypesCommand;
539import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceCommand;
540import com.echothree.control.user.workflow.server.command.GetWorkflowEntrancePartyTypeCommand;
541import com.echothree.control.user.workflow.server.command.GetWorkflowEntrancePartyTypesCommand;
542import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceSecurityRoleCommand;
543import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceSecurityRolesCommand;
544import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceSelectorCommand;
545import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceSelectorsCommand;
546import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceStepCommand;
547import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceStepsCommand;
548import com.echothree.control.user.workflow.server.command.GetWorkflowEntrancesCommand;
549import com.echothree.control.user.workflow.server.command.GetWorkflowSelectorKindCommand;
550import com.echothree.control.user.workflow.server.command.GetWorkflowSelectorKindsCommand;
551import com.echothree.control.user.workflow.server.command.GetWorkflowStepCommand;
552import com.echothree.control.user.workflow.server.command.GetWorkflowStepTypeCommand;
553import com.echothree.control.user.workflow.server.command.GetWorkflowStepTypesCommand;
554import com.echothree.control.user.workflow.server.command.GetWorkflowStepsCommand;
555import com.echothree.control.user.workflow.server.command.GetWorkflowsCommand;
556import com.echothree.model.control.accounting.server.graphql.CurrencyObject;
557import com.echothree.model.control.accounting.server.graphql.GlAccountCategoryObject;
558import com.echothree.model.control.accounting.server.graphql.GlAccountClassObject;
559import com.echothree.model.control.accounting.server.graphql.GlAccountObject;
560import com.echothree.model.control.accounting.server.graphql.GlAccountTypeObject;
561import com.echothree.model.control.accounting.server.graphql.GlResourceTypeObject;
562import com.echothree.model.control.accounting.server.graphql.ItemAccountingCategoryObject;
563import com.echothree.model.control.accounting.server.graphql.SymbolPositionObject;
564import com.echothree.model.control.accounting.server.graphql.TransactionEntityRoleTypeObject;
565import com.echothree.model.control.accounting.server.graphql.TransactionGlAccountCategoryObject;
566import com.echothree.model.control.accounting.server.graphql.TransactionGroupObject;
567import com.echothree.model.control.accounting.server.graphql.TransactionObject;
568import com.echothree.model.control.accounting.server.graphql.TransactionTimeTypeObject;
569import com.echothree.model.control.accounting.server.graphql.TransactionTypeObject;
570import com.echothree.model.control.campaign.server.graphql.CampaignContentObject;
571import com.echothree.model.control.campaign.server.graphql.CampaignMediumObject;
572import com.echothree.model.control.campaign.server.graphql.CampaignObject;
573import com.echothree.model.control.campaign.server.graphql.CampaignSourceObject;
574import com.echothree.model.control.campaign.server.graphql.CampaignTermObject;
575import com.echothree.model.control.cancellationpolicy.server.graphql.CancellationKindObject;
576import com.echothree.model.control.cancellationpolicy.server.graphql.CancellationPolicyObject;
577import com.echothree.model.control.chain.server.graphql.ChainActionObject;
578import com.echothree.model.control.chain.server.graphql.ChainActionSetObject;
579import com.echothree.model.control.chain.server.graphql.ChainActionTypeObject;
580import com.echothree.model.control.chain.server.graphql.ChainEntityRoleTypeObject;
581import com.echothree.model.control.chain.server.graphql.ChainInstanceObject;
582import com.echothree.model.control.chain.server.graphql.ChainKindObject;
583import com.echothree.model.control.chain.server.graphql.ChainObject;
584import com.echothree.model.control.chain.server.graphql.ChainTypeObject;
585import com.echothree.model.control.contact.server.graphql.ContactMechanismPurposeObject;
586import com.echothree.model.control.contactlist.server.graphql.ContactListContactMechanismPurposeObject;
587import com.echothree.model.control.contactlist.server.graphql.ContactListFrequencyObject;
588import com.echothree.model.control.contactlist.server.graphql.ContactListGroupObject;
589import com.echothree.model.control.contactlist.server.graphql.ContactListObject;
590import com.echothree.model.control.contactlist.server.graphql.ContactListTypeObject;
591import com.echothree.model.control.contactlist.server.graphql.CustomerTypeContactListGroupObject;
592import com.echothree.model.control.contactlist.server.graphql.CustomerTypeContactListObject;
593import com.echothree.model.control.contactlist.server.graphql.PartyContactListObject;
594import com.echothree.model.control.contactlist.server.graphql.PartyTypeContactListGroupObject;
595import com.echothree.model.control.contactlist.server.graphql.PartyTypeContactListObject;
596import com.echothree.model.control.content.server.graphql.ContentCatalogItemObject;
597import com.echothree.model.control.content.server.graphql.ContentCatalogObject;
598import com.echothree.model.control.content.server.graphql.ContentCategoryItemObject;
599import com.echothree.model.control.content.server.graphql.ContentCategoryObject;
600import com.echothree.model.control.content.server.graphql.ContentCollectionObject;
601import com.echothree.model.control.content.server.graphql.ContentPageAreaObject;
602import com.echothree.model.control.content.server.graphql.ContentPageAreaTypeObject;
603import com.echothree.model.control.content.server.graphql.ContentPageLayoutAreaObject;
604import com.echothree.model.control.content.server.graphql.ContentPageLayoutObject;
605import com.echothree.model.control.content.server.graphql.ContentPageObject;
606import com.echothree.model.control.content.server.graphql.ContentSectionObject;
607import com.echothree.model.control.content.server.graphql.ContentWebAddressObject;
608import com.echothree.model.control.core.server.graphql.AppearanceObject;
609import com.echothree.model.control.core.server.graphql.ColorObject;
610import com.echothree.model.control.core.server.graphql.ComponentVendorObject;
611import com.echothree.model.control.core.server.graphql.EntityAliasObject;
612import com.echothree.model.control.core.server.graphql.EntityAliasTypeObject;
613import com.echothree.model.control.core.server.graphql.EntityAttributeEntityAttributeGroupObject;
614import com.echothree.model.control.core.server.graphql.EntityAttributeGroupObject;
615import com.echothree.model.control.core.server.graphql.EntityAttributeObject;
616import com.echothree.model.control.core.server.graphql.EntityAttributeTypeObject;
617import com.echothree.model.control.core.server.graphql.EntityInstanceObject;
618import com.echothree.model.control.core.server.graphql.EntityTypeObject;
619import com.echothree.model.control.core.server.graphql.EventObject;
620import com.echothree.model.control.core.server.graphql.EventTypeObject;
621import com.echothree.model.control.core.server.graphql.FontStyleObject;
622import com.echothree.model.control.core.server.graphql.FontWeightObject;
623import com.echothree.model.control.core.server.graphql.MimeTypeFileExtensionObject;
624import com.echothree.model.control.core.server.graphql.MimeTypeObject;
625import com.echothree.model.control.core.server.graphql.MimeTypeUsageTypeObject;
626import com.echothree.model.control.core.server.graphql.TextDecorationObject;
627import com.echothree.model.control.core.server.graphql.TextTransformationObject;
628import com.echothree.model.control.customer.server.graphql.CustomerObject;
629import com.echothree.model.control.customer.server.graphql.CustomerTypeObject;
630import com.echothree.model.control.customer.server.graphql.CustomerTypePaymentMethodObject;
631import com.echothree.model.control.customer.server.graphql.CustomerTypeShippingMethodObject;
632import com.echothree.model.control.employee.server.graphql.EmployeeObject;
633import com.echothree.model.control.filter.server.graphql.FilterAdjustmentAmountObject;
634import com.echothree.model.control.filter.server.graphql.FilterAdjustmentFixedAmountObject;
635import com.echothree.model.control.filter.server.graphql.FilterAdjustmentObject;
636import com.echothree.model.control.filter.server.graphql.FilterAdjustmentPercentObject;
637import com.echothree.model.control.filter.server.graphql.FilterAdjustmentSourceObject;
638import com.echothree.model.control.filter.server.graphql.FilterAdjustmentTypeObject;
639import com.echothree.model.control.filter.server.graphql.FilterEntranceStepObject;
640import com.echothree.model.control.filter.server.graphql.FilterKindObject;
641import com.echothree.model.control.filter.server.graphql.FilterObject;
642import com.echothree.model.control.filter.server.graphql.FilterStepDestinationObject;
643import com.echothree.model.control.filter.server.graphql.FilterStepElementObject;
644import com.echothree.model.control.filter.server.graphql.FilterStepObject;
645import com.echothree.model.control.filter.server.graphql.FilterTypeObject;
646import com.echothree.model.control.geo.server.graphql.GeoCodeAliasObject;
647import com.echothree.model.control.geo.server.graphql.GeoCodeAliasTypeObject;
648import com.echothree.model.control.geo.server.graphql.GeoCodeCurrencyObject;
649import com.echothree.model.control.geo.server.graphql.GeoCodeDateTimeFormatObject;
650import com.echothree.model.control.geo.server.graphql.GeoCodeLanguageObject;
651import com.echothree.model.control.geo.server.graphql.GeoCodeObject;
652import com.echothree.model.control.geo.server.graphql.GeoCodeScopeObject;
653import com.echothree.model.control.geo.server.graphql.GeoCodeTimeZoneObject;
654import com.echothree.model.control.geo.server.graphql.GeoCodeTypeObject;
655import com.echothree.model.control.graphql.server.graphql.count.Connections;
656import com.echothree.model.control.graphql.server.graphql.count.CountedObjects;
657import com.echothree.model.control.graphql.server.graphql.count.CountingDataConnectionFetcher;
658import com.echothree.model.control.graphql.server.graphql.count.CountingPaginatedData;
659import com.echothree.model.control.graphql.server.util.BaseGraphQl;
660import static com.echothree.model.control.graphql.server.util.BaseGraphQl.getUserVisitPK;
661import com.echothree.model.control.graphql.server.util.count.ObjectLimiter;
662import com.echothree.model.control.inventory.server.graphql.AllocationPriorityObject;
663import com.echothree.model.control.inventory.server.graphql.InventoryAdjustmentTypeObject;
664import com.echothree.model.control.inventory.server.graphql.InventoryBucketTypeObject;
665import com.echothree.model.control.inventory.server.graphql.InventoryConditionObject;
666import com.echothree.model.control.inventory.server.graphql.InventoryCostingMethodObject;
667import com.echothree.model.control.inventory.server.graphql.InventoryCostingPoolObject;
668import com.echothree.model.control.inventory.server.graphql.InventoryDispositionAdjustmentObject;
669import com.echothree.model.control.inventory.server.graphql.InventoryDispositionObject;
670import com.echothree.model.control.inventory.server.graphql.InventoryLayerBucketObject;
671import com.echothree.model.control.inventory.server.graphql.InventoryLayerObject;
672import com.echothree.model.control.inventory.server.graphql.InventoryLocationBucketObject;
673import com.echothree.model.control.inventory.server.graphql.InventoryLocationGroupObject;
674import com.echothree.model.control.inventory.server.graphql.InventoryLocationObject;
675import com.echothree.model.control.inventory.server.graphql.InventoryTransactionReasonObject;
676import com.echothree.model.control.inventory.server.graphql.InventoryTransactionRoleTypeObject;
677import com.echothree.model.control.inventory.server.graphql.InventoryTransactionTimeTypeObject;
678import com.echothree.model.control.inventory.server.graphql.InventoryTransactionTypeObject;
679import com.echothree.model.control.inventory.server.graphql.LotObject;
680import com.echothree.model.control.inventory.server.graphql.PartyBucketObject;
681import com.echothree.model.control.inventory.server.graphql.PartyInventoryCostingMethodObject;
682import com.echothree.model.control.item.server.graphql.ItemAliasChecksumTypeObject;
683import com.echothree.model.control.item.server.graphql.ItemAliasObject;
684import com.echothree.model.control.item.server.graphql.ItemAliasTypeObject;
685import com.echothree.model.control.item.server.graphql.ItemCategoryObject;
686import com.echothree.model.control.item.server.graphql.ItemDeliveryTypeObject;
687import com.echothree.model.control.item.server.graphql.ItemDescriptionObject;
688import com.echothree.model.control.item.server.graphql.ItemDescriptionTypeObject;
689import com.echothree.model.control.item.server.graphql.ItemDescriptionTypeUseObject;
690import com.echothree.model.control.item.server.graphql.ItemDescriptionTypeUseTypeObject;
691import com.echothree.model.control.item.server.graphql.ItemImageTypeObject;
692import com.echothree.model.control.item.server.graphql.ItemInventoryTypeObject;
693import com.echothree.model.control.item.server.graphql.ItemObject;
694import com.echothree.model.control.item.server.graphql.ItemPriceObject;
695import com.echothree.model.control.item.server.graphql.ItemPriceTypeObject;
696import com.echothree.model.control.item.server.graphql.ItemTypeObject;
697import com.echothree.model.control.item.server.graphql.ItemUnitOfMeasureTypeObject;
698import com.echothree.model.control.item.server.graphql.ItemUseTypeObject;
699import com.echothree.model.control.item.server.graphql.ItemVolumeTypeObject;
700import com.echothree.model.control.item.server.graphql.ItemWeightTypeObject;
701import com.echothree.model.control.item.server.graphql.RelatedItemObject;
702import com.echothree.model.control.item.server.graphql.RelatedItemTypeObject;
703import com.echothree.model.control.offer.server.graphql.OfferCustomerTypeObject;
704import com.echothree.model.control.offer.server.graphql.OfferItemObject;
705import com.echothree.model.control.offer.server.graphql.OfferItemPriceObject;
706import com.echothree.model.control.offer.server.graphql.OfferNameElementObject;
707import com.echothree.model.control.offer.server.graphql.OfferObject;
708import com.echothree.model.control.offer.server.graphql.OfferUseObject;
709import com.echothree.model.control.offer.server.graphql.UseNameElementObject;
710import com.echothree.model.control.offer.server.graphql.UseObject;
711import com.echothree.model.control.offer.server.graphql.UseTypeObject;
712import com.echothree.model.control.order.server.graphql.OrderPriorityObject;
713import com.echothree.model.control.order.server.graphql.OrderTimeTypeObject;
714import com.echothree.model.control.order.server.graphql.OrderTypeObject;
715import com.echothree.model.control.party.server.graphql.CompanyObject;
716import com.echothree.model.control.party.server.graphql.DateTimeFormatObject;
717import com.echothree.model.control.party.server.graphql.DepartmentObject;
718import com.echothree.model.control.party.server.graphql.DivisionObject;
719import com.echothree.model.control.party.server.graphql.LanguageObject;
720import com.echothree.model.control.party.server.graphql.NameSuffixObject;
721import com.echothree.model.control.party.server.graphql.PartyAliasObject;
722import com.echothree.model.control.party.server.graphql.PartyAliasTypeObject;
723import com.echothree.model.control.party.server.graphql.PartyObject;
724import com.echothree.model.control.party.server.graphql.PartyTypeObject;
725import com.echothree.model.control.party.server.graphql.PersonalTitleObject;
726import com.echothree.model.control.party.server.graphql.RoleTypeObject;
727import com.echothree.model.control.party.server.graphql.TimeZoneObject;
728import com.echothree.model.control.payment.server.graphql.PaymentMethodObject;
729import com.echothree.model.control.payment.server.graphql.PaymentMethodTypeObject;
730import com.echothree.model.control.payment.server.graphql.PaymentProcessorActionTypeObject;
731import com.echothree.model.control.payment.server.graphql.PaymentProcessorObject;
732import com.echothree.model.control.payment.server.graphql.PaymentProcessorResultCodeObject;
733import com.echothree.model.control.payment.server.graphql.PaymentProcessorTransactionObject;
734import com.echothree.model.control.payment.server.graphql.PaymentProcessorTypeCodeObject;
735import com.echothree.model.control.payment.server.graphql.PaymentProcessorTypeCodeTypeObject;
736import com.echothree.model.control.payment.server.graphql.PaymentProcessorTypeObject;
737import com.echothree.model.control.period.server.graphql.PeriodKindObject;
738import com.echothree.model.control.queue.server.graphql.QueueTypeObject;
739import com.echothree.model.control.returnpolicy.server.graphql.ReturnKindObject;
740import com.echothree.model.control.returnpolicy.server.graphql.ReturnPolicyObject;
741import com.echothree.model.control.search.server.control.SearchControl;
742import com.echothree.model.control.search.server.graphql.CheckItemSpellingObject;
743import com.echothree.model.control.search.server.graphql.ComponentVendorResultsObject;
744import com.echothree.model.control.search.server.graphql.ContentCatalogItemResultsObject;
745import com.echothree.model.control.search.server.graphql.ContentCatalogResultsObject;
746import com.echothree.model.control.search.server.graphql.ContentCategoryResultsObject;
747import com.echothree.model.control.search.server.graphql.CustomerResultsObject;
748import com.echothree.model.control.search.server.graphql.EmployeeResultsObject;
749import com.echothree.model.control.search.server.graphql.EntityAliasTypeResultsObject;
750import com.echothree.model.control.search.server.graphql.EntityAttributeGroupResultsObject;
751import com.echothree.model.control.search.server.graphql.EntityAttributeResultsObject;
752import com.echothree.model.control.search.server.graphql.EntityListItemResultsObject;
753import com.echothree.model.control.search.server.graphql.EntityTypeResultsObject;
754import com.echothree.model.control.search.server.graphql.ItemResultsObject;
755import com.echothree.model.control.search.server.graphql.SearchCheckSpellingActionTypeObject;
756import com.echothree.model.control.search.server.graphql.SearchDefaultOperatorObject;
757import com.echothree.model.control.search.server.graphql.SearchKindObject;
758import com.echothree.model.control.search.server.graphql.SearchResultActionTypeObject;
759import com.echothree.model.control.search.server.graphql.SearchSortDirectionObject;
760import com.echothree.model.control.search.server.graphql.SearchSortOrderObject;
761import com.echothree.model.control.search.server.graphql.SearchTypeObject;
762import com.echothree.model.control.search.server.graphql.SearchUseTypeObject;
763import com.echothree.model.control.search.server.graphql.ShippingMethodResultsObject;
764import com.echothree.model.control.search.server.graphql.VendorResultsObject;
765import com.echothree.model.control.search.server.graphql.WarehouseResultsObject;
766import com.echothree.model.control.security.server.graphql.SecurityRoleGroupObject;
767import com.echothree.model.control.security.server.graphql.SecurityRoleObject;
768import com.echothree.model.control.selector.server.graphql.SelectorKindObject;
769import com.echothree.model.control.selector.server.graphql.SelectorObject;
770import com.echothree.model.control.selector.server.graphql.SelectorTypeObject;
771import com.echothree.model.control.sequence.server.graphql.GetSequenceValueResultObject;
772import com.echothree.model.control.sequence.server.graphql.SequenceChecksumTypeObject;
773import com.echothree.model.control.sequence.server.graphql.SequenceEncoderTypeObject;
774import com.echothree.model.control.sequence.server.graphql.SequenceObject;
775import com.echothree.model.control.sequence.server.graphql.SequenceTypeObject;
776import com.echothree.model.control.shipment.server.graphql.FreeOnBoardObject;
777import com.echothree.model.control.shipping.server.control.ShippingControl;
778import com.echothree.model.control.shipping.server.graphql.ShippingMethodObject;
779import com.echothree.model.control.subscription.server.graphql.SubscriptionKindObject;
780import com.echothree.model.control.subscription.server.graphql.SubscriptionObject;
781import com.echothree.model.control.subscription.server.graphql.SubscriptionTypeObject;
782import com.echothree.model.control.tag.server.graphql.EntityTagObject;
783import com.echothree.model.control.tag.server.graphql.TagObject;
784import com.echothree.model.control.tag.server.graphql.TagScopeEntityTypeObject;
785import com.echothree.model.control.tag.server.graphql.TagScopeObject;
786import com.echothree.model.control.term.server.graphql.TermObject;
787import com.echothree.model.control.term.server.graphql.TermTypeObject;
788import com.echothree.model.control.uom.server.graphql.UnitOfMeasureKindObject;
789import com.echothree.model.control.uom.server.graphql.UnitOfMeasureKindUseObject;
790import com.echothree.model.control.uom.server.graphql.UnitOfMeasureKindUseTypeObject;
791import com.echothree.model.control.uom.server.graphql.UnitOfMeasureTypeObject;
792import com.echothree.model.control.user.server.graphql.RecoveryQuestionObject;
793import com.echothree.model.control.user.server.graphql.UserLoginObject;
794import com.echothree.model.control.user.server.graphql.UserSessionObject;
795import com.echothree.model.control.user.server.graphql.UserVisitGroupObject;
796import com.echothree.model.control.user.server.graphql.UserVisitObject;
797import com.echothree.model.control.vendor.server.graphql.ItemPurchasingCategoryObject;
798import com.echothree.model.control.vendor.server.graphql.VendorItemCostObject;
799import com.echothree.model.control.vendor.server.graphql.VendorItemObject;
800import com.echothree.model.control.vendor.server.graphql.VendorObject;
801import com.echothree.model.control.vendor.server.graphql.VendorTypeObject;
802import com.echothree.model.control.warehouse.server.graphql.LocationNameElementObject;
803import com.echothree.model.control.warehouse.server.graphql.LocationObject;
804import com.echothree.model.control.warehouse.server.graphql.LocationTypeObject;
805import com.echothree.model.control.warehouse.server.graphql.LocationUseTypeObject;
806import com.echothree.model.control.warehouse.server.graphql.WarehouseObject;
807import com.echothree.model.control.warehouse.server.graphql.WarehouseTypeObject;
808import com.echothree.model.control.wishlist.server.graphql.WishlistPriorityObject;
809import com.echothree.model.control.wishlist.server.graphql.WishlistTypeObject;
810import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationObject;
811import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationPartyTypeObject;
812import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationSecurityRoleObject;
813import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationSelectorObject;
814import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationStepObject;
815import com.echothree.model.control.workflow.server.graphql.WorkflowEntityStatusObject;
816import com.echothree.model.control.workflow.server.graphql.WorkflowEntityTypeObject;
817import com.echothree.model.control.workflow.server.graphql.WorkflowEntranceObject;
818import com.echothree.model.control.workflow.server.graphql.WorkflowEntrancePartyTypeObject;
819import com.echothree.model.control.workflow.server.graphql.WorkflowEntranceSecurityRoleObject;
820import com.echothree.model.control.workflow.server.graphql.WorkflowEntranceSelectorObject;
821import com.echothree.model.control.workflow.server.graphql.WorkflowEntranceStepObject;
822import com.echothree.model.control.workflow.server.graphql.WorkflowObject;
823import com.echothree.model.control.workflow.server.graphql.WorkflowSelectorKindObject;
824import com.echothree.model.control.workflow.server.graphql.WorkflowStepObject;
825import com.echothree.model.control.workflow.server.graphql.WorkflowStepTypeObject;
826import com.echothree.model.data.accounting.common.CurrencyConstants;
827import com.echothree.model.data.accounting.common.GlAccountCategoryConstants;
828import com.echothree.model.data.accounting.common.GlAccountClassConstants;
829import com.echothree.model.data.accounting.common.GlAccountConstants;
830import com.echothree.model.data.accounting.common.GlAccountTypeConstants;
831import com.echothree.model.data.accounting.common.GlResourceTypeConstants;
832import com.echothree.model.data.accounting.common.ItemAccountingCategoryConstants;
833import com.echothree.model.data.accounting.common.SymbolPositionConstants;
834import com.echothree.model.data.accounting.common.TransactionConstants;
835import com.echothree.model.data.accounting.common.TransactionEntityRoleTypeConstants;
836import com.echothree.model.data.accounting.common.TransactionGlAccountCategoryConstants;
837import com.echothree.model.data.accounting.common.TransactionGroupConstants;
838import com.echothree.model.data.accounting.common.TransactionTimeTypeConstants;
839import com.echothree.model.data.accounting.common.TransactionTypeConstants;
840import com.echothree.model.data.accounting.server.entity.Currency;
841import com.echothree.model.data.accounting.server.entity.GlAccount;
842import com.echothree.model.data.accounting.server.entity.GlAccountCategory;
843import com.echothree.model.data.accounting.server.entity.GlAccountClass;
844import com.echothree.model.data.accounting.server.entity.GlAccountType;
845import com.echothree.model.data.accounting.server.entity.GlResourceType;
846import com.echothree.model.data.accounting.server.entity.ItemAccountingCategory;
847import com.echothree.model.data.accounting.server.entity.SymbolPosition;
848import com.echothree.model.data.accounting.server.entity.Transaction;
849import com.echothree.model.data.accounting.server.entity.TransactionEntityRoleType;
850import com.echothree.model.data.accounting.server.entity.TransactionGlAccountCategory;
851import com.echothree.model.data.accounting.server.entity.TransactionGroup;
852import com.echothree.model.data.accounting.server.entity.TransactionTimeType;
853import com.echothree.model.data.accounting.server.entity.TransactionType;
854import com.echothree.model.data.campaign.common.CampaignConstants;
855import com.echothree.model.data.campaign.common.CampaignContentConstants;
856import com.echothree.model.data.campaign.common.CampaignMediumConstants;
857import com.echothree.model.data.campaign.common.CampaignSourceConstants;
858import com.echothree.model.data.campaign.common.CampaignTermConstants;
859import com.echothree.model.data.campaign.server.entity.Campaign;
860import com.echothree.model.data.campaign.server.entity.CampaignContent;
861import com.echothree.model.data.campaign.server.entity.CampaignMedium;
862import com.echothree.model.data.campaign.server.entity.CampaignSource;
863import com.echothree.model.data.campaign.server.entity.CampaignTerm;
864import com.echothree.model.data.cancellationpolicy.common.CancellationKindConstants;
865import com.echothree.model.data.cancellationpolicy.common.CancellationPolicyConstants;
866import com.echothree.model.data.cancellationpolicy.server.entity.CancellationKind;
867import com.echothree.model.data.cancellationpolicy.server.entity.CancellationPolicy;
868import com.echothree.model.data.chain.common.ChainActionConstants;
869import com.echothree.model.data.chain.common.ChainActionSetConstants;
870import com.echothree.model.data.chain.common.ChainActionTypeConstants;
871import com.echothree.model.data.chain.common.ChainConstants;
872import com.echothree.model.data.chain.common.ChainEntityRoleTypeConstants;
873import com.echothree.model.data.chain.common.ChainInstanceConstants;
874import com.echothree.model.data.chain.common.ChainKindConstants;
875import com.echothree.model.data.chain.common.ChainTypeConstants;
876import com.echothree.model.data.chain.server.entity.Chain;
877import com.echothree.model.data.chain.server.entity.ChainAction;
878import com.echothree.model.data.chain.server.entity.ChainActionSet;
879import com.echothree.model.data.chain.server.entity.ChainActionType;
880import com.echothree.model.data.chain.server.entity.ChainEntityRoleType;
881import com.echothree.model.data.chain.server.entity.ChainInstance;
882import com.echothree.model.data.chain.server.entity.ChainKind;
883import com.echothree.model.data.chain.server.entity.ChainType;
884import com.echothree.model.data.contact.common.ContactMechanismPurposeConstants;
885import com.echothree.model.data.contact.server.entity.ContactMechanismPurpose;
886import com.echothree.model.data.contactlist.common.ContactListConstants;
887import com.echothree.model.data.contactlist.common.ContactListContactMechanismPurposeConstants;
888import com.echothree.model.data.contactlist.common.ContactListFrequencyConstants;
889import com.echothree.model.data.contactlist.common.ContactListGroupConstants;
890import com.echothree.model.data.contactlist.common.ContactListTypeConstants;
891import com.echothree.model.data.contactlist.common.CustomerTypeContactListConstants;
892import com.echothree.model.data.contactlist.common.CustomerTypeContactListGroupConstants;
893import com.echothree.model.data.contactlist.common.PartyContactListConstants;
894import com.echothree.model.data.contactlist.common.PartyTypeContactListConstants;
895import com.echothree.model.data.contactlist.common.PartyTypeContactListGroupConstants;
896import com.echothree.model.data.contactlist.server.entity.ContactList;
897import com.echothree.model.data.contactlist.server.entity.ContactListContactMechanismPurpose;
898import com.echothree.model.data.contactlist.server.entity.ContactListFrequency;
899import com.echothree.model.data.contactlist.server.entity.ContactListGroup;
900import com.echothree.model.data.contactlist.server.entity.ContactListType;
901import com.echothree.model.data.contactlist.server.entity.CustomerTypeContactList;
902import com.echothree.model.data.contactlist.server.entity.CustomerTypeContactListGroup;
903import com.echothree.model.data.contactlist.server.entity.PartyContactList;
904import com.echothree.model.data.contactlist.server.entity.PartyTypeContactList;
905import com.echothree.model.data.contactlist.server.entity.PartyTypeContactListGroup;
906import com.echothree.model.data.content.common.ContentCatalogConstants;
907import com.echothree.model.data.content.common.ContentCatalogItemConstants;
908import com.echothree.model.data.content.common.ContentCategoryConstants;
909import com.echothree.model.data.content.common.ContentCategoryItemConstants;
910import com.echothree.model.data.content.common.ContentCollectionConstants;
911import com.echothree.model.data.content.common.ContentPageAreaConstants;
912import com.echothree.model.data.content.common.ContentPageAreaTypeConstants;
913import com.echothree.model.data.content.common.ContentPageConstants;
914import com.echothree.model.data.content.common.ContentPageLayoutAreaConstants;
915import com.echothree.model.data.content.common.ContentPageLayoutConstants;
916import com.echothree.model.data.content.common.ContentSectionConstants;
917import com.echothree.model.data.content.common.ContentWebAddressConstants;
918import com.echothree.model.data.content.server.entity.ContentCatalog;
919import com.echothree.model.data.content.server.entity.ContentCatalogItem;
920import com.echothree.model.data.content.server.entity.ContentCategory;
921import com.echothree.model.data.content.server.entity.ContentCategoryItem;
922import com.echothree.model.data.content.server.entity.ContentCollection;
923import com.echothree.model.data.content.server.entity.ContentPage;
924import com.echothree.model.data.content.server.entity.ContentPageArea;
925import com.echothree.model.data.content.server.entity.ContentPageAreaType;
926import com.echothree.model.data.content.server.entity.ContentPageLayout;
927import com.echothree.model.data.content.server.entity.ContentPageLayoutArea;
928import com.echothree.model.data.content.server.entity.ContentSection;
929import com.echothree.model.data.content.server.entity.ContentWebAddress;
930import com.echothree.model.data.core.common.AppearanceConstants;
931import com.echothree.model.data.core.common.ColorConstants;
932import com.echothree.model.data.core.common.ComponentVendorConstants;
933import com.echothree.model.data.core.common.EntityAliasConstants;
934import com.echothree.model.data.core.common.EntityAliasTypeConstants;
935import com.echothree.model.data.core.common.EntityAttributeConstants;
936import com.echothree.model.data.core.common.EntityAttributeEntityAttributeGroupConstants;
937import com.echothree.model.data.core.common.EntityAttributeGroupConstants;
938import com.echothree.model.data.core.common.EntityAttributeTypeConstants;
939import com.echothree.model.data.core.common.EntityInstanceConstants;
940import com.echothree.model.data.core.common.EntityTypeConstants;
941import com.echothree.model.data.core.common.EventConstants;
942import com.echothree.model.data.core.common.EventTypeConstants;
943import com.echothree.model.data.core.common.FontStyleConstants;
944import com.echothree.model.data.core.common.FontWeightConstants;
945import com.echothree.model.data.core.common.MimeTypeConstants;
946import com.echothree.model.data.core.common.MimeTypeFileExtensionConstants;
947import com.echothree.model.data.core.common.TextDecorationConstants;
948import com.echothree.model.data.core.common.TextTransformationConstants;
949import com.echothree.model.data.core.server.entity.Appearance;
950import com.echothree.model.data.core.server.entity.Color;
951import com.echothree.model.data.core.server.entity.ComponentVendor;
952import com.echothree.model.data.core.server.entity.EntityAlias;
953import com.echothree.model.data.core.server.entity.EntityAliasType;
954import com.echothree.model.data.core.server.entity.EntityAttribute;
955import com.echothree.model.data.core.server.entity.EntityAttributeEntityAttributeGroup;
956import com.echothree.model.data.core.server.entity.EntityAttributeGroup;
957import com.echothree.model.data.core.server.entity.EntityAttributeType;
958import com.echothree.model.data.core.server.entity.EntityInstance;
959import com.echothree.model.data.core.server.entity.EntityType;
960import com.echothree.model.data.core.server.entity.EventType;
961import com.echothree.model.data.core.server.entity.FontStyle;
962import com.echothree.model.data.core.server.entity.FontWeight;
963import com.echothree.model.data.core.server.entity.MimeType;
964import com.echothree.model.data.core.server.entity.MimeTypeFileExtension;
965import com.echothree.model.data.core.server.entity.MimeTypeUsageType;
966import com.echothree.model.data.core.server.entity.TextDecoration;
967import com.echothree.model.data.core.server.entity.TextTransformation;
968import com.echothree.model.data.customer.common.CustomerConstants;
969import com.echothree.model.data.customer.common.CustomerTypeConstants;
970import com.echothree.model.data.customer.common.CustomerTypePaymentMethodConstants;
971import com.echothree.model.data.customer.common.CustomerTypeShippingMethodConstants;
972import com.echothree.model.data.customer.server.entity.Customer;
973import com.echothree.model.data.customer.server.entity.CustomerType;
974import com.echothree.model.data.customer.server.entity.CustomerTypePaymentMethod;
975import com.echothree.model.data.customer.server.entity.CustomerTypeShippingMethod;
976import com.echothree.model.data.employee.common.PartyEmployeeConstants;
977import com.echothree.model.data.employee.server.entity.PartyEmployee;
978import com.echothree.model.data.filter.common.FilterAdjustmentTypeConstants;
979import com.echothree.model.data.filter.common.FilterConstants;
980import com.echothree.model.data.filter.common.FilterEntranceStepConstants;
981import com.echothree.model.data.filter.common.FilterKindConstants;
982import com.echothree.model.data.filter.common.FilterStepConstants;
983import com.echothree.model.data.filter.common.FilterStepDestinationConstants;
984import com.echothree.model.data.filter.common.FilterStepElementConstants;
985import com.echothree.model.data.filter.common.FilterTypeConstants;
986import com.echothree.model.data.filter.server.entity.Filter;
987import com.echothree.model.data.filter.server.entity.FilterAdjustment;
988import com.echothree.model.data.filter.server.entity.FilterAdjustmentAmount;
989import com.echothree.model.data.filter.server.entity.FilterAdjustmentFixedAmount;
990import com.echothree.model.data.filter.server.entity.FilterAdjustmentPercent;
991import com.echothree.model.data.filter.server.entity.FilterAdjustmentSource;
992import com.echothree.model.data.filter.server.entity.FilterAdjustmentType;
993import com.echothree.model.data.filter.server.entity.FilterEntranceStep;
994import com.echothree.model.data.filter.server.entity.FilterKind;
995import com.echothree.model.data.filter.server.entity.FilterStep;
996import com.echothree.model.data.filter.server.entity.FilterStepDestination;
997import com.echothree.model.data.filter.server.entity.FilterStepElement;
998import com.echothree.model.data.filter.server.entity.FilterType;
999import com.echothree.model.data.geo.common.GeoCodeAliasConstants;
1000import com.echothree.model.data.geo.common.GeoCodeAliasTypeConstants;
1001import com.echothree.model.data.geo.common.GeoCodeConstants;
1002import com.echothree.model.data.geo.common.GeoCodeCurrencyConstants;
1003import com.echothree.model.data.geo.common.GeoCodeDateTimeFormatConstants;
1004import com.echothree.model.data.geo.common.GeoCodeLanguageConstants;
1005import com.echothree.model.data.geo.common.GeoCodeScopeConstants;
1006import com.echothree.model.data.geo.common.GeoCodeTimeZoneConstants;
1007import com.echothree.model.data.geo.common.GeoCodeTypeConstants;
1008import com.echothree.model.data.geo.server.entity.GeoCode;
1009import com.echothree.model.data.geo.server.entity.GeoCodeAlias;
1010import com.echothree.model.data.geo.server.entity.GeoCodeAliasType;
1011import com.echothree.model.data.geo.server.entity.GeoCodeCurrency;
1012import com.echothree.model.data.geo.server.entity.GeoCodeDateTimeFormat;
1013import com.echothree.model.data.geo.server.entity.GeoCodeLanguage;
1014import com.echothree.model.data.geo.server.entity.GeoCodeScope;
1015import com.echothree.model.data.geo.server.entity.GeoCodeTimeZone;
1016import com.echothree.model.data.geo.server.entity.GeoCodeType;
1017import com.echothree.model.data.inventory.common.AllocationPriorityConstants;
1018import com.echothree.model.data.inventory.common.InventoryAdjustmentTypeConstants;
1019import com.echothree.model.data.inventory.common.InventoryBucketTypeConstants;
1020import com.echothree.model.data.inventory.common.InventoryConditionConstants;
1021import com.echothree.model.data.inventory.common.InventoryCostingMethodConstants;
1022import com.echothree.model.data.inventory.common.InventoryCostingPoolConstants;
1023import com.echothree.model.data.inventory.common.InventoryDispositionAdjustmentConstants;
1024import com.echothree.model.data.inventory.common.InventoryDispositionConstants;
1025import com.echothree.model.data.inventory.common.InventoryLayerBucketConstants;
1026import com.echothree.model.data.inventory.common.InventoryLayerConstants;
1027import com.echothree.model.data.inventory.common.InventoryLocationBucketConstants;
1028import com.echothree.model.data.inventory.common.InventoryLocationConstants;
1029import com.echothree.model.data.inventory.common.InventoryLocationGroupConstants;
1030import com.echothree.model.data.inventory.common.InventoryTransactionReasonConstants;
1031import com.echothree.model.data.inventory.common.InventoryTransactionRoleTypeConstants;
1032import com.echothree.model.data.inventory.common.InventoryTransactionTimeTypeConstants;
1033import com.echothree.model.data.inventory.common.InventoryTransactionTypeConstants;
1034import com.echothree.model.data.inventory.common.LotConstants;
1035import com.echothree.model.data.inventory.common.PartyBucketConstants;
1036import com.echothree.model.data.inventory.common.PartyInventoryCostingMethodConstants;
1037import com.echothree.model.data.inventory.server.entity.AllocationPriority;
1038import com.echothree.model.data.inventory.server.entity.InventoryAdjustmentType;
1039import com.echothree.model.data.inventory.server.entity.InventoryBucketType;
1040import com.echothree.model.data.inventory.server.entity.InventoryCondition;
1041import com.echothree.model.data.inventory.server.entity.InventoryCostingMethod;
1042import com.echothree.model.data.inventory.server.entity.InventoryCostingPool;
1043import com.echothree.model.data.inventory.server.entity.InventoryDisposition;
1044import com.echothree.model.data.inventory.server.entity.InventoryDispositionAdjustment;
1045import com.echothree.model.data.inventory.server.entity.InventoryLayer;
1046import com.echothree.model.data.inventory.server.entity.InventoryLayerBucket;
1047import com.echothree.model.data.inventory.server.entity.InventoryLocation;
1048import com.echothree.model.data.inventory.server.entity.InventoryLocationBucket;
1049import com.echothree.model.data.inventory.server.entity.InventoryLocationGroup;
1050import com.echothree.model.data.inventory.server.entity.InventoryTransactionReason;
1051import com.echothree.model.data.inventory.server.entity.InventoryTransactionRoleType;
1052import com.echothree.model.data.inventory.server.entity.InventoryTransactionTimeType;
1053import com.echothree.model.data.inventory.server.entity.InventoryTransactionType;
1054import com.echothree.model.data.inventory.server.entity.Lot;
1055import com.echothree.model.data.inventory.server.entity.PartyBucket;
1056import com.echothree.model.data.inventory.server.entity.PartyInventoryCostingMethod;
1057import com.echothree.model.data.item.common.ItemAliasChecksumTypeConstants;
1058import com.echothree.model.data.item.common.ItemAliasConstants;
1059import com.echothree.model.data.item.common.ItemAliasTypeConstants;
1060import com.echothree.model.data.item.common.ItemCategoryConstants;
1061import com.echothree.model.data.item.common.ItemConstants;
1062import com.echothree.model.data.item.common.ItemDeliveryTypeConstants;
1063import com.echothree.model.data.item.common.ItemDescriptionConstants;
1064import com.echothree.model.data.item.common.ItemDescriptionTypeConstants;
1065import com.echothree.model.data.item.common.ItemDescriptionTypeUseTypeConstants;
1066import com.echothree.model.data.item.common.ItemImageTypeConstants;
1067import com.echothree.model.data.item.common.ItemInventoryTypeConstants;
1068import com.echothree.model.data.item.common.ItemPriceConstants;
1069import com.echothree.model.data.item.common.ItemPriceTypeConstants;
1070import com.echothree.model.data.item.common.ItemTypeConstants;
1071import com.echothree.model.data.item.common.ItemUnitOfMeasureTypeConstants;
1072import com.echothree.model.data.item.common.ItemUseTypeConstants;
1073import com.echothree.model.data.item.common.ItemVolumeTypeConstants;
1074import com.echothree.model.data.item.common.ItemWeightTypeConstants;
1075import com.echothree.model.data.item.common.RelatedItemConstants;
1076import com.echothree.model.data.item.common.RelatedItemTypeConstants;
1077import com.echothree.model.data.item.server.entity.Item;
1078import com.echothree.model.data.item.server.entity.ItemAlias;
1079import com.echothree.model.data.item.server.entity.ItemAliasChecksumType;
1080import com.echothree.model.data.item.server.entity.ItemAliasType;
1081import com.echothree.model.data.item.server.entity.ItemCategory;
1082import com.echothree.model.data.item.server.entity.ItemDeliveryType;
1083import com.echothree.model.data.item.server.entity.ItemDescription;
1084import com.echothree.model.data.item.server.entity.ItemDescriptionType;
1085import com.echothree.model.data.item.server.entity.ItemDescriptionTypeUse;
1086import com.echothree.model.data.item.server.entity.ItemDescriptionTypeUseType;
1087import com.echothree.model.data.item.server.entity.ItemImageType;
1088import com.echothree.model.data.item.server.entity.ItemInventoryType;
1089import com.echothree.model.data.item.server.entity.ItemPrice;
1090import com.echothree.model.data.item.server.entity.ItemPriceType;
1091import com.echothree.model.data.item.server.entity.ItemType;
1092import com.echothree.model.data.item.server.entity.ItemUnitOfMeasureType;
1093import com.echothree.model.data.item.server.entity.ItemUseType;
1094import com.echothree.model.data.item.server.entity.ItemVolumeType;
1095import com.echothree.model.data.item.server.entity.ItemWeightType;
1096import com.echothree.model.data.item.server.entity.RelatedItem;
1097import com.echothree.model.data.item.server.entity.RelatedItemType;
1098import com.echothree.model.data.offer.common.OfferConstants;
1099import com.echothree.model.data.offer.common.OfferCustomerTypeConstants;
1100import com.echothree.model.data.offer.common.OfferItemConstants;
1101import com.echothree.model.data.offer.common.OfferItemPriceConstants;
1102import com.echothree.model.data.offer.common.OfferNameElementConstants;
1103import com.echothree.model.data.offer.common.UseConstants;
1104import com.echothree.model.data.offer.common.UseNameElementConstants;
1105import com.echothree.model.data.offer.common.UseTypeConstants;
1106import com.echothree.model.data.offer.server.entity.Offer;
1107import com.echothree.model.data.offer.server.entity.OfferCustomerType;
1108import com.echothree.model.data.offer.server.entity.OfferItem;
1109import com.echothree.model.data.offer.server.entity.OfferItemPrice;
1110import com.echothree.model.data.offer.server.entity.OfferNameElement;
1111import com.echothree.model.data.offer.server.entity.OfferUse;
1112import com.echothree.model.data.offer.server.entity.Use;
1113import com.echothree.model.data.offer.server.entity.UseNameElement;
1114import com.echothree.model.data.offer.server.entity.UseType;
1115import com.echothree.model.data.order.common.OrderPriorityConstants;
1116import com.echothree.model.data.order.common.OrderTimeTypeConstants;
1117import com.echothree.model.data.order.common.OrderTypeConstants;
1118import com.echothree.model.data.order.server.entity.OrderPriority;
1119import com.echothree.model.data.order.server.entity.OrderTimeType;
1120import com.echothree.model.data.order.server.entity.OrderType;
1121import com.echothree.model.data.party.common.DateTimeFormatConstants;
1122import com.echothree.model.data.party.common.LanguageConstants;
1123import com.echothree.model.data.party.common.NameSuffixConstants;
1124import com.echothree.model.data.party.common.PartyAliasTypeConstants;
1125import com.echothree.model.data.party.common.PartyCompanyConstants;
1126import com.echothree.model.data.party.common.PartyConstants;
1127import com.echothree.model.data.party.common.PartyDepartmentConstants;
1128import com.echothree.model.data.party.common.PartyDivisionConstants;
1129import com.echothree.model.data.party.common.PartyTypeConstants;
1130import com.echothree.model.data.party.common.PersonalTitleConstants;
1131import com.echothree.model.data.party.common.RoleTypeConstants;
1132import com.echothree.model.data.party.common.TimeZoneConstants;
1133import com.echothree.model.data.party.server.entity.DateTimeFormat;
1134import com.echothree.model.data.party.server.entity.Language;
1135import com.echothree.model.data.party.server.entity.Party;
1136import com.echothree.model.data.party.server.entity.PartyAlias;
1137import com.echothree.model.data.party.server.entity.PartyAliasType;
1138import com.echothree.model.data.party.server.entity.PartyCompany;
1139import com.echothree.model.data.party.server.entity.PartyDepartment;
1140import com.echothree.model.data.party.server.entity.PartyDivision;
1141import com.echothree.model.data.party.server.entity.PartyType;
1142import com.echothree.model.data.party.server.entity.RoleType;
1143import com.echothree.model.data.party.server.entity.TimeZone;
1144import com.echothree.model.data.payment.common.PaymentMethodConstants;
1145import com.echothree.model.data.payment.common.PaymentMethodTypeConstants;
1146import com.echothree.model.data.payment.common.PaymentProcessorActionTypeConstants;
1147import com.echothree.model.data.payment.common.PaymentProcessorConstants;
1148import com.echothree.model.data.payment.common.PaymentProcessorResultCodeConstants;
1149import com.echothree.model.data.payment.common.PaymentProcessorTransactionConstants;
1150import com.echothree.model.data.payment.common.PaymentProcessorTypeConstants;
1151import com.echothree.model.data.payment.server.entity.PaymentMethod;
1152import com.echothree.model.data.payment.server.entity.PaymentMethodType;
1153import com.echothree.model.data.payment.server.entity.PaymentProcessor;
1154import com.echothree.model.data.payment.server.entity.PaymentProcessorActionType;
1155import com.echothree.model.data.payment.server.entity.PaymentProcessorResultCode;
1156import com.echothree.model.data.payment.server.entity.PaymentProcessorTransaction;
1157import com.echothree.model.data.payment.server.entity.PaymentProcessorType;
1158import com.echothree.model.data.payment.server.entity.PaymentProcessorTypeCode;
1159import com.echothree.model.data.payment.server.entity.PaymentProcessorTypeCodeType;
1160import com.echothree.model.data.period.common.PeriodKindConstants;
1161import com.echothree.model.data.period.server.entity.PeriodKind;
1162import com.echothree.model.data.queue.common.QueueTypeConstants;
1163import com.echothree.model.data.queue.server.entity.QueueType;
1164import com.echothree.model.data.returnpolicy.common.ReturnKindConstants;
1165import com.echothree.model.data.returnpolicy.common.ReturnPolicyConstants;
1166import com.echothree.model.data.returnpolicy.server.entity.ReturnKind;
1167import com.echothree.model.data.returnpolicy.server.entity.ReturnPolicy;
1168import com.echothree.model.data.search.common.SearchCheckSpellingActionTypeConstants;
1169import com.echothree.model.data.search.common.SearchDefaultOperatorConstants;
1170import com.echothree.model.data.search.common.SearchKindConstants;
1171import com.echothree.model.data.search.common.SearchResultActionTypeConstants;
1172import com.echothree.model.data.search.common.SearchSortDirectionConstants;
1173import com.echothree.model.data.search.common.SearchSortOrderConstants;
1174import com.echothree.model.data.search.common.SearchTypeConstants;
1175import com.echothree.model.data.search.common.SearchUseTypeConstants;
1176import com.echothree.model.data.search.server.entity.SearchCheckSpellingActionType;
1177import com.echothree.model.data.search.server.entity.SearchDefaultOperator;
1178import com.echothree.model.data.search.server.entity.SearchKind;
1179import com.echothree.model.data.search.server.entity.SearchResultActionType;
1180import com.echothree.model.data.search.server.entity.SearchSortDirection;
1181import com.echothree.model.data.search.server.entity.SearchSortOrder;
1182import com.echothree.model.data.search.server.entity.SearchType;
1183import com.echothree.model.data.search.server.entity.SearchUseType;
1184import com.echothree.model.data.security.common.SecurityRoleConstants;
1185import com.echothree.model.data.security.common.SecurityRoleGroupConstants;
1186import com.echothree.model.data.security.server.entity.SecurityRole;
1187import com.echothree.model.data.security.server.entity.SecurityRoleGroup;
1188import com.echothree.model.data.selector.common.SelectorKindConstants;
1189import com.echothree.model.data.selector.common.SelectorTypeConstants;
1190import com.echothree.model.data.selector.server.entity.Selector;
1191import com.echothree.model.data.selector.server.entity.SelectorKind;
1192import com.echothree.model.data.selector.server.entity.SelectorType;
1193import com.echothree.model.data.sequence.common.SequenceChecksumTypeConstants;
1194import com.echothree.model.data.sequence.common.SequenceConstants;
1195import com.echothree.model.data.sequence.common.SequenceEncoderTypeConstants;
1196import com.echothree.model.data.sequence.common.SequenceTypeConstants;
1197import com.echothree.model.data.sequence.server.entity.Sequence;
1198import com.echothree.model.data.sequence.server.entity.SequenceChecksumType;
1199import com.echothree.model.data.sequence.server.entity.SequenceEncoderType;
1200import com.echothree.model.data.sequence.server.entity.SequenceType;
1201import com.echothree.model.data.shipment.common.FreeOnBoardConstants;
1202import com.echothree.model.data.shipment.server.entity.FreeOnBoard;
1203import com.echothree.model.data.shipping.common.ShippingMethodConstants;
1204import com.echothree.model.data.shipping.server.entity.ShippingMethod;
1205import com.echothree.model.data.subscription.common.SubscriptionConstants;
1206import com.echothree.model.data.subscription.common.SubscriptionKindConstants;
1207import com.echothree.model.data.subscription.common.SubscriptionTypeConstants;
1208import com.echothree.model.data.subscription.server.entity.Subscription;
1209import com.echothree.model.data.subscription.server.entity.SubscriptionKind;
1210import com.echothree.model.data.subscription.server.entity.SubscriptionType;
1211import com.echothree.model.data.tag.common.EntityTagConstants;
1212import com.echothree.model.data.tag.common.TagConstants;
1213import com.echothree.model.data.tag.common.TagScopeConstants;
1214import com.echothree.model.data.tag.common.TagScopeEntityTypeConstants;
1215import com.echothree.model.data.tag.server.entity.EntityTag;
1216import com.echothree.model.data.tag.server.entity.Tag;
1217import com.echothree.model.data.tag.server.entity.TagScope;
1218import com.echothree.model.data.tag.server.entity.TagScopeEntityType;
1219import com.echothree.model.data.term.common.TermConstants;
1220import com.echothree.model.data.term.common.TermTypeConstants;
1221import com.echothree.model.data.term.server.entity.Term;
1222import com.echothree.model.data.term.server.entity.TermType;
1223import com.echothree.model.data.uom.common.UnitOfMeasureKindConstants;
1224import com.echothree.model.data.uom.common.UnitOfMeasureKindUseConstants;
1225import com.echothree.model.data.uom.common.UnitOfMeasureKindUseTypeConstants;
1226import com.echothree.model.data.uom.common.UnitOfMeasureTypeConstants;
1227import com.echothree.model.data.uom.server.entity.UnitOfMeasureKind;
1228import com.echothree.model.data.uom.server.entity.UnitOfMeasureKindUse;
1229import com.echothree.model.data.uom.server.entity.UnitOfMeasureKindUseType;
1230import com.echothree.model.data.uom.server.entity.UnitOfMeasureType;
1231import com.echothree.model.data.user.common.RecoveryQuestionConstants;
1232import com.echothree.model.data.user.common.UserVisitGroupConstants;
1233import com.echothree.model.data.user.server.entity.RecoveryQuestion;
1234import com.echothree.model.data.user.server.entity.UserLogin;
1235import com.echothree.model.data.user.server.entity.UserVisitGroup;
1236import com.echothree.model.data.vendor.common.ItemPurchasingCategoryConstants;
1237import com.echothree.model.data.vendor.common.VendorConstants;
1238import com.echothree.model.data.vendor.common.VendorItemConstants;
1239import com.echothree.model.data.vendor.common.VendorItemCostConstants;
1240import com.echothree.model.data.vendor.common.VendorTypeConstants;
1241import com.echothree.model.data.vendor.server.entity.ItemPurchasingCategory;
1242import com.echothree.model.data.vendor.server.entity.Vendor;
1243import com.echothree.model.data.vendor.server.entity.VendorItem;
1244import com.echothree.model.data.vendor.server.entity.VendorItemCost;
1245import com.echothree.model.data.vendor.server.entity.VendorType;
1246import com.echothree.model.data.warehouse.common.LocationConstants;
1247import com.echothree.model.data.warehouse.common.LocationNameElementConstants;
1248import com.echothree.model.data.warehouse.common.LocationTypeConstants;
1249import com.echothree.model.data.warehouse.common.LocationUseTypeConstants;
1250import com.echothree.model.data.warehouse.common.WarehouseConstants;
1251import com.echothree.model.data.warehouse.common.WarehouseTypeConstants;
1252import com.echothree.model.data.warehouse.server.entity.Location;
1253import com.echothree.model.data.warehouse.server.entity.LocationNameElement;
1254import com.echothree.model.data.warehouse.server.entity.LocationType;
1255import com.echothree.model.data.warehouse.server.entity.LocationUseType;
1256import com.echothree.model.data.warehouse.server.entity.Warehouse;
1257import com.echothree.model.data.warehouse.server.entity.WarehouseType;
1258import com.echothree.model.data.wishlist.common.WishlistPriorityConstants;
1259import com.echothree.model.data.wishlist.common.WishlistTypeConstants;
1260import com.echothree.model.data.wishlist.server.entity.WishlistPriority;
1261import com.echothree.model.data.wishlist.server.entity.WishlistType;
1262import com.echothree.model.data.workflow.common.WorkflowConstants;
1263import com.echothree.model.data.workflow.common.WorkflowDestinationConstants;
1264import com.echothree.model.data.workflow.common.WorkflowDestinationPartyTypeConstants;
1265import com.echothree.model.data.workflow.common.WorkflowDestinationSecurityRoleConstants;
1266import com.echothree.model.data.workflow.common.WorkflowDestinationSelectorConstants;
1267import com.echothree.model.data.workflow.common.WorkflowDestinationStepConstants;
1268import com.echothree.model.data.workflow.common.WorkflowEntityStatusConstants;
1269import com.echothree.model.data.workflow.common.WorkflowEntityTypeConstants;
1270import com.echothree.model.data.workflow.common.WorkflowEntranceConstants;
1271import com.echothree.model.data.workflow.common.WorkflowEntrancePartyTypeConstants;
1272import com.echothree.model.data.workflow.common.WorkflowEntranceSecurityRoleConstants;
1273import com.echothree.model.data.workflow.common.WorkflowEntranceSelectorConstants;
1274import com.echothree.model.data.workflow.common.WorkflowEntranceStepConstants;
1275import com.echothree.model.data.workflow.common.WorkflowSelectorKindConstants;
1276import com.echothree.model.data.workflow.common.WorkflowStepConstants;
1277import com.echothree.model.data.workflow.common.WorkflowStepTypeConstants;
1278import com.echothree.model.data.workflow.server.entity.Workflow;
1279import com.echothree.model.data.workflow.server.entity.WorkflowDestination;
1280import com.echothree.model.data.workflow.server.entity.WorkflowDestinationPartyType;
1281import com.echothree.model.data.workflow.server.entity.WorkflowDestinationSecurityRole;
1282import com.echothree.model.data.workflow.server.entity.WorkflowDestinationSelector;
1283import com.echothree.model.data.workflow.server.entity.WorkflowDestinationStep;
1284import com.echothree.model.data.workflow.server.entity.WorkflowEntityType;
1285import com.echothree.model.data.workflow.server.entity.WorkflowEntrance;
1286import com.echothree.model.data.workflow.server.entity.WorkflowEntrancePartyType;
1287import com.echothree.model.data.workflow.server.entity.WorkflowEntranceSecurityRole;
1288import com.echothree.model.data.workflow.server.entity.WorkflowEntranceSelector;
1289import com.echothree.model.data.workflow.server.entity.WorkflowEntranceStep;
1290import com.echothree.model.data.workflow.server.entity.WorkflowSelectorKind;
1291import com.echothree.model.data.workflow.server.entity.WorkflowStep;
1292import com.echothree.model.data.workflow.server.entity.WorkflowStepType;
1293import com.echothree.util.server.persistence.Session;
1294import graphql.annotations.annotationTypes.GraphQLField;
1295import graphql.annotations.annotationTypes.GraphQLID;
1296import graphql.annotations.annotationTypes.GraphQLName;
1297import graphql.annotations.annotationTypes.GraphQLNonNull;
1298import graphql.annotations.connection.GraphQLConnection;
1299import graphql.schema.DataFetchingEnvironment;
1300import java.util.ArrayList;
1301import java.util.Collection;
1302import static java.util.Collections.emptyList;
1303import java.util.stream.Collectors;
1304import javax.enterprise.inject.spi.CDI;
1305import javax.naming.NamingException;
1306
1307@GraphQLName("query")
1308public interface GraphQlQueries {
1309
1310    @GraphQLField
1311    @GraphQLName("searchKind")
1312    static SearchKindObject searchKind(final DataFetchingEnvironment env,
1313            @GraphQLName("searchKindName") final String searchKindName,
1314            @GraphQLName("id") @GraphQLID final String id) {
1315        SearchKind searchKind;
1316
1317        try {
1318            var commandForm = SearchUtil.getHome().getGetSearchKindForm();
1319
1320            commandForm.setSearchKindName(searchKindName);
1321            commandForm.setUuid(id);
1322
1323            searchKind = CDI.current().select(GetSearchKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1324        } catch (NamingException ex) {
1325            throw new RuntimeException(ex);
1326        }
1327
1328        return searchKind == null ? null : new SearchKindObject(searchKind);
1329    }
1330
1331    @GraphQLField
1332    @GraphQLName("searchKinds")
1333    @GraphQLNonNull
1334    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1335    static CountingPaginatedData<SearchKindObject> searchKinds(final DataFetchingEnvironment env) {
1336        CountingPaginatedData<SearchKindObject> data;
1337
1338        try {
1339            var searchControl = Session.getModelController(SearchControl.class);
1340            var totalCount = searchControl.countSearchKinds();
1341
1342            try(var objectLimiter = new ObjectLimiter(env, SearchKindConstants.COMPONENT_VENDOR_NAME, SearchKindConstants.ENTITY_TYPE_NAME, totalCount)) {
1343                var commandForm = SearchUtil.getHome().getGetSearchKindsForm();
1344                var entities = CDI.current().select(GetSearchKindsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1345
1346                if(entities == null) {
1347                    data = Connections.emptyConnection();
1348                } else {
1349                    var searchKinds = entities.stream().map(SearchKindObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1350
1351                    data = new CountedObjects<>(objectLimiter, searchKinds);
1352                }
1353            }
1354        } catch (NamingException ex) {
1355            throw new RuntimeException(ex);
1356        }
1357
1358        return data;
1359    }
1360
1361    @GraphQLField
1362    @GraphQLName("searchType")
1363    static SearchTypeObject searchType(final DataFetchingEnvironment env,
1364            @GraphQLName("searchKindName") final String searchKindName,
1365            @GraphQLName("searchTypeName") final String searchTypeName,
1366            @GraphQLName("id") @GraphQLID final String id) {
1367        SearchType searchType;
1368
1369        try {
1370            var commandForm = SearchUtil.getHome().getGetSearchTypeForm();
1371
1372            commandForm.setSearchKindName(searchKindName);
1373            commandForm.setSearchTypeName(searchTypeName);
1374            commandForm.setUuid(id);
1375
1376            searchType = CDI.current().select(GetSearchTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1377        } catch (NamingException ex) {
1378            throw new RuntimeException(ex);
1379        }
1380
1381        return searchType == null ? null : new SearchTypeObject(searchType);
1382    }
1383
1384    @GraphQLField
1385    @GraphQLName("searchTypes")
1386    @GraphQLNonNull
1387    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1388    static CountingPaginatedData<SearchTypeObject> searchTypes(final DataFetchingEnvironment env,
1389            @GraphQLName("searchKindName") @GraphQLNonNull final String searchKindName) {
1390        CountingPaginatedData<SearchTypeObject> data;
1391
1392        try {
1393            var commandForm = SearchUtil.getHome().getGetSearchTypesForm();
1394            var command = CDI.current().select(GetSearchTypesCommand.class).get();
1395
1396            commandForm.setSearchKindName(searchKindName);
1397
1398            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1399            if(totalEntities == null) {
1400                data = Connections.emptyConnection();
1401            } else {
1402                try(var objectLimiter = new ObjectLimiter(env, SearchTypeConstants.COMPONENT_VENDOR_NAME, SearchTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
1403                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1404
1405                    var searchTypes = entities.stream()
1406                            .map(SearchTypeObject::new)
1407                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1408
1409                    data = new CountedObjects<>(objectLimiter, searchTypes);
1410                }
1411            }
1412        } catch (NamingException ex) {
1413            throw new RuntimeException(ex);
1414        }
1415
1416        return data;
1417    }
1418
1419    @GraphQLField
1420    @GraphQLName("searchSortOrder")
1421    static SearchSortOrderObject searchSortOrder(final DataFetchingEnvironment env,
1422            @GraphQLName("searchKindName") final String searchKindName,
1423            @GraphQLName("searchSortOrderName") final String searchSortOrderName,
1424            @GraphQLName("id") @GraphQLID final String id) {
1425        SearchSortOrder searchSortOrder;
1426
1427        try {
1428            var commandForm = SearchUtil.getHome().getGetSearchSortOrderForm();
1429
1430            commandForm.setSearchKindName(searchKindName);
1431            commandForm.setSearchSortOrderName(searchSortOrderName);
1432            commandForm.setUuid(id);
1433
1434            searchSortOrder = CDI.current().select(GetSearchSortOrderCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1435        } catch (NamingException ex) {
1436            throw new RuntimeException(ex);
1437        }
1438
1439        return searchSortOrder == null ? null : new SearchSortOrderObject(searchSortOrder);
1440    }
1441
1442    @GraphQLField
1443    @GraphQLName("searchSortOrders")
1444    @GraphQLNonNull
1445    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1446    static CountingPaginatedData<SearchSortOrderObject> searchSortOrders(final DataFetchingEnvironment env,
1447            @GraphQLName("searchKindName") @GraphQLNonNull final String searchKindName) {
1448        CountingPaginatedData<SearchSortOrderObject> data;
1449
1450        try {
1451            var commandForm = SearchUtil.getHome().getGetSearchSortOrdersForm();
1452            var command = CDI.current().select(GetSearchSortOrdersCommand.class).get();
1453
1454            commandForm.setSearchKindName(searchKindName);
1455
1456            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1457            if(totalEntities == null) {
1458                data = Connections.emptyConnection();
1459            } else {
1460                try(var objectLimiter = new ObjectLimiter(env, SearchSortOrderConstants.COMPONENT_VENDOR_NAME, SearchSortOrderConstants.ENTITY_TYPE_NAME, totalEntities)) {
1461                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1462
1463                    var searchSortOrders = entities.stream()
1464                            .map(SearchSortOrderObject::new)
1465                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1466
1467                    data = new CountedObjects<>(objectLimiter, searchSortOrders);
1468                }
1469            }
1470        } catch (NamingException ex) {
1471            throw new RuntimeException(ex);
1472        }
1473
1474        return data;
1475    }
1476
1477    @GraphQLField
1478    @GraphQLName("searchUseType")
1479    static SearchUseTypeObject searchUseType(final DataFetchingEnvironment env,
1480            @GraphQLName("searchUseTypeName") final String searchUseTypeName,
1481            @GraphQLName("id") @GraphQLID final String id) {
1482        SearchUseType searchUseType;
1483
1484        try {
1485            var commandForm = SearchUtil.getHome().getGetSearchUseTypeForm();
1486
1487            commandForm.setSearchUseTypeName(searchUseTypeName);
1488            commandForm.setUuid(id);
1489
1490            searchUseType = CDI.current().select(GetSearchUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1491        } catch (NamingException ex) {
1492            throw new RuntimeException(ex);
1493        }
1494
1495        return searchUseType == null ? null : new SearchUseTypeObject(searchUseType);
1496    }
1497
1498    @GraphQLField
1499    @GraphQLName("searchUseTypes")
1500    @GraphQLNonNull
1501    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1502    static CountingPaginatedData<SearchUseTypeObject> searchUseTypes(final DataFetchingEnvironment env) {
1503        CountingPaginatedData<SearchUseTypeObject> data;
1504
1505        try {
1506            var searchControl = Session.getModelController(SearchControl.class);
1507            var totalCount = searchControl.countSearchUseTypes();
1508
1509            try(var objectLimiter = new ObjectLimiter(env, SearchUseTypeConstants.COMPONENT_VENDOR_NAME, SearchUseTypeConstants.ENTITY_TYPE_NAME, totalCount)) {
1510                var commandForm = SearchUtil.getHome().getGetSearchUseTypesForm();
1511                var entities = CDI.current().select(GetSearchUseTypesCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1512
1513                if(entities == null) {
1514                    data = Connections.emptyConnection();
1515                } else {
1516                    var searchUseTypes = entities.stream().map(SearchUseTypeObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1517
1518                    data = new CountedObjects<>(objectLimiter, searchUseTypes);
1519                }
1520            }
1521        } catch (NamingException ex) {
1522            throw new RuntimeException(ex);
1523        }
1524
1525        return data;
1526    }
1527
1528    @GraphQLField
1529    @GraphQLName("searchDefaultOperator")
1530    static SearchDefaultOperatorObject searchDefaultOperator(final DataFetchingEnvironment env,
1531            @GraphQLName("searchDefaultOperatorName") final String searchDefaultOperatorName,
1532            @GraphQLName("id") @GraphQLID final String id) {
1533        SearchDefaultOperator searchDefaultOperator;
1534
1535        try {
1536            var commandForm = SearchUtil.getHome().getGetSearchDefaultOperatorForm();
1537
1538            commandForm.setSearchDefaultOperatorName(searchDefaultOperatorName);
1539            commandForm.setUuid(id);
1540
1541            searchDefaultOperator = CDI.current().select(GetSearchDefaultOperatorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1542        } catch (NamingException ex) {
1543            throw new RuntimeException(ex);
1544        }
1545
1546        return searchDefaultOperator == null ? null : new SearchDefaultOperatorObject(searchDefaultOperator);
1547    }
1548
1549    @GraphQLField
1550    @GraphQLName("searchDefaultOperators")
1551    @GraphQLNonNull
1552    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1553    static CountingPaginatedData<SearchDefaultOperatorObject> searchDefaultOperators(final DataFetchingEnvironment env) {
1554        CountingPaginatedData<SearchDefaultOperatorObject> data;
1555
1556        try {
1557            var searchControl = Session.getModelController(SearchControl.class);
1558            var totalCount = searchControl.countSearchDefaultOperators();
1559
1560            try(var objectLimiter = new ObjectLimiter(env, SearchDefaultOperatorConstants.COMPONENT_VENDOR_NAME, SearchDefaultOperatorConstants.ENTITY_TYPE_NAME, totalCount)) {
1561                var commandForm = SearchUtil.getHome().getGetSearchDefaultOperatorsForm();
1562                var entities = CDI.current().select(GetSearchDefaultOperatorsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1563
1564                if(entities == null) {
1565                    data = Connections.emptyConnection();
1566                } else {
1567                    var searchDefaultOperators = entities.stream().map(SearchDefaultOperatorObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1568
1569                    data = new CountedObjects<>(objectLimiter, searchDefaultOperators);
1570                }
1571            }
1572        } catch (NamingException ex) {
1573            throw new RuntimeException(ex);
1574        }
1575
1576        return data;
1577    }
1578
1579    @GraphQLField
1580    @GraphQLName("searchSortDirection")
1581    static SearchSortDirectionObject searchSortDirection(final DataFetchingEnvironment env,
1582            @GraphQLName("searchSortDirectionName") final String searchSortDirectionName,
1583            @GraphQLName("id") @GraphQLID final String id) {
1584        SearchSortDirection searchSortDirection;
1585
1586        try {
1587            var commandForm = SearchUtil.getHome().getGetSearchSortDirectionForm();
1588
1589            commandForm.setSearchSortDirectionName(searchSortDirectionName);
1590            commandForm.setUuid(id);
1591
1592            searchSortDirection = CDI.current().select(GetSearchSortDirectionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1593        } catch (NamingException ex) {
1594            throw new RuntimeException(ex);
1595        }
1596
1597        return searchSortDirection == null ? null : new SearchSortDirectionObject(searchSortDirection);
1598    }
1599
1600    @GraphQLField
1601    @GraphQLName("searchSortDirections")
1602    @GraphQLNonNull
1603    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1604    static CountingPaginatedData<SearchSortDirectionObject> searchSortDirections(final DataFetchingEnvironment env) {
1605        CountingPaginatedData<SearchSortDirectionObject> data;
1606
1607        try {
1608            var searchControl = Session.getModelController(SearchControl.class);
1609            var totalCount = searchControl.countSearchSortDirections();
1610
1611            try(var objectLimiter = new ObjectLimiter(env, SearchSortDirectionConstants.COMPONENT_VENDOR_NAME, SearchSortDirectionConstants.ENTITY_TYPE_NAME, totalCount)) {
1612                var commandForm = SearchUtil.getHome().getGetSearchSortDirectionsForm();
1613                var entities = CDI.current().select(GetSearchSortDirectionsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1614
1615                if(entities == null) {
1616                    data = Connections.emptyConnection();
1617                } else {
1618                    var searchSortDirections = entities.stream().map(SearchSortDirectionObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1619
1620                    data = new CountedObjects<>(objectLimiter, searchSortDirections);
1621                }
1622            }
1623        } catch (NamingException ex) {
1624            throw new RuntimeException(ex);
1625        }
1626
1627        return data;
1628    }
1629
1630    @GraphQLField
1631    @GraphQLName("searchResultActionType")
1632    static SearchResultActionTypeObject searchResultActionType(final DataFetchingEnvironment env,
1633            @GraphQLName("searchResultActionTypeName") final String searchResultActionTypeName,
1634            @GraphQLName("id") @GraphQLID final String id) {
1635        SearchResultActionType searchResultActionType;
1636
1637        try {
1638            var commandForm = SearchUtil.getHome().getGetSearchResultActionTypeForm();
1639
1640            commandForm.setSearchResultActionTypeName(searchResultActionTypeName);
1641            commandForm.setUuid(id);
1642
1643            searchResultActionType = CDI.current().select(GetSearchResultActionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1644        } catch (NamingException ex) {
1645            throw new RuntimeException(ex);
1646        }
1647
1648        return searchResultActionType == null ? null : new SearchResultActionTypeObject(searchResultActionType);
1649    }
1650
1651    @GraphQLField
1652    @GraphQLName("searchResultActionTypes")
1653    @GraphQLNonNull
1654    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1655    static CountingPaginatedData<SearchResultActionTypeObject> searchResultActionTypes(final DataFetchingEnvironment env) {
1656        CountingPaginatedData<SearchResultActionTypeObject> data;
1657
1658        try {
1659            var commandForm = SearchUtil.getHome().getGetSearchResultActionTypesForm();
1660            var command = CDI.current().select(GetSearchResultActionTypesCommand.class).get();
1661
1662            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1663            if(totalEntities == null) {
1664                data = Connections.emptyConnection();
1665            } else {
1666                try(var objectLimiter = new ObjectLimiter(env, SearchResultActionTypeConstants.COMPONENT_VENDOR_NAME, SearchResultActionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
1667                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1668
1669                    var searchResultActionTypes = entities.stream()
1670                            .map(SearchResultActionTypeObject::new)
1671                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1672
1673                    data = new CountedObjects<>(objectLimiter, searchResultActionTypes);
1674                }
1675            }
1676        } catch (NamingException ex) {
1677            throw new RuntimeException(ex);
1678        }
1679
1680        return data;
1681    }
1682
1683    @GraphQLField
1684    @GraphQLName("searchCheckSpellingActionType")
1685    static SearchCheckSpellingActionTypeObject searchCheckSpellingActionType(final DataFetchingEnvironment env,
1686            @GraphQLName("searchCheckSpellingActionTypeName") final String searchCheckSpellingActionTypeName,
1687            @GraphQLName("id") @GraphQLID final String id) {
1688        SearchCheckSpellingActionType searchCheckSpellingActionType;
1689
1690        try {
1691            var commandForm = SearchUtil.getHome().getGetSearchCheckSpellingActionTypeForm();
1692
1693            commandForm.setSearchCheckSpellingActionTypeName(searchCheckSpellingActionTypeName);
1694            commandForm.setUuid(id);
1695
1696            searchCheckSpellingActionType = CDI.current().select(GetSearchCheckSpellingActionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1697        } catch (NamingException ex) {
1698            throw new RuntimeException(ex);
1699        }
1700
1701        return searchCheckSpellingActionType == null ? null : new SearchCheckSpellingActionTypeObject(searchCheckSpellingActionType);
1702    }
1703
1704    @GraphQLField
1705    @GraphQLName("searchCheckSpellingActionTypes")
1706    @GraphQLNonNull
1707    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1708    static CountingPaginatedData<SearchCheckSpellingActionTypeObject> searchCheckSpellingActionTypes(final DataFetchingEnvironment env) {
1709        CountingPaginatedData<SearchCheckSpellingActionTypeObject> data;
1710
1711        try {
1712            var commandForm = SearchUtil.getHome().getGetSearchCheckSpellingActionTypesForm();
1713            var command = CDI.current().select(GetSearchCheckSpellingActionTypesCommand.class).get();
1714
1715            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1716            if(totalEntities == null) {
1717                data = Connections.emptyConnection();
1718            } else {
1719                try(var objectLimiter = new ObjectLimiter(env, SearchCheckSpellingActionTypeConstants.COMPONENT_VENDOR_NAME, SearchCheckSpellingActionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
1720                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1721
1722                    var searchCheckSpellingActionTypes = entities.stream()
1723                            .map(SearchCheckSpellingActionTypeObject::new)
1724                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1725
1726                    data = new CountedObjects<>(objectLimiter, searchCheckSpellingActionTypes);
1727                }
1728            }
1729        } catch (NamingException ex) {
1730            throw new RuntimeException(ex);
1731        }
1732
1733        return data;
1734    }
1735
1736    @GraphQLField
1737    @GraphQLName("workflow")
1738    static WorkflowObject workflow(final DataFetchingEnvironment env,
1739            @GraphQLName("workflowName") final String workflowName,
1740            @GraphQLName("id") @GraphQLID final String id) {
1741        Workflow workflow;
1742
1743        try {
1744            var commandForm = WorkflowUtil.getHome().getGetWorkflowForm();
1745
1746            commandForm.setWorkflowName(workflowName);
1747            commandForm.setUuid(id);
1748
1749            workflow = CDI.current().select(GetWorkflowCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1750        } catch (NamingException ex) {
1751            throw new RuntimeException(ex);
1752        }
1753
1754        return workflow == null ? null : new WorkflowObject(workflow);
1755    }
1756
1757    @GraphQLField
1758    @GraphQLName("workflows")
1759    @GraphQLNonNull
1760    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1761    static CountingPaginatedData<WorkflowObject> workflows(final DataFetchingEnvironment env,
1762            @GraphQLName("selectorKindName") final String selectorKindName) {
1763        CountingPaginatedData<WorkflowObject> data;
1764
1765        try {
1766            var commandForm = WorkflowUtil.getHome().getGetWorkflowsForm();
1767            var command = CDI.current().select(GetWorkflowsCommand.class).get();
1768
1769            commandForm.setSelectorKindName(selectorKindName);
1770
1771            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1772            if(totalEntities == null) {
1773                data = Connections.emptyConnection();
1774            } else {
1775                try(var objectLimiter = new ObjectLimiter(env, WorkflowConstants.COMPONENT_VENDOR_NAME, WorkflowConstants.ENTITY_TYPE_NAME, totalEntities)) {
1776                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1777
1778                    var workflows = entities.stream()
1779                            .map(WorkflowObject::new)
1780                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1781
1782                    data = new CountedObjects<>(objectLimiter, workflows);
1783                }
1784            }
1785        } catch (NamingException ex) {
1786            throw new RuntimeException(ex);
1787        }
1788
1789        return data;
1790    }
1791    
1792    @GraphQLField
1793    @GraphQLName("workflowEntityType")
1794    static WorkflowEntityTypeObject workflowEntityType(final DataFetchingEnvironment env,
1795            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
1796            @GraphQLName("componentVendorName") @GraphQLNonNull final String componentVendorName,
1797            @GraphQLName("entityTypeName") @GraphQLNonNull final String entityTypeName) {
1798        WorkflowEntityType workflowEntityType;
1799
1800        try {
1801            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntityTypeForm();
1802
1803            commandForm.setWorkflowName(workflowName);
1804            commandForm.setComponentVendorName(componentVendorName);
1805            commandForm.setEntityTypeName(entityTypeName);
1806
1807            workflowEntityType = CDI.current().select(GetWorkflowEntityTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1808        } catch (NamingException ex) {
1809            throw new RuntimeException(ex);
1810        }
1811
1812        return workflowEntityType == null ? null : new WorkflowEntityTypeObject(workflowEntityType);
1813    }
1814
1815    @GraphQLField
1816    @GraphQLName("workflowEntityTypes")
1817    @GraphQLNonNull
1818    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1819    static CountingPaginatedData<WorkflowEntityTypeObject> workflowEntityTypes(final DataFetchingEnvironment env,
1820            @GraphQLName("workflowName") final String workflowName,
1821            @GraphQLName("componentVendorName") final String componentVendorName,
1822            @GraphQLName("entityTypeName") final String entityTypeName) {
1823        CountingPaginatedData<WorkflowEntityTypeObject> data;
1824
1825        try {
1826            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntityTypesForm();
1827            var command = CDI.current().select(GetWorkflowEntityTypesCommand.class).get();
1828
1829            commandForm.setWorkflowName(workflowName);
1830            commandForm.setComponentVendorName(componentVendorName);
1831            commandForm.setEntityTypeName(entityTypeName);
1832
1833            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1834            if(totalEntities == null) {
1835                data = Connections.emptyConnection();
1836            } else {
1837                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntityTypeConstants.COMPONENT_VENDOR_NAME, WorkflowEntityTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
1838                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1839
1840                    var workflowEntityTypes = entities.stream()
1841                            .map(WorkflowEntityTypeObject::new)
1842                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1843
1844                    data = new CountedObjects<>(objectLimiter, workflowEntityTypes);
1845                }
1846            }
1847        } catch (NamingException ex) {
1848            throw new RuntimeException(ex);
1849        }
1850
1851        return data;
1852    }
1853
1854    @GraphQLField
1855    @GraphQLName("workflowSelectorKind")
1856    static WorkflowSelectorKindObject workflowSelectorKind(final DataFetchingEnvironment env,
1857            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
1858            @GraphQLName("selectorKindName") @GraphQLNonNull final String selectorKindName) {
1859        WorkflowSelectorKind workflowSelectorKind;
1860
1861        try {
1862            var commandForm = WorkflowUtil.getHome().getGetWorkflowSelectorKindForm();
1863
1864            commandForm.setWorkflowName(workflowName);
1865            commandForm.setSelectorKindName(selectorKindName);
1866
1867            workflowSelectorKind = CDI.current().select(GetWorkflowSelectorKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1868        } catch (NamingException ex) {
1869            throw new RuntimeException(ex);
1870        }
1871
1872        return workflowSelectorKind == null ? null : new WorkflowSelectorKindObject(workflowSelectorKind);
1873    }
1874
1875    @GraphQLField
1876    @GraphQLName("workflowSelectorKinds")
1877    @GraphQLNonNull
1878    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1879    static CountingPaginatedData<WorkflowSelectorKindObject> workflowSelectorKinds(final DataFetchingEnvironment env,
1880            @GraphQLName("workflowName") final String workflowName,
1881            @GraphQLName("selectorKindName") final String selectorKindName) {
1882        CountingPaginatedData<WorkflowSelectorKindObject> data;
1883
1884        try {
1885            var commandForm = WorkflowUtil.getHome().getGetWorkflowSelectorKindsForm();
1886            var command = CDI.current().select(GetWorkflowSelectorKindsCommand.class).get();
1887
1888            commandForm.setWorkflowName(workflowName);
1889            commandForm.setSelectorKindName(selectorKindName);
1890
1891            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1892            if(totalEntities == null) {
1893                data = Connections.emptyConnection();
1894            } else {
1895                try(var objectLimiter = new ObjectLimiter(env, WorkflowSelectorKindConstants.COMPONENT_VENDOR_NAME, WorkflowSelectorKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
1896                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1897
1898                    var workflowSelectorKinds = entities.stream()
1899                            .map(WorkflowSelectorKindObject::new)
1900                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1901
1902                    data = new CountedObjects<>(objectLimiter, workflowSelectorKinds);
1903                }
1904            }
1905        } catch (NamingException ex) {
1906            throw new RuntimeException(ex);
1907        }
1908
1909        return data;
1910    }
1911
1912    @GraphQLField
1913    @GraphQLName("workflowEntityStatuses")
1914    @GraphQLNonNull
1915    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1916    static CountingPaginatedData<WorkflowEntityStatusObject> workflowEntityStatuses(final DataFetchingEnvironment env,
1917            @GraphQLName("workflowName") final String workflowName) {
1918        CountingPaginatedData<WorkflowEntityStatusObject> data;
1919
1920        try {
1921            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntityStatusesForm();
1922            var command = CDI.current().select(GetWorkflowEntityStatusesCommand.class).get();
1923
1924            commandForm.setWorkflowName(workflowName);
1925
1926            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1927            if(totalEntities == null) {
1928                data = Connections.emptyConnection();
1929            } else {
1930                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntityStatusConstants.COMPONENT_VENDOR_NAME, WorkflowEntityStatusConstants.ENTITY_TYPE_NAME, totalEntities)) {
1931                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1932
1933                    var workflowEntityStatuses = entities.stream()
1934                            .map(WorkflowEntityStatusObject::new)
1935                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1936
1937                    data = new CountedObjects<>(objectLimiter, workflowEntityStatuses);
1938                }
1939            }
1940        } catch (NamingException ex) {
1941            throw new RuntimeException(ex);
1942        }
1943
1944        return data;
1945    }
1946
1947    @GraphQLField
1948    @GraphQLName("workflowStep")
1949    static WorkflowStepObject workflowStep(final DataFetchingEnvironment env,
1950            @GraphQLName("workflowName") final String workflowName,
1951            @GraphQLName("workflowStepName") final String workflowStepName,
1952            @GraphQLName("id") @GraphQLID final String id) {
1953        WorkflowStep workflowStep;
1954
1955        try {
1956            var commandForm = WorkflowUtil.getHome().getGetWorkflowStepForm();
1957
1958            commandForm.setWorkflowName(workflowName);
1959            commandForm.setWorkflowStepName(workflowStepName);
1960            commandForm.setUuid(id);
1961
1962            workflowStep = CDI.current().select(GetWorkflowStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1963        } catch (NamingException ex) {
1964            throw new RuntimeException(ex);
1965        }
1966
1967        return workflowStep == null ? null : new WorkflowStepObject(workflowStep);
1968    }
1969
1970    @GraphQLField
1971    @GraphQLName("workflowSteps")
1972    @GraphQLNonNull
1973    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1974    static CountingPaginatedData<WorkflowStepObject> workflowSteps(final DataFetchingEnvironment env,
1975            @GraphQLName("workflowName") final String workflowName) {
1976        CountingPaginatedData<WorkflowStepObject> data;
1977
1978        try {
1979            var commandForm = WorkflowUtil.getHome().getGetWorkflowStepsForm();
1980            var command = CDI.current().select(GetWorkflowStepsCommand.class).get();
1981
1982            commandForm.setWorkflowName(workflowName);
1983
1984            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1985            if(totalEntities == null) {
1986                data = Connections.emptyConnection();
1987            } else {
1988                try(var objectLimiter = new ObjectLimiter(env, WorkflowStepConstants.COMPONENT_VENDOR_NAME, WorkflowStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
1989                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1990
1991                    var workflowSteps = entities.stream()
1992                            .map(WorkflowStepObject::new)
1993                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1994
1995                    data = new CountedObjects<>(objectLimiter, workflowSteps);
1996                }
1997            }
1998        } catch (NamingException ex) {
1999            throw new RuntimeException(ex);
2000        }
2001
2002        return data;
2003    }
2004    
2005    @GraphQLField
2006    @GraphQLName("workflowDestination")
2007    static WorkflowDestinationObject workflowDestination(final DataFetchingEnvironment env,
2008            @GraphQLName("workflowName") final String workflowName,
2009            @GraphQLName("workflowStepName") final String workflowStepName,
2010            @GraphQLName("workflowDestinationName") final String workflowDestinationName,
2011            @GraphQLName("id") @GraphQLID final String id) {
2012        WorkflowDestination workflowDestination;
2013
2014        try {
2015            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationForm();
2016
2017            commandForm.setWorkflowName(workflowName);
2018            commandForm.setWorkflowStepName(workflowStepName);
2019            commandForm.setWorkflowDestinationName(workflowDestinationName);
2020            commandForm.setUuid(id);
2021
2022            workflowDestination = CDI.current().select(GetWorkflowDestinationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2023        } catch (NamingException ex) {
2024            throw new RuntimeException(ex);
2025        }
2026
2027        return workflowDestination == null ? null : new WorkflowDestinationObject(workflowDestination);
2028    }
2029
2030    @GraphQLField
2031    @GraphQLName("workflowDestinations")
2032    @GraphQLNonNull
2033    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2034    static CountingPaginatedData<WorkflowDestinationObject> workflowDestinations(final DataFetchingEnvironment env,
2035            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2036            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName) {
2037        CountingPaginatedData<WorkflowDestinationObject> data;
2038
2039        try {
2040            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationsForm();
2041            var command = CDI.current().select(GetWorkflowDestinationsCommand.class).get();
2042
2043            commandForm.setWorkflowName(workflowName);
2044            commandForm.setWorkflowStepName(workflowStepName);
2045
2046            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2047            if(totalEntities == null) {
2048                data = Connections.emptyConnection();
2049            } else {
2050                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationConstants.ENTITY_TYPE_NAME, totalEntities)) {
2051                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2052
2053                    var workflowDestinations = entities.stream()
2054                            .map(WorkflowDestinationObject::new)
2055                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2056
2057                    data = new CountedObjects<>(objectLimiter, workflowDestinations);
2058                }
2059            }
2060        } catch (NamingException ex) {
2061            throw new RuntimeException(ex);
2062        }
2063
2064        return data;
2065    }
2066
2067    @GraphQLField
2068    @GraphQLName("workflowDestinationStep")
2069    static WorkflowDestinationStepObject workflowDestinationStep(final DataFetchingEnvironment env,
2070            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2071            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2072            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
2073            @GraphQLName("destinationWorkflowName") @GraphQLNonNull final String destinationWorkflowName,
2074            @GraphQLName("destinationWorkflowStepName") @GraphQLNonNull final String destinationWorkflowStepName) {
2075        WorkflowDestinationStep workflowDestinationStep;
2076
2077        try {
2078            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationStepForm();
2079
2080            commandForm.setWorkflowName(workflowName);
2081            commandForm.setWorkflowStepName(workflowStepName);
2082            commandForm.setWorkflowDestinationName(workflowDestinationName);
2083            commandForm.setDestinationWorkflowName(destinationWorkflowName);
2084            commandForm.setDestinationWorkflowStepName(destinationWorkflowStepName);
2085
2086            workflowDestinationStep = CDI.current().select(GetWorkflowDestinationStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2087        } catch (NamingException ex) {
2088            throw new RuntimeException(ex);
2089        }
2090
2091        return workflowDestinationStep == null ? null : new WorkflowDestinationStepObject(workflowDestinationStep);
2092    }
2093
2094    @GraphQLField
2095    @GraphQLName("workflowDestinationSteps")
2096    @GraphQLNonNull
2097    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2098    static CountingPaginatedData<WorkflowDestinationStepObject> workflowDestinationSteps(final DataFetchingEnvironment env,
2099            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2100            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2101            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName) {
2102        CountingPaginatedData<WorkflowDestinationStepObject> data;
2103
2104        try {
2105            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationStepsForm();
2106            var command = CDI.current().select(GetWorkflowDestinationStepsCommand.class).get();
2107
2108            commandForm.setWorkflowName(workflowName);
2109            commandForm.setWorkflowStepName(workflowStepName);
2110            commandForm.setWorkflowDestinationName(workflowDestinationName);
2111
2112            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2113            if(totalEntities == null) {
2114                data = Connections.emptyConnection();
2115            } else {
2116                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationStepConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
2117                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2118
2119                    var workflowDestinationSteps = entities.stream()
2120                            .map(WorkflowDestinationStepObject::new)
2121                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2122
2123                    data = new CountedObjects<>(objectLimiter, workflowDestinationSteps);
2124                }
2125            }
2126        } catch (NamingException ex) {
2127            throw new RuntimeException(ex);
2128        }
2129
2130        return data;
2131    }
2132
2133    @GraphQLField
2134    @GraphQLName("workflowDestinationPartyType")
2135    static WorkflowDestinationPartyTypeObject workflowDestinationPartyType(final DataFetchingEnvironment env,
2136            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2137            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2138            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
2139            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
2140        WorkflowDestinationPartyType workflowDestinationPartyType;
2141
2142        try {
2143            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationPartyTypeForm();
2144
2145            commandForm.setWorkflowName(workflowName);
2146            commandForm.setWorkflowStepName(workflowStepName);
2147            commandForm.setWorkflowDestinationName(workflowDestinationName);
2148            commandForm.setPartyTypeName(partyTypeName);
2149
2150            workflowDestinationPartyType = CDI.current().select(GetWorkflowDestinationPartyTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2151        } catch (NamingException ex) {
2152            throw new RuntimeException(ex);
2153        }
2154
2155        return workflowDestinationPartyType == null ? null : new WorkflowDestinationPartyTypeObject(workflowDestinationPartyType);
2156    }
2157
2158    @GraphQLField
2159    @GraphQLName("workflowDestinationPartyTypes")
2160    @GraphQLNonNull
2161    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2162    static CountingPaginatedData<WorkflowDestinationPartyTypeObject> workflowDestinationPartyTypes(final DataFetchingEnvironment env,
2163            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2164            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2165            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName) {
2166        CountingPaginatedData<WorkflowDestinationPartyTypeObject> data;
2167
2168        try {
2169            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationPartyTypesForm();
2170            var command = CDI.current().select(GetWorkflowDestinationPartyTypesCommand.class).get();
2171
2172            commandForm.setWorkflowName(workflowName);
2173            commandForm.setWorkflowStepName(workflowStepName);
2174            commandForm.setWorkflowDestinationName(workflowDestinationName);
2175
2176            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2177            if(totalEntities == null) {
2178                data = Connections.emptyConnection();
2179            } else {
2180                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationPartyTypeConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationPartyTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2181                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2182
2183                    var workflowDestinationPartyTypes = entities.stream()
2184                            .map(WorkflowDestinationPartyTypeObject::new)
2185                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2186
2187                    data = new CountedObjects<>(objectLimiter, workflowDestinationPartyTypes);
2188                }
2189            }
2190        } catch (NamingException ex) {
2191            throw new RuntimeException(ex);
2192        }
2193
2194        return data;
2195    }
2196
2197    @GraphQLField
2198    @GraphQLName("workflowDestinationSecurityRole")
2199    static WorkflowDestinationSecurityRoleObject workflowDestinationSecurityRole(final DataFetchingEnvironment env,
2200            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2201            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2202            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
2203            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName,
2204            @GraphQLName("securityRoleName") @GraphQLNonNull final String securityRoleName) {
2205        WorkflowDestinationSecurityRole workflowDestinationSecurityRole;
2206
2207        try {
2208            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationSecurityRoleForm();
2209
2210            commandForm.setWorkflowName(workflowName);
2211            commandForm.setWorkflowStepName(workflowStepName);
2212            commandForm.setWorkflowDestinationName(workflowDestinationName);
2213            commandForm.setPartyTypeName(partyTypeName);
2214            commandForm.setSecurityRoleName(securityRoleName);
2215
2216            workflowDestinationSecurityRole = CDI.current().select(GetWorkflowDestinationSecurityRoleCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2217        } catch (NamingException ex) {
2218            throw new RuntimeException(ex);
2219        }
2220
2221        return workflowDestinationSecurityRole == null ? null : new WorkflowDestinationSecurityRoleObject(workflowDestinationSecurityRole);
2222    }
2223
2224    @GraphQLField
2225    @GraphQLName("workflowDestinationSecurityRoles")
2226    @GraphQLNonNull
2227    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2228    static CountingPaginatedData<WorkflowDestinationSecurityRoleObject> workflowDestinationSecurityRoles(final DataFetchingEnvironment env,
2229            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2230            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2231            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
2232            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
2233        CountingPaginatedData<WorkflowDestinationSecurityRoleObject> data;
2234
2235        try {
2236            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationSecurityRolesForm();
2237            var command = CDI.current().select(GetWorkflowDestinationSecurityRolesCommand.class).get();
2238
2239            commandForm.setWorkflowName(workflowName);
2240            commandForm.setWorkflowStepName(workflowStepName);
2241            commandForm.setWorkflowDestinationName(workflowDestinationName);
2242            commandForm.setPartyTypeName(partyTypeName);
2243
2244            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2245            if(totalEntities == null) {
2246                data = Connections.emptyConnection();
2247            } else {
2248                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationSecurityRoleConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationSecurityRoleConstants.ENTITY_TYPE_NAME, totalEntities)) {
2249                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2250
2251                    var workflowDestinationSecurityRoles = entities.stream()
2252                            .map(WorkflowDestinationSecurityRoleObject::new)
2253                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2254
2255                    data = new CountedObjects<>(objectLimiter, workflowDestinationSecurityRoles);
2256                }
2257            }
2258        } catch (NamingException ex) {
2259            throw new RuntimeException(ex);
2260        }
2261
2262        return data;
2263    }
2264
2265    @GraphQLField
2266    @GraphQLName("workflowDestinationSelector")
2267    static WorkflowDestinationSelectorObject workflowDestinationSelector(final DataFetchingEnvironment env,
2268            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2269            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2270            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
2271            @GraphQLName("selectorName") @GraphQLNonNull final String selectorName) {
2272        WorkflowDestinationSelector workflowDestinationSelector;
2273
2274        try {
2275            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationSelectorForm();
2276
2277            commandForm.setWorkflowName(workflowName);
2278            commandForm.setWorkflowStepName(workflowStepName);
2279            commandForm.setWorkflowDestinationName(workflowDestinationName);
2280            commandForm.setSelectorName(selectorName);
2281
2282            workflowDestinationSelector = CDI.current().select(GetWorkflowDestinationSelectorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2283        } catch (NamingException ex) {
2284            throw new RuntimeException(ex);
2285        }
2286
2287        return workflowDestinationSelector == null ? null : new WorkflowDestinationSelectorObject(workflowDestinationSelector);
2288    }
2289
2290    @GraphQLField
2291    @GraphQLName("workflowDestinationSelectors")
2292    @GraphQLNonNull
2293    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2294    static CountingPaginatedData<WorkflowDestinationSelectorObject> workflowDestinationSelectors(final DataFetchingEnvironment env,
2295            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2296            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2297            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName) {
2298        CountingPaginatedData<WorkflowDestinationSelectorObject> data;
2299
2300        try {
2301            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationSelectorsForm();
2302            var command = CDI.current().select(GetWorkflowDestinationSelectorsCommand.class).get();
2303
2304            commandForm.setWorkflowName(workflowName);
2305            commandForm.setWorkflowStepName(workflowStepName);
2306            commandForm.setWorkflowDestinationName(workflowDestinationName);
2307
2308            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2309            if(totalEntities == null) {
2310                data = Connections.emptyConnection();
2311            } else {
2312                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationSelectorConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationSelectorConstants.ENTITY_TYPE_NAME, totalEntities)) {
2313                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2314
2315                    var workflowDestinationSelectors = entities.stream()
2316                            .map(WorkflowDestinationSelectorObject::new)
2317                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2318
2319                    data = new CountedObjects<>(objectLimiter, workflowDestinationSelectors);
2320                }
2321            }
2322        } catch (NamingException ex) {
2323            throw new RuntimeException(ex);
2324        }
2325
2326        return data;
2327    }
2328
2329    @GraphQLField
2330    @GraphQLName("workflowEntrance")
2331    static WorkflowEntranceObject workflowEntrance(final DataFetchingEnvironment env,
2332            @GraphQLName("workflowName") final String workflowName,
2333            @GraphQLName("workflowEntranceName") final String workflowEntranceName,
2334            @GraphQLName("id") @GraphQLID final String id) {
2335        WorkflowEntrance workflowEntrance;
2336
2337        try {
2338            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceForm();
2339
2340            commandForm.setWorkflowName(workflowName);
2341            commandForm.setWorkflowEntranceName(workflowEntranceName);
2342            commandForm.setUuid(id);
2343
2344            workflowEntrance = CDI.current().select(GetWorkflowEntranceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2345        } catch (NamingException ex) {
2346            throw new RuntimeException(ex);
2347        }
2348
2349        return workflowEntrance == null ? null : new WorkflowEntranceObject(workflowEntrance);
2350    }
2351
2352    @GraphQLField
2353    @GraphQLName("workflowEntrances")
2354    @GraphQLNonNull
2355    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2356    static CountingPaginatedData<WorkflowEntranceObject> workflowEntrances(final DataFetchingEnvironment env,
2357            @GraphQLName("workflowName") final String workflowName) {
2358        CountingPaginatedData<WorkflowEntranceObject> data;
2359
2360        try {
2361            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntrancesForm();
2362            var command = CDI.current().select(GetWorkflowEntrancesCommand.class).get();
2363
2364            commandForm.setWorkflowName(workflowName);
2365
2366            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2367            if(totalEntities == null) {
2368                data = Connections.emptyConnection();
2369            } else {
2370                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntranceConstants.COMPONENT_VENDOR_NAME, WorkflowEntranceConstants.ENTITY_TYPE_NAME, totalEntities)) {
2371                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2372
2373                    var workflowEntrances = entities.stream()
2374                            .map(WorkflowEntranceObject::new)
2375                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2376
2377                    data = new CountedObjects<>(objectLimiter, workflowEntrances);
2378                }
2379            }
2380        } catch (NamingException ex) {
2381            throw new RuntimeException(ex);
2382        }
2383
2384        return data;
2385    }
2386
2387    @GraphQLField
2388    @GraphQLName("workflowEntranceStep")
2389    static WorkflowEntranceStepObject workflowEntranceStep(final DataFetchingEnvironment env,
2390            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2391            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2392            @GraphQLName("entranceWorkflowName") @GraphQLNonNull final String entranceWorkflowName,
2393            @GraphQLName("entranceWorkflowStepName") @GraphQLNonNull final String entranceWorkflowStepName) {
2394        WorkflowEntranceStep workflowEntranceStep;
2395
2396        try {
2397            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceStepForm();
2398
2399            commandForm.setWorkflowName(workflowName);
2400            commandForm.setWorkflowEntranceName(workflowEntranceName);
2401            commandForm.setEntranceWorkflowName(entranceWorkflowName);
2402            commandForm.setEntranceWorkflowStepName(entranceWorkflowStepName);
2403
2404            workflowEntranceStep = CDI.current().select(GetWorkflowEntranceStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2405        } catch (NamingException ex) {
2406            throw new RuntimeException(ex);
2407        }
2408
2409        return workflowEntranceStep == null ? null : new WorkflowEntranceStepObject(workflowEntranceStep);
2410    }
2411
2412    @GraphQLField
2413    @GraphQLName("workflowEntranceSteps")
2414    @GraphQLNonNull
2415    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2416    static CountingPaginatedData<WorkflowEntranceStepObject> workflowEntranceSteps(final DataFetchingEnvironment env,
2417            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2418            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName) {
2419        CountingPaginatedData<WorkflowEntranceStepObject> data;
2420
2421        try {
2422            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceStepsForm();
2423            var command = CDI.current().select(GetWorkflowEntranceStepsCommand.class).get();
2424
2425            commandForm.setWorkflowName(workflowName);
2426            commandForm.setWorkflowEntranceName(workflowEntranceName);
2427
2428            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2429            if(totalEntities == null) {
2430                data = Connections.emptyConnection();
2431            } else {
2432                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntranceStepConstants.COMPONENT_VENDOR_NAME, WorkflowEntranceStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
2433                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2434
2435                    var workflowEntranceSteps = entities.stream()
2436                            .map(WorkflowEntranceStepObject::new)
2437                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2438
2439                    data = new CountedObjects<>(objectLimiter, workflowEntranceSteps);
2440                }
2441            }
2442        } catch (NamingException ex) {
2443            throw new RuntimeException(ex);
2444        }
2445
2446        return data;
2447    }
2448
2449    @GraphQLField
2450    @GraphQLName("workflowEntrancePartyType")
2451    static WorkflowEntrancePartyTypeObject workflowEntrancePartyType(final DataFetchingEnvironment env,
2452            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2453            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2454            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
2455        WorkflowEntrancePartyType workflowEntrancePartyType;
2456
2457        try {
2458            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntrancePartyTypeForm();
2459
2460            commandForm.setWorkflowName(workflowName);
2461            commandForm.setWorkflowEntranceName(workflowEntranceName);
2462            commandForm.setPartyTypeName(partyTypeName);
2463
2464            workflowEntrancePartyType = CDI.current().select(GetWorkflowEntrancePartyTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2465        } catch (NamingException ex) {
2466            throw new RuntimeException(ex);
2467        }
2468
2469        return workflowEntrancePartyType == null ? null : new WorkflowEntrancePartyTypeObject(workflowEntrancePartyType);
2470    }
2471
2472    @GraphQLField
2473    @GraphQLName("workflowEntrancePartyTypes")
2474    @GraphQLNonNull
2475    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2476    static CountingPaginatedData<WorkflowEntrancePartyTypeObject> workflowEntrancePartyTypes(final DataFetchingEnvironment env,
2477            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2478            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName) {
2479        CountingPaginatedData<WorkflowEntrancePartyTypeObject> data;
2480
2481        try {
2482            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntrancePartyTypesForm();
2483            var command = CDI.current().select(GetWorkflowEntrancePartyTypesCommand.class).get();
2484
2485            commandForm.setWorkflowName(workflowName);
2486            commandForm.setWorkflowEntranceName(workflowEntranceName);
2487
2488            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2489            if(totalEntities == null) {
2490                data = Connections.emptyConnection();
2491            } else {
2492                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntrancePartyTypeConstants.COMPONENT_VENDOR_NAME, WorkflowEntrancePartyTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2493                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2494
2495                    var workflowEntrancePartyTypes = entities.stream()
2496                            .map(WorkflowEntrancePartyTypeObject::new)
2497                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2498
2499                    data = new CountedObjects<>(objectLimiter, workflowEntrancePartyTypes);
2500                }
2501            }
2502        } catch (NamingException ex) {
2503            throw new RuntimeException(ex);
2504        }
2505
2506        return data;
2507    }
2508
2509    @GraphQLField
2510    @GraphQLName("workflowEntranceSecurityRole")
2511    static WorkflowEntranceSecurityRoleObject workflowEntranceSecurityRole(final DataFetchingEnvironment env,
2512            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2513            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2514            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName,
2515            @GraphQLName("securityRoleName") @GraphQLNonNull final String securityRoleName) {
2516        WorkflowEntranceSecurityRole workflowEntranceSecurityRole;
2517
2518        try {
2519            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceSecurityRoleForm();
2520
2521            commandForm.setWorkflowName(workflowName);
2522            commandForm.setWorkflowEntranceName(workflowEntranceName);
2523            commandForm.setPartyTypeName(partyTypeName);
2524            commandForm.setSecurityRoleName(securityRoleName);
2525
2526            workflowEntranceSecurityRole = CDI.current().select(GetWorkflowEntranceSecurityRoleCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2527        } catch (NamingException ex) {
2528            throw new RuntimeException(ex);
2529        }
2530
2531        return workflowEntranceSecurityRole == null ? null : new WorkflowEntranceSecurityRoleObject(workflowEntranceSecurityRole);
2532    }
2533
2534    @GraphQLField
2535    @GraphQLName("workflowEntranceSecurityRoles")
2536    @GraphQLNonNull
2537    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2538    static CountingPaginatedData<WorkflowEntranceSecurityRoleObject> workflowEntranceSecurityRoles(final DataFetchingEnvironment env,
2539            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2540            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2541            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
2542        CountingPaginatedData<WorkflowEntranceSecurityRoleObject> data;
2543
2544        try {
2545            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceSecurityRolesForm();
2546            var command = CDI.current().select(GetWorkflowEntranceSecurityRolesCommand.class).get();
2547
2548            commandForm.setWorkflowName(workflowName);
2549            commandForm.setWorkflowEntranceName(workflowEntranceName);
2550            commandForm.setPartyTypeName(partyTypeName);
2551
2552            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2553            if(totalEntities == null) {
2554                data = Connections.emptyConnection();
2555            } else {
2556                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntranceSecurityRoleConstants.COMPONENT_VENDOR_NAME, WorkflowEntranceSecurityRoleConstants.ENTITY_TYPE_NAME, totalEntities)) {
2557                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2558
2559                    var workflowEntranceSecurityRoles = entities.stream()
2560                            .map(WorkflowEntranceSecurityRoleObject::new)
2561                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2562
2563                    data = new CountedObjects<>(objectLimiter, workflowEntranceSecurityRoles);
2564                }
2565            }
2566        } catch (NamingException ex) {
2567            throw new RuntimeException(ex);
2568        }
2569
2570        return data;
2571    }
2572
2573    @GraphQLField
2574    @GraphQLName("workflowEntranceSelector")
2575    static WorkflowEntranceSelectorObject workflowEntranceSelector(final DataFetchingEnvironment env,
2576            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2577            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2578            @GraphQLName("selectorName") @GraphQLNonNull final String selectorName) {
2579        WorkflowEntranceSelector workflowEntranceSelector;
2580
2581        try {
2582            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceSelectorForm();
2583
2584            commandForm.setWorkflowName(workflowName);
2585            commandForm.setWorkflowEntranceName(workflowEntranceName);
2586            commandForm.setSelectorName(selectorName);
2587
2588            workflowEntranceSelector = CDI.current().select(GetWorkflowEntranceSelectorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2589        } catch (NamingException ex) {
2590            throw new RuntimeException(ex);
2591        }
2592
2593        return workflowEntranceSelector == null ? null : new WorkflowEntranceSelectorObject(workflowEntranceSelector);
2594    }
2595
2596    @GraphQLField
2597    @GraphQLName("workflowEntranceSelectors")
2598    @GraphQLNonNull
2599    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2600    static CountingPaginatedData<WorkflowEntranceSelectorObject> workflowEntranceSelectors(final DataFetchingEnvironment env,
2601            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2602            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName) {
2603        CountingPaginatedData<WorkflowEntranceSelectorObject> data;
2604
2605        try {
2606            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceSelectorsForm();
2607            var command = CDI.current().select(GetWorkflowEntranceSelectorsCommand.class).get();
2608
2609            commandForm.setWorkflowName(workflowName);
2610            commandForm.setWorkflowEntranceName(workflowEntranceName);
2611
2612            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2613            if(totalEntities == null) {
2614                data = Connections.emptyConnection();
2615            } else {
2616                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntranceSelectorConstants.COMPONENT_VENDOR_NAME, WorkflowEntranceSelectorConstants.ENTITY_TYPE_NAME, totalEntities)) {
2617                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2618
2619                    var workflowEntranceSelectors = entities.stream()
2620                            .map(WorkflowEntranceSelectorObject::new)
2621                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2622
2623                    data = new CountedObjects<>(objectLimiter, workflowEntranceSelectors);
2624                }
2625            }
2626        } catch (NamingException ex) {
2627            throw new RuntimeException(ex);
2628        }
2629
2630        return data;
2631    }
2632
2633    @GraphQLField
2634    @GraphQLName("workflowStepType")
2635    static WorkflowStepTypeObject workflowStepType(final DataFetchingEnvironment env,
2636            @GraphQLName("workflowStepTypeName") final String workflowStepTypeName,
2637            @GraphQLName("id") @GraphQLID final String id) {
2638        WorkflowStepType workflowStepType;
2639
2640        try {
2641            var commandForm = WorkflowUtil.getHome().getGetWorkflowStepTypeForm();
2642
2643            commandForm.setWorkflowStepTypeName(workflowStepTypeName);
2644            commandForm.setUuid(id);
2645
2646            workflowStepType = CDI.current().select(GetWorkflowStepTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2647        } catch (NamingException ex) {
2648            throw new RuntimeException(ex);
2649        }
2650
2651        return workflowStepType == null ? null : new WorkflowStepTypeObject(workflowStepType);
2652    }
2653
2654    @GraphQLField
2655    @GraphQLName("workflowStepTypes")
2656    @GraphQLNonNull
2657    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2658    static CountingPaginatedData<WorkflowStepTypeObject> workflowStepTypes(final DataFetchingEnvironment env) {
2659        CountingPaginatedData<WorkflowStepTypeObject> data;
2660
2661        try {
2662            var commandForm = WorkflowUtil.getHome().getGetWorkflowStepTypesForm();
2663            var command = CDI.current().select(GetWorkflowStepTypesCommand.class).get();
2664
2665            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2666            if(totalEntities == null) {
2667                data = Connections.emptyConnection();
2668            } else {
2669                try(var objectLimiter = new ObjectLimiter(env, WorkflowStepTypeConstants.COMPONENT_VENDOR_NAME, WorkflowStepTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2670                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2671
2672                    var workflowStepTypes = entities.stream()
2673                            .map(WorkflowStepTypeObject::new)
2674                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2675
2676                    data = new CountedObjects<>(objectLimiter, workflowStepTypes);
2677                }
2678            }
2679        } catch (NamingException ex) {
2680            throw new RuntimeException(ex);
2681        }
2682
2683        return data;
2684    }
2685
2686    @GraphQLField
2687    @GraphQLName("sequence")
2688    static SequenceObject sequence(final DataFetchingEnvironment env,
2689            @GraphQLName("sequenceTypeName") final String sequenceTypeName,
2690            @GraphQLName("sequenceName") final String sequenceName,
2691            @GraphQLName("id") @GraphQLID final String id) {
2692        Sequence sequence;
2693
2694        try {
2695            var commandForm = SequenceUtil.getHome().getGetSequenceForm();
2696
2697            commandForm.setSequenceTypeName(sequenceTypeName);
2698            commandForm.setSequenceName(sequenceName);
2699            commandForm.setUuid(id);
2700
2701            sequence = CDI.current().select(GetSequenceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2702        } catch (NamingException ex) {
2703            throw new RuntimeException(ex);
2704        }
2705
2706        return sequence == null ? null : new SequenceObject(sequence);
2707    }
2708
2709    @GraphQLField
2710    @GraphQLName("sequenceValue")
2711    static GetSequenceValueResultObject sequenceValue(final DataFetchingEnvironment env,
2712            @GraphQLName("sequenceTypeName") final String sequenceTypeName,
2713            @GraphQLName("sequenceName") final String sequenceName,
2714            @GraphQLName("id") @GraphQLID final String id) {
2715        GetSequenceValueResultObject result = null;
2716
2717        try {
2718            var commandForm = SequenceUtil.getHome().getGetSequenceValueForm();
2719
2720            commandForm.setSequenceTypeName(sequenceTypeName);
2721            commandForm.setSequenceName(sequenceName);
2722            commandForm.setUuid(id);
2723
2724            var commandResult = SequenceUtil.getHome().getSequenceValue(BaseGraphQl.getUserVisitPK(env), commandForm);
2725
2726            if(!commandResult.hasErrors()) {
2727                result = new GetSequenceValueResultObject(commandResult.getExecutionResult().getResult());
2728            }
2729        } catch (NamingException ex) {
2730            throw new RuntimeException(ex);
2731        }
2732
2733        return result;
2734    }
2735
2736    @GraphQLField
2737    @GraphQLName("sequences")
2738    @GraphQLNonNull
2739    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2740    static CountingPaginatedData<SequenceObject> sequences(final DataFetchingEnvironment env,
2741            @GraphQLName("sequenceTypeName") @GraphQLNonNull final String sequenceTypeName) {
2742        CountingPaginatedData<SequenceObject> data;
2743
2744        try {
2745            var commandForm = SequenceUtil.getHome().getGetSequencesForm();
2746            var command = CDI.current().select(GetSequencesCommand.class).get();
2747
2748            commandForm.setSequenceTypeName(sequenceTypeName);
2749
2750            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2751            if(totalEntities == null) {
2752                data = Connections.emptyConnection();
2753            } else {
2754                try(var objectLimiter = new ObjectLimiter(env, SequenceConstants.COMPONENT_VENDOR_NAME, SequenceConstants.ENTITY_TYPE_NAME, totalEntities)) {
2755                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2756
2757                    var sequences = entities.stream()
2758                            .map(SequenceObject::new)
2759                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2760
2761                    data = new CountedObjects<>(objectLimiter, sequences);
2762                }
2763            }
2764        } catch (NamingException ex) {
2765            throw new RuntimeException(ex);
2766        }
2767
2768        return data;
2769    }
2770
2771    @GraphQLField
2772    @GraphQLName("sequenceType")
2773    static SequenceTypeObject sequenceType(final DataFetchingEnvironment env,
2774            @GraphQLName("sequenceTypeName") final String sequenceTypeName,
2775            @GraphQLName("id") @GraphQLID final String id) {
2776        SequenceType sequenceType;
2777
2778        try {
2779            var commandForm = SequenceUtil.getHome().getGetSequenceTypeForm();
2780
2781            commandForm.setSequenceTypeName(sequenceTypeName);
2782            commandForm.setUuid(id);
2783
2784            sequenceType = CDI.current().select(GetSequenceTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2785        } catch (NamingException ex) {
2786            throw new RuntimeException(ex);
2787        }
2788
2789        return sequenceType == null ? null : new SequenceTypeObject(sequenceType);
2790    }
2791
2792    @GraphQLField
2793    @GraphQLName("sequenceTypes")
2794    @GraphQLNonNull
2795    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2796    static CountingPaginatedData<SequenceTypeObject> sequenceTypes(final DataFetchingEnvironment env) {
2797        CountingPaginatedData<SequenceTypeObject> data;
2798
2799        try {
2800            var commandForm = SequenceUtil.getHome().getGetSequenceTypesForm();
2801            var command = CDI.current().select(GetSequenceTypesCommand.class).get();
2802
2803            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2804            if(totalEntities == null) {
2805                data = Connections.emptyConnection();
2806            } else {
2807                try(var objectLimiter = new ObjectLimiter(env, SequenceTypeConstants.COMPONENT_VENDOR_NAME, SequenceTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2808                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2809
2810                    var sequenceTypes = entities.stream()
2811                            .map(SequenceTypeObject::new)
2812                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2813
2814                    data = new CountedObjects<>(objectLimiter, sequenceTypes);
2815                }
2816            }
2817        } catch (NamingException ex) {
2818            throw new RuntimeException(ex);
2819        }
2820
2821        return data;
2822    }
2823
2824    @GraphQLField
2825    @GraphQLName("sequenceChecksumType")
2826    static SequenceChecksumTypeObject sequenceChecksumType(final DataFetchingEnvironment env,
2827            @GraphQLName("sequenceChecksumTypeName") @GraphQLNonNull final String sequenceChecksumTypeName) {
2828        SequenceChecksumType sequenceChecksumType;
2829
2830        try {
2831            var commandForm = SequenceUtil.getHome().getGetSequenceChecksumTypeForm();
2832
2833            commandForm.setSequenceChecksumTypeName(sequenceChecksumTypeName);
2834
2835            sequenceChecksumType = CDI.current().select(GetSequenceChecksumTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2836        } catch (NamingException ex) {
2837            throw new RuntimeException(ex);
2838        }
2839
2840        return sequenceChecksumType == null ? null : new SequenceChecksumTypeObject(sequenceChecksumType);
2841    }
2842
2843    @GraphQLField
2844    @GraphQLName("sequenceChecksumTypes")
2845    @GraphQLNonNull
2846    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2847    static CountingPaginatedData<SequenceChecksumTypeObject> sequenceChecksumTypes(final DataFetchingEnvironment env) {
2848        CountingPaginatedData<SequenceChecksumTypeObject> data;
2849
2850        try {
2851            var commandForm = SequenceUtil.getHome().getGetSequenceChecksumTypesForm();
2852            var command = CDI.current().select(GetSequenceChecksumTypesCommand.class).get();
2853
2854            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2855            if(totalEntities == null) {
2856                data = Connections.emptyConnection();
2857            } else {
2858                try(var objectLimiter = new ObjectLimiter(env, SequenceChecksumTypeConstants.COMPONENT_VENDOR_NAME, SequenceChecksumTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2859                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2860
2861                    var sequenceChecksumTypes = entities.stream()
2862                            .map(SequenceChecksumTypeObject::new)
2863                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2864
2865                    data = new CountedObjects<>(objectLimiter, sequenceChecksumTypes);
2866                }
2867            }
2868        } catch (NamingException ex) {
2869            throw new RuntimeException(ex);
2870        }
2871
2872        return data;
2873    }
2874
2875    @GraphQLField
2876    @GraphQLName("sequenceEncoderType")
2877    static SequenceEncoderTypeObject sequenceEncoderType(final DataFetchingEnvironment env,
2878            @GraphQLName("sequenceEncoderTypeName") @GraphQLNonNull final String sequenceEncoderTypeName) {
2879        SequenceEncoderType sequenceEncoderType;
2880
2881        try {
2882            var commandForm = SequenceUtil.getHome().getGetSequenceEncoderTypeForm();
2883
2884            commandForm.setSequenceEncoderTypeName(sequenceEncoderTypeName);
2885
2886            sequenceEncoderType = CDI.current().select(GetSequenceEncoderTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2887        } catch (NamingException ex) {
2888            throw new RuntimeException(ex);
2889        }
2890
2891        return sequenceEncoderType == null ? null : new SequenceEncoderTypeObject(sequenceEncoderType);
2892    }
2893
2894    @GraphQLField
2895    @GraphQLName("sequenceEncoderTypes")
2896    @GraphQLNonNull
2897    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2898    static CountingPaginatedData<SequenceEncoderTypeObject> sequenceEncoderTypes(final DataFetchingEnvironment env) {
2899        CountingPaginatedData<SequenceEncoderTypeObject> data;
2900
2901        try {
2902            var commandForm = SequenceUtil.getHome().getGetSequenceEncoderTypesForm();
2903            var command = CDI.current().select(GetSequenceEncoderTypesCommand.class).get();
2904
2905            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2906            if(totalEntities == null) {
2907                data = Connections.emptyConnection();
2908            } else {
2909                try(var objectLimiter = new ObjectLimiter(env, SequenceEncoderTypeConstants.COMPONENT_VENDOR_NAME, SequenceEncoderTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2910                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2911
2912                    var sequenceEncoderTypes = entities.stream()
2913                            .map(SequenceEncoderTypeObject::new)
2914                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2915
2916                    data = new CountedObjects<>(objectLimiter, sequenceEncoderTypes);
2917                }
2918            }
2919        } catch (NamingException ex) {
2920            throw new RuntimeException(ex);
2921        }
2922
2923        return data;
2924    }
2925
2926    @GraphQLField
2927    @GraphQLName("selectorKind")
2928    static SelectorKindObject selectorKind(final DataFetchingEnvironment env,
2929            @GraphQLName("selectorKindName") final String selectorKindName,
2930            @GraphQLName("id") @GraphQLID final String id) {
2931        SelectorKind selectorKind;
2932
2933        try {
2934            var commandForm = SelectorUtil.getHome().getGetSelectorKindForm();
2935
2936            commandForm.setSelectorKindName(selectorKindName);
2937            commandForm.setUuid(id);
2938
2939            selectorKind = CDI.current().select(GetSelectorKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2940        } catch (NamingException ex) {
2941            throw new RuntimeException(ex);
2942        }
2943
2944        return selectorKind == null ? null : new SelectorKindObject(selectorKind);
2945    }
2946
2947    @GraphQLField
2948    @GraphQLName("selectorKinds")
2949    @GraphQLNonNull
2950    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2951    static CountingPaginatedData<SelectorKindObject> selectorKinds(final DataFetchingEnvironment env) {
2952        CountingPaginatedData<SelectorKindObject> data;
2953
2954        try {
2955            var commandForm = SelectorUtil.getHome().getGetSelectorKindsForm();
2956            var command = CDI.current().select(GetSelectorKindsCommand.class).get();
2957
2958            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2959            if(totalEntities == null) {
2960                data = Connections.emptyConnection();
2961            } else {
2962                try(var objectLimiter = new ObjectLimiter(env, SelectorKindConstants.COMPONENT_VENDOR_NAME, SelectorKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
2963                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2964
2965                    var selectorKinds = entities.stream()
2966                            .map(SelectorKindObject::new)
2967                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2968
2969                    data = new CountedObjects<>(objectLimiter, selectorKinds);
2970                }
2971            }
2972        } catch (NamingException ex) {
2973            throw new RuntimeException(ex);
2974        }
2975
2976        return data;
2977    }
2978    
2979    @GraphQLField
2980    @GraphQLName("selectorType")
2981    static SelectorTypeObject selectorType(final DataFetchingEnvironment env,
2982            @GraphQLName("selectorKindName") final String selectorKindName,
2983            @GraphQLName("selectorTypeName") final String selectorTypeName,
2984            @GraphQLName("id") @GraphQLID final String id) {
2985        SelectorType selectorType;
2986
2987        try {
2988            var commandForm = SelectorUtil.getHome().getGetSelectorTypeForm();
2989
2990            commandForm.setSelectorKindName(selectorKindName);
2991            commandForm.setSelectorTypeName(selectorTypeName);
2992            commandForm.setUuid(id);
2993
2994            selectorType = CDI.current().select(GetSelectorTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2995        } catch (NamingException ex) {
2996            throw new RuntimeException(ex);
2997        }
2998
2999        return selectorType == null ? null : new SelectorTypeObject(selectorType);
3000    }
3001
3002    @GraphQLField
3003    @GraphQLName("selectorTypes")
3004    @GraphQLNonNull
3005    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3006    static CountingPaginatedData<SelectorTypeObject> selectorTypes(final DataFetchingEnvironment env,
3007            @GraphQLName("selectorKindName") @GraphQLNonNull final String selectorKindName) {
3008        CountingPaginatedData<SelectorTypeObject> data;
3009
3010        try {
3011            var commandForm = SelectorUtil.getHome().getGetSelectorTypesForm();
3012            var command = CDI.current().select(GetSelectorTypesCommand.class).get();
3013
3014            commandForm.setSelectorKindName(selectorKindName);
3015
3016            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3017            if(totalEntities == null) {
3018                data = Connections.emptyConnection();
3019            } else {
3020                try(var objectLimiter = new ObjectLimiter(env, SelectorTypeConstants.COMPONENT_VENDOR_NAME, SelectorTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
3021                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3022
3023                    var selectorTypes = entities.stream()
3024                            .map(SelectorTypeObject::new)
3025                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3026
3027                    data = new CountedObjects<>(objectLimiter, selectorTypes);
3028                }
3029            }
3030        } catch (NamingException ex) {
3031            throw new RuntimeException(ex);
3032        }
3033
3034        return data;
3035    }
3036
3037    @GraphQLField
3038    @GraphQLName("selector")
3039    static SelectorObject selector(final DataFetchingEnvironment env,
3040            @GraphQLName("selectorKindName") final String selectorKindName,
3041            @GraphQLName("selectorTypeName") final String selectorTypeName,
3042            @GraphQLName("selectorName") final String selectorName,
3043            @GraphQLName("id") @GraphQLID final String id) {
3044        Selector selector;
3045
3046        try {
3047            var commandForm = SelectorUtil.getHome().getGetSelectorForm();
3048
3049            commandForm.setSelectorKindName(selectorKindName);
3050            commandForm.setSelectorTypeName(selectorTypeName);
3051            commandForm.setSelectorName(selectorName);
3052            commandForm.setUuid(id);
3053
3054            selector = CDI.current().select(GetSelectorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3055        } catch (NamingException ex) {
3056            throw new RuntimeException(ex);
3057        }
3058
3059        return selector == null ? null : new SelectorObject(selector);
3060    }
3061
3062    @GraphQLField
3063    @GraphQLName("selectors")
3064    static Collection<SelectorObject> selectors(final DataFetchingEnvironment env,
3065            @GraphQLName("selectorKindName") @GraphQLNonNull final String selectorKindName,
3066            @GraphQLName("selectorTypeName") @GraphQLNonNull final String selectorTypeName) {
3067        Collection<Selector> selectors;
3068        Collection<SelectorObject> selectorObjects;
3069
3070        try {
3071            var commandForm = SelectorUtil.getHome().getGetSelectorsForm();
3072
3073            commandForm.setSelectorKindName(selectorKindName);
3074            commandForm.setSelectorTypeName(selectorTypeName);
3075
3076            selectors = CDI.current().select(GetSelectorsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3077        } catch (NamingException ex) {
3078            throw new RuntimeException(ex);
3079        }
3080
3081        if(selectors == null) {
3082            selectorObjects = emptyList();
3083        } else {
3084            selectorObjects = new ArrayList<>(selectors.size());
3085
3086            selectors.stream()
3087                    .map(SelectorObject::new)
3088                    .forEachOrdered(selectorObjects::add);
3089        }
3090
3091        return selectorObjects;
3092    }
3093
3094    @GraphQLField
3095    @GraphQLName("filterKind")
3096    static FilterKindObject filterKind(final DataFetchingEnvironment env,
3097            @GraphQLName("filterKindName") final String filterKindName,
3098            @GraphQLName("id") @GraphQLID final String id) {
3099        FilterKind filterKind;
3100
3101        try {
3102            var commandForm = FilterUtil.getHome().getGetFilterKindForm();
3103
3104            commandForm.setFilterKindName(filterKindName);
3105            commandForm.setUuid(id);
3106
3107            filterKind = CDI.current().select(GetFilterKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3108        } catch (NamingException ex) {
3109            throw new RuntimeException(ex);
3110        }
3111
3112        return filterKind == null ? null : new FilterKindObject(filterKind);
3113    }
3114
3115    @GraphQLField
3116    @GraphQLName("filterKinds")
3117    @GraphQLNonNull
3118    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3119    static CountingPaginatedData<FilterKindObject> filterKinds(final DataFetchingEnvironment env) {
3120        CountingPaginatedData<FilterKindObject> data;
3121
3122        try {
3123            var commandForm = FilterUtil.getHome().getGetFilterKindsForm();
3124            var command = CDI.current().select(GetFilterKindsCommand.class).get();
3125
3126            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3127            if(totalEntities == null) {
3128                data = Connections.emptyConnection();
3129            } else {
3130                try(var objectLimiter = new ObjectLimiter(env, FilterKindConstants.COMPONENT_VENDOR_NAME, FilterKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
3131                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3132
3133                    var filterKinds = entities.stream()
3134                            .map(FilterKindObject::new)
3135                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3136
3137                    data = new CountedObjects<>(objectLimiter, filterKinds);
3138                }
3139            }
3140        } catch (NamingException ex) {
3141            throw new RuntimeException(ex);
3142        }
3143
3144        return data;
3145    }
3146
3147    @GraphQLField
3148    @GraphQLName("filterType")
3149    static FilterTypeObject filterType(final DataFetchingEnvironment env,
3150            @GraphQLName("filterKindName") final String filterKindName,
3151            @GraphQLName("filterTypeName") final String filterTypeName,
3152            @GraphQLName("id") @GraphQLID final String id) {
3153        FilterType filterType;
3154
3155        try {
3156            var commandForm = FilterUtil.getHome().getGetFilterTypeForm();
3157
3158            commandForm.setFilterKindName(filterKindName);
3159            commandForm.setFilterTypeName(filterTypeName);
3160            commandForm.setUuid(id);
3161
3162            filterType = CDI.current().select(GetFilterTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3163        } catch (NamingException ex) {
3164            throw new RuntimeException(ex);
3165        }
3166
3167        return filterType == null ? null : new FilterTypeObject(filterType);
3168    }
3169
3170    @GraphQLField
3171    @GraphQLName("filterTypes")
3172    @GraphQLNonNull
3173    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3174    static CountingPaginatedData<FilterTypeObject> filterTypes(final DataFetchingEnvironment env,
3175            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName) {
3176        CountingPaginatedData<FilterTypeObject> data;
3177
3178        try {
3179            var commandForm = FilterUtil.getHome().getGetFilterTypesForm();
3180            var command = CDI.current().select(GetFilterTypesCommand.class).get();
3181
3182            commandForm.setFilterKindName(filterKindName);
3183
3184            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3185            if(totalEntities == null) {
3186                data = Connections.emptyConnection();
3187            } else {
3188                try(var objectLimiter = new ObjectLimiter(env, FilterTypeConstants.COMPONENT_VENDOR_NAME, FilterTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
3189                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3190
3191                    var filterTypes = entities.stream()
3192                            .map(FilterTypeObject::new)
3193                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3194
3195                    data = new CountedObjects<>(objectLimiter, filterTypes);
3196                }
3197            }
3198        } catch (NamingException ex) {
3199            throw new RuntimeException(ex);
3200        }
3201
3202        return data;
3203    }
3204
3205    @GraphQLField
3206    @GraphQLName("filter")
3207    static FilterObject filter(final DataFetchingEnvironment env,
3208            @GraphQLName("filterKindName") final String filterKindName,
3209            @GraphQLName("filterTypeName") final String filterTypeName,
3210            @GraphQLName("filterName") final String filterName,
3211            @GraphQLName("id") @GraphQLID final String id) {
3212        Filter filter;
3213
3214        try {
3215            var commandForm = FilterUtil.getHome().getGetFilterForm();
3216
3217            commandForm.setFilterKindName(filterKindName);
3218            commandForm.setFilterTypeName(filterTypeName);
3219            commandForm.setFilterName(filterName);
3220            commandForm.setUuid(id);
3221
3222            filter = CDI.current().select(GetFilterCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3223        } catch (NamingException ex) {
3224            throw new RuntimeException(ex);
3225        }
3226
3227        return filter == null ? null : new FilterObject(filter);
3228    }
3229
3230    @GraphQLField
3231    @GraphQLName("filters")
3232    @GraphQLNonNull
3233    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3234    static CountingPaginatedData<FilterObject> filters(final DataFetchingEnvironment env,
3235            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3236            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName) {
3237        CountingPaginatedData<FilterObject> data;
3238
3239        try {
3240            var commandForm = FilterUtil.getHome().getGetFiltersForm();
3241            var command = CDI.current().select(GetFiltersCommand.class).get();
3242
3243            commandForm.setFilterKindName(filterKindName);
3244            commandForm.setFilterTypeName(filterTypeName);
3245
3246            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3247            if(totalEntities == null) {
3248                data = Connections.emptyConnection();
3249            } else {
3250                try(var objectLimiter = new ObjectLimiter(env, FilterConstants.COMPONENT_VENDOR_NAME, FilterConstants.ENTITY_TYPE_NAME, totalEntities)) {
3251                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3252
3253                    var filters = entities.stream()
3254                            .map(FilterObject::new)
3255                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3256
3257                    data = new CountedObjects<>(objectLimiter, filters);
3258                }
3259            }
3260        } catch (NamingException ex) {
3261            throw new RuntimeException(ex);
3262        }
3263
3264        return data;
3265    }
3266
3267    @GraphQLField
3268    @GraphQLName("filterEntranceStep")
3269    static FilterEntranceStepObject filterEntranceStep(final DataFetchingEnvironment env,
3270            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3271            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3272            @GraphQLName("filterName") @GraphQLNonNull final String filterName,
3273            @GraphQLName("filterStepName") @GraphQLNonNull final String filterStepName) {
3274        FilterEntranceStep filterEntranceStep;
3275
3276        try {
3277            var commandForm = FilterUtil.getHome().getGetFilterEntranceStepForm();
3278
3279            commandForm.setFilterKindName(filterKindName);
3280            commandForm.setFilterTypeName(filterTypeName);
3281            commandForm.setFilterName(filterName);
3282            commandForm.setFilterStepName(filterStepName);
3283
3284            filterEntranceStep = CDI.current().select(GetFilterEntranceStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3285        } catch (NamingException ex) {
3286            throw new RuntimeException(ex);
3287        }
3288
3289        return filterEntranceStep == null ? null : new FilterEntranceStepObject(filterEntranceStep);
3290    }
3291
3292    @GraphQLField
3293    @GraphQLName("filterEntranceSteps")
3294    @GraphQLNonNull
3295    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3296    static CountingPaginatedData<FilterEntranceStepObject> filterEntranceSteps(final DataFetchingEnvironment env,
3297            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3298            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3299            @GraphQLName("filterName") @GraphQLNonNull final String filterName) {
3300        CountingPaginatedData<FilterEntranceStepObject> data;
3301
3302        try {
3303            var commandForm = FilterUtil.getHome().getGetFilterEntranceStepsForm();
3304            var command = CDI.current().select(GetFilterEntranceStepsCommand.class).get();
3305
3306            commandForm.setFilterKindName(filterKindName);
3307            commandForm.setFilterTypeName(filterTypeName);
3308            commandForm.setFilterName(filterName);
3309
3310            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3311            if(totalEntities == null) {
3312                data = Connections.emptyConnection();
3313            } else {
3314                try(var objectLimiter = new ObjectLimiter(env, FilterEntranceStepConstants.COMPONENT_VENDOR_NAME, FilterEntranceStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
3315                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3316
3317                    var filterEntranceSteps = entities.stream()
3318                            .map(FilterEntranceStepObject::new)
3319                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3320
3321                    data = new CountedObjects<>(objectLimiter, filterEntranceSteps);
3322                }
3323            }
3324        } catch (NamingException ex) {
3325            throw new RuntimeException(ex);
3326        }
3327
3328        return data;
3329    }
3330
3331    @GraphQLField
3332    @GraphQLName("filterStep")
3333    static FilterStepObject filterStep(final DataFetchingEnvironment env,
3334            @GraphQLName("filterKindName") final String filterKindName,
3335            @GraphQLName("filterTypeName") final String filterTypeName,
3336            @GraphQLName("filterName") final String filterName,
3337            @GraphQLName("filterStepName") final String filterStepName,
3338            @GraphQLName("id") @GraphQLID final String id) {
3339        FilterStep filterStep;
3340
3341        try {
3342            var commandForm = FilterUtil.getHome().getGetFilterStepForm();
3343
3344            commandForm.setFilterKindName(filterKindName);
3345            commandForm.setFilterTypeName(filterTypeName);
3346            commandForm.setFilterName(filterName);
3347            commandForm.setFilterStepName(filterStepName);
3348            commandForm.setUuid(id);
3349
3350            filterStep = CDI.current().select(GetFilterStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3351        } catch (NamingException ex) {
3352            throw new RuntimeException(ex);
3353        }
3354
3355        return filterStep == null ? null : new FilterStepObject(filterStep);
3356    }
3357
3358    @GraphQLField
3359    @GraphQLName("filterSteps")
3360    @GraphQLNonNull
3361    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3362    static CountingPaginatedData<FilterStepObject> filterSteps(final DataFetchingEnvironment env,
3363            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3364            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3365            @GraphQLName("filterName") @GraphQLNonNull final String filterName) {
3366        CountingPaginatedData<FilterStepObject> data;
3367
3368        try {
3369            var commandForm = FilterUtil.getHome().getGetFilterStepsForm();
3370            var command = CDI.current().select(GetFilterStepsCommand.class).get();
3371
3372            commandForm.setFilterKindName(filterKindName);
3373            commandForm.setFilterTypeName(filterTypeName);
3374            commandForm.setFilterName(filterName);
3375
3376            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3377            if(totalEntities == null) {
3378                data = Connections.emptyConnection();
3379            } else {
3380                try(var objectLimiter = new ObjectLimiter(env, FilterStepConstants.COMPONENT_VENDOR_NAME, FilterStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
3381                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3382
3383                    var filterSteps = entities.stream()
3384                            .map(FilterStepObject::new)
3385                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3386
3387                    data = new CountedObjects<>(objectLimiter, filterSteps);
3388                }
3389            }
3390        } catch (NamingException ex) {
3391            throw new RuntimeException(ex);
3392        }
3393
3394        return data;
3395    }
3396
3397    @GraphQLField
3398    @GraphQLName("filterStepElement")
3399    static FilterStepElementObject filterStepElement(final DataFetchingEnvironment env,
3400            @GraphQLName("filterKindName") final String filterKindName,
3401            @GraphQLName("filterTypeName") final String filterTypeName,
3402            @GraphQLName("filterName") final String filterName,
3403            @GraphQLName("filterStepName") final String filterStepName,
3404            @GraphQLName("filterStepElementName") final String filterStepElementName,
3405            @GraphQLName("id") @GraphQLID final String id) {
3406        FilterStepElement filterStepElement;
3407
3408        try {
3409            var commandForm = FilterUtil.getHome().getGetFilterStepElementForm();
3410
3411            commandForm.setFilterKindName(filterKindName);
3412            commandForm.setFilterTypeName(filterTypeName);
3413            commandForm.setFilterName(filterName);
3414            commandForm.setFilterStepName(filterStepName);
3415            commandForm.setFilterStepElementName(filterStepElementName);
3416            commandForm.setUuid(id);
3417
3418            filterStepElement = CDI.current().select(GetFilterStepElementCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3419        } catch (NamingException ex) {
3420            throw new RuntimeException(ex);
3421        }
3422
3423        return filterStepElement == null ? null : new FilterStepElementObject(filterStepElement);
3424    }
3425
3426    @GraphQLField
3427    @GraphQLName("filterStepElements")
3428    @GraphQLNonNull
3429    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3430    static CountingPaginatedData<FilterStepElementObject> filterStepElements(final DataFetchingEnvironment env,
3431            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3432            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3433            @GraphQLName("filterName") @GraphQLNonNull final String filterName,
3434            @GraphQLName("filterStepName") @GraphQLNonNull final String filterStepName) {
3435        CountingPaginatedData<FilterStepElementObject> data;
3436
3437        try {
3438            var commandForm = FilterUtil.getHome().getGetFilterStepElementsForm();
3439            var command = CDI.current().select(GetFilterStepElementsCommand.class).get();
3440
3441            commandForm.setFilterKindName(filterKindName);
3442            commandForm.setFilterTypeName(filterTypeName);
3443            commandForm.setFilterName(filterName);
3444            commandForm.setFilterStepName(filterStepName);
3445
3446            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3447            if(totalEntities == null) {
3448                data = Connections.emptyConnection();
3449            } else {
3450                try(var objectLimiter = new ObjectLimiter(env, FilterStepElementConstants.COMPONENT_VENDOR_NAME, FilterStepElementConstants.ENTITY_TYPE_NAME, totalEntities)) {
3451                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3452
3453                    var filterStepElements = entities.stream()
3454                            .map(FilterStepElementObject::new)
3455                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3456
3457                    data = new CountedObjects<>(objectLimiter, filterStepElements);
3458                }
3459            }
3460        } catch (NamingException ex) {
3461            throw new RuntimeException(ex);
3462        }
3463
3464        return data;
3465    }
3466
3467    @GraphQLField
3468    @GraphQLName("filterStepDestination")
3469    static FilterStepDestinationObject filterStepDestination(final DataFetchingEnvironment env,
3470            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3471            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3472            @GraphQLName("filterName") @GraphQLNonNull final String filterName,
3473            @GraphQLName("fromFilterStepName") @GraphQLNonNull final String fromFilterStepName,
3474            @GraphQLName("toFilterStepName") @GraphQLNonNull final String toFilterStepName) {
3475        FilterStepDestination filterStepDestination;
3476
3477        try {
3478            var commandForm = FilterUtil.getHome().getGetFilterStepDestinationForm();
3479
3480            commandForm.setFilterKindName(filterKindName);
3481            commandForm.setFilterTypeName(filterTypeName);
3482            commandForm.setFilterName(filterName);
3483            commandForm.setFromFilterStepName(fromFilterStepName);
3484            commandForm.setToFilterStepName(toFilterStepName);
3485
3486            filterStepDestination = CDI.current().select(GetFilterStepDestinationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3487        } catch (NamingException ex) {
3488            throw new RuntimeException(ex);
3489        }
3490
3491        return filterStepDestination == null ? null : new FilterStepDestinationObject(filterStepDestination);
3492    }
3493
3494    @GraphQLField
3495    @GraphQLName("filterStepDestinations")
3496    @GraphQLNonNull
3497    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3498    static CountingPaginatedData<FilterStepDestinationObject> filterStepDestinations(final DataFetchingEnvironment env,
3499            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3500            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3501            @GraphQLName("filterName") @GraphQLNonNull final String filterName,
3502            @GraphQLName("fromFilterStepName") final String fromFilterStepName,
3503            @GraphQLName("toFilterStepName") final String toFilterStepName) {
3504        CountingPaginatedData<FilterStepDestinationObject> data;
3505
3506        try {
3507            var commandForm = FilterUtil.getHome().getGetFilterStepDestinationsForm();
3508            var command = CDI.current().select(GetFilterStepDestinationsCommand.class).get();
3509
3510            commandForm.setFilterKindName(filterKindName);
3511            commandForm.setFilterTypeName(filterTypeName);
3512            commandForm.setFilterName(filterName);
3513            commandForm.setFromFilterStepName(fromFilterStepName);
3514            commandForm.setToFilterStepName(toFilterStepName);
3515
3516            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3517            if(totalEntities == null) {
3518                data = Connections.emptyConnection();
3519            } else {
3520                try(var objectLimiter = new ObjectLimiter(env, FilterStepDestinationConstants.COMPONENT_VENDOR_NAME, FilterStepDestinationConstants.ENTITY_TYPE_NAME, totalEntities)) {
3521                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3522
3523                    var filterStepDestinations = entities.stream()
3524                            .map(FilterStepDestinationObject::new)
3525                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3526
3527                    data = new CountedObjects<>(objectLimiter, filterStepDestinations);
3528                }
3529            }
3530        } catch (NamingException ex) {
3531            throw new RuntimeException(ex);
3532        }
3533
3534        return data;
3535    }
3536
3537    @GraphQLField
3538    @GraphQLName("filterAdjustmentSource")
3539    static FilterAdjustmentSourceObject filterAdjustmentSource(final DataFetchingEnvironment env,
3540            @GraphQLName("filterAdjustmentSourceName") @GraphQLNonNull final String filterAdjustmentSourceName) {
3541        FilterAdjustmentSource filterAdjustmentSource;
3542
3543        try {
3544            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentSourceForm();
3545
3546            commandForm.setFilterAdjustmentSourceName(filterAdjustmentSourceName);
3547
3548            filterAdjustmentSource = CDI.current().select(GetFilterAdjustmentSourceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3549        } catch (NamingException ex) {
3550            throw new RuntimeException(ex);
3551        }
3552
3553        return filterAdjustmentSource == null ? null : new FilterAdjustmentSourceObject(filterAdjustmentSource);
3554    }
3555
3556    @GraphQLField
3557    @GraphQLName("filterAdjustmentSources")
3558    @GraphQLNonNull
3559    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3560    static CountingPaginatedData<FilterAdjustmentSourceObject> filterAdjustmentSources(final DataFetchingEnvironment env) {
3561        CountingPaginatedData<FilterAdjustmentSourceObject> data;
3562
3563        try {
3564            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentSourcesForm();
3565            var command = CDI.current().select(GetFilterAdjustmentSourcesCommand.class).get();
3566
3567            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3568            if(totalEntities == null) {
3569                data = Connections.emptyConnection();
3570            } else {
3571                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)) {
3572                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3573
3574                    var filterAdjustmentSources = entities.stream()
3575                            .map(FilterAdjustmentSourceObject::new)
3576                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3577
3578                    data = new CountedObjects<>(objectLimiter, filterAdjustmentSources);
3579                }
3580            }
3581        } catch (NamingException ex) {
3582            throw new RuntimeException(ex);
3583        }
3584
3585        return data;
3586    }
3587
3588    @GraphQLField
3589    @GraphQLName("filterAdjustmentType")
3590    static FilterAdjustmentTypeObject filterAdjustmentType(final DataFetchingEnvironment env,
3591            @GraphQLName("filterAdjustmentTypeName") @GraphQLNonNull final String filterAdjustmentTypeName) {
3592        FilterAdjustmentType filterAdjustmentType;
3593
3594        try {
3595            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentTypeForm();
3596
3597            commandForm.setFilterAdjustmentTypeName(filterAdjustmentTypeName);
3598
3599            filterAdjustmentType = CDI.current().select(GetFilterAdjustmentTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3600        } catch (NamingException ex) {
3601            throw new RuntimeException(ex);
3602        }
3603
3604        return filterAdjustmentType == null ? null : new FilterAdjustmentTypeObject(filterAdjustmentType);
3605    }
3606
3607    @GraphQLField
3608    @GraphQLName("filterAdjustmentTypes")
3609    @GraphQLNonNull
3610    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3611    static CountingPaginatedData<FilterAdjustmentTypeObject> filterAdjustmentTypes(final DataFetchingEnvironment env) {
3612        CountingPaginatedData<FilterAdjustmentTypeObject> data;
3613
3614        try {
3615            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentTypesForm();
3616            var command = CDI.current().select(GetFilterAdjustmentTypesCommand.class).get();
3617
3618            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3619            if(totalEntities == null) {
3620                data = Connections.emptyConnection();
3621            } else {
3622                try(var objectLimiter = new ObjectLimiter(env, FilterAdjustmentTypeConstants.COMPONENT_VENDOR_NAME, FilterAdjustmentTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
3623                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3624
3625                    var filterAdjustmentTypes = entities.stream()
3626                            .map(FilterAdjustmentTypeObject::new)
3627                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3628
3629                    data = new CountedObjects<>(objectLimiter, filterAdjustmentTypes);
3630                }
3631            }
3632        } catch (NamingException ex) {
3633            throw new RuntimeException(ex);
3634        }
3635
3636        return data;
3637    }
3638
3639    @GraphQLField
3640    @GraphQLName("filterAdjustment")
3641    static FilterAdjustmentObject filterAdjustment(final DataFetchingEnvironment env,
3642            @GraphQLName("filterKindName") final String filterKindName,
3643            @GraphQLName("filterAdjustmentName") final String filterAdjustmentName,
3644            @GraphQLName("id") @GraphQLID final String id) {
3645        FilterAdjustment filterAdjustment;
3646
3647        try {
3648            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentForm();
3649
3650            commandForm.setFilterKindName(filterKindName);
3651            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3652            commandForm.setUuid(id);
3653
3654            filterAdjustment = CDI.current().select(GetFilterAdjustmentCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3655        } catch (NamingException ex) {
3656            throw new RuntimeException(ex);
3657        }
3658
3659        return filterAdjustment == null ? null : new FilterAdjustmentObject(filterAdjustment);
3660    }
3661
3662    @GraphQLField
3663    @GraphQLName("filterAdjustments")
3664    static Collection<FilterAdjustmentObject> filterAdjustments(final DataFetchingEnvironment env,
3665            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName) {
3666        Collection<FilterAdjustment> filterAdjustments;
3667        Collection<FilterAdjustmentObject> filterAdjustmentObjects;
3668
3669        try {
3670            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentsForm();
3671
3672            commandForm.setFilterKindName(filterKindName);
3673
3674            filterAdjustments = CDI.current().select(GetFilterAdjustmentsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3675        } catch (NamingException ex) {
3676            throw new RuntimeException(ex);
3677        }
3678
3679        if(filterAdjustments == null) {
3680            filterAdjustmentObjects = emptyList();
3681        } else {
3682            filterAdjustmentObjects = new ArrayList<>(filterAdjustments.size());
3683
3684            filterAdjustments.stream()
3685                    .map(FilterAdjustmentObject::new)
3686                    .forEachOrdered(filterAdjustmentObjects::add);
3687        }
3688
3689        return filterAdjustmentObjects;
3690    }
3691
3692    @GraphQLField
3693    @GraphQLName("filterAdjustmentAmount")
3694    static FilterAdjustmentAmountObject filterAdjustmentAmount(final DataFetchingEnvironment env,
3695            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3696            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName,
3697            @GraphQLName("unitOfMeasureName") final String unitOfMeasureName,
3698            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName,
3699            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
3700            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
3701        FilterAdjustmentAmount filterAdjustmentAmount;
3702
3703        try {
3704            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentAmountForm();
3705
3706            commandForm.setFilterKindName(filterKindName);
3707            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3708            commandForm.setUnitOfMeasureName(unitOfMeasureName);
3709            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
3710            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
3711            commandForm.setCurrencyIsoName(currencyIsoName);
3712
3713            filterAdjustmentAmount = CDI.current().select(GetFilterAdjustmentAmountCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3714        } catch (NamingException ex) {
3715            throw new RuntimeException(ex);
3716        }
3717
3718        return filterAdjustmentAmount == null ? null : new FilterAdjustmentAmountObject(filterAdjustmentAmount);
3719    }
3720
3721    @GraphQLField
3722    @GraphQLName("filterAdjustmentAmounts")
3723    static Collection<FilterAdjustmentAmountObject> filterAdjustmentAmounts(final DataFetchingEnvironment env,
3724            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3725            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName) {
3726        Collection<FilterAdjustmentAmount> filterAdjustmentAmounts;
3727        Collection<FilterAdjustmentAmountObject> filterAdjustmentAmountObjects;
3728
3729        try {
3730            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentAmountsForm();
3731
3732            commandForm.setFilterKindName(filterKindName);
3733            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3734
3735            filterAdjustmentAmounts = CDI.current().select(GetFilterAdjustmentAmountsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3736        } catch (NamingException ex) {
3737            throw new RuntimeException(ex);
3738        }
3739
3740        if(filterAdjustmentAmounts == null) {
3741            filterAdjustmentAmountObjects = emptyList();
3742        } else {
3743            filterAdjustmentAmountObjects = new ArrayList<>(filterAdjustmentAmounts.size());
3744
3745            filterAdjustmentAmounts.stream()
3746                    .map(FilterAdjustmentAmountObject::new)
3747                    .forEachOrdered(filterAdjustmentAmountObjects::add);
3748        }
3749
3750        return filterAdjustmentAmountObjects;
3751    }
3752
3753    @GraphQLField
3754    @GraphQLName("filterAdjustmentFixedAmount")
3755    static FilterAdjustmentFixedAmountObject filterAdjustmentFixedAmount(final DataFetchingEnvironment env,
3756            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3757            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName,
3758            @GraphQLName("unitOfMeasureName") final String unitOfMeasureName,
3759            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName,
3760            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
3761            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
3762        FilterAdjustmentFixedAmount filterAdjustmentFixedAmount;
3763
3764        try {
3765            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentFixedAmountForm();
3766
3767            commandForm.setFilterKindName(filterKindName);
3768            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3769            commandForm.setUnitOfMeasureName(unitOfMeasureName);
3770            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
3771            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
3772            commandForm.setCurrencyIsoName(currencyIsoName);
3773
3774            filterAdjustmentFixedAmount = CDI.current().select(GetFilterAdjustmentFixedAmountCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3775        } catch (NamingException ex) {
3776            throw new RuntimeException(ex);
3777        }
3778
3779        return filterAdjustmentFixedAmount == null ? null : new FilterAdjustmentFixedAmountObject(filterAdjustmentFixedAmount);
3780    }
3781
3782    @GraphQLField
3783    @GraphQLName("filterAdjustmentFixedAmounts")
3784    static Collection<FilterAdjustmentFixedAmountObject> filterAdjustmentFixedAmounts(final DataFetchingEnvironment env,
3785            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3786            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName) {
3787        Collection<FilterAdjustmentFixedAmount> filterAdjustmentFixedAmounts;
3788        Collection<FilterAdjustmentFixedAmountObject> filterAdjustmentFixedAmountObjects;
3789
3790        try {
3791            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentFixedAmountsForm();
3792
3793            commandForm.setFilterKindName(filterKindName);
3794            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3795
3796            filterAdjustmentFixedAmounts = CDI.current().select(GetFilterAdjustmentFixedAmountsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3797        } catch (NamingException ex) {
3798            throw new RuntimeException(ex);
3799        }
3800
3801        if(filterAdjustmentFixedAmounts == null) {
3802            filterAdjustmentFixedAmountObjects = emptyList();
3803        } else {
3804            filterAdjustmentFixedAmountObjects = new ArrayList<>(filterAdjustmentFixedAmounts.size());
3805
3806            filterAdjustmentFixedAmounts.stream()
3807                    .map(FilterAdjustmentFixedAmountObject::new)
3808                    .forEachOrdered(filterAdjustmentFixedAmountObjects::add);
3809        }
3810
3811        return filterAdjustmentFixedAmountObjects;
3812    }
3813
3814    @GraphQLField
3815    @GraphQLName("filterAdjustmentPercent")
3816    static FilterAdjustmentPercentObject filterAdjustmentPercent(final DataFetchingEnvironment env,
3817            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3818            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName,
3819            @GraphQLName("unitOfMeasureName") final String unitOfMeasureName,
3820            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName,
3821            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
3822            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
3823        FilterAdjustmentPercent filterAdjustmentPercent;
3824
3825        try {
3826            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentPercentForm();
3827
3828            commandForm.setFilterKindName(filterKindName);
3829            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3830            commandForm.setUnitOfMeasureName(unitOfMeasureName);
3831            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
3832            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
3833            commandForm.setCurrencyIsoName(currencyIsoName);
3834
3835            filterAdjustmentPercent = CDI.current().select(GetFilterAdjustmentPercentCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3836        } catch (NamingException ex) {
3837            throw new RuntimeException(ex);
3838        }
3839
3840        return filterAdjustmentPercent == null ? null : new FilterAdjustmentPercentObject(filterAdjustmentPercent);
3841    }
3842
3843    @GraphQLField
3844    @GraphQLName("filterAdjustmentPercents")
3845    static Collection<FilterAdjustmentPercentObject> filterAdjustmentPercents(final DataFetchingEnvironment env,
3846            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3847            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName) {
3848        Collection<FilterAdjustmentPercent> filterAdjustmentPercents;
3849        Collection<FilterAdjustmentPercentObject> filterAdjustmentPercentObjects;
3850
3851        try {
3852            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentPercentsForm();
3853
3854            commandForm.setFilterKindName(filterKindName);
3855            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3856
3857            filterAdjustmentPercents = CDI.current().select(GetFilterAdjustmentPercentsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3858        } catch (NamingException ex) {
3859            throw new RuntimeException(ex);
3860        }
3861
3862        if(filterAdjustmentPercents == null) {
3863            filterAdjustmentPercentObjects = emptyList();
3864        } else {
3865            filterAdjustmentPercentObjects = new ArrayList<>(filterAdjustmentPercents.size());
3866
3867            filterAdjustmentPercents.stream()
3868                    .map(FilterAdjustmentPercentObject::new)
3869                    .forEachOrdered(filterAdjustmentPercentObjects::add);
3870        }
3871
3872        return filterAdjustmentPercentObjects;
3873    }
3874
3875    @GraphQLField
3876    @GraphQLName("offerUse")
3877    static OfferUseObject offerUse(final DataFetchingEnvironment env,
3878            @GraphQLName("offerName") @GraphQLNonNull final String offerName,
3879            @GraphQLName("useName") @GraphQLNonNull final String useName) {
3880        OfferUse offerUse;
3881
3882        try {
3883            var commandForm = OfferUtil.getHome().getGetOfferUseForm();
3884
3885            commandForm.setOfferName(offerName);
3886            commandForm.setUseName(useName);
3887
3888            offerUse = CDI.current().select(GetOfferUseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3889        } catch (NamingException ex) {
3890            throw new RuntimeException(ex);
3891        }
3892
3893        return offerUse == null ? null : new OfferUseObject(offerUse);
3894    }
3895
3896    @GraphQLField
3897    @GraphQLName("offerUses")
3898    @GraphQLNonNull
3899    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3900    static CountingPaginatedData<OfferUseObject> offerUses(final DataFetchingEnvironment env,
3901            @GraphQLName("offerName") final String offerName,
3902            @GraphQLName("useName") final String useName) {
3903        CountingPaginatedData<OfferUseObject> data;
3904
3905        try {
3906            var commandForm = OfferUtil.getHome().getGetOfferUsesForm();
3907
3908            commandForm.setOfferName(offerName);
3909            commandForm.setUseName(useName);
3910
3911            var command = CDI.current().select(GetOfferUsesCommand.class).get();
3912
3913            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3914            if(totalEntities == null) {
3915                data = Connections.emptyConnection();
3916            } else {
3917                try(var objectLimiter = new ObjectLimiter(env, OfferConstants.COMPONENT_VENDOR_NAME, OfferConstants.ENTITY_TYPE_NAME, totalEntities)) {
3918                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3919
3920                    var offerUses = entities.stream()
3921                            .map(OfferUseObject::new)
3922                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3923
3924                    data = new CountedObjects<>(objectLimiter, offerUses);
3925                }
3926            }
3927        } catch (NamingException ex) {
3928            throw new RuntimeException(ex);
3929        }
3930
3931        return data;
3932    }
3933
3934    @GraphQLField
3935    @GraphQLName("offer")
3936    static OfferObject offer(final DataFetchingEnvironment env,
3937            @GraphQLName("offerName") final String offerName,
3938            @GraphQLName("id") @GraphQLID final String id) {
3939        Offer offer;
3940
3941        try {
3942            var commandForm = OfferUtil.getHome().getGetOfferForm();
3943
3944            commandForm.setOfferName(offerName);
3945            commandForm.setUuid(id);
3946
3947            offer = CDI.current().select(GetOfferCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3948        } catch (NamingException ex) {
3949            throw new RuntimeException(ex);
3950        }
3951
3952        return offer == null ? null : new OfferObject(offer);
3953    }
3954
3955    @GraphQLField
3956    @GraphQLName("offers")
3957    @GraphQLNonNull
3958    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3959    static CountingPaginatedData<OfferObject> offers(final DataFetchingEnvironment env) {
3960        CountingPaginatedData<OfferObject> data;
3961
3962        try {
3963            var commandForm = OfferUtil.getHome().getGetOffersForm();
3964            var command = CDI.current().select(GetOffersCommand.class).get();
3965
3966            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3967            if(totalEntities == null) {
3968                data = Connections.emptyConnection();
3969            } else {
3970                try(var objectLimiter = new ObjectLimiter(env, OfferConstants.COMPONENT_VENDOR_NAME, OfferConstants.ENTITY_TYPE_NAME, totalEntities)) {
3971                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3972
3973                    var offers = entities.stream()
3974                            .map(OfferObject::new)
3975                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3976
3977                    data = new CountedObjects<>(objectLimiter, offers);
3978                }
3979            }
3980        } catch (NamingException ex) {
3981            throw new RuntimeException(ex);
3982        }
3983
3984        return data;
3985    }
3986    
3987    @GraphQLField
3988    @GraphQLName("offerItem")
3989    static OfferItemObject offerItem(final DataFetchingEnvironment env,
3990            @GraphQLName("offerName") final String offerName,
3991            @GraphQLName("itemName") final String itemName,
3992            @GraphQLName("id") @GraphQLID final String id) {
3993        OfferItem offerItem;
3994
3995        try {
3996            var commandForm = OfferUtil.getHome().getGetOfferItemForm();
3997
3998            commandForm.setOfferName(offerName);
3999            commandForm.setItemName(itemName);
4000            commandForm.setUuid(id);
4001
4002            offerItem = CDI.current().select(GetOfferItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4003        } catch (NamingException ex) {
4004            throw new RuntimeException(ex);
4005        }
4006
4007        return offerItem == null ? null : new OfferItemObject(offerItem);
4008    }
4009
4010    @GraphQLField
4011    @GraphQLName("offerItems")
4012    @GraphQLNonNull
4013    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4014    static CountingPaginatedData<OfferItemObject> offerItems(final DataFetchingEnvironment env,
4015            @GraphQLName("offerName") @GraphQLNonNull final String offerName) {
4016        CountingPaginatedData<OfferItemObject> data;
4017
4018        try {
4019            var commandForm = OfferUtil.getHome().getGetOfferItemsForm();
4020            var command = CDI.current().select(GetOfferItemsCommand.class).get();
4021
4022            commandForm.setOfferName(offerName);
4023
4024            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4025            if(totalEntities == null) {
4026                data = Connections.emptyConnection();
4027            } else {
4028                try(var objectLimiter = new ObjectLimiter(env, OfferItemConstants.COMPONENT_VENDOR_NAME, OfferItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
4029                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4030
4031                    var offerItemObjects = entities.stream()
4032                            .map(OfferItemObject::new)
4033                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4034
4035                    data = new CountedObjects<>(objectLimiter, offerItemObjects);
4036                }
4037            }
4038        } catch (NamingException ex) {
4039            throw new RuntimeException(ex);
4040        }
4041
4042        return data;
4043    }
4044
4045    @GraphQLField
4046    @GraphQLName("offerItemPrice")
4047    static OfferItemPriceObject offerItemPrice(final DataFetchingEnvironment env,
4048            @GraphQLName("offerName") @GraphQLNonNull final String offerName,
4049            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
4050            @GraphQLName("inventoryConditionName") @GraphQLNonNull final String inventoryConditionName,
4051            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName,
4052            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
4053        OfferItemPrice offerItemPrice;
4054
4055        try {
4056            var commandForm = OfferUtil.getHome().getGetOfferItemPriceForm();
4057
4058            commandForm.setOfferName(offerName);
4059            commandForm.setItemName(itemName);
4060            commandForm.setInventoryConditionName(inventoryConditionName);
4061            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
4062            commandForm.setCurrencyIsoName(currencyIsoName);
4063
4064            offerItemPrice = CDI.current().select(GetOfferItemPriceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4065        } catch (NamingException ex) {
4066            throw new RuntimeException(ex);
4067        }
4068
4069        return offerItemPrice == null ? null : new OfferItemPriceObject(offerItemPrice);
4070    }
4071
4072    @GraphQLField
4073    @GraphQLName("offerItemPrices")
4074    @GraphQLNonNull
4075    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4076    static CountingPaginatedData<OfferItemPriceObject> offerItemPrices(final DataFetchingEnvironment env,
4077            @GraphQLName("offerName") @GraphQLNonNull final String offerName,
4078            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
4079        CountingPaginatedData<OfferItemPriceObject> data;
4080
4081        try {
4082            var commandForm = OfferUtil.getHome().getGetOfferItemPricesForm();
4083            var command = CDI.current().select(GetOfferItemPricesCommand.class).get();
4084
4085            commandForm.setOfferName(offerName);
4086            commandForm.setItemName(itemName);
4087
4088            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4089            if(totalEntities == null) {
4090                data = Connections.emptyConnection();
4091            } else {
4092                try(var objectLimiter = new ObjectLimiter(env, OfferItemPriceConstants.COMPONENT_VENDOR_NAME, OfferItemPriceConstants.ENTITY_TYPE_NAME, totalEntities)) {
4093                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4094
4095                    var offerItemPrices = entities.stream()
4096                            .map(OfferItemPriceObject::new)
4097                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4098
4099                    data = new CountedObjects<>(objectLimiter, offerItemPrices);
4100                }
4101            }
4102        } catch (NamingException ex) {
4103            throw new RuntimeException(ex);
4104        }
4105
4106        return data;
4107    }
4108
4109    @GraphQLField
4110    @GraphQLName("offerCustomerType")
4111    static OfferCustomerTypeObject offerCustomerType(final DataFetchingEnvironment env,
4112            @GraphQLName("offerName") @GraphQLNonNull final String offerName,
4113            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName) {
4114        OfferCustomerType offerCustomerType;
4115
4116        try {
4117            var commandForm = OfferUtil.getHome().getGetOfferCustomerTypeForm();
4118
4119            commandForm.setOfferName(offerName);
4120            commandForm.setCustomerTypeName(customerTypeName);
4121
4122            offerCustomerType = CDI.current().select(GetOfferCustomerTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4123        } catch (NamingException ex) {
4124            throw new RuntimeException(ex);
4125        }
4126
4127        return offerCustomerType == null ? null : new OfferCustomerTypeObject(offerCustomerType);
4128    }
4129
4130    @GraphQLField
4131    @GraphQLName("offerCustomerTypes")
4132    @GraphQLNonNull
4133    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4134    static CountingPaginatedData<OfferCustomerTypeObject> offerCustomerTypes(final DataFetchingEnvironment env,
4135            @GraphQLName("offerName") final String offerName,
4136            @GraphQLName("customerTypeName") final String customerTypeName) {
4137        CountingPaginatedData<OfferCustomerTypeObject> data;
4138
4139        try {
4140            var commandForm = OfferUtil.getHome().getGetOfferCustomerTypesForm();
4141            var command = CDI.current().select(GetOfferCustomerTypesCommand.class).get();
4142
4143            commandForm.setOfferName(offerName);
4144            commandForm.setCustomerTypeName(customerTypeName);
4145
4146            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4147            if(totalEntities == null) {
4148                data = Connections.emptyConnection();
4149            } else {
4150                try(var objectLimiter = new ObjectLimiter(env, OfferCustomerTypeConstants.COMPONENT_VENDOR_NAME, OfferCustomerTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4151                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4152
4153                    var offerCustomerTypeObjects = entities.stream()
4154                            .map(OfferCustomerTypeObject::new)
4155                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4156
4157                    data = new CountedObjects<>(objectLimiter, offerCustomerTypeObjects);
4158                }
4159            }
4160        } catch (NamingException ex) {
4161            throw new RuntimeException(ex);
4162        }
4163
4164        return data;
4165    }
4166
4167    @GraphQLField
4168    @GraphQLName("use")
4169    static UseObject use(final DataFetchingEnvironment env,
4170            @GraphQLName("useName") final String useName,
4171            @GraphQLName("id") @GraphQLID final String id) {
4172        Use use;
4173
4174        try {
4175            var commandForm = OfferUtil.getHome().getGetUseForm();
4176
4177            commandForm.setUseName(useName);
4178            commandForm.setUuid(id);
4179
4180            use = CDI.current().select(GetUseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4181        } catch (NamingException ex) {
4182            throw new RuntimeException(ex);
4183        }
4184
4185        return use == null ? null : new UseObject(use);
4186    }
4187
4188    @GraphQLField
4189    @GraphQLName("uses")
4190    @GraphQLNonNull
4191    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4192    static CountingPaginatedData<UseObject> uses(final DataFetchingEnvironment env) {
4193        CountingPaginatedData<UseObject> data;
4194
4195        try {
4196            var commandForm = OfferUtil.getHome().getGetUsesForm();
4197            var command = CDI.current().select(GetUsesCommand.class).get();
4198
4199            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4200            if(totalEntities == null) {
4201                data = Connections.emptyConnection();
4202            } else {
4203                try(var objectLimiter = new ObjectLimiter(env, UseConstants.COMPONENT_VENDOR_NAME, UseConstants.ENTITY_TYPE_NAME, totalEntities)) {
4204                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4205
4206                    var uses = entities.stream()
4207                            .map(UseObject::new)
4208                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4209
4210                    data = new CountedObjects<>(objectLimiter, uses);
4211                }
4212            }
4213        } catch (NamingException ex) {
4214            throw new RuntimeException(ex);
4215        }
4216
4217        return data;
4218    }
4219
4220    @GraphQLField
4221    @GraphQLName("offerNameElement")
4222    static OfferNameElementObject offerNameElement(final DataFetchingEnvironment env,
4223            @GraphQLName("offerNameElementName") final String offerNameElementName,
4224            @GraphQLName("id") @GraphQLID final String id) {
4225        OfferNameElement offerNameElement;
4226
4227        try {
4228            var commandForm = OfferUtil.getHome().getGetOfferNameElementForm();
4229
4230            commandForm.setOfferNameElementName(offerNameElementName);
4231            commandForm.setUuid(id);
4232
4233            offerNameElement = CDI.current().select(GetOfferNameElementCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4234        } catch (NamingException ex) {
4235            throw new RuntimeException(ex);
4236        }
4237
4238        return offerNameElement == null ? null : new OfferNameElementObject(offerNameElement);
4239    }
4240
4241    @GraphQLField
4242    @GraphQLName("offerNameElements")
4243    @GraphQLNonNull
4244    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4245    static CountingPaginatedData<OfferNameElementObject> offerNameElements(final DataFetchingEnvironment env) {
4246        CountingPaginatedData<OfferNameElementObject> data;
4247
4248        try {
4249            var commandForm = OfferUtil.getHome().getGetOfferNameElementsForm();
4250            var command = CDI.current().select(GetOfferNameElementsCommand.class).get();
4251
4252            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4253            if(totalEntities == null) {
4254                data = Connections.emptyConnection();
4255            } else {
4256                try(var objectLimiter = new ObjectLimiter(env, OfferNameElementConstants.COMPONENT_VENDOR_NAME, OfferNameElementConstants.ENTITY_TYPE_NAME, totalEntities)) {
4257                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4258
4259                    var offerNameElementObjects = entities.stream()
4260                            .map(OfferNameElementObject::new)
4261                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4262
4263                    data = new CountedObjects<>(objectLimiter, offerNameElementObjects);
4264                }
4265            }
4266        } catch (NamingException ex) {
4267            throw new RuntimeException(ex);
4268        }
4269
4270        return data;
4271    }
4272
4273    @GraphQLField
4274    @GraphQLName("useNameElement")
4275    static UseNameElementObject useNameElement(final DataFetchingEnvironment env,
4276            @GraphQLName("useNameElementName") final String useNameElementName,
4277            @GraphQLName("id") @GraphQLID final String id) {
4278        UseNameElement useNameElement;
4279
4280        try {
4281            var commandForm = OfferUtil.getHome().getGetUseNameElementForm();
4282
4283            commandForm.setUseNameElementName(useNameElementName);
4284            commandForm.setUuid(id);
4285
4286            useNameElement = CDI.current().select(GetUseNameElementCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4287        } catch (NamingException ex) {
4288            throw new RuntimeException(ex);
4289        }
4290
4291        return useNameElement == null ? null : new UseNameElementObject(useNameElement);
4292    }
4293
4294    @GraphQLField
4295    @GraphQLName("useNameElements")
4296    @GraphQLNonNull
4297    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4298    static CountingPaginatedData<UseNameElementObject> useNameElements(final DataFetchingEnvironment env) {
4299        CountingPaginatedData<UseNameElementObject> data;
4300
4301        try {
4302            var commandForm = OfferUtil.getHome().getGetUseNameElementsForm();
4303            var command = CDI.current().select(GetUseNameElementsCommand.class).get();
4304
4305            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4306            if(totalEntities == null) {
4307                data = Connections.emptyConnection();
4308            } else {
4309                try(var objectLimiter = new ObjectLimiter(env, UseNameElementConstants.COMPONENT_VENDOR_NAME, UseNameElementConstants.ENTITY_TYPE_NAME, totalEntities)) {
4310                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4311
4312                    var useNameElementObjects = entities.stream()
4313                            .map(UseNameElementObject::new)
4314                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4315
4316                    data = new CountedObjects<>(objectLimiter, useNameElementObjects);
4317                }
4318            }
4319        } catch (NamingException ex) {
4320            throw new RuntimeException(ex);
4321        }
4322
4323        return data;
4324    }
4325
4326    @GraphQLField
4327    @GraphQLName("useType")
4328    static UseTypeObject useType(final DataFetchingEnvironment env,
4329            @GraphQLName("useTypeName") final String useTypeName,
4330            @GraphQLName("id") @GraphQLID final String id) {
4331        UseType useType;
4332
4333        try {
4334            var commandForm = OfferUtil.getHome().getGetUseTypeForm();
4335
4336            commandForm.setUseTypeName(useTypeName);
4337            commandForm.setUuid(id);
4338
4339            useType = CDI.current().select(GetUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4340        } catch (NamingException ex) {
4341            throw new RuntimeException(ex);
4342        }
4343
4344        return useType == null ? null : new UseTypeObject(useType);
4345    }
4346
4347    @GraphQLField
4348    @GraphQLName("useTypes")
4349    @GraphQLNonNull
4350    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4351    static CountingPaginatedData<UseTypeObject> useTypes(final DataFetchingEnvironment env) {
4352        CountingPaginatedData<UseTypeObject> data;
4353
4354        try {
4355            var commandForm = OfferUtil.getHome().getGetUseTypesForm();
4356            var command = CDI.current().select(GetUseTypesCommand.class).get();
4357
4358            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4359            if(totalEntities == null) {
4360                data = Connections.emptyConnection();
4361            } else {
4362                try(var objectLimiter = new ObjectLimiter(env, UseTypeConstants.COMPONENT_VENDOR_NAME, UseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4363                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4364
4365                    var useTypes = entities.stream()
4366                            .map(UseTypeObject::new)
4367                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4368
4369                    data = new CountedObjects<>(objectLimiter, useTypes);
4370                }
4371            }
4372        } catch (NamingException ex) {
4373            throw new RuntimeException(ex);
4374        }
4375
4376        return data;
4377    }
4378
4379    @GraphQLField
4380    @GraphQLName("freeOnBoard")
4381    static FreeOnBoardObject freeOnBoard(final DataFetchingEnvironment env,
4382            @GraphQLName("freeOnBoardName") final String freeOnBoardName,
4383            @GraphQLName("id") @GraphQLID final String id) {
4384        FreeOnBoard freeOnBoard;
4385
4386        try {
4387            var commandForm = ShipmentUtil.getHome().getGetFreeOnBoardForm();
4388
4389            commandForm.setFreeOnBoardName(freeOnBoardName);
4390            commandForm.setUuid(id);
4391
4392            freeOnBoard = CDI.current().select(GetFreeOnBoardCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4393        } catch (NamingException ex) {
4394            throw new RuntimeException(ex);
4395        }
4396
4397        return freeOnBoard == null ? null : new FreeOnBoardObject(freeOnBoard);
4398    }
4399
4400    @GraphQLField
4401    @GraphQLName("freeOnBoards")
4402    @GraphQLNonNull
4403    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4404    static CountingPaginatedData<FreeOnBoardObject> freeOnBoards(final DataFetchingEnvironment env) {
4405        CountingPaginatedData<FreeOnBoardObject> data;
4406
4407        try {
4408            var commandForm = ShipmentUtil.getHome().getGetFreeOnBoardsForm();
4409            var command = CDI.current().select(GetFreeOnBoardsCommand.class).get();
4410
4411            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4412            if(totalEntities == null) {
4413                data = Connections.emptyConnection();
4414            } else {
4415                try(var objectLimiter = new ObjectLimiter(env, FreeOnBoardConstants.COMPONENT_VENDOR_NAME, FreeOnBoardConstants.ENTITY_TYPE_NAME, totalEntities)) {
4416                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4417
4418                    var freeOnBoards = entities.stream()
4419                            .map(FreeOnBoardObject::new)
4420                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4421
4422                    data = new CountedObjects<>(objectLimiter, freeOnBoards);
4423                }
4424            }
4425        } catch (NamingException ex) {
4426            throw new RuntimeException(ex);
4427        }
4428
4429        return data;
4430    }
4431
4432    @GraphQLField
4433    @GraphQLName("paymentProcessorTypeCodeType")
4434    static PaymentProcessorTypeCodeTypeObject paymentProcessorTypeCodeType(final DataFetchingEnvironment env,
4435            @GraphQLName("paymentProcessorTypeName") final String paymentProcessorTypeName,
4436            @GraphQLName("paymentProcessorTypeCodeTypeName") final String paymentProcessorTypeCodeTypeName,
4437            @GraphQLName("id") @GraphQLID final String id) {
4438        PaymentProcessorTypeCodeType paymentProcessorTypeCodeType;
4439
4440        try {
4441            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTypeCodeTypeForm();
4442
4443            commandForm.setPaymentProcessorTypeName(paymentProcessorTypeName);
4444            commandForm.setPaymentProcessorTypeCodeTypeName(paymentProcessorTypeCodeTypeName);
4445            commandForm.setUuid(id);
4446
4447            paymentProcessorTypeCodeType = CDI.current().select(GetPaymentProcessorTypeCodeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4448        } catch (NamingException ex) {
4449            throw new RuntimeException(ex);
4450        }
4451
4452        return paymentProcessorTypeCodeType == null ? null : new PaymentProcessorTypeCodeTypeObject(paymentProcessorTypeCodeType);
4453    }
4454
4455    @GraphQLField
4456    @GraphQLName("paymentProcessorTypeCode")
4457    static PaymentProcessorTypeCodeObject paymentProcessorTypeCode(final DataFetchingEnvironment env,
4458            @GraphQLName("paymentProcessorTypeName") final String paymentProcessorTypeName,
4459            @GraphQLName("paymentProcessorTypeCodeTypeName") final String paymentProcessorTypeCodeTypeName,
4460            @GraphQLName("paymentProcessorTypeCodeName") final String paymentProcessorTypeCodeName,
4461            @GraphQLName("id") @GraphQLID final String id) {
4462        PaymentProcessorTypeCode paymentProcessorTypeCode;
4463
4464        try {
4465            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTypeCodeForm();
4466
4467            commandForm.setPaymentProcessorTypeName(paymentProcessorTypeName);
4468            commandForm.setPaymentProcessorTypeCodeTypeName(paymentProcessorTypeCodeTypeName);
4469            commandForm.setPaymentProcessorTypeCodeName(paymentProcessorTypeCodeName);
4470            commandForm.setUuid(id);
4471
4472            paymentProcessorTypeCode = CDI.current().select(GetPaymentProcessorTypeCodeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4473        } catch (NamingException ex) {
4474            throw new RuntimeException(ex);
4475        }
4476
4477        return paymentProcessorTypeCode == null ? null : new PaymentProcessorTypeCodeObject(paymentProcessorTypeCode);
4478    }
4479
4480    @GraphQLField
4481    @GraphQLName("paymentProcessorTransaction")
4482    static PaymentProcessorTransactionObject paymentProcessorTransaction(final DataFetchingEnvironment env,
4483            @GraphQLName("paymentProcessorTransactionName") final String paymentProcessorTransactionName,
4484            @GraphQLName("id") @GraphQLID final String id) {
4485        PaymentProcessorTransaction paymentProcessorTransaction;
4486
4487        try {
4488            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTransactionForm();
4489
4490            commandForm.setPaymentProcessorTransactionName(paymentProcessorTransactionName);
4491            commandForm.setUuid(id);
4492
4493            paymentProcessorTransaction = CDI.current().select(GetPaymentProcessorTransactionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4494        } catch (NamingException ex) {
4495            throw new RuntimeException(ex);
4496        }
4497
4498        return paymentProcessorTransaction == null ? null : new PaymentProcessorTransactionObject(paymentProcessorTransaction);
4499    }
4500
4501    @GraphQLField
4502    @GraphQLName("paymentProcessorTransactions")
4503    @GraphQLNonNull
4504    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4505    static CountingPaginatedData<PaymentProcessorTransactionObject> paymentProcessorTransactions(final DataFetchingEnvironment env) {
4506        CountingPaginatedData<PaymentProcessorTransactionObject> data;
4507
4508        try {
4509            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTransactionsForm();
4510            var command = CDI.current().select(GetPaymentProcessorTransactionsCommand.class).get();
4511
4512            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4513            if(totalEntities == null) {
4514                data = Connections.emptyConnection();
4515            } else {
4516                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorTransactionConstants.COMPONENT_VENDOR_NAME, PaymentProcessorTransactionConstants.ENTITY_TYPE_NAME, totalEntities)) {
4517                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4518
4519                    var paymentProcessorTransactions = entities.stream()
4520                            .map(PaymentProcessorTransactionObject::new)
4521                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4522
4523                    data = new CountedObjects<>(objectLimiter, paymentProcessorTransactions);
4524                }
4525            }
4526        } catch (NamingException ex) {
4527            throw new RuntimeException(ex);
4528        }
4529
4530        return data;
4531    }
4532
4533    @GraphQLField
4534    @GraphQLName("paymentProcessor")
4535    static PaymentProcessorObject paymentProcessor(final DataFetchingEnvironment env,
4536            @GraphQLName("paymentProcessorName") final String paymentProcessorName,
4537            @GraphQLName("id") @GraphQLID final String id) {
4538        PaymentProcessor paymentProcessor;
4539
4540        try {
4541            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorForm();
4542
4543            commandForm.setPaymentProcessorName(paymentProcessorName);
4544            commandForm.setUuid(id);
4545
4546            paymentProcessor = CDI.current().select(GetPaymentProcessorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4547        } catch (NamingException ex) {
4548            throw new RuntimeException(ex);
4549        }
4550
4551        return paymentProcessor == null ? null : new PaymentProcessorObject(paymentProcessor);
4552    }
4553
4554    @GraphQLField
4555    @GraphQLName("paymentProcessors")
4556    @GraphQLNonNull
4557    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4558    static CountingPaginatedData<PaymentProcessorObject> paymentProcessors(final DataFetchingEnvironment env) {
4559        CountingPaginatedData<PaymentProcessorObject> data;
4560
4561        try {
4562            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorsForm();
4563            var command = CDI.current().select(GetPaymentProcessorsCommand.class).get();
4564
4565            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4566            if(totalEntities == null) {
4567                data = Connections.emptyConnection();
4568            } else {
4569                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorConstants.COMPONENT_VENDOR_NAME, PaymentProcessorConstants.ENTITY_TYPE_NAME, totalEntities)) {
4570                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4571
4572                    var paymentProcessors = entities.stream()
4573                            .map(PaymentProcessorObject::new)
4574                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4575
4576                    data = new CountedObjects<>(objectLimiter, paymentProcessors);
4577                }
4578            }
4579        } catch (NamingException ex) {
4580            throw new RuntimeException(ex);
4581        }
4582
4583        return data;
4584    }
4585
4586    @GraphQLField
4587    @GraphQLName("paymentProcessorType")
4588    static PaymentProcessorTypeObject paymentProcessorType(final DataFetchingEnvironment env,
4589            @GraphQLName("paymentProcessorTypeName") final String paymentProcessorTypeName,
4590            @GraphQLName("id") @GraphQLID final String id) {
4591        PaymentProcessorType paymentProcessorType;
4592
4593        try {
4594            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTypeForm();
4595
4596            commandForm.setPaymentProcessorTypeName(paymentProcessorTypeName);
4597            commandForm.setUuid(id);
4598
4599            paymentProcessorType = CDI.current().select(GetPaymentProcessorTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4600        } catch (NamingException ex) {
4601            throw new RuntimeException(ex);
4602        }
4603
4604        return paymentProcessorType == null ? null : new PaymentProcessorTypeObject(paymentProcessorType);
4605    }
4606
4607    @GraphQLField
4608    @GraphQLName("paymentProcessorTypes")
4609    @GraphQLNonNull
4610    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4611    static CountingPaginatedData<PaymentProcessorTypeObject> paymentProcessorTypes(final DataFetchingEnvironment env) {
4612        CountingPaginatedData<PaymentProcessorTypeObject> data;
4613
4614        try {
4615            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTypesForm();
4616            var command = CDI.current().select(GetPaymentProcessorTypesCommand.class).get();
4617
4618            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4619            if(totalEntities == null) {
4620                data = Connections.emptyConnection();
4621            } else {
4622                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorTypeConstants.COMPONENT_VENDOR_NAME, PaymentProcessorTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4623                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4624
4625                    var paymentProcessorTypes = entities.stream()
4626                            .map(PaymentProcessorTypeObject::new)
4627                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4628
4629                    data = new CountedObjects<>(objectLimiter, paymentProcessorTypes);
4630                }
4631            }
4632        } catch (NamingException ex) {
4633            throw new RuntimeException(ex);
4634        }
4635
4636        return data;
4637    }
4638
4639    @GraphQLField
4640    @GraphQLName("paymentMethodType")
4641    static PaymentMethodTypeObject paymentMethodType(final DataFetchingEnvironment env,
4642            @GraphQLName("paymentMethodTypeName") final String paymentMethodTypeName,
4643            @GraphQLName("id") @GraphQLID final String id) {
4644        PaymentMethodType paymentMethodType;
4645
4646        try {
4647            var commandForm = PaymentUtil.getHome().getGetPaymentMethodTypeForm();
4648
4649            commandForm.setPaymentMethodTypeName(paymentMethodTypeName);
4650            commandForm.setUuid(id);
4651
4652            paymentMethodType = CDI.current().select(GetPaymentMethodTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4653        } catch (NamingException ex) {
4654            throw new RuntimeException(ex);
4655        }
4656
4657        return paymentMethodType == null ? null : new PaymentMethodTypeObject(paymentMethodType);
4658    }
4659
4660    @GraphQLField
4661    @GraphQLName("paymentMethodTypes")
4662    @GraphQLNonNull
4663    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4664    static CountingPaginatedData<PaymentMethodTypeObject> paymentMethodTypes(final DataFetchingEnvironment env) {
4665        CountingPaginatedData<PaymentMethodTypeObject> data;
4666
4667        try {
4668            var commandForm = PaymentUtil.getHome().getGetPaymentMethodTypesForm();
4669            var command = CDI.current().select(GetPaymentMethodTypesCommand.class).get();
4670
4671            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4672            if(totalEntities == null) {
4673                data = Connections.emptyConnection();
4674            } else {
4675                try(var objectLimiter = new ObjectLimiter(env, PaymentMethodTypeConstants.COMPONENT_VENDOR_NAME, PaymentMethodTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4676                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4677
4678                    var paymentMethodTypes = entities.stream()
4679                            .map(PaymentMethodTypeObject::new)
4680                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4681
4682                    data = new CountedObjects<>(objectLimiter, paymentMethodTypes);
4683                }
4684            }
4685        } catch (NamingException ex) {
4686            throw new RuntimeException(ex);
4687        }
4688
4689        return data;
4690    }
4691
4692    @GraphQLField
4693    @GraphQLName("paymentMethod")
4694    static PaymentMethodObject paymentMethod(final DataFetchingEnvironment env,
4695            @GraphQLName("paymentMethodName") final String paymentMethodName) {
4696        PaymentMethod paymentMethod;
4697
4698        try {
4699            var commandForm = PaymentUtil.getHome().getGetPaymentMethodForm();
4700
4701            commandForm.setPaymentMethodName(paymentMethodName);
4702
4703            paymentMethod = CDI.current().select(GetPaymentMethodCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4704        } catch (NamingException ex) {
4705            throw new RuntimeException(ex);
4706        }
4707
4708        return paymentMethod == null ? null : new PaymentMethodObject(paymentMethod);
4709    }
4710
4711    @GraphQLField
4712    @GraphQLName("paymentMethods")
4713    @GraphQLNonNull
4714    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4715    static CountingPaginatedData<PaymentMethodObject> paymentMethods(final DataFetchingEnvironment env) {
4716        CountingPaginatedData<PaymentMethodObject> data;
4717
4718        try {
4719            var commandForm = PaymentUtil.getHome().getGetPaymentMethodsForm();
4720            var command = CDI.current().select(GetPaymentMethodsCommand.class).get();
4721
4722            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4723            if(totalEntities == null) {
4724                data = Connections.emptyConnection();
4725            } else {
4726                try(var objectLimiter = new ObjectLimiter(env, PaymentMethodConstants.COMPONENT_VENDOR_NAME, PaymentMethodConstants.ENTITY_TYPE_NAME, totalEntities)) {
4727                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4728
4729                    var paymentMethods = entities.stream()
4730                            .map(PaymentMethodObject::new)
4731                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4732
4733                    data = new CountedObjects<>(objectLimiter, paymentMethods);
4734                }
4735            }
4736        } catch (NamingException ex) {
4737            throw new RuntimeException(ex);
4738        }
4739
4740        return data;
4741    }
4742
4743    @GraphQLField
4744    @GraphQLName("paymentProcessorResultCode")
4745    static PaymentProcessorResultCodeObject paymentProcessorResultCode(final DataFetchingEnvironment env,
4746            @GraphQLName("paymentProcessorResultCodeName") final String paymentProcessorResultCodeName,
4747            @GraphQLName("id") @GraphQLID final String id) {
4748        PaymentProcessorResultCode paymentProcessorResultCode;
4749
4750        try {
4751            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorResultCodeForm();
4752
4753            commandForm.setPaymentProcessorResultCodeName(paymentProcessorResultCodeName);
4754            commandForm.setUuid(id);
4755
4756            paymentProcessorResultCode = CDI.current().select(GetPaymentProcessorResultCodeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4757        } catch (NamingException ex) {
4758            throw new RuntimeException(ex);
4759        }
4760
4761        return paymentProcessorResultCode == null ? null : new PaymentProcessorResultCodeObject(paymentProcessorResultCode);
4762    }
4763
4764    @GraphQLField
4765    @GraphQLName("paymentProcessorResultCodes")
4766    @GraphQLNonNull
4767    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4768    static CountingPaginatedData<PaymentProcessorResultCodeObject> paymentProcessorResultCodes(final DataFetchingEnvironment env) {
4769        CountingPaginatedData<PaymentProcessorResultCodeObject> data;
4770
4771        try {
4772            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorResultCodesForm();
4773            var command = CDI.current().select(GetPaymentProcessorResultCodesCommand.class).get();
4774
4775            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4776            if(totalEntities == null) {
4777                data = Connections.emptyConnection();
4778            } else {
4779                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorResultCodeConstants.COMPONENT_VENDOR_NAME, PaymentProcessorResultCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4780                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4781                    var objects = entities.stream()
4782                            .map(PaymentProcessorResultCodeObject::new)
4783                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4784
4785                    data = new CountedObjects<>(objectLimiter, objects);
4786                }
4787            }
4788        } catch (NamingException ex) {
4789            throw new RuntimeException(ex);
4790        }
4791
4792        return data;
4793    }
4794
4795    @GraphQLField
4796    @GraphQLName("paymentProcessorActionType")
4797    static PaymentProcessorActionTypeObject paymentProcessorActionType(final DataFetchingEnvironment env,
4798            @GraphQLName("paymentProcessorActionTypeName") final String paymentProcessorActionTypeName,
4799            @GraphQLName("id") @GraphQLID final String id) {
4800        PaymentProcessorActionType paymentProcessorActionType;
4801
4802        try {
4803            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorActionTypeForm();
4804
4805            commandForm.setPaymentProcessorActionTypeName(paymentProcessorActionTypeName);
4806            commandForm.setUuid(id);
4807
4808            paymentProcessorActionType = CDI.current().select(GetPaymentProcessorActionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4809        } catch (NamingException ex) {
4810            throw new RuntimeException(ex);
4811        }
4812
4813        return paymentProcessorActionType == null ? null : new PaymentProcessorActionTypeObject(paymentProcessorActionType);
4814    }
4815
4816    @GraphQLField
4817    @GraphQLName("paymentProcessorActionTypes")
4818    @GraphQLNonNull
4819    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4820    static CountingPaginatedData<PaymentProcessorActionTypeObject> paymentProcessorActionTypes(final DataFetchingEnvironment env) {
4821        CountingPaginatedData<PaymentProcessorActionTypeObject> data;
4822
4823        try {
4824            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorActionTypesForm();
4825            var command = CDI.current().select(GetPaymentProcessorActionTypesCommand.class).get();
4826
4827            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4828            if(totalEntities == null) {
4829                data = Connections.emptyConnection();
4830            } else {
4831                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorActionTypeConstants.COMPONENT_VENDOR_NAME, PaymentProcessorActionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4832                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4833                    var objects = entities.stream()
4834                            .map(PaymentProcessorActionTypeObject::new)
4835                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4836
4837                    data = new CountedObjects<>(objectLimiter, objects);
4838                }
4839            }
4840        } catch (NamingException ex) {
4841            throw new RuntimeException(ex);
4842        }
4843
4844        return data;
4845    }
4846
4847    @GraphQLField
4848    @GraphQLName("appearance")
4849    static AppearanceObject appearance(final DataFetchingEnvironment env,
4850            @GraphQLName("appearanceName") final String appearanceName,
4851            @GraphQLName("id") @GraphQLID final String id) {
4852        Appearance appearance;
4853
4854        try {
4855            var commandForm = CoreUtil.getHome().getGetAppearanceForm();
4856
4857            commandForm.setAppearanceName(appearanceName);
4858            commandForm.setUuid(id);
4859
4860            appearance = CDI.current().select(GetAppearanceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4861        } catch (NamingException ex) {
4862            throw new RuntimeException(ex);
4863        }
4864
4865        return appearance == null ? null : new AppearanceObject(appearance);
4866    }
4867
4868    @GraphQLField
4869    @GraphQLName("appearances")
4870    @GraphQLNonNull
4871    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4872    static CountingPaginatedData<AppearanceObject> appearances(final DataFetchingEnvironment env) {
4873        CountingPaginatedData<AppearanceObject> data;
4874
4875        try {
4876            var commandForm = CoreUtil.getHome().getGetAppearancesForm();
4877            var command = CDI.current().select(GetAppearancesCommand.class).get();
4878
4879            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4880            if(totalEntities == null) {
4881                data = Connections.emptyConnection();
4882            } else {
4883                try(var objectLimiter = new ObjectLimiter(env, AppearanceConstants.COMPONENT_VENDOR_NAME, AppearanceConstants.ENTITY_TYPE_NAME, totalEntities)) {
4884                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4885
4886                    var appearances = entities.stream()
4887                            .map(AppearanceObject::new)
4888                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4889
4890                    data = new CountedObjects<>(objectLimiter, appearances);
4891                }
4892            }
4893        } catch (NamingException ex) {
4894            throw new RuntimeException(ex);
4895        }
4896
4897        return data;
4898    }
4899
4900    @GraphQLField
4901    @GraphQLName("eventType")
4902    static EventTypeObject eventType(final DataFetchingEnvironment env,
4903            @GraphQLName("eventTypeName") final String eventTypeName,
4904            @GraphQLName("id") @GraphQLID final String id) {
4905        EventType eventType;
4906
4907        try {
4908            var commandForm = CoreUtil.getHome().getGetEventTypeForm();
4909
4910            commandForm.setEventTypeName(eventTypeName);
4911            commandForm.setUuid(id);
4912
4913            eventType = CDI.current().select(GetEventTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4914        } catch (NamingException ex) {
4915            throw new RuntimeException(ex);
4916        }
4917
4918        return eventType == null ? null : new EventTypeObject(eventType);
4919    }
4920
4921    @GraphQLField
4922    @GraphQLName("eventTypes")
4923    @GraphQLNonNull
4924    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4925    static CountingPaginatedData<EventTypeObject> eventTypes(final DataFetchingEnvironment env) {
4926        CountingPaginatedData<EventTypeObject> data;
4927
4928        try {
4929            var commandForm = CoreUtil.getHome().getGetEventTypesForm();
4930            var command = CDI.current().select(GetEventTypesCommand.class).get();
4931
4932            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4933            if(totalEntities == null) {
4934                data = Connections.emptyConnection();
4935            } else {
4936                try(var objectLimiter = new ObjectLimiter(env, EventTypeConstants.COMPONENT_VENDOR_NAME, EventTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4937                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4938
4939                    var eventTypes = entities.stream()
4940                            .map(EventTypeObject::new)
4941                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4942
4943                    data = new CountedObjects<>(objectLimiter, eventTypes);
4944                }
4945            }
4946        } catch (NamingException ex) {
4947            throw new RuntimeException(ex);
4948        }
4949
4950        return data;
4951    }
4952
4953    @GraphQLField
4954    @GraphQLName("events")
4955    @GraphQLNonNull
4956    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4957    static CountingPaginatedData<EventObject> events(final DataFetchingEnvironment env,
4958            @GraphQLName("id") final String id,
4959            @GraphQLName("createdById") final String createdById) {
4960        CountingPaginatedData<EventObject> data;
4961
4962        try {
4963            var commandForm = CoreUtil.getHome().getGetEventsForm();
4964            var command = CDI.current().select(GetEventsCommand.class).get();
4965
4966            commandForm.setUuid(id);
4967            commandForm.setCreatedByUuid(createdById);
4968
4969            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4970            if(totalEntities == null) {
4971                data = Connections.emptyConnection();
4972            } else {
4973                try(var objectLimiter = new ObjectLimiter(env, EventConstants.COMPONENT_VENDOR_NAME, EventConstants.ENTITY_TYPE_NAME, totalEntities)) {
4974                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4975
4976                    var events = entities.stream()
4977                            .map(EventObject::new)
4978                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4979
4980                    data = new CountedObjects<>(objectLimiter, events);
4981                }
4982            }
4983        } catch (NamingException ex) {
4984            throw new RuntimeException(ex);
4985        }
4986
4987        return data;
4988    }
4989
4990    @GraphQLField
4991    @GraphQLName("entityAliasType")
4992    static EntityAliasTypeObject entityAliasType(final DataFetchingEnvironment env,
4993            @GraphQLName("componentVendorName") final String componentVendorName,
4994            @GraphQLName("entityTypeName") final String entityTypeName,
4995            @GraphQLName("entityAliasTypeName") final String entityAliasTypeName,
4996            @GraphQLName("id") @GraphQLID final String id) {
4997        EntityAliasType entityAliasType;
4998
4999        try {
5000            var commandForm = CoreUtil.getHome().getGetEntityAliasTypeForm();
5001
5002            commandForm.setComponentVendorName(componentVendorName);
5003            commandForm.setEntityTypeName(entityTypeName);
5004            commandForm.setEntityAliasTypeName(entityAliasTypeName);
5005            commandForm.setUuid(id);
5006
5007            entityAliasType = CDI.current().select(GetEntityAliasTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5008        } catch (NamingException ex) {
5009            throw new RuntimeException(ex);
5010        }
5011
5012        return entityAliasType == null ? null : new EntityAliasTypeObject(entityAliasType, null);
5013    }
5014
5015    @GraphQLField
5016    @GraphQLName("entityAliasTypes")
5017    @GraphQLNonNull
5018    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5019    static CountingPaginatedData<EntityAliasTypeObject> entityAliasTypes(final DataFetchingEnvironment env,
5020            @GraphQLName("componentVendorName") final String componentVendorName,
5021            @GraphQLName("entityTypeName") final String entityTypeName,
5022            @GraphQLName("id") @GraphQLID final String id) {
5023        CountingPaginatedData<EntityAliasTypeObject> data;
5024
5025        try {
5026            var commandForm = CoreUtil.getHome().getGetEntityAliasTypesForm();
5027            var command = CDI.current().select(GetEntityAliasTypesCommand.class).get();
5028
5029            commandForm.setComponentVendorName(componentVendorName);
5030            commandForm.setEntityTypeName(entityTypeName);
5031            commandForm.setUuid(id);
5032
5033            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5034            if(totalEntities == null) {
5035                data = Connections.emptyConnection();
5036            } else {
5037                try(var objectLimiter = new ObjectLimiter(env, EntityAliasTypeConstants.COMPONENT_VENDOR_NAME, EntityAliasTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5038                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5039
5040                    var entityAliasTypes = entities.stream()
5041                            .map(entityAliasType -> new EntityAliasTypeObject(entityAliasType, null))
5042                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5043
5044                    data = new CountedObjects<>(objectLimiter, entityAliasTypes);
5045                }
5046            }
5047        } catch (NamingException ex) {
5048            throw new RuntimeException(ex);
5049        }
5050
5051        return data;
5052    }
5053
5054    @GraphQLField
5055    @GraphQLName("entityAlias")
5056    static EntityAliasObject entityAlias(final DataFetchingEnvironment env,
5057            @GraphQLName("componentVendorName") final String componentVendorName,
5058            @GraphQLName("entityTypeName") final String entityTypeName,
5059            @GraphQLName("entityAliasTypeName") final String entityAliasTypeName,
5060            @GraphQLName("id") @GraphQLID final String id,
5061            @GraphQLName("alias") @GraphQLNonNull final String alias) {
5062        EntityAlias entityAlias;
5063
5064        try {
5065            var commandForm = CoreUtil.getHome().getGetEntityAliasForm();
5066
5067            commandForm.setComponentVendorName(componentVendorName);
5068            commandForm.setEntityTypeName(entityTypeName);
5069            commandForm.setEntityAliasTypeName(entityAliasTypeName);
5070            commandForm.setUuid(id);
5071            commandForm.setAlias(alias);
5072
5073            entityAlias = CDI.current().select(GetEntityAliasCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5074        } catch (NamingException ex) {
5075            throw new RuntimeException(ex);
5076        }
5077
5078        return entityAlias == null ? null : new EntityAliasObject(entityAlias);
5079    }
5080
5081    @GraphQLField
5082    @GraphQLName("entityAliases")
5083    @GraphQLNonNull
5084    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5085    static CountingPaginatedData<EntityAliasObject> entityAliases(final DataFetchingEnvironment env,
5086            @GraphQLName("componentVendorName") final String componentVendorName,
5087            @GraphQLName("entityTypeName") final String entityTypeName,
5088            @GraphQLName("entityAliasTypeName") final String entityAliasTypeName,
5089            @GraphQLName("id") @GraphQLID final String id) {
5090        CountingPaginatedData<EntityAliasObject> data;
5091
5092        try {
5093            var commandForm = CoreUtil.getHome().getGetEntityAliasesForm();
5094            var command = CDI.current().select(GetEntityAliasesCommand.class).get();
5095
5096            commandForm.setComponentVendorName(componentVendorName);
5097            commandForm.setEntityTypeName(entityTypeName);
5098            commandForm.setEntityAliasTypeName(entityAliasTypeName);
5099            commandForm.setUuid(id);
5100
5101            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5102            if(totalEntities == null) {
5103                data = Connections.emptyConnection();
5104            } else {
5105                try(var objectLimiter = new ObjectLimiter(env, EntityAliasConstants.COMPONENT_VENDOR_NAME, EntityAliasConstants.ENTITY_TYPE_NAME, totalEntities)) {
5106                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5107
5108                    var entityAliases = entities.stream()
5109                            .map(EntityAliasObject::new)
5110                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5111
5112                    data = new CountedObjects<>(objectLimiter, entityAliases);
5113                }
5114            }
5115        } catch (NamingException ex) {
5116            throw new RuntimeException(ex);
5117        }
5118
5119        return data;
5120    }
5121
5122
5123    @GraphQLField
5124    @GraphQLName("entityAttributeGroup")
5125    static EntityAttributeGroupObject entityAttributeGroup(final DataFetchingEnvironment env,
5126            @GraphQLName("componentVendorName") final String componentVendorName,
5127            @GraphQLName("entityTypeName") final String entityTypeName,
5128            @GraphQLName("entityAttributeGroupName") final String entityAttributeGroupName,
5129            @GraphQLName("id") @GraphQLID final String id) {
5130        EntityAttributeGroup entityAttributeGroup;
5131
5132        try {
5133            var commandForm = CoreUtil.getHome().getGetEntityAttributeGroupForm();
5134            commandForm.setComponentVendorName(componentVendorName);
5135            commandForm.setEntityTypeName(entityTypeName);
5136
5137            commandForm.setEntityAttributeGroupName(entityAttributeGroupName);
5138            commandForm.setUuid(id);
5139
5140            entityAttributeGroup = CDI.current().select(GetEntityAttributeGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5141        } catch (NamingException ex) {
5142            throw new RuntimeException(ex);
5143        }
5144
5145        return entityAttributeGroup == null ? null : new EntityAttributeGroupObject(entityAttributeGroup, null);
5146    }
5147
5148    @GraphQLField
5149    @GraphQLName("entityAttributeGroups")
5150    @GraphQLNonNull
5151    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5152    static CountingPaginatedData<EntityAttributeGroupObject> entityAttributeGroups(final DataFetchingEnvironment env,
5153            @GraphQLName("componentVendorName") @GraphQLNonNull final String componentVendorName,
5154            @GraphQLName("entityTypeName") @GraphQLNonNull final String entityTypeName) {
5155        CountingPaginatedData<EntityAttributeGroupObject> data;
5156
5157        try {
5158            var commandForm = CoreUtil.getHome().getGetEntityAttributeGroupsForm();
5159            var command = CDI.current().select(GetEntityAttributeGroupsCommand.class).get();
5160
5161            commandForm.setComponentVendorName(componentVendorName);
5162            commandForm.setEntityTypeName(entityTypeName);
5163
5164            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5165            if(totalEntities == null) {
5166                data = Connections.emptyConnection();
5167            } else {
5168                try(var objectLimiter = new ObjectLimiter(env, EntityAttributeGroupConstants.COMPONENT_VENDOR_NAME, EntityAttributeGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
5169                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5170
5171                    var entityAttributeGroups = entities.stream()
5172                            .map(entityAttributeGroup -> new EntityAttributeGroupObject(entityAttributeGroup, null))
5173                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5174
5175                    data = new CountedObjects<>(objectLimiter, entityAttributeGroups);
5176                }
5177            }
5178        } catch (NamingException ex) {
5179            throw new RuntimeException(ex);
5180        }
5181
5182        return data;
5183    }
5184
5185    @GraphQLField
5186    @GraphQLName("entityAttribute")
5187    static EntityAttributeObject entityAttribute(final DataFetchingEnvironment env,
5188            @GraphQLName("componentVendorName") final String componentVendorName,
5189            @GraphQLName("entityTypeName") final String entityTypeName,
5190            @GraphQLName("entityAttributeName") final String entityAttributeName,
5191            @GraphQLName("id") @GraphQLID final String id) {
5192        EntityAttribute entityAttribute;
5193
5194        try {
5195            var commandForm = CoreUtil.getHome().getGetEntityAttributeForm();
5196
5197            commandForm.setComponentVendorName(componentVendorName);
5198            commandForm.setEntityTypeName(entityTypeName);
5199            commandForm.setEntityAttributeName(entityAttributeName);
5200            commandForm.setUuid(id);
5201
5202            entityAttribute = CDI.current().select(GetEntityAttributeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5203        } catch (NamingException ex) {
5204            throw new RuntimeException(ex);
5205        }
5206
5207        return entityAttribute == null ? null : new EntityAttributeObject(entityAttribute, null);
5208    }
5209
5210    @GraphQLField
5211    @GraphQLName("entityAttributes")
5212    @GraphQLNonNull
5213    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5214    static CountingPaginatedData<EntityAttributeObject> entityAttributes(final DataFetchingEnvironment env,
5215            @GraphQLName("componentVendorName") final String componentVendorName,
5216            @GraphQLName("entityTypeName") final String entityTypeName,
5217            @GraphQLName("entityAttributeTypeNames") final String entityAttributeTypeNames,
5218            @GraphQLName("id") @GraphQLID final String id) {
5219        CountingPaginatedData<EntityAttributeObject> data;
5220
5221        try {
5222            var commandForm = CoreUtil.getHome().getGetEntityAttributesForm();
5223            var command = CDI.current().select(GetEntityAttributesCommand.class).get();
5224
5225            commandForm.setComponentVendorName(componentVendorName);
5226            commandForm.setEntityTypeName(entityTypeName);
5227            commandForm.setEntityAttributeTypeNames(entityAttributeTypeNames);
5228            commandForm.setUuid(id);
5229
5230            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5231            if(totalEntities == null) {
5232                data = Connections.emptyConnection();
5233            } else {
5234                try(var objectLimiter = new ObjectLimiter(env, EntityAttributeConstants.COMPONENT_VENDOR_NAME, EntityAttributeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5235                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5236
5237                    var entityAttributes = entities.stream()
5238                            .map(entityAttribute -> new EntityAttributeObject(entityAttribute, null))
5239                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5240
5241                    data = new CountedObjects<>(objectLimiter, entityAttributes);
5242                }
5243            }
5244        } catch (NamingException ex) {
5245            throw new RuntimeException(ex);
5246        }
5247
5248        return data;
5249    }
5250
5251    @GraphQLField
5252    @GraphQLName("entityAttributeEntityAttributeGroup")
5253    static EntityAttributeEntityAttributeGroupObject entityAttributeEntityAttributeGroup(final DataFetchingEnvironment env,
5254            @GraphQLName("componentVendorName") @GraphQLNonNull final String componentVendorName,
5255            @GraphQLName("entityTypeName") @GraphQLNonNull final String entityTypeName,
5256            @GraphQLName("entityAttributeName") @GraphQLNonNull final String entityAttributeName,
5257            @GraphQLName("entityAttributeGroupName") @GraphQLNonNull final String entityAttributeGroupName) {
5258        EntityAttributeEntityAttributeGroup entityAttributeEntityAttributeGroup;
5259
5260        try {
5261            var commandForm = CoreUtil.getHome().getGetEntityAttributeEntityAttributeGroupForm();
5262
5263            commandForm.setComponentVendorName(componentVendorName);
5264            commandForm.setEntityTypeName(entityTypeName);
5265            commandForm.setEntityAttributeName(entityAttributeName);
5266            commandForm.setEntityAttributeGroupName(entityAttributeGroupName);
5267
5268            entityAttributeEntityAttributeGroup = CDI.current().select(GetEntityAttributeEntityAttributeGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5269        } catch (NamingException ex) {
5270            throw new RuntimeException(ex);
5271        }
5272
5273        return entityAttributeEntityAttributeGroup == null ? null : new EntityAttributeEntityAttributeGroupObject(entityAttributeEntityAttributeGroup);
5274    }
5275
5276    @GraphQLField
5277    @GraphQLName("entityAttributeEntityAttributeGroups")
5278    @GraphQLNonNull
5279    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5280    static CountingPaginatedData<EntityAttributeEntityAttributeGroupObject> entityAttributeEntityAttributeGroups(final DataFetchingEnvironment env,
5281            @GraphQLName("componentVendorName") @GraphQLNonNull final String componentVendorName,
5282            @GraphQLName("entityTypeName") @GraphQLNonNull final String entityTypeName,
5283            @GraphQLName("entityAttributeName") final String entityAttributeName,
5284            @GraphQLName("entityAttributeGroupName") final String entityAttributeGroupName) {
5285        CountingPaginatedData<EntityAttributeEntityAttributeGroupObject> data;
5286
5287        try {
5288            var commandForm = CoreUtil.getHome().getGetEntityAttributeEntityAttributeGroupsForm();
5289            var command = CDI.current().select(GetEntityAttributeEntityAttributeGroupsCommand.class).get();
5290
5291            commandForm.setComponentVendorName(componentVendorName);
5292            commandForm.setEntityTypeName(entityTypeName);
5293            commandForm.setEntityAttributeName(entityAttributeName);
5294            commandForm.setEntityAttributeGroupName(entityAttributeGroupName);
5295
5296            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5297            if(totalEntities == null) {
5298                data = Connections.emptyConnection();
5299            } else {
5300                try(var objectLimiter = new ObjectLimiter(env, EntityAttributeEntityAttributeGroupConstants.COMPONENT_VENDOR_NAME, EntityAttributeEntityAttributeGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
5301                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5302
5303                    var entityAttributeEntityAttributeGroups = entities.stream()
5304                            .map(EntityAttributeEntityAttributeGroupObject::new)
5305                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5306
5307                    data = new CountedObjects<>(objectLimiter, entityAttributeEntityAttributeGroups);
5308                }
5309            }
5310        } catch (NamingException ex) {
5311            throw new RuntimeException(ex);
5312        }
5313
5314        return data;
5315    }
5316
5317    @GraphQLField
5318    @GraphQLName("entityInstance")
5319    static EntityInstanceObject entityInstance(final DataFetchingEnvironment env,
5320            @GraphQLName("id") @GraphQLID final String id,
5321            @GraphQLName("entityRef") final String entityRef) {
5322        EntityInstance entityInstance;
5323
5324        try {
5325            var commandForm = CoreUtil.getHome().getGetEntityInstanceForm();
5326
5327            commandForm.setUuid(id);
5328            commandForm.setEntityRef(entityRef);
5329
5330            entityInstance = CDI.current().select(GetEntityInstanceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5331        } catch (NamingException ex) {
5332            throw new RuntimeException(ex);
5333        }
5334
5335        return entityInstance == null ? null : new EntityInstanceObject(entityInstance);
5336    }
5337
5338    @GraphQLField
5339    @GraphQLName("entityInstances")
5340    @GraphQLNonNull
5341    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5342    static CountingPaginatedData<EntityInstanceObject> entityInstances(final DataFetchingEnvironment env,
5343            @GraphQLName("componentVendorName") @GraphQLNonNull final String componentVendorName,
5344            @GraphQLName("entityTypeName") @GraphQLNonNull final String entityTypeName) {
5345        CountingPaginatedData<EntityInstanceObject> data;
5346
5347        try {
5348            var commandForm = CoreUtil.getHome().getGetEntityInstancesForm();
5349            var command = CDI.current().select(GetEntityInstancesCommand.class).get();
5350
5351            commandForm.setComponentVendorName(componentVendorName);
5352            commandForm.setEntityTypeName(entityTypeName);
5353
5354            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5355            if(totalEntities == null) {
5356                data = Connections.emptyConnection();
5357            } else {
5358                try(var objectLimiter = new ObjectLimiter(env, EntityInstanceConstants.COMPONENT_VENDOR_NAME, EntityInstanceConstants.ENTITY_TYPE_NAME, totalEntities)) {
5359                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5360
5361                    var entityInstances = entities.stream()
5362                            .map(EntityInstanceObject::new)
5363                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5364
5365                    data = new CountedObjects<>(objectLimiter, entityInstances);
5366                }
5367            }
5368        } catch (NamingException ex) {
5369            throw new RuntimeException(ex);
5370        }
5371
5372        return data;
5373    }
5374
5375    @GraphQLField
5376    @GraphQLName("entityType")
5377    static EntityTypeObject entityType(final DataFetchingEnvironment env,
5378            @GraphQLName("componentVendorName") final String componentVendorName,
5379            @GraphQLName("entityTypeName") final String entityTypeName,
5380            @GraphQLName("id") @GraphQLID final String id) {
5381        EntityType entityType;
5382
5383        try {
5384            var commandForm = CoreUtil.getHome().getGetEntityTypeForm();
5385
5386            commandForm.setComponentVendorName(componentVendorName);
5387            commandForm.setEntityTypeName(entityTypeName);
5388            commandForm.setUuid(id);
5389
5390            entityType = CDI.current().select(GetEntityTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5391        } catch (NamingException ex) {
5392            throw new RuntimeException(ex);
5393        }
5394
5395        return entityType == null ? null : new EntityTypeObject(entityType);
5396    }
5397
5398    @GraphQLField
5399    @GraphQLName("entityTypes")
5400    @GraphQLNonNull
5401    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5402    static CountingPaginatedData<EntityTypeObject> entityTypes(final DataFetchingEnvironment env,
5403            @GraphQLName("componentVendorName") final String componentVendorName) {
5404        CountingPaginatedData<EntityTypeObject> data;
5405
5406        try {
5407            var commandForm = CoreUtil.getHome().getGetEntityTypesForm();
5408            var command = CDI.current().select(GetEntityTypesCommand.class).get();
5409
5410            commandForm.setComponentVendorName(componentVendorName);
5411
5412            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5413            if(totalEntities == null) {
5414                data = Connections.emptyConnection();
5415            } else {
5416                try(var objectLimiter = new ObjectLimiter(env, EntityTypeConstants.COMPONENT_VENDOR_NAME, EntityTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5417                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5418
5419                    var entityTypes = entities.stream()
5420                            .map(EntityTypeObject::new)
5421                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5422
5423                    data = new CountedObjects<>(objectLimiter, entityTypes);
5424                }
5425            }
5426        } catch (NamingException ex) {
5427            throw new RuntimeException(ex);
5428        }
5429
5430        return data;
5431    }
5432
5433    @GraphQLField
5434    @GraphQLName("componentVendor")
5435    static ComponentVendorObject componentVendor(final DataFetchingEnvironment env,
5436            @GraphQLName("componentVendorName") final String componentVendorName,
5437            @GraphQLName("id") @GraphQLID final String id) {
5438        ComponentVendor componentVendor;
5439
5440        try {
5441            var commandForm = CoreUtil.getHome().getGetComponentVendorForm();
5442
5443            commandForm.setComponentVendorName(componentVendorName);
5444            commandForm.setUuid(id);
5445
5446            componentVendor = CDI.current().select(GetComponentVendorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5447        } catch (NamingException ex) {
5448            throw new RuntimeException(ex);
5449        }
5450
5451        return componentVendor == null ? null : new ComponentVendorObject(componentVendor);
5452    }
5453
5454    @GraphQLField
5455    @GraphQLName("componentVendors")
5456    @GraphQLNonNull
5457    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5458    static CountingPaginatedData<ComponentVendorObject> componentVendors(final DataFetchingEnvironment env) {
5459        CountingPaginatedData<ComponentVendorObject> data;
5460
5461        try {
5462            var commandForm = CoreUtil.getHome().getGetComponentVendorsForm();
5463            var command = CDI.current().select(GetComponentVendorsCommand.class).get();
5464
5465            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5466            if(totalEntities == null) {
5467                data = Connections.emptyConnection();
5468            } else {
5469                try(var objectLimiter = new ObjectLimiter(env, ComponentVendorConstants.COMPONENT_VENDOR_NAME, ComponentVendorConstants.ENTITY_TYPE_NAME, totalEntities)) {
5470                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5471
5472                    var componentVendors = entities.stream()
5473                            .map(ComponentVendorObject::new)
5474                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5475
5476                    data = new CountedObjects<>(objectLimiter, componentVendors);
5477                }
5478            }
5479        } catch (NamingException ex) {
5480            throw new RuntimeException(ex);
5481        }
5482
5483        return data;
5484    }
5485
5486    @GraphQLField
5487    @GraphQLName("inventoryCondition")
5488    static InventoryConditionObject inventoryCondition(final DataFetchingEnvironment env,
5489            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
5490            @GraphQLName("id") @GraphQLID final String id) {
5491        InventoryCondition inventoryCondition;
5492
5493        try {
5494            var commandForm = InventoryUtil.getHome().getGetInventoryConditionForm();
5495
5496            commandForm.setInventoryConditionName(inventoryConditionName);
5497            commandForm.setUuid(id);
5498
5499            inventoryCondition = CDI.current().select(GetInventoryConditionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5500        } catch (NamingException ex) {
5501            throw new RuntimeException(ex);
5502        }
5503
5504        return inventoryCondition == null ? null : new InventoryConditionObject(inventoryCondition);
5505    }
5506
5507    @GraphQLField
5508    @GraphQLName("inventoryConditions")
5509    @GraphQLNonNull
5510    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5511    static CountingPaginatedData<InventoryConditionObject> inventoryConditions(final DataFetchingEnvironment env) {
5512        CountingPaginatedData<InventoryConditionObject> data;
5513
5514        try {
5515            var commandForm = InventoryUtil.getHome().getGetInventoryConditionsForm();
5516            var command = CDI.current().select(GetInventoryConditionsCommand.class).get();
5517
5518            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5519            if(totalEntities == null) {
5520                data = Connections.emptyConnection();
5521            } else {
5522                try(var objectLimiter = new ObjectLimiter(env, InventoryConditionConstants.COMPONENT_VENDOR_NAME, InventoryConditionConstants.ENTITY_TYPE_NAME, totalEntities)) {
5523                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5524
5525                    var inventoryConditions = entities.stream()
5526                            .map(InventoryConditionObject::new)
5527                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5528
5529                    data = new CountedObjects<>(objectLimiter, inventoryConditions);
5530                }
5531            }
5532        } catch (NamingException ex) {
5533            throw new RuntimeException(ex);
5534        }
5535
5536        return data;
5537    }
5538
5539    @GraphQLField
5540    @GraphQLName("allocationPriority")
5541    static AllocationPriorityObject allocationPriority(final DataFetchingEnvironment env,
5542            @GraphQLName("allocationPriorityName") final String allocationPriorityName,
5543            @GraphQLName("id") @GraphQLID final String id) {
5544        AllocationPriority allocationPriority;
5545
5546        try {
5547            var commandForm = InventoryUtil.getHome().getGetAllocationPriorityForm();
5548
5549            commandForm.setAllocationPriorityName(allocationPriorityName);
5550            commandForm.setUuid(id);
5551
5552            allocationPriority = CDI.current().select(GetAllocationPriorityCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5553        } catch (NamingException ex) {
5554            throw new RuntimeException(ex);
5555        }
5556
5557        return allocationPriority == null ? null : new AllocationPriorityObject(allocationPriority);
5558    }
5559
5560    @GraphQLField
5561    @GraphQLName("allocationPriorities")
5562    @GraphQLNonNull
5563    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5564    static CountingPaginatedData<AllocationPriorityObject> allocationPriorities(final DataFetchingEnvironment env) {
5565        CountingPaginatedData<AllocationPriorityObject> data;
5566
5567        try {
5568            var commandForm = InventoryUtil.getHome().getGetAllocationPrioritiesForm();
5569            var command = CDI.current().select(GetAllocationPrioritiesCommand.class).get();
5570
5571            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5572            if(totalEntities == null) {
5573                data = Connections.emptyConnection();
5574            } else {
5575                try(var objectLimiter = new ObjectLimiter(env, AllocationPriorityConstants.COMPONENT_VENDOR_NAME, AllocationPriorityConstants.ENTITY_TYPE_NAME, totalEntities)) {
5576                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5577
5578                    var allocationPriorities = entities.stream()
5579                            .map(AllocationPriorityObject::new)
5580                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5581
5582                    data = new CountedObjects<>(objectLimiter, allocationPriorities);
5583                }
5584            }
5585        } catch (NamingException ex) {
5586            throw new RuntimeException(ex);
5587        }
5588
5589        return data;
5590    }
5591
5592    @GraphQLField
5593    @GraphQLName("inventoryTransactionType")
5594    static InventoryTransactionTypeObject inventoryTransactionType(final DataFetchingEnvironment env,
5595            @GraphQLName("inventoryTransactionTypeName") final String inventoryTransactionTypeName,
5596            @GraphQLName("id") @GraphQLID final String id) {
5597        InventoryTransactionType inventoryTransactionType;
5598
5599        try {
5600            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionTypeForm();
5601
5602            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5603            commandForm.setUuid(id);
5604
5605            inventoryTransactionType = CDI.current().select(GetInventoryTransactionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5606        } catch (NamingException ex) {
5607            throw new RuntimeException(ex);
5608        }
5609
5610        return inventoryTransactionType == null ? null : new InventoryTransactionTypeObject(inventoryTransactionType);
5611    }
5612
5613    @GraphQLField
5614    @GraphQLName("inventoryTransactionTypes")
5615    @GraphQLNonNull
5616    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5617    static CountingPaginatedData<InventoryTransactionTypeObject> inventoryTransactionTypes(final DataFetchingEnvironment env) {
5618        CountingPaginatedData<InventoryTransactionTypeObject> data;
5619
5620        try {
5621            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionTypesForm();
5622            var command = CDI.current().select(GetInventoryTransactionTypesCommand.class).get();
5623
5624            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5625            if(totalEntities == null) {
5626                data = Connections.emptyConnection();
5627            } else {
5628                try(var objectLimiter = new ObjectLimiter(env, InventoryTransactionTypeConstants.COMPONENT_VENDOR_NAME, InventoryTransactionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5629                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5630
5631                    var inventoryTransactionTypes = entities.stream()
5632                            .map(InventoryTransactionTypeObject::new)
5633                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5634
5635                    data = new CountedObjects<>(objectLimiter, inventoryTransactionTypes);
5636                }
5637            }
5638        } catch (NamingException ex) {
5639            throw new RuntimeException(ex);
5640        }
5641
5642        return data;
5643    }
5644
5645    @GraphQLField
5646    @GraphQLName("inventoryTransactionTimeType")
5647    static InventoryTransactionTimeTypeObject inventoryTransactionTimeType(final DataFetchingEnvironment env,
5648            @GraphQLName("inventoryTransactionTypeName") final String inventoryTransactionTypeName,
5649            @GraphQLName("inventoryTransactionTimeTypeName") final String inventoryTransactionTimeTypeName,
5650            @GraphQLName("id") @GraphQLID final String id) {
5651        InventoryTransactionTimeType inventoryTransactionTimeType;
5652
5653        try {
5654            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionTimeTypeForm();
5655
5656            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5657            commandForm.setInventoryTransactionTimeTypeName(inventoryTransactionTimeTypeName);
5658            commandForm.setUuid(id);
5659
5660            inventoryTransactionTimeType = 
5661                    CDI.current().select(GetInventoryTransactionTimeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5662        } catch (NamingException ex) {
5663            throw new RuntimeException(ex);
5664        }
5665
5666        return inventoryTransactionTimeType == null ? null : new InventoryTransactionTimeTypeObject(inventoryTransactionTimeType);
5667    }
5668
5669    @GraphQLField
5670    @GraphQLName("inventoryTransactionTimeTypes")
5671    @GraphQLNonNull
5672    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5673    static CountingPaginatedData<InventoryTransactionTimeTypeObject> inventoryTransactionTimeTypes(final DataFetchingEnvironment env,
5674            @GraphQLName("inventoryTransactionTypeName") @GraphQLNonNull final String inventoryTransactionTypeName) {
5675        CountingPaginatedData<InventoryTransactionTimeTypeObject> data;
5676
5677        try {
5678            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionTimeTypesForm();
5679            var command = CDI.current().select(GetInventoryTransactionTimeTypesCommand.class).get();
5680
5681            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5682
5683            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5684            if(totalEntities == null) {
5685                data = Connections.emptyConnection();
5686            } else {
5687                try(var objectLimiter = new ObjectLimiter(env, InventoryTransactionTimeTypeConstants.COMPONENT_VENDOR_NAME,
5688                        InventoryTransactionTimeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5689                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5690
5691                    var inventoryTransactionTimeTypes = entities.stream()
5692                            .map(InventoryTransactionTimeTypeObject::new)
5693                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5694
5695                    data = new CountedObjects<>(objectLimiter, inventoryTransactionTimeTypes);
5696                }
5697            }
5698        } catch (NamingException ex) {
5699            throw new RuntimeException(ex);
5700        }
5701
5702        return data;
5703    }
5704
5705    @GraphQLField
5706    @GraphQLName("inventoryDisposition")
5707    static InventoryDispositionObject inventoryDisposition(final DataFetchingEnvironment env,
5708            @GraphQLName("inventoryTransactionTypeName") final String inventoryTransactionTypeName,
5709            @GraphQLName("inventoryDispositionName") final String inventoryDispositionName,
5710            @GraphQLName("id") @GraphQLID final String id) {
5711        InventoryDisposition inventoryDisposition;
5712
5713        try {
5714            var commandForm = InventoryUtil.getHome().getGetInventoryDispositionForm();
5715
5716            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5717            commandForm.setInventoryDispositionName(inventoryDispositionName);
5718            commandForm.setUuid(id);
5719
5720            inventoryDisposition = 
5721                    CDI.current().select(GetInventoryDispositionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5722        } catch (NamingException ex) {
5723            throw new RuntimeException(ex);
5724        }
5725
5726        return inventoryDisposition == null ? null : new InventoryDispositionObject(inventoryDisposition);
5727    }
5728
5729    @GraphQLField
5730    @GraphQLName("inventoryDispositions")
5731    @GraphQLNonNull
5732    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5733    static CountingPaginatedData<InventoryDispositionObject> inventoryDispositions(final DataFetchingEnvironment env,
5734            @GraphQLName("inventoryTransactionTypeName") @GraphQLNonNull final String inventoryTransactionTypeName) {
5735        CountingPaginatedData<InventoryDispositionObject> data;
5736
5737        try {
5738            var commandForm = InventoryUtil.getHome().getGetInventoryDispositionsForm();
5739            var command = CDI.current().select(GetInventoryDispositionsCommand.class).get();
5740
5741            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5742
5743            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5744            if(totalEntities == null) {
5745                data = Connections.emptyConnection();
5746            } else {
5747                try(var objectLimiter = new ObjectLimiter(env, InventoryDispositionConstants.COMPONENT_VENDOR_NAME,
5748                        InventoryDispositionConstants.ENTITY_TYPE_NAME, totalEntities)) {
5749                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5750
5751                    var inventoryDispositions = entities.stream()
5752                            .map(InventoryDispositionObject::new)
5753                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5754
5755                    data = new CountedObjects<>(objectLimiter, inventoryDispositions);
5756                }
5757            }
5758        } catch (NamingException ex) {
5759            throw new RuntimeException(ex);
5760        }
5761
5762        return data;
5763    }
5764
5765    @GraphQLField
5766    @GraphQLName("inventoryDispositionAdjustment")
5767    static InventoryDispositionAdjustmentObject inventoryDispositionAdjustment(final DataFetchingEnvironment env,
5768            @GraphQLName("inventoryTransactionTypeName") final String inventoryTransactionTypeName,
5769            @GraphQLName("inventoryDispositionName") final String inventoryDispositionName,
5770            @GraphQLName("inventoryDispositionAdjustmentName") final String inventoryDispositionAdjustmentName,
5771            @GraphQLName("id") @GraphQLID final String id) {
5772        InventoryDispositionAdjustment inventoryDispositionAdjustment;
5773
5774        try {
5775            var commandForm = InventoryUtil.getHome().getGetInventoryDispositionAdjustmentForm();
5776
5777            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5778            commandForm.setInventoryDispositionName(inventoryDispositionName);
5779            commandForm.setInventoryDispositionAdjustmentName(inventoryDispositionAdjustmentName);
5780            commandForm.setUuid(id);
5781
5782            inventoryDispositionAdjustment =
5783                    CDI.current().select(GetInventoryDispositionAdjustmentCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5784        } catch (NamingException ex) {
5785            throw new RuntimeException(ex);
5786        }
5787
5788        return inventoryDispositionAdjustment == null ? null : new InventoryDispositionAdjustmentObject(inventoryDispositionAdjustment);
5789    }
5790
5791    @GraphQLField
5792    @GraphQLName("inventoryDispositionAdjustments")
5793    @GraphQLNonNull
5794    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5795    static CountingPaginatedData<InventoryDispositionAdjustmentObject> inventoryDispositionAdjustments(final DataFetchingEnvironment env,
5796            @GraphQLName("inventoryTransactionTypeName") @GraphQLNonNull final String inventoryTransactionTypeName,
5797            @GraphQLName("inventoryDispositionName") @GraphQLNonNull final String inventoryDispositionName) {
5798        CountingPaginatedData<InventoryDispositionAdjustmentObject> data;
5799
5800        try {
5801            var commandForm = InventoryUtil.getHome().getGetInventoryDispositionAdjustmentsForm();
5802            var command = CDI.current().select(GetInventoryDispositionAdjustmentsCommand.class).get();
5803
5804            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5805            commandForm.setInventoryDispositionName(inventoryDispositionName);
5806
5807            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5808            if(totalEntities == null) {
5809                data = Connections.emptyConnection();
5810            } else {
5811                try(var objectLimiter = new ObjectLimiter(env, InventoryDispositionAdjustmentConstants.COMPONENT_VENDOR_NAME,
5812                        InventoryDispositionAdjustmentConstants.ENTITY_TYPE_NAME, totalEntities)) {
5813                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5814
5815                    var inventoryDispositionAdjustments = entities.stream()
5816                            .map(InventoryDispositionAdjustmentObject::new)
5817                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5818
5819                    data = new CountedObjects<>(objectLimiter, inventoryDispositionAdjustments);
5820                }
5821            }
5822        } catch (NamingException ex) {
5823            throw new RuntimeException(ex);
5824        }
5825
5826        return data;
5827    }
5828
5829    @GraphQLField
5830    @GraphQLName("inventoryTransactionReason")
5831    static InventoryTransactionReasonObject inventoryTransactionReason(final DataFetchingEnvironment env,
5832            @GraphQLName("inventoryTransactionTypeName") final String inventoryTransactionTypeName,
5833            @GraphQLName("inventoryTransactionReasonName") final String inventoryTransactionReasonName,
5834            @GraphQLName("id") @GraphQLID final String id) {
5835        InventoryTransactionReason inventoryTransactionReason;
5836
5837        try {
5838            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionReasonForm();
5839
5840            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5841            commandForm.setInventoryTransactionReasonName(inventoryTransactionReasonName);
5842            commandForm.setUuid(id);
5843
5844            inventoryTransactionReason = 
5845                    CDI.current().select(GetInventoryTransactionReasonCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5846        } catch (NamingException ex) {
5847            throw new RuntimeException(ex);
5848        }
5849
5850        return inventoryTransactionReason == null ? null : new InventoryTransactionReasonObject(inventoryTransactionReason);
5851    }
5852
5853    @GraphQLField
5854    @GraphQLName("inventoryTransactionReasons")
5855    @GraphQLNonNull
5856    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5857    static CountingPaginatedData<InventoryTransactionReasonObject> inventoryTransactionReasons(final DataFetchingEnvironment env,
5858            @GraphQLName("inventoryTransactionTypeName") @GraphQLNonNull final String inventoryTransactionTypeName) {
5859        CountingPaginatedData<InventoryTransactionReasonObject> data;
5860
5861        try {
5862            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionReasonsForm();
5863            var command = CDI.current().select(GetInventoryTransactionReasonsCommand.class).get();
5864
5865            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5866
5867            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5868            if(totalEntities == null) {
5869                data = Connections.emptyConnection();
5870            } else {
5871                try(var objectLimiter = new ObjectLimiter(env, InventoryTransactionReasonConstants.COMPONENT_VENDOR_NAME,
5872                        InventoryTransactionReasonConstants.ENTITY_TYPE_NAME, totalEntities)) {
5873                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5874
5875                    var inventoryTransactionReasons = entities.stream()
5876                            .map(InventoryTransactionReasonObject::new)
5877                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5878
5879                    data = new CountedObjects<>(objectLimiter, inventoryTransactionReasons);
5880                }
5881            }
5882        } catch (NamingException ex) {
5883            throw new RuntimeException(ex);
5884        }
5885
5886        return data;
5887    }
5888
5889    @GraphQLField
5890    @GraphQLName("inventoryTransactionRoleType")
5891    static InventoryTransactionRoleTypeObject inventoryTransactionRoleType(final DataFetchingEnvironment env,
5892            @GraphQLName("inventoryTransactionTypeName") final String inventoryTransactionTypeName,
5893            @GraphQLName("inventoryTransactionRoleTypeName") final String inventoryTransactionRoleTypeName,
5894            @GraphQLName("id") @GraphQLID final String id) {
5895        InventoryTransactionRoleType inventoryTransactionRoleType;
5896
5897        try {
5898            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionRoleTypeForm();
5899
5900            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5901            commandForm.setInventoryTransactionRoleTypeName(inventoryTransactionRoleTypeName);
5902            commandForm.setUuid(id);
5903
5904            inventoryTransactionRoleType = 
5905                    CDI.current().select(GetInventoryTransactionRoleTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5906        } catch (NamingException ex) {
5907            throw new RuntimeException(ex);
5908        }
5909
5910        return inventoryTransactionRoleType == null ? null : new InventoryTransactionRoleTypeObject(inventoryTransactionRoleType);
5911    }
5912
5913    @GraphQLField
5914    @GraphQLName("inventoryTransactionRoleTypes")
5915    @GraphQLNonNull
5916    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5917    static CountingPaginatedData<InventoryTransactionRoleTypeObject> inventoryTransactionRoleTypes(final DataFetchingEnvironment env,
5918            @GraphQLName("inventoryTransactionTypeName") @GraphQLNonNull final String inventoryTransactionTypeName) {
5919        CountingPaginatedData<InventoryTransactionRoleTypeObject> data;
5920
5921        try {
5922            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionRoleTypesForm();
5923            var command = CDI.current().select(GetInventoryTransactionRoleTypesCommand.class).get();
5924
5925            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5926
5927            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5928            if(totalEntities == null) {
5929                data = Connections.emptyConnection();
5930            } else {
5931                try(var objectLimiter = new ObjectLimiter(env, InventoryTransactionRoleTypeConstants.COMPONENT_VENDOR_NAME,
5932                        InventoryTransactionRoleTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5933                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5934
5935                    var inventoryTransactionRoleTypes = entities.stream()
5936                            .map(InventoryTransactionRoleTypeObject::new)
5937                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5938
5939                    data = new CountedObjects<>(objectLimiter, inventoryTransactionRoleTypes);
5940                }
5941            }
5942        } catch (NamingException ex) {
5943            throw new RuntimeException(ex);
5944        }
5945
5946        return data;
5947    }
5948
5949    @GraphQLField
5950    @GraphQLName("inventoryAdjustmentType")
5951    static InventoryAdjustmentTypeObject inventoryAdjustmentType(final DataFetchingEnvironment env,
5952            @GraphQLName("inventoryAdjustmentTypeName") final String inventoryAdjustmentTypeName,
5953            @GraphQLName("id") @GraphQLID final String id) {
5954        InventoryAdjustmentType inventoryAdjustmentType;
5955
5956        try {
5957            var commandForm = InventoryUtil.getHome().getGetInventoryAdjustmentTypeForm();
5958
5959            commandForm.setInventoryAdjustmentTypeName(inventoryAdjustmentTypeName);
5960            commandForm.setUuid(id);
5961
5962            inventoryAdjustmentType = CDI.current().select(GetInventoryAdjustmentTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5963        } catch (NamingException ex) {
5964            throw new RuntimeException(ex);
5965        }
5966
5967        return inventoryAdjustmentType == null ? null : new InventoryAdjustmentTypeObject(inventoryAdjustmentType);
5968    }
5969
5970    @GraphQLField
5971    @GraphQLName("inventoryAdjustmentTypes")
5972    @GraphQLNonNull
5973    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5974    static CountingPaginatedData<InventoryAdjustmentTypeObject> inventoryAdjustmentTypes(final DataFetchingEnvironment env) {
5975        CountingPaginatedData<InventoryAdjustmentTypeObject> data;
5976
5977        try {
5978            var commandForm = InventoryUtil.getHome().getGetInventoryAdjustmentTypesForm();
5979            var command = CDI.current().select(GetInventoryAdjustmentTypesCommand.class).get();
5980
5981            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5982            if(totalEntities == null) {
5983                data = Connections.emptyConnection();
5984            } else {
5985                try(var objectLimiter = new ObjectLimiter(env, InventoryAdjustmentTypeConstants.COMPONENT_VENDOR_NAME, InventoryAdjustmentTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5986                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5987
5988                    var inventoryAdjustmentTypes = entities.stream()
5989                            .map(InventoryAdjustmentTypeObject::new)
5990                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5991
5992                    data = new CountedObjects<>(objectLimiter, inventoryAdjustmentTypes);
5993                }
5994            }
5995        } catch (NamingException ex) {
5996            throw new RuntimeException(ex);
5997        }
5998
5999        return data;
6000    }
6001
6002    @GraphQLField
6003    @GraphQLName("inventoryCostingMethod")
6004    static InventoryCostingMethodObject inventoryCostingMethod(final DataFetchingEnvironment env,
6005            @GraphQLName("inventoryCostingMethodName") final String inventoryCostingMethodName,
6006            @GraphQLName("id") @GraphQLID final String id) {
6007        InventoryCostingMethod inventoryCostingMethod;
6008
6009        try {
6010            var commandForm = InventoryUtil.getHome().getGetInventoryCostingMethodForm();
6011
6012            commandForm.setInventoryCostingMethodName(inventoryCostingMethodName);
6013            commandForm.setUuid(id);
6014
6015            inventoryCostingMethod = CDI.current().select(GetInventoryCostingMethodCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6016        } catch (NamingException ex) {
6017            throw new RuntimeException(ex);
6018        }
6019
6020        return inventoryCostingMethod == null ? null : new InventoryCostingMethodObject(inventoryCostingMethod);
6021    }
6022
6023    @GraphQLField
6024    @GraphQLName("inventoryCostingMethods")
6025    @GraphQLNonNull
6026    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6027    static CountingPaginatedData<InventoryCostingMethodObject> inventoryCostingMethods(final DataFetchingEnvironment env) {
6028        CountingPaginatedData<InventoryCostingMethodObject> data;
6029
6030        try {
6031            var commandForm = InventoryUtil.getHome().getGetInventoryCostingMethodsForm();
6032            var command = CDI.current().select(GetInventoryCostingMethodsCommand.class).get();
6033
6034            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6035            if(totalEntities == null) {
6036                data = Connections.emptyConnection();
6037            } else {
6038                try(var objectLimiter = new ObjectLimiter(env, InventoryCostingMethodConstants.COMPONENT_VENDOR_NAME, InventoryCostingMethodConstants.ENTITY_TYPE_NAME, totalEntities)) {
6039                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6040
6041                    var inventoryCostingMethods = entities.stream()
6042                            .map(InventoryCostingMethodObject::new)
6043                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6044
6045                    data = new CountedObjects<>(objectLimiter, inventoryCostingMethods);
6046                }
6047            }
6048        } catch (NamingException ex) {
6049            throw new RuntimeException(ex);
6050        }
6051
6052        return data;
6053    }
6054
6055    @GraphQLField
6056    @GraphQLName("partyInventoryCostingMethod")
6057    static PartyInventoryCostingMethodObject partyInventoryCostingMethod(final DataFetchingEnvironment env,
6058            @GraphQLName("partyName") final String partyName,
6059            @GraphQLName("id") @GraphQLID final String id) {
6060        PartyInventoryCostingMethod partyInventoryCostingMethod;
6061
6062        try {
6063            var commandForm = InventoryUtil.getHome().getGetPartyInventoryCostingMethodForm();
6064
6065            commandForm.setPartyName(partyName);
6066            commandForm.setUuid(id);
6067
6068            partyInventoryCostingMethod = CDI.current().select(GetPartyInventoryCostingMethodCommand.class).get()
6069                    .getEntityForGraphQl(getUserVisitPK(env), commandForm);
6070        } catch (NamingException ex) {
6071            throw new RuntimeException(ex);
6072        }
6073
6074        return partyInventoryCostingMethod == null ? null
6075                : new PartyInventoryCostingMethodObject(partyInventoryCostingMethod);
6076    }
6077
6078    @GraphQLField
6079    @GraphQLName("partyInventoryCostingMethods")
6080    @GraphQLNonNull
6081    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6082    static CountingPaginatedData<PartyInventoryCostingMethodObject> partyInventoryCostingMethods(
6083            final DataFetchingEnvironment env,
6084            @GraphQLName("inventoryCostingMethodName") final String inventoryCostingMethodName,
6085            @GraphQLName("id") @GraphQLID final String id) {
6086        CountingPaginatedData<PartyInventoryCostingMethodObject> data;
6087
6088        try {
6089            var commandForm = InventoryUtil.getHome().getGetPartyInventoryCostingMethodsForm();
6090            var command = CDI.current().select(GetPartyInventoryCostingMethodsCommand.class).get();
6091
6092            commandForm.setInventoryCostingMethodName(inventoryCostingMethodName);
6093            commandForm.setUuid(id);
6094
6095            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6096            if(totalEntities == null) {
6097                data = Connections.emptyConnection();
6098            } else {
6099                try(var objectLimiter = new ObjectLimiter(env,
6100                        PartyInventoryCostingMethodConstants.COMPONENT_VENDOR_NAME,
6101                        PartyInventoryCostingMethodConstants.ENTITY_TYPE_NAME, totalEntities)) {
6102                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6103                    var partyInventoryCostingMethods = entities.stream()
6104                            .map(PartyInventoryCostingMethodObject::new)
6105                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6106
6107                    data = new CountedObjects<>(objectLimiter, partyInventoryCostingMethods);
6108                }
6109            }
6110        } catch (NamingException ex) {
6111            throw new RuntimeException(ex);
6112        }
6113
6114        return data;
6115    }
6116
6117    @GraphQLField
6118    @GraphQLName("inventoryBucketType")
6119    static InventoryBucketTypeObject inventoryBucketType(final DataFetchingEnvironment env,
6120            @GraphQLName("inventoryBucketTypeName") final String inventoryBucketTypeName,
6121            @GraphQLName("id") @GraphQLID final String id) {
6122        InventoryBucketType inventoryBucketType;
6123
6124        try {
6125            var commandForm = InventoryUtil.getHome().getGetInventoryBucketTypeForm();
6126
6127            commandForm.setInventoryBucketTypeName(inventoryBucketTypeName);
6128            commandForm.setUuid(id);
6129
6130            inventoryBucketType = CDI.current().select(GetInventoryBucketTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6131        } catch (NamingException ex) {
6132            throw new RuntimeException(ex);
6133        }
6134
6135        return inventoryBucketType == null ? null : new InventoryBucketTypeObject(inventoryBucketType);
6136    }
6137
6138    @GraphQLField
6139    @GraphQLName("inventoryBucketTypes")
6140    @GraphQLNonNull
6141    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6142    static CountingPaginatedData<InventoryBucketTypeObject> inventoryBucketTypes(final DataFetchingEnvironment env) {
6143        CountingPaginatedData<InventoryBucketTypeObject> data;
6144
6145        try {
6146            var commandForm = InventoryUtil.getHome().getGetInventoryBucketTypesForm();
6147            var command = CDI.current().select(GetInventoryBucketTypesCommand.class).get();
6148
6149            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6150            if(totalEntities == null) {
6151                data = Connections.emptyConnection();
6152            } else {
6153                try(var objectLimiter = new ObjectLimiter(env, InventoryBucketTypeConstants.COMPONENT_VENDOR_NAME, InventoryBucketTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
6154                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6155
6156                    var inventoryBucketTypes = entities.stream()
6157                            .map(InventoryBucketTypeObject::new)
6158                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6159
6160                    data = new CountedObjects<>(objectLimiter, inventoryBucketTypes);
6161                }
6162            }
6163        } catch (NamingException ex) {
6164            throw new RuntimeException(ex);
6165        }
6166
6167        return data;
6168    }
6169
6170    @GraphQLField
6171    @GraphQLName("partyBucket")
6172    static PartyBucketObject partyBucket(final DataFetchingEnvironment env,
6173            @GraphQLName("partyName") final String partyName,
6174            @GraphQLName("companyName") final String companyName,
6175            @GraphQLName("warehouseName") final String warehouseName,
6176            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
6177            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName,
6178            @GraphQLName("inventoryConditionName") @GraphQLNonNull final String inventoryConditionName,
6179            @GraphQLName("inventoryBucketTypeName") @GraphQLNonNull final String inventoryBucketTypeName) {
6180        PartyBucket partyBucket;
6181
6182        try {
6183            var commandForm = InventoryUtil.getHome().getGetPartyBucketForm();
6184
6185            commandForm.setPartyName(partyName);
6186            commandForm.setCompanyName(companyName);
6187            commandForm.setWarehouseName(warehouseName);
6188            commandForm.setItemName(itemName);
6189            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
6190            commandForm.setInventoryConditionName(inventoryConditionName);
6191            commandForm.setInventoryBucketTypeName(inventoryBucketTypeName);
6192
6193            partyBucket = CDI.current().select(GetPartyBucketCommand.class).get()
6194                    .getEntityForGraphQl(getUserVisitPK(env), commandForm);
6195        } catch (NamingException ex) {
6196            throw new RuntimeException(ex);
6197        }
6198
6199        return partyBucket == null ? null : new PartyBucketObject(partyBucket);
6200    }
6201
6202    @GraphQLField
6203    @GraphQLName("partyBuckets")
6204    @GraphQLNonNull
6205    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6206    static CountingPaginatedData<PartyBucketObject> partyBuckets(final DataFetchingEnvironment env,
6207            @GraphQLName("partyName") final String partyName,
6208            @GraphQLName("companyName") final String companyName,
6209            @GraphQLName("warehouseName") final String warehouseName,
6210            @GraphQLName("itemName") final String itemName,
6211            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName,
6212            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
6213            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
6214            @GraphQLName("inventoryBucketTypeName") final String inventoryBucketTypeName) {
6215        CountingPaginatedData<PartyBucketObject> data;
6216
6217        try {
6218            var commandForm = InventoryUtil.getHome().getGetPartyBucketsForm();
6219            var command = CDI.current().select(GetPartyBucketsCommand.class).get();
6220
6221            commandForm.setPartyName(partyName);
6222            commandForm.setCompanyName(companyName);
6223            commandForm.setWarehouseName(warehouseName);
6224            commandForm.setItemName(itemName);
6225            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
6226            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
6227            commandForm.setInventoryConditionName(inventoryConditionName);
6228            commandForm.setInventoryBucketTypeName(inventoryBucketTypeName);
6229
6230            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6231            if(totalEntities == null) {
6232                data = Connections.emptyConnection();
6233            } else {
6234                try(var objectLimiter = new ObjectLimiter(env, PartyBucketConstants.COMPONENT_VENDOR_NAME,
6235                        PartyBucketConstants.ENTITY_TYPE_NAME, totalEntities)) {
6236                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6237                    var partyBuckets = entities.stream()
6238                            .map(PartyBucketObject::new)
6239                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6240
6241                    data = new CountedObjects<>(objectLimiter, partyBuckets);
6242                }
6243            }
6244        } catch (NamingException ex) {
6245            throw new RuntimeException(ex);
6246        }
6247
6248        return data;
6249    }
6250
6251    @GraphQLField
6252    @GraphQLName("inventoryCostingPool")
6253    static InventoryCostingPoolObject inventoryCostingPool(final DataFetchingEnvironment env,
6254            @GraphQLName("partyName") final String partyName,
6255            @GraphQLName("companyName") final String companyName,
6256            @GraphQLName("itemName") final String itemName,
6257            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
6258            @GraphQLName("id") @GraphQLID final String id) {
6259        InventoryCostingPool inventoryCostingPool;
6260
6261        try {
6262            var commandForm = InventoryUtil.getHome().getGetInventoryCostingPoolForm();
6263
6264            commandForm.setPartyName(partyName);
6265            commandForm.setCompanyName(companyName);
6266            commandForm.setItemName(itemName);
6267            commandForm.setInventoryConditionName(inventoryConditionName);
6268            commandForm.setUuid(id);
6269
6270            inventoryCostingPool = CDI.current().select(GetInventoryCostingPoolCommand.class).get()
6271                    .getEntityForGraphQl(getUserVisitPK(env), commandForm);
6272        } catch (NamingException ex) {
6273            throw new RuntimeException(ex);
6274        }
6275
6276        return inventoryCostingPool == null ? null : new InventoryCostingPoolObject(inventoryCostingPool);
6277    }
6278
6279    @GraphQLField
6280    @GraphQLName("inventoryCostingPools")
6281    @GraphQLNonNull
6282    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6283    static CountingPaginatedData<InventoryCostingPoolObject> inventoryCostingPools(final DataFetchingEnvironment env,
6284            @GraphQLName("partyName") final String partyName,
6285            @GraphQLName("companyName") final String companyName,
6286            @GraphQLName("itemName") final String itemName,
6287            @GraphQLName("inventoryConditionName") final String inventoryConditionName) {
6288        CountingPaginatedData<InventoryCostingPoolObject> data;
6289
6290        try {
6291            var commandForm = InventoryUtil.getHome().getGetInventoryCostingPoolsForm();
6292            var command = CDI.current().select(GetInventoryCostingPoolsCommand.class).get();
6293
6294            commandForm.setPartyName(partyName);
6295            commandForm.setCompanyName(companyName);
6296            commandForm.setItemName(itemName);
6297            commandForm.setInventoryConditionName(inventoryConditionName);
6298
6299            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6300            if(totalEntities == null) {
6301                data = Connections.emptyConnection();
6302            } else {
6303                try(var objectLimiter = new ObjectLimiter(env, InventoryCostingPoolConstants.COMPONENT_VENDOR_NAME,
6304                        InventoryCostingPoolConstants.ENTITY_TYPE_NAME, totalEntities)) {
6305                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6306                    var inventoryCostingPools = entities.stream()
6307                            .map(InventoryCostingPoolObject::new)
6308                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6309
6310                    data = new CountedObjects<>(objectLimiter, inventoryCostingPools);
6311                }
6312            }
6313        } catch (NamingException ex) {
6314            throw new RuntimeException(ex);
6315        }
6316
6317        return data;
6318    }
6319
6320    @GraphQLField
6321    @GraphQLName("inventoryLayer")
6322    static InventoryLayerObject inventoryLayer(final DataFetchingEnvironment env,
6323            @GraphQLName("partyName") final String partyName,
6324            @GraphQLName("companyName") final String companyName,
6325            @GraphQLName("itemName") final String itemName,
6326            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
6327            @GraphQLName("inventoryLayerSequence") final String inventoryLayerSequence,
6328            @GraphQLName("id") @GraphQLID final String id) {
6329        InventoryLayer inventoryLayer;
6330
6331        try {
6332            var commandForm = InventoryUtil.getHome().getGetInventoryLayerForm();
6333
6334            commandForm.setPartyName(partyName);
6335            commandForm.setCompanyName(companyName);
6336            commandForm.setItemName(itemName);
6337            commandForm.setInventoryConditionName(inventoryConditionName);
6338            commandForm.setInventoryLayerSequence(inventoryLayerSequence);
6339            commandForm.setUuid(id);
6340
6341            inventoryLayer = CDI.current().select(GetInventoryLayerCommand.class).get()
6342                    .getEntityForGraphQl(getUserVisitPK(env), commandForm);
6343        } catch (NamingException ex) {
6344            throw new RuntimeException(ex);
6345        }
6346
6347        return inventoryLayer == null ? null : new InventoryLayerObject(inventoryLayer);
6348    }
6349
6350    @GraphQLField
6351    @GraphQLName("inventoryLayers")
6352    @GraphQLNonNull
6353    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6354    static CountingPaginatedData<InventoryLayerObject> inventoryLayers(final DataFetchingEnvironment env,
6355            @GraphQLName("partyName") final String partyName,
6356            @GraphQLName("companyName") final String companyName,
6357            @GraphQLName("itemName") final String itemName,
6358            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
6359            @GraphQLName("inventoryTransactionTypeName") final String inventoryTransactionTypeName,
6360            @GraphQLName("inventoryTransactionName") final String inventoryTransactionName,
6361            @GraphQLName("inventoryTransactionLineSequence") final String inventoryTransactionLineSequence) {
6362        CountingPaginatedData<InventoryLayerObject> data;
6363
6364        try {
6365            var commandForm = InventoryUtil.getHome().getGetInventoryLayersForm();
6366            var command = CDI.current().select(GetInventoryLayersCommand.class).get();
6367
6368            commandForm.setPartyName(partyName);
6369            commandForm.setCompanyName(companyName);
6370            commandForm.setItemName(itemName);
6371            commandForm.setInventoryConditionName(inventoryConditionName);
6372            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
6373            commandForm.setInventoryTransactionName(inventoryTransactionName);
6374            commandForm.setInventoryTransactionLineSequence(inventoryTransactionLineSequence);
6375
6376            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6377            if(totalEntities == null) {
6378                data = Connections.emptyConnection();
6379            } else {
6380                try(var objectLimiter = new ObjectLimiter(env, InventoryLayerConstants.COMPONENT_VENDOR_NAME,
6381                        InventoryLayerConstants.ENTITY_TYPE_NAME, totalEntities)) {
6382                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6383                    var inventoryLayers = entities.stream()
6384                            .map(InventoryLayerObject::new)
6385                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6386
6387                    data = new CountedObjects<>(objectLimiter, inventoryLayers);
6388                }
6389            }
6390        } catch (NamingException ex) {
6391            throw new RuntimeException(ex);
6392        }
6393
6394        return data;
6395    }
6396
6397    @GraphQLField
6398    @GraphQLName("lot")
6399    static LotObject lot(final DataFetchingEnvironment env,
6400            @GraphQLName("itemName") final String itemName,
6401            @GraphQLName("lotIdentifier") final String lotIdentifier,
6402            @GraphQLName("id") @GraphQLID final String id) {
6403        Lot lot;
6404
6405        try {
6406            var commandForm = InventoryUtil.getHome().getGetLotForm();
6407
6408            commandForm.setItemName(itemName);
6409            commandForm.setLotIdentifier(lotIdentifier);
6410            commandForm.setUuid(id);
6411
6412            lot = CDI.current().select(GetLotCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6413        } catch (NamingException ex) {
6414            throw new RuntimeException(ex);
6415        }
6416
6417        return lot == null ? null : new LotObject(lot);
6418    }
6419
6420    @GraphQLField
6421    @GraphQLName("lots")
6422    @GraphQLNonNull
6423    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6424    static CountingPaginatedData<LotObject> lots(final DataFetchingEnvironment env,
6425            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
6426        CountingPaginatedData<LotObject> data;
6427
6428        try {
6429            var commandForm = InventoryUtil.getHome().getGetLotsForm();
6430            var command = CDI.current().select(GetLotsCommand.class).get();
6431
6432            commandForm.setItemName(itemName);
6433
6434            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6435            if(totalEntities == null) {
6436                data = Connections.emptyConnection();
6437            } else {
6438                try(var objectLimiter = new ObjectLimiter(env, LotConstants.COMPONENT_VENDOR_NAME, LotConstants.ENTITY_TYPE_NAME, totalEntities)) {
6439                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6440
6441                    var lots = entities.stream()
6442                            .map(LotObject::new)
6443                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6444
6445                    data = new CountedObjects<>(objectLimiter, lots);
6446                }
6447            }
6448        } catch (NamingException ex) {
6449            throw new RuntimeException(ex);
6450        }
6451
6452        return data;
6453    }
6454
6455    @GraphQLField
6456    @GraphQLName("contentPageLayout")
6457    static ContentPageLayoutObject contentPageLayout(final DataFetchingEnvironment env,
6458            @GraphQLName("contentPageLayoutName") final String contentPageLayoutName,
6459            @GraphQLName("id") @GraphQLID final String id) {
6460        ContentPageLayout contentPageLayout;
6461
6462        try {
6463            var commandForm = ContentUtil.getHome().getGetContentPageLayoutForm();
6464
6465            commandForm.setContentPageLayoutName(contentPageLayoutName);
6466            commandForm.setUuid(id);
6467
6468            contentPageLayout = CDI.current().select(GetContentPageLayoutCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6469        } catch (NamingException ex) {
6470            throw new RuntimeException(ex);
6471        }
6472
6473        return contentPageLayout == null ? null : new ContentPageLayoutObject(contentPageLayout);
6474    }
6475
6476    @GraphQLField
6477    @GraphQLName("contentPageLayouts")
6478    @GraphQLNonNull
6479    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6480    static CountingPaginatedData<ContentPageLayoutObject> contentPageLayouts(final DataFetchingEnvironment env) {
6481        CountingPaginatedData<ContentPageLayoutObject> data;
6482
6483        try {
6484            var commandForm = ContentUtil.getHome().getGetContentPageLayoutsForm();
6485            var command = CDI.current().select(GetContentPageLayoutsCommand.class).get();
6486
6487            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6488            if(totalEntities == null) {
6489                data = Connections.emptyConnection();
6490            } else {
6491                try(var objectLimiter = new ObjectLimiter(env, ContentPageLayoutConstants.COMPONENT_VENDOR_NAME, ContentPageLayoutConstants.ENTITY_TYPE_NAME, totalEntities)) {
6492                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6493
6494                    var contentPageLayouts = entities.stream()
6495                            .map(ContentPageLayoutObject::new)
6496                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6497
6498                    data = new CountedObjects<>(objectLimiter, contentPageLayouts);
6499                }
6500            }
6501        } catch (NamingException ex) {
6502            throw new RuntimeException(ex);
6503        }
6504
6505        return data;
6506    }
6507
6508    @GraphQLField
6509    @GraphQLName("contentPageLayoutArea")
6510    static ContentPageLayoutAreaObject contentPageLayoutArea(final DataFetchingEnvironment env,
6511            @GraphQLName("contentCollectionName") @GraphQLNonNull final String contentCollectionName,
6512            @GraphQLName("contentSectionName") @GraphQLNonNull final String contentSectionName,
6513            @GraphQLName("contentPageName") @GraphQLNonNull final String contentPageName,
6514            @GraphQLName("sortOrder") @GraphQLNonNull final String sortOrder) {
6515        ContentPageLayoutArea contentPageLayoutArea;
6516
6517        try {
6518            var commandForm = ContentUtil.getHome().getGetContentPageLayoutAreaForm();
6519
6520            commandForm.setContentCollectionName(contentCollectionName);
6521            commandForm.setContentSectionName(contentSectionName);
6522            commandForm.setContentPageName(contentPageName);
6523            commandForm.setSortOrder(sortOrder);
6524
6525            contentPageLayoutArea = CDI.current().select(GetContentPageLayoutAreaCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6526        } catch (NamingException ex) {
6527            throw new RuntimeException(ex);
6528        }
6529
6530        return contentPageLayoutArea == null ? null : new ContentPageLayoutAreaObject(contentPageLayoutArea);
6531    }
6532
6533    @GraphQLField
6534    @GraphQLName("contentPageLayoutAreas")
6535    @GraphQLNonNull
6536    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6537    static CountingPaginatedData<ContentPageLayoutAreaObject> contentPageLayoutAreas(final DataFetchingEnvironment env,
6538            @GraphQLName("contentCollectionName") @GraphQLNonNull final String contentCollectionName,
6539            @GraphQLName("contentSectionName") @GraphQLNonNull final String contentSectionName,
6540            @GraphQLName("contentPageName") @GraphQLNonNull final String contentPageName) {
6541        CountingPaginatedData<ContentPageLayoutAreaObject> data;
6542
6543        try {
6544            var commandForm = ContentUtil.getHome().getGetContentPageLayoutAreasForm();
6545            var command = CDI.current().select(GetContentPageLayoutAreasCommand.class).get();
6546
6547
6548            commandForm.setContentCollectionName(contentCollectionName);
6549            commandForm.setContentSectionName(contentSectionName);
6550            commandForm.setContentPageName(contentPageName);
6551
6552            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6553            if(totalEntities == null) {
6554                data = Connections.emptyConnection();
6555            } else {
6556                try(var objectLimiter = new ObjectLimiter(env, ContentPageLayoutAreaConstants.COMPONENT_VENDOR_NAME, ContentPageLayoutAreaConstants.ENTITY_TYPE_NAME, totalEntities)) {
6557                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6558
6559                    var contentPageLayoutAreas = entities.stream()
6560                            .map(ContentPageLayoutAreaObject::new)
6561                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6562
6563                    data = new CountedObjects<>(objectLimiter, contentPageLayoutAreas);
6564                }
6565            }
6566        } catch (NamingException ex) {
6567            throw new RuntimeException(ex);
6568        }
6569
6570        return data;
6571    }
6572
6573    @GraphQLField
6574    @GraphQLName("contentPageAreaType")
6575    static ContentPageAreaTypeObject contentPageAreaType(final DataFetchingEnvironment env,
6576            @GraphQLName("contentPageAreaTypeName") final String contentPageAreaTypeName,
6577            @GraphQLName("id") @GraphQLID final String id) {
6578        ContentPageAreaType contentPageAreaType;
6579
6580        try {
6581            var commandForm = ContentUtil.getHome().getGetContentPageAreaTypeForm();
6582
6583            commandForm.setContentPageAreaTypeName(contentPageAreaTypeName);
6584            commandForm.setUuid(id);
6585
6586            contentPageAreaType = CDI.current().select(GetContentPageAreaTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6587        } catch (NamingException ex) {
6588            throw new RuntimeException(ex);
6589        }
6590
6591        return contentPageAreaType == null ? null : new ContentPageAreaTypeObject(contentPageAreaType);
6592    }
6593
6594    @GraphQLField
6595    @GraphQLName("contentPageAreaTypes")
6596    @GraphQLNonNull
6597    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6598    static CountingPaginatedData<ContentPageAreaTypeObject> contentPageAreaTypes(final DataFetchingEnvironment env) {
6599        CountingPaginatedData<ContentPageAreaTypeObject> data;
6600
6601        try {
6602            var commandForm = ContentUtil.getHome().getGetContentPageAreaTypesForm();
6603            var command = CDI.current().select(GetContentPageAreaTypesCommand.class).get();
6604
6605            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6606            if(totalEntities == null) {
6607                data = Connections.emptyConnection();
6608            } else {
6609                try(var objectLimiter = new ObjectLimiter(env, ContentPageAreaTypeConstants.COMPONENT_VENDOR_NAME, ContentPageAreaTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
6610                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6611
6612                    var contentPageAreaTypes = entities.stream()
6613                            .map(ContentPageAreaTypeObject::new)
6614                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6615
6616                    data = new CountedObjects<>(objectLimiter, contentPageAreaTypes);
6617                }
6618            }
6619        } catch (NamingException ex) {
6620            throw new RuntimeException(ex);
6621        }
6622
6623        return data;
6624    }
6625
6626    @GraphQLField
6627    @GraphQLName("contentWebAddress")
6628    static ContentWebAddressObject contentWebAddress(final DataFetchingEnvironment env,
6629            @GraphQLName("contentWebAddressName") @GraphQLNonNull final String contentWebAddressName) {
6630        ContentWebAddress contentWebAddress;
6631
6632        try {
6633            var commandForm = ContentUtil.getHome().getGetContentWebAddressForm();
6634
6635            commandForm.setContentWebAddressName(contentWebAddressName);
6636
6637            contentWebAddress = CDI.current().select(GetContentWebAddressCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6638        } catch (NamingException ex) {
6639            throw new RuntimeException(ex);
6640        }
6641
6642        return contentWebAddress == null ? null : new ContentWebAddressObject(contentWebAddress);
6643    }
6644
6645    @GraphQLField
6646    @GraphQLName("contentWebAddresses")
6647    @GraphQLNonNull
6648    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6649    static CountingPaginatedData<ContentWebAddressObject> contentWebAddresses(final DataFetchingEnvironment env) {
6650        CountingPaginatedData<ContentWebAddressObject> data;
6651
6652        try {
6653            var commandForm = ContentUtil.getHome().getGetContentWebAddressesForm();
6654            var command = CDI.current().select(GetContentWebAddressesCommand.class).get();
6655
6656            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6657            if(totalEntities == null) {
6658                data = Connections.emptyConnection();
6659            } else {
6660                try(var objectLimiter = new ObjectLimiter(env, ContentWebAddressConstants.COMPONENT_VENDOR_NAME, ContentWebAddressConstants.ENTITY_TYPE_NAME, totalEntities)) {
6661                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6662
6663                    var contentWebAddresses = entities.stream()
6664                            .map(ContentWebAddressObject::new)
6665                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6666
6667                    data = new CountedObjects<>(objectLimiter, contentWebAddresses);
6668                }
6669            }
6670        } catch (NamingException ex) {
6671            throw new RuntimeException(ex);
6672        }
6673
6674        return data;
6675    }
6676
6677    @GraphQLField
6678    @GraphQLName("contentCollection")
6679    static ContentCollectionObject contentCollection(final DataFetchingEnvironment env,
6680            @GraphQLName("contentCollectionName") final String contentCollectionName) {
6681        ContentCollection contentCollection;
6682
6683        try {
6684            var commandForm = ContentUtil.getHome().getGetContentCollectionForm();
6685
6686            commandForm.setContentCollectionName(contentCollectionName);
6687
6688            contentCollection = CDI.current().select(GetContentCollectionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6689        } catch (NamingException ex) {
6690            throw new RuntimeException(ex);
6691        }
6692
6693        return contentCollection == null ? null : new ContentCollectionObject(contentCollection);
6694    }
6695
6696    @GraphQLField
6697    @GraphQLName("contentCollections")
6698    @GraphQLNonNull
6699    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6700    static CountingPaginatedData<ContentCollectionObject> contentCollections(final DataFetchingEnvironment env) {
6701        CountingPaginatedData<ContentCollectionObject> data;
6702
6703        try {
6704            var commandForm = ContentUtil.getHome().getGetContentCollectionsForm();
6705            var command = CDI.current().select(GetContentCollectionsCommand.class).get();
6706
6707            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6708            if(totalEntities == null) {
6709                data = Connections.emptyConnection();
6710            } else {
6711                try(var objectLimiter = new ObjectLimiter(env, ContentCollectionConstants.COMPONENT_VENDOR_NAME, ContentCollectionConstants.ENTITY_TYPE_NAME, totalEntities)) {
6712                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6713
6714                    var contentCollections = entities.stream()
6715                            .map(ContentCollectionObject::new)
6716                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6717
6718                    data = new CountedObjects<>(objectLimiter, contentCollections);
6719                }
6720            }
6721        } catch (NamingException ex) {
6722            throw new RuntimeException(ex);
6723        }
6724
6725        return data;
6726    }
6727    
6728    @GraphQLField
6729    @GraphQLName("contentSection")
6730    static ContentSectionObject contentSection(final DataFetchingEnvironment env,
6731            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6732            @GraphQLName("contentCollectionName") final String contentCollectionName,
6733            @GraphQLName("contentSectionName") final String contentSectionName,
6734            @GraphQLName("associateProgramName") final String associateProgramName,
6735            @GraphQLName("associateName") final String associateName,
6736            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6737        ContentSection contentSection;
6738
6739        try {
6740            var commandForm = ContentUtil.getHome().getGetContentSectionForm();
6741
6742            commandForm.setContentWebAddressName(contentWebAddressName);
6743            commandForm.setContentCollectionName(contentCollectionName);
6744            commandForm.setContentSectionName(contentSectionName);
6745            commandForm.setAssociateProgramName(associateProgramName);
6746            commandForm.setAssociateName(associateName);
6747            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6748
6749            contentSection = CDI.current().select(GetContentSectionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6750        } catch (NamingException ex) {
6751            throw new RuntimeException(ex);
6752        }
6753
6754        return contentSection == null ? null : new ContentSectionObject(contentSection);
6755    }
6756
6757    @GraphQLField
6758    @GraphQLName("contentSections")
6759    @GraphQLNonNull
6760    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6761    static CountingPaginatedData<ContentSectionObject> contentSections(final DataFetchingEnvironment env,
6762            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6763            @GraphQLName("contentCollectionName") final String contentCollectionName,
6764            @GraphQLName("parentContentSectionName") final String parentContentSectionName,
6765            @GraphQLName("associateProgramName") final String associateProgramName,
6766            @GraphQLName("associateName") final String associateName,
6767            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6768        CountingPaginatedData<ContentSectionObject> data;
6769
6770        try {
6771            var commandForm = ContentUtil.getHome().getGetContentSectionsForm();
6772            var command = CDI.current().select(GetContentSectionsCommand.class).get();
6773
6774            commandForm.setContentWebAddressName(contentWebAddressName);
6775            commandForm.setContentCollectionName(contentCollectionName);
6776            commandForm.setParentContentSectionName(parentContentSectionName);
6777            commandForm.setAssociateProgramName(associateProgramName);
6778            commandForm.setAssociateName(associateName);
6779            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6780
6781            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6782            if(totalEntities == null) {
6783                data = Connections.emptyConnection();
6784            } else {
6785                try(var objectLimiter = new ObjectLimiter(env, ContentSectionConstants.COMPONENT_VENDOR_NAME, ContentSectionConstants.ENTITY_TYPE_NAME, totalEntities)) {
6786                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6787
6788                    var contentSections = entities.stream()
6789                            .map(ContentSectionObject::new)
6790                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6791
6792                    data = new CountedObjects<>(objectLimiter, contentSections);
6793                }
6794            }
6795        } catch (NamingException ex) {
6796            throw new RuntimeException(ex);
6797        }
6798
6799        return data;
6800    }
6801
6802    @GraphQLField
6803    @GraphQLName("contentPage")
6804    static ContentPageObject contentPage(final DataFetchingEnvironment env,
6805            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6806            @GraphQLName("contentCollectionName") final String contentCollectionName,
6807            @GraphQLName("contentSectionName") final String contentSectionName,
6808            @GraphQLName("contentPageName") final String contentPageName,
6809            @GraphQLName("associateProgramName") final String associateProgramName,
6810            @GraphQLName("associateName") final String associateName,
6811            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6812        ContentPage contentPage;
6813
6814        try {
6815            var commandForm = ContentUtil.getHome().getGetContentPageForm();
6816
6817            commandForm.setContentWebAddressName(contentWebAddressName);
6818            commandForm.setContentCollectionName(contentCollectionName);
6819            commandForm.setContentSectionName(contentSectionName);
6820            commandForm.setContentPageName(contentPageName);
6821            commandForm.setAssociateProgramName(associateProgramName);
6822            commandForm.setAssociateName(associateName);
6823            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6824
6825            contentPage = CDI.current().select(GetContentPageCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6826        } catch (NamingException ex) {
6827            throw new RuntimeException(ex);
6828        }
6829
6830        return contentPage == null ? null : new ContentPageObject(contentPage);
6831    }
6832
6833    @GraphQLField
6834    @GraphQLName("contentPages")
6835    @GraphQLNonNull
6836    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6837    static CountingPaginatedData<ContentPageObject> contentPages(final DataFetchingEnvironment env,
6838            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6839            @GraphQLName("contentCollectionName") final String contentCollectionName,
6840            @GraphQLName("contentSectionName") final String contentSectionName,
6841            @GraphQLName("associateProgramName") final String associateProgramName,
6842            @GraphQLName("associateName") final String associateName,
6843            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6844        CountingPaginatedData<ContentPageObject> data;
6845
6846        try {
6847            var commandForm = ContentUtil.getHome().getGetContentPagesForm();
6848            var command = CDI.current().select(GetContentPagesCommand.class).get();
6849
6850            commandForm.setContentWebAddressName(contentWebAddressName);
6851            commandForm.setContentCollectionName(contentCollectionName);
6852            commandForm.setContentSectionName(contentSectionName);
6853            commandForm.setAssociateProgramName(associateProgramName);
6854            commandForm.setAssociateName(associateName);
6855            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6856
6857            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6858            if(totalEntities == null) {
6859                data = Connections.emptyConnection();
6860            } else {
6861                try(var objectLimiter = new ObjectLimiter(env, ContentPageConstants.COMPONENT_VENDOR_NAME, ContentPageConstants.ENTITY_TYPE_NAME, totalEntities)) {
6862                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6863
6864                    var contentPages = entities.stream()
6865                            .map(ContentPageObject::new)
6866                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6867
6868                    data = new CountedObjects<>(objectLimiter, contentPages);
6869                }
6870            }
6871        } catch (NamingException ex) {
6872            throw new RuntimeException(ex);
6873        }
6874
6875        return data;
6876    }
6877
6878    @GraphQLField
6879    @GraphQLName("contentPageArea")
6880    static ContentPageAreaObject contentPageArea(final DataFetchingEnvironment env,
6881            @GraphQLName("contentCollectionName") @GraphQLNonNull final String contentCollectionName,
6882            @GraphQLName("contentSectionName") @GraphQLNonNull final String contentSectionName,
6883            @GraphQLName("contentPageName") @GraphQLNonNull final String contentPageName,
6884            @GraphQLName("sortOrder") @GraphQLNonNull final String sortOrder,
6885            @GraphQLName("languageIsoName") @GraphQLNonNull final String languageIsoName) {
6886        ContentPageArea contentPageArea;
6887
6888        try {
6889            var commandForm = ContentUtil.getHome().getGetContentPageAreaForm();
6890
6891            commandForm.setContentCollectionName(contentCollectionName);
6892            commandForm.setContentSectionName(contentSectionName);
6893            commandForm.setContentPageName(contentPageName);
6894            commandForm.setSortOrder(sortOrder);
6895            commandForm.setLanguageIsoName(languageIsoName);
6896
6897            contentPageArea = CDI.current().select(GetContentPageAreaCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6898        } catch (NamingException ex) {
6899            throw new RuntimeException(ex);
6900        }
6901
6902        return contentPageArea == null ? null : new ContentPageAreaObject(contentPageArea);
6903    }
6904
6905    @GraphQLField
6906    @GraphQLName("contentPageAreas")
6907    @GraphQLNonNull
6908    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6909    static CountingPaginatedData<ContentPageAreaObject> contentPageAreas(final DataFetchingEnvironment env,
6910            @GraphQLName("contentCollectionName") @GraphQLNonNull final String contentCollectionName,
6911            @GraphQLName("contentSectionName") @GraphQLNonNull final String contentSectionName,
6912            @GraphQLName("contentPageName") @GraphQLNonNull final String contentPageName) {
6913        CountingPaginatedData<ContentPageAreaObject> data;
6914
6915        try {
6916            var commandForm = ContentUtil.getHome().getGetContentPageAreasForm();
6917            var command = CDI.current().select(GetContentPageAreasCommand.class).get();
6918
6919
6920            commandForm.setContentCollectionName(contentCollectionName);
6921            commandForm.setContentSectionName(contentSectionName);
6922            commandForm.setContentPageName(contentPageName);
6923
6924            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6925            if(totalEntities == null) {
6926                data = Connections.emptyConnection();
6927            } else {
6928                try(var objectLimiter = new ObjectLimiter(env, ContentPageAreaConstants.COMPONENT_VENDOR_NAME, ContentPageAreaConstants.ENTITY_TYPE_NAME, totalEntities)) {
6929                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6930
6931                    var contentPageAreas = entities.stream()
6932                            .map(ContentPageAreaObject::new)
6933                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6934
6935                    data = new CountedObjects<>(objectLimiter, contentPageAreas);
6936                }
6937            }
6938        } catch (NamingException ex) {
6939            throw new RuntimeException(ex);
6940        }
6941
6942        return data;
6943    }
6944
6945
6946    @GraphQLField
6947    @GraphQLName("contentCatalog")
6948    static ContentCatalogObject contentCatalog(final DataFetchingEnvironment env,
6949            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6950            @GraphQLName("contentCollectionName") final String contentCollectionName,
6951            @GraphQLName("contentCatalogName") final String contentCatalogName,
6952            @GraphQLName("associateProgramName") final String associateProgramName,
6953            @GraphQLName("associateName") final String associateName,
6954            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6955        ContentCatalog contentCatalog;
6956
6957        try {
6958            var commandForm = ContentUtil.getHome().getGetContentCatalogForm();
6959
6960            commandForm.setContentWebAddressName(contentWebAddressName);
6961            commandForm.setContentCollectionName(contentCollectionName);
6962            commandForm.setContentCatalogName(contentCatalogName);
6963            commandForm.setAssociateProgramName(associateProgramName);
6964            commandForm.setAssociateName(associateName);
6965            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6966
6967            contentCatalog = CDI.current().select(GetContentCatalogCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6968        } catch (NamingException ex) {
6969            throw new RuntimeException(ex);
6970        }
6971
6972        return contentCatalog == null ? null : new ContentCatalogObject(contentCatalog);
6973    }
6974
6975    @GraphQLField
6976    @GraphQLName("contentCatalogs")
6977    @GraphQLNonNull
6978    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6979    static CountingPaginatedData<ContentCatalogObject> contentCatalogs(final DataFetchingEnvironment env,
6980            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6981            @GraphQLName("contentCollectionName") final String contentCollectionName,
6982            @GraphQLName("associateProgramName") final String associateProgramName,
6983            @GraphQLName("associateName") final String associateName,
6984            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6985        CountingPaginatedData<ContentCatalogObject> data;
6986
6987        try {
6988            var commandForm = ContentUtil.getHome().getGetContentCatalogsForm();
6989            var command = CDI.current().select(GetContentCatalogsCommand.class).get();
6990
6991            commandForm.setContentWebAddressName(contentWebAddressName);
6992            commandForm.setContentCollectionName(contentCollectionName);
6993            commandForm.setAssociateProgramName(associateProgramName);
6994            commandForm.setAssociateName(associateName);
6995            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6996
6997            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6998            if(totalEntities == null) {
6999                data = Connections.emptyConnection();
7000            } else {
7001                try(var objectLimiter = new ObjectLimiter(env, ContentCatalogConstants.COMPONENT_VENDOR_NAME, ContentCatalogConstants.ENTITY_TYPE_NAME, totalEntities)) {
7002                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7003
7004                    var contentCatalogs = entities.stream()
7005                            .map(ContentCatalogObject::new)
7006                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7007
7008                    data = new CountedObjects<>(objectLimiter, contentCatalogs);
7009                }
7010            }
7011        } catch (NamingException ex) {
7012            throw new RuntimeException(ex);
7013        }
7014
7015        return data;
7016    }
7017
7018    @GraphQLField
7019    @GraphQLName("contentCatalogItem")
7020    static ContentCatalogItemObject contentCatalogItem(final DataFetchingEnvironment env,
7021            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
7022            @GraphQLName("contentCollectionName") final String contentCollectionName,
7023            @GraphQLName("contentCatalogName") final String contentCatalogName,
7024            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
7025            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
7026            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
7027            @GraphQLName("currencyIsoName") final String currencyIsoName,
7028            @GraphQLName("associateProgramName") final String associateProgramName,
7029            @GraphQLName("associateName") final String associateName,
7030            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
7031        ContentCatalogItem contentCatalogItem;
7032
7033        try {
7034            var commandForm = ContentUtil.getHome().getGetContentCatalogItemForm();
7035
7036            commandForm.setContentWebAddressName(contentWebAddressName);
7037            commandForm.setContentCollectionName(contentCollectionName);
7038            commandForm.setContentCatalogName(contentCatalogName);
7039            commandForm.setItemName(itemName);
7040            commandForm.setInventoryConditionName(inventoryConditionName);
7041            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
7042            commandForm.setCurrencyIsoName(currencyIsoName);
7043            commandForm.setAssociateProgramName(associateProgramName);
7044            commandForm.setAssociateName(associateName);
7045            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
7046
7047            contentCatalogItem = CDI.current().select(GetContentCatalogItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7048        } catch (NamingException ex) {
7049            throw new RuntimeException(ex);
7050        }
7051
7052        return contentCatalogItem == null ? null : new ContentCatalogItemObject(contentCatalogItem);
7053    }
7054
7055    @GraphQLField
7056    @GraphQLName("contentCatalogItems")
7057    @GraphQLNonNull
7058    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7059    static CountingPaginatedData<ContentCatalogItemObject> contentCatalogItems(final DataFetchingEnvironment env,
7060            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
7061            @GraphQLName("contentCollectionName") final String contentCollectionName,
7062            @GraphQLName("contentCatalogName") final String contentCatalogName,
7063            @GraphQLName("associateProgramName") final String associateProgramName,
7064            @GraphQLName("associateName") final String associateName,
7065            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
7066        CountingPaginatedData<ContentCatalogItemObject> data;
7067
7068        try {
7069            var commandForm = ContentUtil.getHome().getGetContentCatalogItemsForm();
7070            var command = CDI.current().select(GetContentCatalogItemsCommand.class).get();
7071
7072            commandForm.setContentWebAddressName(contentWebAddressName);
7073            commandForm.setContentCollectionName(contentCollectionName);
7074            commandForm.setContentCatalogName(contentCatalogName);
7075            commandForm.setAssociateProgramName(associateProgramName);
7076            commandForm.setAssociateName(associateName);
7077            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
7078
7079            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7080            if(totalEntities == null) {
7081                data = Connections.emptyConnection();
7082            } else {
7083                try(var objectLimiter = new ObjectLimiter(env, ContentCatalogItemConstants.COMPONENT_VENDOR_NAME, ContentCatalogItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
7084                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7085
7086                    var contentCatalogItems = entities.stream()
7087                            .map(ContentCatalogItemObject::new)
7088                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7089
7090                    data = new CountedObjects<>(objectLimiter, contentCatalogItems);
7091                }
7092            }
7093        } catch (NamingException ex) {
7094            throw new RuntimeException(ex);
7095        }
7096
7097        return data;
7098    }
7099
7100    @GraphQLField
7101    @GraphQLName("contentCategory")
7102    static ContentCategoryObject contentCategory(final DataFetchingEnvironment env,
7103            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
7104            @GraphQLName("contentCollectionName") final String contentCollectionName,
7105            @GraphQLName("contentCatalogName") final String contentCatalogName,
7106            @GraphQLName("contentCategoryName") final String contentCategoryName,
7107            @GraphQLName("associateProgramName") final String associateProgramName,
7108            @GraphQLName("associateName") final String associateName,
7109            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
7110        ContentCategory contentCategory;
7111
7112        try {
7113            var commandForm = ContentUtil.getHome().getGetContentCategoryForm();
7114
7115            commandForm.setContentWebAddressName(contentWebAddressName);
7116            commandForm.setContentCollectionName(contentCollectionName);
7117            commandForm.setContentCatalogName(contentCatalogName);
7118            commandForm.setContentCategoryName(contentCategoryName);
7119            commandForm.setAssociateProgramName(associateProgramName);
7120            commandForm.setAssociateName(associateName);
7121            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
7122
7123            contentCategory = CDI.current().select(GetContentCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7124        } catch (NamingException ex) {
7125            throw new RuntimeException(ex);
7126        }
7127
7128        return contentCategory == null ? null : new ContentCategoryObject(contentCategory);
7129    }
7130
7131    @GraphQLField
7132    @GraphQLName("contentCategories")
7133    @GraphQLNonNull
7134    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7135    static CountingPaginatedData<ContentCategoryObject> contentCategories(final DataFetchingEnvironment env,
7136            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
7137            @GraphQLName("contentCollectionName") final String contentCollectionName,
7138            @GraphQLName("contentCatalogName") final String contentCatalogName,
7139            @GraphQLName("parentContentCategoryName") final String parentContentCategoryName,
7140            @GraphQLName("associateProgramName") final String associateProgramName,
7141            @GraphQLName("associateName") final String associateName,
7142            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
7143        CountingPaginatedData<ContentCategoryObject> data;
7144
7145        try {
7146            var commandForm = ContentUtil.getHome().getGetContentCategoriesForm();
7147            var command = CDI.current().select(GetContentCategoriesCommand.class).get();
7148
7149            commandForm.setContentWebAddressName(contentWebAddressName);
7150            commandForm.setContentCollectionName(contentCollectionName);
7151            commandForm.setContentCatalogName(contentCatalogName);
7152            commandForm.setParentContentCategoryName(parentContentCategoryName);
7153            commandForm.setAssociateProgramName(associateProgramName);
7154            commandForm.setAssociateName(associateName);
7155            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
7156
7157            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7158            if(totalEntities == null) {
7159                data = Connections.emptyConnection();
7160            } else {
7161                try(var objectLimiter = new ObjectLimiter(env, ContentCategoryConstants.COMPONENT_VENDOR_NAME, ContentCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
7162                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7163
7164                    var contentCategories = entities.stream()
7165                            .map(ContentCategoryObject::new)
7166                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7167
7168                    data = new CountedObjects<>(objectLimiter, contentCategories);
7169                }
7170            }
7171        } catch (NamingException ex) {
7172            throw new RuntimeException(ex);
7173        }
7174
7175        return data;
7176    }
7177
7178    @GraphQLField
7179    @GraphQLName("contentCategoryItem")
7180    static ContentCategoryItemObject contentCategoryItem(final DataFetchingEnvironment env,
7181            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
7182            @GraphQLName("contentCollectionName") final String contentCollectionName,
7183            @GraphQLName("contentCatalogName") final String contentCatalogName,
7184            @GraphQLName("contentCategoryName") final String contentCategoryName,
7185            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
7186            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
7187            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
7188            @GraphQLName("currencyIsoName") final String currencyIsoName,
7189            @GraphQLName("associateProgramName") final String associateProgramName,
7190            @GraphQLName("associateName") final String associateName,
7191            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
7192        ContentCategoryItem contentCategoryItem;
7193
7194        try {
7195            var commandForm = ContentUtil.getHome().getGetContentCategoryItemForm();
7196
7197            commandForm.setContentWebAddressName(contentWebAddressName);
7198            commandForm.setContentCollectionName(contentCollectionName);
7199            commandForm.setContentCatalogName(contentCatalogName);
7200            commandForm.setContentCategoryName(contentCategoryName);
7201            commandForm.setItemName(itemName);
7202            commandForm.setInventoryConditionName(inventoryConditionName);
7203            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
7204            commandForm.setCurrencyIsoName(currencyIsoName);
7205            commandForm.setAssociateProgramName(associateProgramName);
7206            commandForm.setAssociateName(associateName);
7207            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
7208
7209            contentCategoryItem = CDI.current().select(GetContentCategoryItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7210        } catch (NamingException ex) {
7211            throw new RuntimeException(ex);
7212        }
7213
7214        return contentCategoryItem == null ? null : new ContentCategoryItemObject(contentCategoryItem);
7215    }
7216
7217    @GraphQLField
7218    @GraphQLName("contentCategoryItems")
7219    @GraphQLNonNull
7220    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7221    static CountingPaginatedData<ContentCategoryItemObject> contentCategoryItems(final DataFetchingEnvironment env,
7222            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
7223            @GraphQLName("contentCollectionName") final String contentCollectionName,
7224            @GraphQLName("contentCatalogName") final String contentCatalogName,
7225            @GraphQLName("contentCategoryName") final String contentCategoryName,
7226            @GraphQLName("associateProgramName") final String associateProgramName,
7227            @GraphQLName("associateName") final String associateName,
7228            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
7229        CountingPaginatedData<ContentCategoryItemObject> data;
7230
7231        try {
7232            var commandForm = ContentUtil.getHome().getGetContentCategoryItemsForm();
7233            var command = CDI.current().select(GetContentCategoryItemsCommand.class).get();
7234
7235            commandForm.setContentWebAddressName(contentWebAddressName);
7236            commandForm.setContentCollectionName(contentCollectionName);
7237            commandForm.setContentCatalogName(contentCatalogName);
7238            commandForm.setContentCategoryName(contentCategoryName);
7239            commandForm.setAssociateProgramName(associateProgramName);
7240            commandForm.setAssociateName(associateName);
7241            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
7242
7243            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7244            if(totalEntities == null) {
7245                data = Connections.emptyConnection();
7246            } else {
7247                try(var objectLimiter = new ObjectLimiter(env, ContentCategoryItemConstants.COMPONENT_VENDOR_NAME, ContentCategoryItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
7248                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7249
7250                    var contentCategoryItems = entities.stream()
7251                            .map(ContentCategoryItemObject::new)
7252                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7253
7254                    data = new CountedObjects<>(objectLimiter, contentCategoryItems);
7255                }
7256            }
7257        } catch (NamingException ex) {
7258            throw new RuntimeException(ex);
7259        }
7260
7261        return data;
7262    }
7263
7264    @GraphQLField
7265    @GraphQLName("mimeTypeFileExtension")
7266    static MimeTypeFileExtensionObject mimeTypeFileExtension(final DataFetchingEnvironment env,
7267            @GraphQLName("fileExtension") @GraphQLNonNull final String fileExtension) {
7268        MimeTypeFileExtension mimeTypeFileExtension;
7269
7270        try {
7271            var commandForm = CoreUtil.getHome().getGetMimeTypeFileExtensionForm();
7272
7273            commandForm.setFileExtension(fileExtension);
7274
7275            mimeTypeFileExtension = CDI.current().select(GetMimeTypeFileExtensionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7276        } catch (NamingException ex) {
7277            throw new RuntimeException(ex);
7278        }
7279
7280        return mimeTypeFileExtension == null ? null : new MimeTypeFileExtensionObject(mimeTypeFileExtension);
7281    }
7282
7283    @GraphQLField
7284    @GraphQLName("mimeTypeFileExtensions")
7285    @GraphQLNonNull
7286    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7287    static CountingPaginatedData<MimeTypeFileExtensionObject> mimeTypeFileExtensions(final DataFetchingEnvironment env) {
7288        CountingPaginatedData<MimeTypeFileExtensionObject> data;
7289
7290        try {
7291            var commandForm = CoreUtil.getHome().getGetMimeTypeFileExtensionsForm();
7292            var command = CDI.current().select(GetMimeTypeFileExtensionsCommand.class).get();
7293
7294            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7295            if(totalEntities == null) {
7296                data = Connections.emptyConnection();
7297            } else {
7298                try(var objectLimiter = new ObjectLimiter(env, MimeTypeFileExtensionConstants.COMPONENT_VENDOR_NAME, MimeTypeFileExtensionConstants.ENTITY_TYPE_NAME, totalEntities)) {
7299                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7300                    var mimeTypeFileExtensionObjects = entities.stream().map(MimeTypeFileExtensionObject::new).collect(Collectors.toList());
7301
7302                    data = new CountedObjects<>(objectLimiter, mimeTypeFileExtensionObjects);
7303                }
7304            }
7305        } catch (NamingException ex) {
7306            throw new RuntimeException(ex);
7307        }
7308
7309        return data;
7310    }
7311
7312    @GraphQLField
7313    @GraphQLName("mimeTypeUsageType")
7314    static MimeTypeUsageTypeObject mimeTypeUsageType(final DataFetchingEnvironment env,
7315            @GraphQLName("mimeTypeUsageTypeName") @GraphQLNonNull final String mimeTypeUsageTypeName) {
7316        MimeTypeUsageType mimeTypeUsageType;
7317
7318        try {
7319            var commandForm = CoreUtil.getHome().getGetMimeTypeUsageTypeForm();
7320
7321            commandForm.setMimeTypeUsageTypeName(mimeTypeUsageTypeName);
7322
7323            mimeTypeUsageType = CDI.current().select(GetMimeTypeUsageTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7324        } catch (NamingException ex) {
7325            throw new RuntimeException(ex);
7326        }
7327
7328        return mimeTypeUsageType == null ? null : new MimeTypeUsageTypeObject(mimeTypeUsageType);
7329    }
7330
7331    @GraphQLField
7332    @GraphQLName("mimeTypeUsageTypes")
7333    @GraphQLNonNull
7334    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7335    static CountingPaginatedData<MimeTypeUsageTypeObject> mimeTypeUsageTypes(final DataFetchingEnvironment env) {
7336        CountingPaginatedData<MimeTypeUsageTypeObject> data;
7337
7338        try {
7339            var commandForm = CoreUtil.getHome().getGetMimeTypeUsageTypesForm();
7340            var command = CDI.current().select(GetMimeTypeUsageTypesCommand.class).get();
7341
7342            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7343            if(totalEntities == null) {
7344                data = Connections.emptyConnection();
7345            } else {
7346                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)) {
7347                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7348
7349                    var mimeTypeUsageTypes = entities.stream()
7350                            .map(MimeTypeUsageTypeObject::new)
7351                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7352
7353                    data = new CountedObjects<>(objectLimiter, mimeTypeUsageTypes);
7354                }
7355            }
7356        } catch (NamingException ex) {
7357            throw new RuntimeException(ex);
7358        }
7359
7360        return data;
7361    }
7362
7363    @GraphQLField
7364    @GraphQLName("mimeType")
7365    static MimeTypeObject mimeType(final DataFetchingEnvironment env,
7366            @GraphQLName("mimeTypeName") @GraphQLNonNull final String mimeTypeName) {
7367        MimeType mimeType;
7368
7369        try {
7370            var commandForm = CoreUtil.getHome().getGetMimeTypeForm();
7371
7372            commandForm.setMimeTypeName(mimeTypeName);
7373
7374            mimeType = CDI.current().select(GetMimeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7375        } catch (NamingException ex) {
7376            throw new RuntimeException(ex);
7377        }
7378
7379        return mimeType == null ? null : new MimeTypeObject(mimeType);
7380    }
7381
7382    @GraphQLField
7383    @GraphQLName("mimeTypes")
7384    @GraphQLNonNull
7385    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7386    static CountingPaginatedData<MimeTypeObject> mimeTypes(final DataFetchingEnvironment env,
7387            @GraphQLName("mimeTypeUsageTypeName") final String mimeTypeUsageTypeName) {
7388        CountingPaginatedData<MimeTypeObject> data;
7389
7390        try {
7391            var commandForm = CoreUtil.getHome().getGetMimeTypesForm();
7392            var command = CDI.current().select(GetMimeTypesCommand.class).get();
7393
7394            commandForm.setMimeTypeUsageTypeName(mimeTypeUsageTypeName);
7395
7396            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7397            if(totalEntities == null) {
7398                data = Connections.emptyConnection();
7399            } else {
7400                try(var objectLimiter = new ObjectLimiter(env, MimeTypeConstants.COMPONENT_VENDOR_NAME, MimeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
7401                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7402
7403                    var mimeTypes = entities.stream()
7404                            .map(MimeTypeObject::new)
7405                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7406
7407                    data = new CountedObjects<>(objectLimiter, mimeTypes);
7408                }
7409            }
7410        } catch (NamingException ex) {
7411            throw new RuntimeException(ex);
7412        }
7413
7414        return data;
7415    }
7416
7417    @GraphQLField
7418    @GraphQLName("queueType")
7419    static QueueTypeObject queueType(final DataFetchingEnvironment env,
7420            @GraphQLName("queueTypeName") @GraphQLNonNull final String queueTypeName) {
7421        QueueType queueType;
7422
7423        try {
7424            var commandForm = QueueUtil.getHome().getGetQueueTypeForm();
7425
7426            commandForm.setQueueTypeName(queueTypeName);
7427
7428            queueType = CDI.current().select(GetQueueTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7429        } catch (NamingException ex) {
7430            throw new RuntimeException(ex);
7431        }
7432
7433        return queueType == null ? null : new QueueTypeObject(queueType);
7434    }
7435
7436    @GraphQLField
7437    @GraphQLName("queueTypes")
7438    @GraphQLNonNull
7439    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7440    static CountingPaginatedData<QueueTypeObject> queueTypes(final DataFetchingEnvironment env) {
7441        CountingPaginatedData<QueueTypeObject> data;
7442
7443        try {
7444            var commandForm = QueueUtil.getHome().getGetQueueTypesForm();
7445            var command = CDI.current().select(GetQueueTypesCommand.class).get();
7446
7447            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7448            if(totalEntities == null) {
7449                data = Connections.emptyConnection();
7450            } else {
7451                try(var objectLimiter = new ObjectLimiter(env, QueueTypeConstants.COMPONENT_VENDOR_NAME, QueueTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
7452                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7453
7454                    var queueTypes = entities.stream()
7455                            .map(QueueTypeObject::new)
7456                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7457
7458                    data = new CountedObjects<>(objectLimiter, queueTypes);
7459                }
7460            }
7461        } catch (NamingException ex) {
7462            throw new RuntimeException(ex);
7463        }
7464
7465        return data;
7466    }
7467
7468    @GraphQLField
7469    @GraphQLName("unitOfMeasureKindUse")
7470    static UnitOfMeasureKindUseObject unitOfMeasureKindUse(final DataFetchingEnvironment env,
7471            @GraphQLName("unitOfMeasureKindUseTypeName") @GraphQLNonNull final String unitOfMeasureKindUseTypeName,
7472            @GraphQLName("unitOfMeasureKindName") @GraphQLNonNull final String unitOfMeasureKindName) {
7473        UnitOfMeasureKindUse unitOfMeasureKindUse;
7474
7475        try {
7476            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindUseForm();
7477
7478            commandForm.setUnitOfMeasureKindUseTypeName(unitOfMeasureKindUseTypeName);
7479            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
7480
7481            unitOfMeasureKindUse = CDI.current().select(GetUnitOfMeasureKindUseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7482        } catch (NamingException ex) {
7483            throw new RuntimeException(ex);
7484        }
7485
7486        return unitOfMeasureKindUse == null ? null : new UnitOfMeasureKindUseObject(unitOfMeasureKindUse);
7487    }
7488
7489    @GraphQLField
7490    @GraphQLName("unitOfMeasureKindUses")
7491    @GraphQLNonNull
7492    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7493    static CountingPaginatedData<UnitOfMeasureKindUseObject> unitOfMeasureKindUses(final DataFetchingEnvironment env,
7494            @GraphQLName("unitOfMeasureKindUseTypeName") final String unitOfMeasureKindUseTypeName,
7495            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName) {
7496        CountingPaginatedData<UnitOfMeasureKindUseObject> data;
7497
7498        try {
7499            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindUsesForm();
7500            var command = CDI.current().select(GetUnitOfMeasureKindUsesCommand.class).get();
7501
7502            commandForm.setUnitOfMeasureKindUseTypeName(unitOfMeasureKindUseTypeName);
7503            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
7504
7505            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7506            if(totalEntities == null) {
7507                data = Connections.emptyConnection();
7508            } else {
7509                try(var objectLimiter = new ObjectLimiter(env, UnitOfMeasureKindUseConstants.COMPONENT_VENDOR_NAME, UnitOfMeasureKindUseConstants.ENTITY_TYPE_NAME, totalEntities)) {
7510                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7511
7512                    var unitOfMeasureKindUses = entities.stream()
7513                            .map(UnitOfMeasureKindUseObject::new)
7514                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7515
7516                    data = new CountedObjects<>(objectLimiter, unitOfMeasureKindUses);
7517                }
7518            }
7519        } catch (NamingException ex) {
7520            throw new RuntimeException(ex);
7521        }
7522
7523        return data;
7524    }
7525
7526    @GraphQLField
7527    @GraphQLName("unitOfMeasureType")
7528    static UnitOfMeasureTypeObject unitOfMeasureType(final DataFetchingEnvironment env,
7529            @GraphQLName("unitOfMeasureKindName") @GraphQLNonNull final String unitOfMeasureKindName,
7530            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName) {
7531        UnitOfMeasureType unitOfMeasureType;
7532
7533        try {
7534            var commandForm = UomUtil.getHome().getGetUnitOfMeasureTypeForm();
7535
7536            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
7537            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
7538
7539            unitOfMeasureType = CDI.current().select(GetUnitOfMeasureTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7540        } catch (NamingException ex) {
7541            throw new RuntimeException(ex);
7542        }
7543
7544        return unitOfMeasureType == null ? null : new UnitOfMeasureTypeObject(unitOfMeasureType);
7545    }
7546
7547    @GraphQLField
7548    @GraphQLName("unitOfMeasureTypes")
7549    @GraphQLNonNull
7550    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7551    static CountingPaginatedData<UnitOfMeasureTypeObject> unitOfMeasureTypes(final DataFetchingEnvironment env,
7552            @GraphQLName("unitOfMeasureKindName") @GraphQLNonNull final String unitOfMeasureKindName) {
7553        CountingPaginatedData<UnitOfMeasureTypeObject> data;
7554
7555        try {
7556            var commandForm = UomUtil.getHome().getGetUnitOfMeasureTypesForm();
7557            var command = CDI.current().select(GetUnitOfMeasureTypesCommand.class).get();
7558
7559            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
7560
7561            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7562            if(totalEntities == null) {
7563                data = Connections.emptyConnection();
7564            } else {
7565                try(var objectLimiter = new ObjectLimiter(env, UnitOfMeasureTypeConstants.COMPONENT_VENDOR_NAME, UnitOfMeasureTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
7566                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7567
7568                    var unitOfMeasureTypes = entities.stream()
7569                            .map(UnitOfMeasureTypeObject::new)
7570                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7571
7572                    data = new CountedObjects<>(objectLimiter, unitOfMeasureTypes);
7573                }
7574            }
7575        } catch (NamingException ex) {
7576            throw new RuntimeException(ex);
7577        }
7578
7579        return data;
7580    }
7581
7582    @GraphQLField
7583    @GraphQLName("unitOfMeasureKind")
7584    static UnitOfMeasureKindObject unitOfMeasureKind(final DataFetchingEnvironment env,
7585            @GraphQLName("unitOfMeasureKindName") @GraphQLNonNull final String unitOfMeasureKindName) {
7586        UnitOfMeasureKind unitOfMeasureKind;
7587
7588        try {
7589            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindForm();
7590
7591            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
7592
7593            unitOfMeasureKind = CDI.current().select(GetUnitOfMeasureKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7594        } catch (NamingException ex) {
7595            throw new RuntimeException(ex);
7596        }
7597
7598        return unitOfMeasureKind == null ? null : new UnitOfMeasureKindObject(unitOfMeasureKind);
7599    }
7600
7601    @GraphQLField
7602    @GraphQLName("unitOfMeasureKinds")
7603    @GraphQLNonNull
7604    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7605    static CountingPaginatedData<UnitOfMeasureKindObject> unitOfMeasureKinds(final DataFetchingEnvironment env) {
7606        CountingPaginatedData<UnitOfMeasureKindObject> data;
7607
7608        try {
7609            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindsForm();
7610            var command = CDI.current().select(GetUnitOfMeasureKindsCommand.class).get();
7611
7612            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7613            if(totalEntities == null) {
7614                data = Connections.emptyConnection();
7615            } else {
7616                try(var objectLimiter = new ObjectLimiter(env, UnitOfMeasureKindConstants.COMPONENT_VENDOR_NAME, UnitOfMeasureKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
7617                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7618
7619                    var unitOfMeasureKinds = entities.stream()
7620                            .map(UnitOfMeasureKindObject::new)
7621                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7622
7623                    data = new CountedObjects<>(objectLimiter, unitOfMeasureKinds);
7624                }
7625            }
7626        } catch (NamingException ex) {
7627            throw new RuntimeException(ex);
7628        }
7629
7630        return data;
7631    }
7632
7633    @GraphQLField
7634    @GraphQLName("unitOfMeasureKindUseType")
7635    static UnitOfMeasureKindUseTypeObject unitOfMeasureKindUseType(final DataFetchingEnvironment env,
7636            @GraphQLName("unitOfMeasureKindUseTypeName") @GraphQLNonNull final String unitOfMeasureKindUseTypeName) {
7637        UnitOfMeasureKindUseType unitOfMeasureKindUseType;
7638
7639        try {
7640            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindUseTypeForm();
7641
7642            commandForm.setUnitOfMeasureKindUseTypeName(unitOfMeasureKindUseTypeName);
7643
7644            unitOfMeasureKindUseType = CDI.current().select(GetUnitOfMeasureKindUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7645        } catch (NamingException ex) {
7646            throw new RuntimeException(ex);
7647        }
7648
7649        return unitOfMeasureKindUseType == null ? null : new UnitOfMeasureKindUseTypeObject(unitOfMeasureKindUseType);
7650    }
7651
7652    @GraphQLField
7653    @GraphQLName("unitOfMeasureKindUseTypes")
7654    @GraphQLNonNull
7655    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7656    static CountingPaginatedData<UnitOfMeasureKindUseTypeObject> unitOfMeasureKindUseTypes(final DataFetchingEnvironment env) {
7657        CountingPaginatedData<UnitOfMeasureKindUseTypeObject> data;
7658
7659        try {
7660            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindUseTypesForm();
7661            var command = CDI.current().select(GetUnitOfMeasureKindUseTypesCommand.class).get();
7662
7663            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7664            if(totalEntities == null) {
7665                data = Connections.emptyConnection();
7666            } else {
7667                try(var objectLimiter = new ObjectLimiter(env, UnitOfMeasureKindUseTypeConstants.COMPONENT_VENDOR_NAME, UnitOfMeasureKindUseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
7668                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7669
7670                    var objects = entities.stream()
7671                            .map(UnitOfMeasureKindUseTypeObject::new)
7672                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7673
7674                    data = new CountedObjects<>(objectLimiter, objects);
7675                }
7676            }
7677        } catch (NamingException ex) {
7678            throw new RuntimeException(ex);
7679        }
7680
7681        return data;
7682    }
7683
7684    @GraphQLField
7685    @GraphQLName("entityAttributeType")
7686    static EntityAttributeTypeObject entityAttributeType(final DataFetchingEnvironment env,
7687            @GraphQLName("entityAttributeTypeName") @GraphQLNonNull final String entityAttributeTypeName) {
7688        EntityAttributeType entityAttributeType;
7689
7690        try {
7691            var commandForm = CoreUtil.getHome().getGetEntityAttributeTypeForm();
7692
7693            commandForm.setEntityAttributeTypeName(entityAttributeTypeName);
7694
7695            entityAttributeType = CDI.current().select(GetEntityAttributeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7696        } catch (NamingException ex) {
7697            throw new RuntimeException(ex);
7698        }
7699
7700        return entityAttributeType == null ? null : new EntityAttributeTypeObject(entityAttributeType);
7701    }
7702
7703    @GraphQLField
7704    @GraphQLName("entityAttributeTypes")
7705    @GraphQLNonNull
7706    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7707    static CountingPaginatedData<EntityAttributeTypeObject> entityAttributeTypes(final DataFetchingEnvironment env) {
7708        CountingPaginatedData<EntityAttributeTypeObject> data;
7709
7710        try {
7711            var commandForm = CoreUtil.getHome().getGetEntityAttributeTypesForm();
7712            var command = CDI.current().select(GetEntityAttributeTypesCommand.class).get();
7713
7714            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7715            if(totalEntities == null) {
7716                data = Connections.emptyConnection();
7717            } else {
7718                try(var objectLimiter = new ObjectLimiter(env, EntityAttributeTypeConstants.COMPONENT_VENDOR_NAME, EntityAttributeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
7719                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7720
7721                    var entityAttributeTypes = entities.stream()
7722                            .map(EntityAttributeTypeObject::new)
7723                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7724
7725                    data = new CountedObjects<>(objectLimiter, entityAttributeTypes);
7726                }
7727            }
7728        } catch (NamingException ex) {
7729            throw new RuntimeException(ex);
7730        }
7731
7732        return data;
7733    }
7734
7735    @GraphQLField
7736    @GraphQLName("componentVendorResults")
7737    static ComponentVendorResultsObject componentVendorResults(final DataFetchingEnvironment env,
7738            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7739        ComponentVendorResultsObject componentVendorResultsObject = null;
7740
7741        try {
7742            var commandForm = SearchUtil.getHome().getGetComponentVendorResultsForm();
7743
7744            commandForm.setSearchTypeName(searchTypeName);
7745
7746            if(CDI.current().select(GetComponentVendorResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7747                componentVendorResultsObject = new ComponentVendorResultsObject(commandForm);
7748            }
7749        } catch (NamingException ex) {
7750            throw new RuntimeException(ex);
7751        }
7752
7753        return componentVendorResultsObject;
7754    }
7755
7756    @GraphQLField
7757    @GraphQLName("entityTypeResults")
7758    static EntityTypeResultsObject entityTypeResults(final DataFetchingEnvironment env,
7759            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7760        EntityTypeResultsObject entityTypeResultsObject = null;
7761
7762        try {
7763            var commandForm = SearchUtil.getHome().getGetEntityTypeResultsForm();
7764
7765            commandForm.setSearchTypeName(searchTypeName);
7766
7767            if(CDI.current().select(GetEntityTypeResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7768                entityTypeResultsObject = new EntityTypeResultsObject(commandForm);
7769            }
7770        } catch (NamingException ex) {
7771            throw new RuntimeException(ex);
7772        }
7773
7774        return entityTypeResultsObject;
7775    }
7776
7777    @GraphQLField
7778    @GraphQLName("entityAliasTypeResults")
7779    static EntityAliasTypeResultsObject entityAliasTypeResults(final DataFetchingEnvironment env,
7780            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7781        EntityAliasTypeResultsObject entityAliasTypeResultsObject = null;
7782
7783        try {
7784            var commandForm = SearchUtil.getHome().getGetEntityAliasTypeResultsForm();
7785
7786            commandForm.setSearchTypeName(searchTypeName);
7787
7788            if(CDI.current().select(GetEntityAliasTypeResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7789                entityAliasTypeResultsObject = new EntityAliasTypeResultsObject(commandForm);
7790            }
7791        } catch (NamingException ex) {
7792            throw new RuntimeException(ex);
7793        }
7794
7795        return entityAliasTypeResultsObject;
7796    }
7797
7798    @GraphQLField
7799    @GraphQLName("entityAttributeGroupResults")
7800    static EntityAttributeGroupResultsObject entityAttributeGroupResults(final DataFetchingEnvironment env,
7801            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7802        EntityAttributeGroupResultsObject entityAttributeGroupResultsObject = null;
7803
7804        try {
7805            var commandForm = SearchUtil.getHome().getGetEntityAttributeGroupResultsForm();
7806
7807            commandForm.setSearchTypeName(searchTypeName);
7808
7809            if(CDI.current().select(GetEntityAttributeGroupResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7810                entityAttributeGroupResultsObject = new EntityAttributeGroupResultsObject(commandForm);
7811            }
7812        } catch (NamingException ex) {
7813            throw new RuntimeException(ex);
7814        }
7815
7816        return entityAttributeGroupResultsObject;
7817    }
7818
7819    @GraphQLField
7820    @GraphQLName("entityAttributeResults")
7821    static EntityAttributeResultsObject entityAttributeResults(final DataFetchingEnvironment env,
7822            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7823        EntityAttributeResultsObject entityAttributeResultsObject = null;
7824
7825        try {
7826            var commandForm = SearchUtil.getHome().getGetEntityAttributeResultsForm();
7827
7828            commandForm.setSearchTypeName(searchTypeName);
7829
7830            if(CDI.current().select(GetEntityAttributeResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7831                entityAttributeResultsObject = new EntityAttributeResultsObject(commandForm);
7832            }
7833        } catch (NamingException ex) {
7834            throw new RuntimeException(ex);
7835        }
7836
7837        return entityAttributeResultsObject;
7838    }
7839
7840    @GraphQLField
7841    @GraphQLName("entityListItemResults")
7842    static EntityListItemResultsObject entityListItemResults(final DataFetchingEnvironment env,
7843            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7844        EntityListItemResultsObject entityListItemResultsObject = null;
7845
7846        try {
7847            var commandForm = SearchUtil.getHome().getGetEntityListItemResultsForm();
7848
7849            commandForm.setSearchTypeName(searchTypeName);
7850
7851            if(CDI.current().select(GetEntityListItemResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7852                entityListItemResultsObject = new EntityListItemResultsObject(commandForm);
7853            }
7854        } catch (NamingException ex) {
7855            throw new RuntimeException(ex);
7856        }
7857
7858        return entityListItemResultsObject;
7859    }
7860
7861    @GraphQLField
7862    @GraphQLName("customerResults")
7863    static CustomerResultsObject customerResults(final DataFetchingEnvironment env,
7864            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7865        CustomerResultsObject customerResultsObject = null;
7866
7867        try {
7868            var commandForm = SearchUtil.getHome().getGetCustomerResultsForm();
7869
7870            commandForm.setSearchTypeName(searchTypeName);
7871
7872            if(CDI.current().select(GetCustomerResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7873                customerResultsObject = new CustomerResultsObject(commandForm);
7874            }
7875        } catch (NamingException ex) {
7876            throw new RuntimeException(ex);
7877        }
7878
7879        return customerResultsObject;
7880    }
7881
7882    @GraphQLField
7883    @GraphQLName("employeeResults")
7884    static EmployeeResultsObject employeeResults(final DataFetchingEnvironment env,
7885            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7886        EmployeeResultsObject employeeResultsObject = null;
7887
7888        try {
7889            var commandForm = SearchUtil.getHome().getGetEmployeeResultsForm();
7890
7891            commandForm.setSearchTypeName(searchTypeName);
7892
7893            if(CDI.current().select(GetEmployeeResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7894                employeeResultsObject = new EmployeeResultsObject(commandForm);
7895            }
7896        } catch (NamingException ex) {
7897            throw new RuntimeException(ex);
7898        }
7899
7900        return employeeResultsObject;
7901    }
7902
7903    @GraphQLField
7904    @GraphQLName("itemResults")
7905    static ItemResultsObject itemResults(final DataFetchingEnvironment env,
7906            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7907        ItemResultsObject itemResultsObject = null;
7908
7909        try {
7910            var commandForm = SearchUtil.getHome().getGetItemResultsForm();
7911
7912            commandForm.setSearchTypeName(searchTypeName);
7913
7914            if(CDI.current().select(GetItemResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7915                itemResultsObject = new ItemResultsObject(commandForm);
7916            }
7917        } catch (NamingException ex) {
7918            throw new RuntimeException(ex);
7919        }
7920
7921        return itemResultsObject;
7922    }
7923
7924    @GraphQLField
7925    @GraphQLName("checkItemSpelling")
7926    static CheckItemSpellingObject checkItemSpelling(final DataFetchingEnvironment env,
7927            @GraphQLName("languageIsoName") final String languageIsoName,
7928            @GraphQLName("searchDefaultOperatorName") final String searchDefaultOperatorName,
7929            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName,
7930            @GraphQLName("q") final String q) {
7931        var checkItemSpellingObject = new CheckItemSpellingObject();
7932
7933        try {
7934            var commandForm = SearchUtil.getHome().getCheckItemSpellingForm();
7935
7936            commandForm.setLanguageIsoName(languageIsoName);
7937            commandForm.setSearchDefaultOperatorName(searchDefaultOperatorName);
7938            commandForm.setSearchTypeName(searchTypeName);
7939            commandForm.setQ(q);
7940
7941            var commandResult = SearchUtil.getHome().checkItemSpelling(getUserVisitPK(env), commandForm);
7942            checkItemSpellingObject.setCommandResult(commandResult);
7943            checkItemSpellingObject.setResult(commandResult.hasErrors() ? null : commandResult.getExecutionResult().getResult());
7944        } catch (NamingException ex) {
7945            throw new RuntimeException(ex);
7946        }
7947
7948        return checkItemSpellingObject;
7949    }
7950
7951    @GraphQLField
7952    @GraphQLName("vendorResults")
7953    static VendorResultsObject vendorResults(final DataFetchingEnvironment env,
7954            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7955        VendorResultsObject vendorResultsObject = null;
7956
7957        try {
7958            var commandForm = SearchUtil.getHome().getGetVendorResultsForm();
7959
7960            commandForm.setSearchTypeName(searchTypeName);
7961
7962            if(CDI.current().select(GetVendorResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7963                vendorResultsObject = new VendorResultsObject(commandForm);
7964            }
7965        } catch (NamingException ex) {
7966            throw new RuntimeException(ex);
7967        }
7968
7969        return vendorResultsObject;
7970    }
7971
7972    @GraphQLField
7973    @GraphQLName("shippingMethodResults")
7974    static ShippingMethodResultsObject shippingMethodResults(final DataFetchingEnvironment env,
7975            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7976        ShippingMethodResultsObject shippingMethodResultsObject = null;
7977
7978        try {
7979            var commandForm = SearchUtil.getHome().getGetShippingMethodResultsForm();
7980
7981            commandForm.setSearchTypeName(searchTypeName);
7982
7983            if(CDI.current().select(GetShippingMethodResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7984                shippingMethodResultsObject = new ShippingMethodResultsObject(commandForm);
7985            }
7986        } catch (NamingException ex) {
7987            throw new RuntimeException(ex);
7988        }
7989
7990        return shippingMethodResultsObject;
7991    }
7992
7993    @GraphQLField
7994    @GraphQLName("warehouseResults")
7995    static WarehouseResultsObject warehouseResults(final DataFetchingEnvironment env,
7996            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7997        WarehouseResultsObject warehouseResultsObject = null;
7998
7999        try {
8000            var commandForm = SearchUtil.getHome().getGetWarehouseResultsForm();
8001
8002            commandForm.setSearchTypeName(searchTypeName);
8003
8004            if(CDI.current().select(GetWarehouseResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
8005                warehouseResultsObject = new WarehouseResultsObject(commandForm);
8006            }
8007        } catch (NamingException ex) {
8008            throw new RuntimeException(ex);
8009        }
8010
8011        return warehouseResultsObject;
8012    }
8013
8014    @GraphQLField
8015    @GraphQLName("contentCatalogResults")
8016    static ContentCatalogResultsObject contentCatalogResults(final DataFetchingEnvironment env,
8017            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
8018        ContentCatalogResultsObject contentCatalogResultsObject = null;
8019
8020        try {
8021            var commandForm = SearchUtil.getHome().getGetContentCatalogResultsForm();
8022
8023            commandForm.setSearchTypeName(searchTypeName);
8024
8025            if(CDI.current().select(GetContentCatalogResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
8026                contentCatalogResultsObject = new ContentCatalogResultsObject(commandForm);
8027            }
8028        } catch (NamingException ex) {
8029            throw new RuntimeException(ex);
8030        }
8031
8032        return contentCatalogResultsObject;
8033    }
8034
8035    @GraphQLField
8036    @GraphQLName("contentCatalogItemResults")
8037    static ContentCatalogItemResultsObject contentCatalogItemResults(final DataFetchingEnvironment env,
8038            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
8039        ContentCatalogItemResultsObject contentCatalogItemResultsObject = null;
8040
8041        try {
8042            var commandForm = SearchUtil.getHome().getGetContentCatalogItemResultsForm();
8043
8044            commandForm.setSearchTypeName(searchTypeName);
8045
8046            if(CDI.current().select(GetContentCatalogItemResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
8047                contentCatalogItemResultsObject = new ContentCatalogItemResultsObject(commandForm);
8048            }
8049        } catch (NamingException ex) {
8050            throw new RuntimeException(ex);
8051        }
8052
8053        return contentCatalogItemResultsObject;
8054    }
8055
8056    @GraphQLField
8057    @GraphQLName("contentCategoryResults")
8058    static ContentCategoryResultsObject contentCategoryResults(final DataFetchingEnvironment env,
8059            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
8060        ContentCategoryResultsObject contentCategoryResultsObject = null;
8061
8062        try {
8063            var commandForm = SearchUtil.getHome().getGetContentCategoryResultsForm();
8064
8065            commandForm.setSearchTypeName(searchTypeName);
8066
8067            if(CDI.current().select(GetContentCategoryResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
8068                contentCategoryResultsObject = new ContentCategoryResultsObject(commandForm);
8069            }
8070        } catch (NamingException ex) {
8071            throw new RuntimeException(ex);
8072        }
8073
8074        return contentCategoryResultsObject;
8075    }
8076
8077    @GraphQLField
8078    @GraphQLName("color")
8079    static ColorObject color(final DataFetchingEnvironment env,
8080            @GraphQLName("colorName") final String colorName,
8081            @GraphQLName("id") @GraphQLID final String id) {
8082        Color color;
8083
8084        try {
8085            var commandForm = CoreUtil.getHome().getGetColorForm();
8086
8087            commandForm.setColorName(colorName);
8088            commandForm.setUuid(id);
8089
8090            color = CDI.current().select(GetColorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8091        } catch (NamingException ex) {
8092            throw new RuntimeException(ex);
8093        }
8094
8095        return color == null ? null : new ColorObject(color);
8096    }
8097
8098    @GraphQLField
8099    @GraphQLName("colors")
8100    @GraphQLNonNull
8101    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8102    static CountingPaginatedData<ColorObject> colors(final DataFetchingEnvironment env) {
8103        CountingPaginatedData<ColorObject> data;
8104
8105        try {
8106            var commandForm = CoreUtil.getHome().getGetColorsForm();
8107            var command = CDI.current().select(GetColorsCommand.class).get();
8108
8109            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8110            if(totalEntities == null) {
8111                data = Connections.emptyConnection();
8112            } else {
8113                try(var objectLimiter = new ObjectLimiter(env, ColorConstants.COMPONENT_VENDOR_NAME, ColorConstants.ENTITY_TYPE_NAME, totalEntities)) {
8114                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8115
8116                    var colors = entities.stream()
8117                            .map(ColorObject::new)
8118                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8119
8120                    data = new CountedObjects<>(objectLimiter, colors);
8121                }
8122            }
8123        } catch (NamingException ex) {
8124            throw new RuntimeException(ex);
8125        }
8126
8127        return data;
8128    }
8129
8130    @GraphQLField
8131    @GraphQLName("fontStyle")
8132    static FontStyleObject fontStyle(final DataFetchingEnvironment env,
8133            @GraphQLName("fontStyleName") final String fontStyleName,
8134            @GraphQLName("id") @GraphQLID final String id) {
8135        FontStyle fontStyle;
8136
8137        try {
8138            var commandForm = CoreUtil.getHome().getGetFontStyleForm();
8139
8140            commandForm.setFontStyleName(fontStyleName);
8141            commandForm.setUuid(id);
8142
8143            fontStyle = CDI.current().select(GetFontStyleCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8144        } catch (NamingException ex) {
8145            throw new RuntimeException(ex);
8146        }
8147
8148        return fontStyle == null ? null : new FontStyleObject(fontStyle);
8149    }
8150
8151    @GraphQLField
8152    @GraphQLName("fontStyles")
8153    @GraphQLNonNull
8154    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8155    static CountingPaginatedData<FontStyleObject> fontStyles(final DataFetchingEnvironment env) {
8156        CountingPaginatedData<FontStyleObject> data;
8157
8158        try {
8159            var commandForm = CoreUtil.getHome().getGetFontStylesForm();
8160            var command = CDI.current().select(GetFontStylesCommand.class).get();
8161
8162            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8163            if(totalEntities == null) {
8164                data = Connections.emptyConnection();
8165            } else {
8166                try(var objectLimiter = new ObjectLimiter(env, FontStyleConstants.COMPONENT_VENDOR_NAME, FontStyleConstants.ENTITY_TYPE_NAME, totalEntities)) {
8167                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8168
8169                    var fontStyles = entities.stream()
8170                            .map(FontStyleObject::new)
8171                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8172
8173                    data = new CountedObjects<>(objectLimiter, fontStyles);
8174                }
8175            }
8176        } catch (NamingException ex) {
8177            throw new RuntimeException(ex);
8178        }
8179
8180        return data;
8181    }
8182
8183    @GraphQLField
8184    @GraphQLName("fontWeight")
8185    static FontWeightObject fontWeight(final DataFetchingEnvironment env,
8186            @GraphQLName("fontWeightName") final String fontWeightName,
8187            @GraphQLName("id") @GraphQLID final String id) {
8188        FontWeight fontWeight;
8189
8190        try {
8191            var commandForm = CoreUtil.getHome().getGetFontWeightForm();
8192
8193            commandForm.setFontWeightName(fontWeightName);
8194            commandForm.setUuid(id);
8195
8196            fontWeight = CDI.current().select(GetFontWeightCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8197        } catch (NamingException ex) {
8198            throw new RuntimeException(ex);
8199        }
8200
8201        return fontWeight == null ? null : new FontWeightObject(fontWeight);
8202    }
8203
8204    @GraphQLField
8205    @GraphQLName("fontWeights")
8206    @GraphQLNonNull
8207    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8208    static CountingPaginatedData<FontWeightObject> fontWeights(final DataFetchingEnvironment env) {
8209        CountingPaginatedData<FontWeightObject> data;
8210
8211        try {
8212            var commandForm = CoreUtil.getHome().getGetFontWeightsForm();
8213            var command = CDI.current().select(GetFontWeightsCommand.class).get();
8214
8215            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8216            if(totalEntities == null) {
8217                data = Connections.emptyConnection();
8218            } else {
8219                try(var objectLimiter = new ObjectLimiter(env, FontWeightConstants.COMPONENT_VENDOR_NAME, FontWeightConstants.ENTITY_TYPE_NAME, totalEntities)) {
8220                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8221
8222                    var fontWeights = entities.stream()
8223                            .map(FontWeightObject::new)
8224                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8225
8226                    data = new CountedObjects<>(objectLimiter, fontWeights);
8227                }
8228            }
8229        } catch (NamingException ex) {
8230            throw new RuntimeException(ex);
8231        }
8232
8233        return data;
8234    }
8235
8236    @GraphQLField
8237    @GraphQLName("textDecoration")
8238    static TextDecorationObject textDecoration(final DataFetchingEnvironment env,
8239            @GraphQLName("textDecorationName") final String textDecorationName,
8240            @GraphQLName("id") @GraphQLID final String id) {
8241        TextDecoration textDecoration;
8242
8243        try {
8244            var commandForm = CoreUtil.getHome().getGetTextDecorationForm();
8245
8246            commandForm.setTextDecorationName(textDecorationName);
8247            commandForm.setUuid(id);
8248
8249            textDecoration = CDI.current().select(GetTextDecorationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8250        } catch (NamingException ex) {
8251            throw new RuntimeException(ex);
8252        }
8253
8254        return textDecoration == null ? null : new TextDecorationObject(textDecoration);
8255    }
8256
8257    @GraphQLField
8258    @GraphQLName("textDecorations")
8259    @GraphQLNonNull
8260    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8261    static CountingPaginatedData<TextDecorationObject> textDecorations(final DataFetchingEnvironment env) {
8262        CountingPaginatedData<TextDecorationObject> data;
8263
8264        try {
8265            var commandForm = CoreUtil.getHome().getGetTextDecorationsForm();
8266            var command = CDI.current().select(GetTextDecorationsCommand.class).get();
8267
8268            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8269            if(totalEntities == null) {
8270                data = Connections.emptyConnection();
8271            } else {
8272                try(var objectLimiter = new ObjectLimiter(env, TextDecorationConstants.COMPONENT_VENDOR_NAME, TextDecorationConstants.ENTITY_TYPE_NAME, totalEntities)) {
8273                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8274
8275                    var textDecorations = entities.stream()
8276                            .map(TextDecorationObject::new)
8277                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8278
8279                    data = new CountedObjects<>(objectLimiter, textDecorations);
8280                }
8281            }
8282        } catch (NamingException ex) {
8283            throw new RuntimeException(ex);
8284        }
8285
8286        return data;
8287    }
8288
8289    @GraphQLField
8290    @GraphQLName("textTransformation")
8291    static TextTransformationObject textTransformation(final DataFetchingEnvironment env,
8292            @GraphQLName("textTransformationName") final String textTransformationName,
8293            @GraphQLName("id") @GraphQLID final String id) {
8294        TextTransformation textTransformation;
8295
8296        try {
8297            var commandForm = CoreUtil.getHome().getGetTextTransformationForm();
8298
8299            commandForm.setTextTransformationName(textTransformationName);
8300            commandForm.setUuid(id);
8301
8302            textTransformation = CDI.current().select(GetTextTransformationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8303        } catch (NamingException ex) {
8304            throw new RuntimeException(ex);
8305        }
8306
8307        return textTransformation == null ? null : new TextTransformationObject(textTransformation);
8308    }
8309
8310    @GraphQLField
8311    @GraphQLName("textTransformations")
8312    @GraphQLNonNull
8313    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8314    static CountingPaginatedData<TextTransformationObject> textTransformations(final DataFetchingEnvironment env) {
8315        CountingPaginatedData<TextTransformationObject> data;
8316
8317        try {
8318            var commandForm = CoreUtil.getHome().getGetTextTransformationsForm();
8319            var command = CDI.current().select(GetTextTransformationsCommand.class).get();
8320
8321            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8322            if(totalEntities == null) {
8323                data = Connections.emptyConnection();
8324            } else {
8325                try(var objectLimiter = new ObjectLimiter(env, TextTransformationConstants.COMPONENT_VENDOR_NAME, TextTransformationConstants.ENTITY_TYPE_NAME, totalEntities)) {
8326                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8327
8328                    var textTransformations = entities.stream()
8329                            .map(TextTransformationObject::new)
8330                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8331
8332                    data = new CountedObjects<>(objectLimiter, textTransformations);
8333                }
8334            }
8335        } catch (NamingException ex) {
8336            throw new RuntimeException(ex);
8337        }
8338
8339        return data;
8340    }
8341
8342    @GraphQLField
8343    @GraphQLName("userLogin")
8344    static UserLoginObject userLogin(final DataFetchingEnvironment env,
8345            @GraphQLName("username") final String username,
8346            @GraphQLName("id") @GraphQLID final String id) {
8347        UserLogin userLogin;
8348
8349        try {
8350            var commandForm = UserUtil.getHome().getGetUserLoginForm();
8351
8352            commandForm.setUsername(username);
8353            commandForm.setUuid(id);
8354
8355            var getUserLoginCommand = CDI.current().select(GetUserLoginCommand.class).get();
8356            userLogin = getUserLoginCommand.getEntityForGraphQl(getUserVisitPK(env), commandForm);
8357        } catch (NamingException ex) {
8358            throw new RuntimeException(ex);
8359        }
8360
8361        return userLogin == null ? null : new UserLoginObject(userLogin);
8362    }
8363
8364    @GraphQLField
8365    @GraphQLName("recoveryQuestion")
8366    static RecoveryQuestionObject recoveryQuestion(final DataFetchingEnvironment env,
8367            @GraphQLName("recoveryQuestionName") final String recoveryQuestionName,
8368            @GraphQLName("id") @GraphQLID final String id,
8369            @GraphQLName("username") final String username) {
8370        RecoveryQuestion recoveryQuestion;
8371
8372        try {
8373            var commandForm = UserUtil.getHome().getGetRecoveryQuestionForm();
8374
8375            commandForm.setRecoveryQuestionName(recoveryQuestionName);
8376            commandForm.setUuid(id);
8377            commandForm.setUsername(username);
8378
8379            recoveryQuestion = CDI.current().select(GetRecoveryQuestionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8380        } catch (NamingException ex) {
8381            throw new RuntimeException(ex);
8382        }
8383
8384        return recoveryQuestion == null ? null : new RecoveryQuestionObject(recoveryQuestion);
8385    }
8386
8387    @GraphQLField
8388    @GraphQLName("recoveryQuestions")
8389    @GraphQLNonNull
8390    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8391    static CountingPaginatedData<RecoveryQuestionObject> recoveryQuestions(final DataFetchingEnvironment env) {
8392        CountingPaginatedData<RecoveryQuestionObject> data;
8393
8394        try {
8395            var commandForm = UserUtil.getHome().getGetRecoveryQuestionsForm();
8396            var command = CDI.current().select(GetRecoveryQuestionsCommand.class).get();
8397
8398            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8399            if(totalEntities == null) {
8400                data = Connections.emptyConnection();
8401            } else {
8402                try(var objectLimiter = new ObjectLimiter(env, RecoveryQuestionConstants.COMPONENT_VENDOR_NAME, RecoveryQuestionConstants.ENTITY_TYPE_NAME, totalEntities)) {
8403                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8404
8405                    var recoveryQuestions = entities.stream()
8406                            .map(RecoveryQuestionObject::new)
8407                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8408
8409                    data = new CountedObjects<>(objectLimiter, recoveryQuestions);
8410                }
8411            }
8412        } catch (NamingException ex) {
8413            throw new RuntimeException(ex);
8414        }
8415
8416        return data;
8417    }
8418
8419    @GraphQLField
8420    @GraphQLName("userSession")
8421    static UserSessionObject userSession(final DataFetchingEnvironment env) {
8422        var userSession = BaseGraphQl.getUserSession(env);
8423
8424        return userSession == null ? null : new UserSessionObject(userSession);
8425    }
8426
8427    @GraphQLField
8428    @GraphQLName("userVisitGroup")
8429    static UserVisitGroupObject userVisitGroup(final DataFetchingEnvironment env,
8430            @GraphQLName("userVisitGroupName") final String userVisitGroupName,
8431            @GraphQLName("id") @GraphQLID final String id) {
8432        UserVisitGroup userVisitGroup;
8433
8434        try {
8435            var commandForm = UserUtil.getHome().getGetUserVisitGroupForm();
8436
8437            commandForm.setUserVisitGroupName(userVisitGroupName);
8438            commandForm.setUuid(id);
8439
8440            userVisitGroup = CDI.current().select(GetUserVisitGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8441        } catch (NamingException ex) {
8442            throw new RuntimeException(ex);
8443        }
8444
8445        return userVisitGroup == null ? null : new UserVisitGroupObject(userVisitGroup);
8446    }
8447
8448    @GraphQLField
8449    @GraphQLName("userVisitGroups")
8450    @GraphQLNonNull
8451    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8452    static CountingPaginatedData<UserVisitGroupObject> userVisitGroups(final DataFetchingEnvironment env) {
8453        CountingPaginatedData<UserVisitGroupObject> data;
8454
8455        try {
8456            var commandForm = UserUtil.getHome().getGetUserVisitGroupsForm();
8457            var command = CDI.current().select(GetUserVisitGroupsCommand.class).get();
8458
8459            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8460            if(totalEntities == null) {
8461                data = Connections.emptyConnection();
8462            } else {
8463                try(var objectLimiter = new ObjectLimiter(env, UserVisitGroupConstants.COMPONENT_VENDOR_NAME, UserVisitGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
8464                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8465
8466                    var userVisitGroups = entities.stream()
8467                            .map(UserVisitGroupObject::new)
8468                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8469
8470                    data = new CountedObjects<>(objectLimiter, userVisitGroups);
8471                }
8472            }
8473        } catch (NamingException ex) {
8474            throw new RuntimeException(ex);
8475        }
8476
8477        return data;
8478    }
8479
8480    @GraphQLField
8481    @GraphQLName("userVisit")
8482    static UserVisitObject userVisit(final DataFetchingEnvironment env) {
8483        var userVisit = BaseGraphQl.getUserVisit(env);
8484
8485        return userVisit == null ? null : new UserVisitObject(userVisit);
8486    }
8487
8488    @GraphQLField
8489    @GraphQLName("symbolPosition")
8490    static SymbolPositionObject symbolPosition(final DataFetchingEnvironment env,
8491            @GraphQLName("symbolPositionName") final String symbolPositionName,
8492            @GraphQLName("id") @GraphQLID final String id) {
8493        SymbolPosition symbolPosition;
8494
8495        try {
8496            var commandForm = AccountingUtil.getHome().getGetSymbolPositionForm();
8497
8498            commandForm.setSymbolPositionName(symbolPositionName);
8499            commandForm.setUuid(id);
8500
8501            symbolPosition = CDI.current().select(GetSymbolPositionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8502        } catch (NamingException ex) {
8503            throw new RuntimeException(ex);
8504        }
8505
8506        return symbolPosition == null ? null : new SymbolPositionObject(symbolPosition);
8507    }
8508
8509    @GraphQLField
8510    @GraphQLName("symbolPositions")
8511    @GraphQLNonNull
8512    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8513    static CountingPaginatedData<SymbolPositionObject> symbolPositions(final DataFetchingEnvironment env) {
8514        CountingPaginatedData<SymbolPositionObject> data;
8515
8516        try {
8517            var commandForm = AccountingUtil.getHome().getGetSymbolPositionsForm();
8518            var command = CDI.current().select(GetSymbolPositionsCommand.class).get();
8519
8520            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8521            if(totalEntities == null) {
8522                data = Connections.emptyConnection();
8523            } else {
8524                try(var objectLimiter = new ObjectLimiter(env, SymbolPositionConstants.COMPONENT_VENDOR_NAME, SymbolPositionConstants.ENTITY_TYPE_NAME, totalEntities)) {
8525                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8526
8527                    var symbolPositions = entities.stream()
8528                            .map(SymbolPositionObject::new)
8529                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8530
8531                    data = new CountedObjects<>(objectLimiter, symbolPositions);
8532                }
8533            }
8534        } catch (NamingException ex) {
8535            throw new RuntimeException(ex);
8536        }
8537
8538        return data;
8539    }
8540
8541    @GraphQLField
8542    @GraphQLName("currency")
8543    static CurrencyObject currency(final DataFetchingEnvironment env,
8544            @GraphQLName("currencyIsoName") final String currencyIsoName,
8545            @GraphQLName("id") @GraphQLID final String id) {
8546        Currency currency;
8547
8548        try {
8549            var commandForm = AccountingUtil.getHome().getGetCurrencyForm();
8550
8551            commandForm.setCurrencyIsoName(currencyIsoName);
8552            commandForm.setUuid(id);
8553
8554            currency = CDI.current().select(GetCurrencyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8555        } catch (NamingException ex) {
8556            throw new RuntimeException(ex);
8557        }
8558
8559        return currency == null ? null : new CurrencyObject(currency);
8560    }
8561
8562    @GraphQLField
8563    @GraphQLName("currencies")
8564    @GraphQLNonNull
8565    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8566    static CountingPaginatedData<CurrencyObject> currencies(final DataFetchingEnvironment env) {
8567        CountingPaginatedData<CurrencyObject> data;
8568
8569        try {
8570            var commandForm = AccountingUtil.getHome().getGetCurrenciesForm();
8571            var command = CDI.current().select(GetCurrenciesCommand.class).get();
8572
8573            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8574            if(totalEntities == null) {
8575                data = Connections.emptyConnection();
8576            } else {
8577                try(var objectLimiter = new ObjectLimiter(env, CurrencyConstants.COMPONENT_VENDOR_NAME, CurrencyConstants.ENTITY_TYPE_NAME, totalEntities)) {
8578                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8579
8580                    var currencies = entities.stream()
8581                            .map(CurrencyObject::new)
8582                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8583
8584                    data = new CountedObjects<>(objectLimiter, currencies);
8585                }
8586            }
8587        } catch (NamingException ex) {
8588            throw new RuntimeException(ex);
8589        }
8590
8591        return data;
8592    }
8593
8594    @GraphQLField
8595    @GraphQLName("language")
8596    static LanguageObject language(final DataFetchingEnvironment env,
8597            @GraphQLName("languageIsoName") final String languageIsoName,
8598            @GraphQLName("id") @GraphQLID final String id) {
8599        Language language;
8600
8601        try {
8602            var commandForm = PartyUtil.getHome().getGetLanguageForm();
8603
8604            commandForm.setLanguageIsoName(languageIsoName);
8605            commandForm.setUuid(id);
8606
8607            language = CDI.current().select(GetLanguageCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8608        } catch (NamingException ex) {
8609            throw new RuntimeException(ex);
8610        }
8611
8612        return language == null ? null : new LanguageObject(language);
8613    }
8614
8615    @GraphQLField
8616    @GraphQLName("languages")
8617    @GraphQLNonNull
8618    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8619    static CountingPaginatedData<LanguageObject> languages(final DataFetchingEnvironment env) {
8620        CountingPaginatedData<LanguageObject> data;
8621
8622        try {
8623            var commandForm = PartyUtil.getHome().getGetLanguagesForm();
8624            var command = CDI.current().select(GetLanguagesCommand.class).get();
8625
8626            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8627            if(totalEntities == null) {
8628                data = Connections.emptyConnection();
8629            } else {
8630                try(var objectLimiter = new ObjectLimiter(env, LanguageConstants.COMPONENT_VENDOR_NAME, LanguageConstants.ENTITY_TYPE_NAME, totalEntities)) {
8631                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8632
8633                    var languages = entities.stream()
8634                            .map(LanguageObject::new)
8635                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8636
8637                    data = new CountedObjects<>(objectLimiter, languages);
8638                }
8639            }
8640        } catch (NamingException ex) {
8641            throw new RuntimeException(ex);
8642        }
8643
8644        return data;
8645    }
8646
8647    @GraphQLField
8648    @GraphQLName("dateTimeFormat")
8649    static DateTimeFormatObject dateTimeFormat(final DataFetchingEnvironment env,
8650            @GraphQLName("dateTimeFormatName") final String dateTimeFormatName,
8651            @GraphQLName("id") @GraphQLID final String id) {
8652        DateTimeFormat dateTimeFormat;
8653
8654        try {
8655            var commandForm = PartyUtil.getHome().getGetDateTimeFormatForm();
8656
8657            commandForm.setDateTimeFormatName(dateTimeFormatName);
8658            commandForm.setUuid(id);
8659
8660            dateTimeFormat = CDI.current().select(GetDateTimeFormatCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8661        } catch (NamingException ex) {
8662            throw new RuntimeException(ex);
8663        }
8664
8665        return dateTimeFormat == null ? null : new DateTimeFormatObject(dateTimeFormat);
8666    }
8667
8668    @GraphQLField
8669    @GraphQLName("dateTimeFormats")
8670    @GraphQLNonNull
8671    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8672    static CountingPaginatedData<DateTimeFormatObject> dateTimeFormats(final DataFetchingEnvironment env) {
8673        CountingPaginatedData<DateTimeFormatObject> data;
8674
8675        try {
8676            var commandForm = PartyUtil.getHome().getGetDateTimeFormatsForm();
8677            var command = CDI.current().select(GetDateTimeFormatsCommand.class).get();
8678
8679            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8680            if(totalEntities == null) {
8681                data = Connections.emptyConnection();
8682            } else {
8683                try(var objectLimiter = new ObjectLimiter(env, DateTimeFormatConstants.COMPONENT_VENDOR_NAME, DateTimeFormatConstants.ENTITY_TYPE_NAME, totalEntities)) {
8684                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8685
8686                    var dateTimeFormats = entities.stream()
8687                            .map(DateTimeFormatObject::new)
8688                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8689
8690                    data = new CountedObjects<>(objectLimiter, dateTimeFormats);
8691                }
8692            }
8693        } catch (NamingException ex) {
8694            throw new RuntimeException(ex);
8695        }
8696
8697        return data;
8698    }
8699
8700    @GraphQLField
8701    @GraphQLName("timeZone")
8702    static TimeZoneObject timeZone(final DataFetchingEnvironment env,
8703            @GraphQLName("javaTimeZoneName") final String javaTimeZoneName,
8704            @GraphQLName("id") @GraphQLID final String id) {
8705        TimeZone timeZone;
8706
8707        try {
8708            var commandForm = PartyUtil.getHome().getGetTimeZoneForm();
8709
8710            commandForm.setJavaTimeZoneName(javaTimeZoneName);
8711            commandForm.setUuid(id);
8712
8713            timeZone = CDI.current().select(GetTimeZoneCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8714        } catch (NamingException ex) {
8715            throw new RuntimeException(ex);
8716        }
8717
8718        return timeZone == null ? null : new TimeZoneObject(timeZone);
8719    }
8720
8721    @GraphQLField
8722    @GraphQLName("timeZones")
8723    @GraphQLNonNull
8724    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8725    static CountingPaginatedData<TimeZoneObject> timeZones(final DataFetchingEnvironment env) {
8726        CountingPaginatedData<TimeZoneObject> data;
8727
8728        try {
8729            var commandForm = PartyUtil.getHome().getGetTimeZonesForm();
8730            var command = CDI.current().select(GetTimeZonesCommand.class).get();
8731
8732            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8733            if(totalEntities == null) {
8734                data = Connections.emptyConnection();
8735            } else {
8736                try(var objectLimiter = new ObjectLimiter(env, TimeZoneConstants.COMPONENT_VENDOR_NAME, TimeZoneConstants.ENTITY_TYPE_NAME, totalEntities)) {
8737                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8738
8739                    var timeZones = entities.stream()
8740                            .map(TimeZoneObject::new)
8741                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8742
8743                    data = new CountedObjects<>(objectLimiter, timeZones);
8744                }
8745            }
8746        } catch (NamingException ex) {
8747            throw new RuntimeException(ex);
8748        }
8749
8750        return data;
8751    }
8752
8753    @GraphQLField
8754    @GraphQLName("customerType")
8755    static CustomerTypeObject customerType(final DataFetchingEnvironment env,
8756            @GraphQLName("customerTypeName") final String customerTypeName,
8757            @GraphQLName("id") @GraphQLID final String id) {
8758        CustomerType customerType;
8759
8760        try {
8761            var commandForm = CustomerUtil.getHome().getGetCustomerTypeForm();
8762
8763            commandForm.setCustomerTypeName(customerTypeName);
8764            commandForm.setUuid(id);
8765
8766            customerType = CDI.current().select(GetCustomerTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8767        } catch (NamingException ex) {
8768            throw new RuntimeException(ex);
8769        }
8770
8771        return customerType == null ? null : new CustomerTypeObject(customerType);
8772    }
8773
8774    @GraphQLField
8775    @GraphQLName("customerTypes")
8776    @GraphQLNonNull
8777    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8778    static CountingPaginatedData<CustomerTypeObject> customerTypes(final DataFetchingEnvironment env) {
8779        CountingPaginatedData<CustomerTypeObject> data;
8780
8781        try {
8782            var commandForm = CustomerUtil.getHome().getGetCustomerTypesForm();
8783            var command = CDI.current().select(GetCustomerTypesCommand.class).get();
8784
8785            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8786            if(totalEntities == null) {
8787                data = Connections.emptyConnection();
8788            } else {
8789                try(var objectLimiter = new ObjectLimiter(env, CustomerTypeConstants.COMPONENT_VENDOR_NAME, CustomerTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
8790                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8791
8792                    var customerTypes = entities.stream()
8793                            .map(CustomerTypeObject::new)
8794                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8795
8796                    data = new CountedObjects<>(objectLimiter, customerTypes);
8797                }
8798            }
8799        } catch (NamingException ex) {
8800            throw new RuntimeException(ex);
8801        }
8802
8803        return data;
8804    }
8805
8806    @GraphQLField
8807    @GraphQLName("customerTypePaymentMethod")
8808    static CustomerTypePaymentMethodObject customerTypePaymentMethod(final DataFetchingEnvironment env,
8809            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName,
8810            @GraphQLName("paymentMethodName") @GraphQLNonNull final String paymentMethodName) {
8811        CustomerTypePaymentMethod customerTypePaymentMethod;
8812
8813        try {
8814            var commandForm = CustomerUtil.getHome().getGetCustomerTypePaymentMethodForm();
8815
8816            commandForm.setCustomerTypeName(customerTypeName);
8817            commandForm.setPaymentMethodName(paymentMethodName);
8818
8819
8820            customerTypePaymentMethod = CDI.current().select(GetCustomerTypePaymentMethodCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8821        } catch (NamingException ex) {
8822            throw new RuntimeException(ex);
8823        }
8824
8825        return customerTypePaymentMethod == null ? null : new CustomerTypePaymentMethodObject(customerTypePaymentMethod);
8826    }
8827
8828    @GraphQLField
8829    @GraphQLName("customerTypePaymentMethods")
8830    @GraphQLNonNull
8831    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8832    static CountingPaginatedData<CustomerTypePaymentMethodObject> customerTypePaymentMethods(final DataFetchingEnvironment env,
8833            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName) {
8834        CountingPaginatedData<CustomerTypePaymentMethodObject> data;
8835
8836        try {
8837            var commandForm = CustomerUtil.getHome().getGetCustomerTypePaymentMethodsForm();
8838            var command = CDI.current().select(GetCustomerTypePaymentMethodsCommand.class).get();
8839
8840            commandForm.setCustomerTypeName(customerTypeName);
8841
8842            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8843            if(totalEntities == null) {
8844                data = Connections.emptyConnection();
8845            } else {
8846                try(var objectLimiter = new ObjectLimiter(env, CustomerTypePaymentMethodConstants.COMPONENT_VENDOR_NAME, CustomerTypePaymentMethodConstants.ENTITY_TYPE_NAME, totalEntities)) {
8847                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8848
8849                    var customerTypePaymentMethods = entities.stream()
8850                            .map(CustomerTypePaymentMethodObject::new)
8851                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8852
8853                    data = new CountedObjects<>(objectLimiter, customerTypePaymentMethods);
8854                }
8855            }
8856        } catch (NamingException ex) {
8857            throw new RuntimeException(ex);
8858        }
8859
8860        return data;
8861    }
8862
8863    @GraphQLField
8864    @GraphQLName("customerTypeShippingMethod")
8865    static CustomerTypeShippingMethodObject customerTypeShippingMethod(final DataFetchingEnvironment env,
8866            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName,
8867            @GraphQLName("shippingMethodName") @GraphQLNonNull final String shippingMethodName) {
8868        CustomerTypeShippingMethod customerTypeShippingMethod;
8869
8870        try {
8871            var commandForm = CustomerUtil.getHome().getGetCustomerTypeShippingMethodForm();
8872
8873            commandForm.setCustomerTypeName(customerTypeName);
8874            commandForm.setShippingMethodName(shippingMethodName);
8875
8876
8877            customerTypeShippingMethod = CDI.current().select(GetCustomerTypeShippingMethodCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8878        } catch (NamingException ex) {
8879            throw new RuntimeException(ex);
8880        }
8881
8882        return customerTypeShippingMethod == null ? null : new CustomerTypeShippingMethodObject(customerTypeShippingMethod);
8883    }
8884
8885    @GraphQLField
8886    @GraphQLName("customerTypeShippingMethods")
8887    @GraphQLNonNull
8888    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8889    static CountingPaginatedData<CustomerTypeShippingMethodObject> customerTypeShippingMethods(final DataFetchingEnvironment env,
8890            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName) {
8891        CountingPaginatedData<CustomerTypeShippingMethodObject> data;
8892
8893        try {
8894            var commandForm = CustomerUtil.getHome().getGetCustomerTypeShippingMethodsForm();
8895            var command = CDI.current().select(GetCustomerTypeShippingMethodsCommand.class).get();
8896
8897            commandForm.setCustomerTypeName(customerTypeName);
8898
8899            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8900            if(totalEntities == null) {
8901                data = Connections.emptyConnection();
8902            } else {
8903                try(var objectLimiter = new ObjectLimiter(env, CustomerTypeShippingMethodConstants.COMPONENT_VENDOR_NAME, CustomerTypeShippingMethodConstants.ENTITY_TYPE_NAME, totalEntities)) {
8904                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8905
8906                    var customerTypeShippingMethods = entities.stream()
8907                            .map(CustomerTypeShippingMethodObject::new)
8908                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8909
8910                    data = new CountedObjects<>(objectLimiter, customerTypeShippingMethods);
8911                }
8912            }
8913        } catch (NamingException ex) {
8914            throw new RuntimeException(ex);
8915        }
8916
8917        return data;
8918    }
8919
8920    @GraphQLField
8921    @GraphQLName("customer")
8922    static CustomerObject customer(final DataFetchingEnvironment env,
8923            @GraphQLName("customerName") final String customerName,
8924            @GraphQLName("partyName") final String partyName,
8925            @GraphQLName("id") @GraphQLID final String id) {
8926        Customer customer;
8927
8928        try {
8929            var commandForm = CustomerUtil.getHome().getGetCustomerForm();
8930
8931            commandForm.setCustomerName(customerName);
8932            commandForm.setPartyName(partyName);
8933            commandForm.setUuid(id);
8934
8935            customer = CDI.current().select(GetCustomerCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8936        } catch (NamingException ex) {
8937            throw new RuntimeException(ex);
8938        }
8939
8940        return customer == null ? null : new CustomerObject(customer);
8941    }
8942
8943    @GraphQLField
8944    @GraphQLName("customers")
8945    @GraphQLNonNull
8946    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8947    static CountingPaginatedData<CustomerObject> customers(final DataFetchingEnvironment env) {
8948        CountingPaginatedData<CustomerObject> data;
8949
8950        try {
8951            var commandForm = CustomerUtil.getHome().getGetCustomersForm();
8952            var command = CDI.current().select(GetCustomersCommand.class).get();
8953
8954            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8955            if(totalEntities == null) {
8956                data = Connections.emptyConnection();
8957            } else {
8958                try(var objectLimiter = new ObjectLimiter(env, CustomerConstants.COMPONENT_VENDOR_NAME, CustomerConstants.ENTITY_TYPE_NAME, totalEntities)) {
8959                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8960
8961                    var customers = entities.stream()
8962                            .map(CustomerObject::new)
8963                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8964
8965                    data = new CountedObjects<>(objectLimiter, customers);
8966                }
8967            }
8968        } catch (NamingException ex) {
8969            throw new RuntimeException(ex);
8970        }
8971
8972        return data;
8973    }
8974
8975    @GraphQLField
8976    @GraphQLName("employee")
8977    static EmployeeObject employee(final DataFetchingEnvironment env,
8978            @GraphQLName("employeeName") final String employeeName,
8979            @GraphQLName("partyName") final String partyName,
8980            @GraphQLName("id") @GraphQLID final String id) {
8981        PartyEmployee partyEmployee;
8982
8983        try {
8984            var commandForm = EmployeeUtil.getHome().getGetEmployeeForm();
8985
8986            commandForm.setEmployeeName(employeeName);
8987            commandForm.setPartyName(partyName);
8988            commandForm.setUuid(id);
8989
8990            partyEmployee = CDI.current().select(GetEmployeeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8991        } catch (NamingException ex) {
8992            throw new RuntimeException(ex);
8993        }
8994
8995        return partyEmployee == null ? null : new EmployeeObject(partyEmployee);
8996    }
8997
8998    @GraphQLField
8999    @GraphQLName("employees")
9000    @GraphQLNonNull
9001    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9002    static CountingPaginatedData<EmployeeObject> employees(final DataFetchingEnvironment env) {
9003        CountingPaginatedData<EmployeeObject> data;
9004
9005        try {
9006            var commandForm = EmployeeUtil.getHome().getGetEmployeesForm();
9007            var command = CDI.current().select(GetEmployeesCommand.class).get();
9008
9009            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9010            if(totalEntities == null) {
9011                data = Connections.emptyConnection();
9012            } else {
9013                try(var objectLimiter = new ObjectLimiter(env, PartyEmployeeConstants.COMPONENT_VENDOR_NAME, PartyEmployeeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9014                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9015
9016                    var employees = entities.stream()
9017                            .map(EmployeeObject::new)
9018                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9019
9020                    data = new CountedObjects<>(objectLimiter, employees);
9021                }
9022            }
9023        } catch (NamingException ex) {
9024            throw new RuntimeException(ex);
9025        }
9026
9027        return data;
9028    }
9029
9030    @GraphQLField
9031    @GraphQLName("vendorType")
9032    static VendorTypeObject vendorType(final DataFetchingEnvironment env,
9033            @GraphQLName("vendorTypeName") final String vendorTypeName,
9034            @GraphQLName("id") @GraphQLID final String id) {
9035        VendorType vendorType;
9036
9037        try {
9038            var commandForm = VendorUtil.getHome().getGetVendorTypeForm();
9039
9040            commandForm.setVendorTypeName(vendorTypeName);
9041            commandForm.setUuid(id);
9042
9043            vendorType = CDI.current().select(GetVendorTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9044        } catch (NamingException ex) {
9045            throw new RuntimeException(ex);
9046        }
9047
9048        return vendorType == null ? null : new VendorTypeObject(vendorType);
9049    }
9050
9051    @GraphQLField
9052    @GraphQLName("vendorTypes")
9053    @GraphQLNonNull
9054    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9055    static CountingPaginatedData<VendorTypeObject> vendorTypes(final DataFetchingEnvironment env) {
9056        CountingPaginatedData<VendorTypeObject> data;
9057
9058        try {
9059            var commandForm = VendorUtil.getHome().getGetVendorTypesForm();
9060            var command = CDI.current().select(GetVendorTypesCommand.class).get();
9061
9062            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9063            if(totalEntities == null) {
9064                data = Connections.emptyConnection();
9065            } else {
9066                try(var objectLimiter = new ObjectLimiter(env, VendorTypeConstants.COMPONENT_VENDOR_NAME, VendorTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9067                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9068
9069                    var vendorTypes = entities.stream()
9070                            .map(VendorTypeObject::new)
9071                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9072
9073                    data = new CountedObjects<>(objectLimiter, vendorTypes);
9074                }
9075            }
9076        } catch (NamingException ex) {
9077            throw new RuntimeException(ex);
9078        }
9079
9080        return data;
9081    }
9082
9083    @GraphQLField
9084    @GraphQLName("vendor")
9085    static VendorObject vendor(final DataFetchingEnvironment env,
9086            @GraphQLName("vendorName") final String vendorName,
9087            @GraphQLName("partyName") final String partyName,
9088            @GraphQLName("id") @GraphQLID final String id) {
9089        Vendor vendor;
9090
9091        try {
9092            var commandForm = VendorUtil.getHome().getGetVendorForm();
9093
9094            commandForm.setVendorName(vendorName);
9095            commandForm.setPartyName(partyName);
9096            commandForm.setUuid(id);
9097
9098            vendor = CDI.current().select(GetVendorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9099        } catch (NamingException ex) {
9100            throw new RuntimeException(ex);
9101        }
9102
9103        return vendor == null ? null : new VendorObject(vendor);
9104    }
9105
9106    @GraphQLField
9107    @GraphQLName("vendors")
9108    @GraphQLNonNull
9109    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9110    static CountingPaginatedData<VendorObject> vendors(final DataFetchingEnvironment env) {
9111        CountingPaginatedData<VendorObject> data;
9112
9113        try {
9114            var commandForm = VendorUtil.getHome().getGetVendorsForm();
9115            var command = CDI.current().select(GetVendorsCommand.class).get();
9116
9117            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9118            if(totalEntities == null) {
9119                data = Connections.emptyConnection();
9120            } else {
9121                try(var objectLimiter = new ObjectLimiter(env, VendorConstants.COMPONENT_VENDOR_NAME, VendorConstants.ENTITY_TYPE_NAME, totalEntities)) {
9122                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9123
9124                    var vendors = entities.stream()
9125                            .map(VendorObject::new)
9126                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9127
9128                    data = new CountedObjects<>(objectLimiter, vendors);
9129                }
9130            }
9131        } catch (NamingException ex) {
9132            throw new RuntimeException(ex);
9133        }
9134
9135        return data;
9136    }
9137
9138    @GraphQLField
9139    @GraphQLName("vendorItem")
9140    static VendorItemObject vendorItem(final DataFetchingEnvironment env,
9141            @GraphQLName("vendorName") final String vendorName,
9142            @GraphQLName("partyName") final String partyName,
9143            @GraphQLName("vendorItemName") final String vendorItemName,
9144            @GraphQLName("id") @GraphQLID final String id) {
9145        VendorItem vendorItem;
9146
9147        try {
9148            var commandForm = VendorUtil.getHome().getGetVendorItemForm();
9149
9150            commandForm.setVendorName(vendorName);
9151            commandForm.setPartyName(partyName);
9152            commandForm.setVendorItemName(vendorItemName);
9153            commandForm.setUuid(id);
9154
9155            vendorItem = CDI.current().select(GetVendorItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9156        } catch (NamingException ex) {
9157            throw new RuntimeException(ex);
9158        }
9159
9160        return vendorItem == null ? null : new VendorItemObject(vendorItem);
9161    }
9162
9163    @GraphQLField
9164    @GraphQLName("vendorItems")
9165    @GraphQLNonNull
9166    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9167    static CountingPaginatedData<VendorItemObject> vendorItems(final DataFetchingEnvironment env,
9168            @GraphQLName("vendorName") final String vendorName,
9169            @GraphQLName("itemName") final String itemName) {
9170        CountingPaginatedData<VendorItemObject> data;
9171
9172        try {
9173            var commandForm = VendorUtil.getHome().getGetVendorItemsForm();
9174            var command = CDI.current().select(GetVendorItemsCommand.class).get();
9175
9176            commandForm.setVendorName(vendorName);
9177            commandForm.setItemName(itemName);
9178
9179            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9180            if(totalEntities == null) {
9181                data = Connections.emptyConnection();
9182            } else {
9183                try(var objectLimiter = new ObjectLimiter(env, VendorItemConstants.COMPONENT_VENDOR_NAME, VendorItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
9184                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9185
9186                    var vendorItems = entities.stream()
9187                            .map(VendorItemObject::new)
9188                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9189
9190                    data = new CountedObjects<>(objectLimiter, vendorItems);
9191                }
9192            }
9193        } catch (NamingException ex) {
9194            throw new RuntimeException(ex);
9195        }
9196
9197        return data;
9198    }
9199
9200    @GraphQLField
9201    @GraphQLName("vendorItemCost")
9202    static VendorItemCostObject vendorItemCost(final DataFetchingEnvironment env,
9203            @GraphQLName("vendorName") final String vendorName,
9204            @GraphQLName("partyName") final String partyName,
9205            @GraphQLName("vendorItemName") @GraphQLNonNull final String vendorItemName,
9206            @GraphQLName("inventoryConditionName") @GraphQLNonNull final String inventoryConditionName,
9207            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName) {
9208        VendorItemCost vendorItemCost;
9209
9210        try {
9211            var commandForm = VendorUtil.getHome().getGetVendorItemCostForm();
9212
9213            commandForm.setVendorName(vendorName);
9214            commandForm.setPartyName(partyName);
9215            commandForm.setVendorItemName(vendorItemName);
9216            commandForm.setInventoryConditionName(inventoryConditionName);
9217            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
9218
9219            vendorItemCost = CDI.current().select(GetVendorItemCostCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9220        } catch (NamingException ex) {
9221            throw new RuntimeException(ex);
9222        }
9223
9224        return vendorItemCost == null ? null : new VendorItemCostObject(vendorItemCost);
9225    }
9226
9227    @GraphQLField
9228    @GraphQLName("vendorItemCosts")
9229    @GraphQLNonNull
9230    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9231    static CountingPaginatedData<VendorItemCostObject> vendorItemCosts(final DataFetchingEnvironment env,
9232            @GraphQLName("vendorName") @GraphQLNonNull final String vendorName,
9233            @GraphQLName("vendorItemName") @GraphQLNonNull final String vendorItemName) {
9234        CountingPaginatedData<VendorItemCostObject> data;
9235
9236        try {
9237            var commandForm = VendorUtil.getHome().getGetVendorItemCostsForm();
9238
9239            commandForm.setVendorName(vendorName);
9240            commandForm.setVendorItemName(vendorItemName);
9241
9242            var command = CDI.current().select(GetVendorItemCostsCommand.class).get();
9243
9244            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9245            if(totalEntities == null) {
9246                data = Connections.emptyConnection();
9247            } else {
9248                try(var objectLimiter = new ObjectLimiter(env, VendorItemCostConstants.COMPONENT_VENDOR_NAME, VendorItemCostConstants.ENTITY_TYPE_NAME, totalEntities)) {
9249                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9250
9251                    var vendorItemCosts = entities.stream()
9252                            .map(VendorItemCostObject::new)
9253                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9254
9255                    data = new CountedObjects<>(objectLimiter, vendorItemCosts);
9256                }
9257            }
9258        } catch (NamingException ex) {
9259            throw new RuntimeException(ex);
9260        }
9261
9262        return data;
9263    }
9264
9265    @GraphQLField
9266    @GraphQLName("roleType")
9267    static RoleTypeObject roleType(final DataFetchingEnvironment env,
9268            @GraphQLName("roleTypeName") final String roleTypeName,
9269            @GraphQLName("id") @GraphQLID final String id) {
9270        RoleType roleType;
9271
9272        try {
9273            var commandForm = PartyUtil.getHome().getGetRoleTypeForm();
9274
9275            commandForm.setRoleTypeName(roleTypeName);
9276            commandForm.setUuid(id);
9277
9278            roleType = CDI.current().select(GetRoleTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9279        } catch (NamingException ex) {
9280            throw new RuntimeException(ex);
9281        }
9282
9283        return roleType == null ? null : new RoleTypeObject(roleType);
9284    }
9285
9286    @GraphQLField
9287    @GraphQLName("roleTypes")
9288    @GraphQLNonNull
9289    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9290    static CountingPaginatedData<RoleTypeObject> roleTypes(final DataFetchingEnvironment env) {
9291        CountingPaginatedData<RoleTypeObject> data;
9292
9293        try {
9294            var commandForm = PartyUtil.getHome().getGetRoleTypesForm();
9295            var command = CDI.current().select(GetRoleTypesCommand.class).get();
9296
9297            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9298            if(totalEntities == null) {
9299                data = Connections.emptyConnection();
9300            } else {
9301                try(var objectLimiter = new ObjectLimiter(env, RoleTypeConstants.COMPONENT_VENDOR_NAME, RoleTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9302                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9303
9304                    var roleTypes = entities.stream()
9305                            .map(RoleTypeObject::new)
9306                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9307
9308                    data = new CountedObjects<>(objectLimiter, roleTypes);
9309                }
9310            }
9311        } catch (NamingException ex) {
9312            throw new RuntimeException(ex);
9313        }
9314
9315        return data;
9316    }
9317
9318    @GraphQLField
9319    @GraphQLName("partyType")
9320    static PartyTypeObject partyType(final DataFetchingEnvironment env,
9321            @GraphQLName("partyTypeName") final String partyTypeName,
9322            @GraphQLName("id") @GraphQLID final String id) {
9323        PartyType partyType;
9324
9325        try {
9326            var commandForm = PartyUtil.getHome().getGetPartyTypeForm();
9327
9328            commandForm.setPartyTypeName(partyTypeName);
9329            commandForm.setUuid(id);
9330
9331            partyType = CDI.current().select(GetPartyTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9332        } catch (NamingException ex) {
9333            throw new RuntimeException(ex);
9334        }
9335
9336        return partyType == null ? null : new PartyTypeObject(partyType);
9337    }
9338
9339    @GraphQLField
9340    @GraphQLName("partyTypes")
9341    @GraphQLNonNull
9342    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9343    static CountingPaginatedData<PartyTypeObject> partyTypes(final DataFetchingEnvironment env) {
9344        CountingPaginatedData<PartyTypeObject> data;
9345
9346        try {
9347            var commandForm = PartyUtil.getHome().getGetPartyTypesForm();
9348            var command = CDI.current().select(GetPartyTypesCommand.class).get();
9349
9350            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9351            if(totalEntities == null) {
9352                data = Connections.emptyConnection();
9353            } else {
9354                try(var objectLimiter = new ObjectLimiter(env, PartyTypeConstants.COMPONENT_VENDOR_NAME, PartyTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9355                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9356
9357                    var partyTypes = entities.stream()
9358                            .map(PartyTypeObject::new)
9359                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9360
9361                    data = new CountedObjects<>(objectLimiter, partyTypes);
9362                }
9363            }
9364        } catch (NamingException ex) {
9365            throw new RuntimeException(ex);
9366        }
9367
9368        return data;
9369    }
9370
9371    @GraphQLField
9372    @GraphQLName("partyAliasType")
9373    static PartyAliasTypeObject partyAliasType(final DataFetchingEnvironment env,
9374            @GraphQLName("partyTypeName") final String partyTypeName,
9375            @GraphQLName("partyAliasTypeName") final String partyAliasTypeName,
9376            @GraphQLName("id") @GraphQLID final String id) {
9377        PartyAliasType partyAliasType;
9378
9379        try {
9380            var commandForm = PartyUtil.getHome().getGetPartyAliasTypeForm();
9381
9382            commandForm.setPartyTypeName(partyTypeName);
9383            commandForm.setPartyAliasTypeName(partyAliasTypeName);
9384            commandForm.setUuid(id);
9385
9386            partyAliasType = CDI.current().select(GetPartyAliasTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9387        } catch (NamingException ex) {
9388            throw new RuntimeException(ex);
9389        }
9390
9391        return partyAliasType == null ? null : new PartyAliasTypeObject(partyAliasType);
9392    }
9393
9394    @GraphQLField
9395    @GraphQLName("partyAliasTypes")
9396    @GraphQLNonNull
9397    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9398    static CountingPaginatedData<PartyAliasTypeObject> partyAliasTypes(final DataFetchingEnvironment env,
9399            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
9400        CountingPaginatedData<PartyAliasTypeObject> data;
9401
9402        try {
9403            var commandForm = PartyUtil.getHome().getGetPartyAliasTypesForm();
9404            var command = CDI.current().select(GetPartyAliasTypesCommand.class).get();
9405
9406            commandForm.setPartyTypeName(partyTypeName);
9407
9408            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9409            if(totalEntities == null) {
9410                data = Connections.emptyConnection();
9411            } else {
9412                try(var objectLimiter = new ObjectLimiter(env, PartyAliasTypeConstants.COMPONENT_VENDOR_NAME, PartyAliasTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9413                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9414
9415                    var partyAliasTypes = entities.stream()
9416                            .map(PartyAliasTypeObject::new)
9417                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9418
9419                    data = new CountedObjects<>(objectLimiter, partyAliasTypes);
9420                }
9421            }
9422        } catch (NamingException ex) {
9423            throw new RuntimeException(ex);
9424        }
9425
9426        return data;
9427    }
9428
9429    @GraphQLField
9430    @GraphQLName("partyAlias")
9431    static PartyAliasObject partyAlias(final DataFetchingEnvironment env,
9432            @GraphQLName("partyName") final String partyName,
9433            @GraphQLName("partyTypeName") final String partyTypeName,
9434            @GraphQLName("partyAliasTypeName") final String partyAliasTypeName,
9435            @GraphQLName("alias") final String alias) {
9436        PartyAlias partyAlias;
9437
9438        try {
9439            var commandForm = PartyUtil.getHome().getGetPartyAliasForm();
9440
9441            commandForm.setPartyName(partyName);
9442            commandForm.setPartyTypeName(partyTypeName);
9443            commandForm.setPartyAliasTypeName(partyAliasTypeName);
9444            commandForm.setAlias(alias);
9445
9446            partyAlias = CDI.current().select(GetPartyAliasCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9447        } catch (NamingException ex) {
9448            throw new RuntimeException(ex);
9449        }
9450
9451        return partyAlias == null ? null : new PartyAliasObject(partyAlias);
9452    }
9453
9454    @GraphQLField
9455    @GraphQLName("partyAliases")
9456    static Collection<PartyAliasObject> partyAliases(final DataFetchingEnvironment env,
9457            @GraphQLName("partyName") final String partyName,
9458            @GraphQLName("partyTypeName") final String partyTypeName,
9459            @GraphQLName("partyAliasTypeName") final String partyAliasTypeName) {
9460        Collection<PartyAlias> partyAliases;
9461        Collection<PartyAliasObject> partyAliasObjects;
9462
9463        try {
9464            var commandForm = PartyUtil.getHome().getGetPartyAliasesForm();
9465
9466            commandForm.setPartyName(partyName);
9467            commandForm.setPartyTypeName(partyTypeName);
9468            commandForm.setPartyAliasTypeName(partyAliasTypeName);
9469
9470            partyAliases = CDI.current().select(GetPartyAliasesCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9471        } catch (NamingException ex) {
9472            throw new RuntimeException(ex);
9473        }
9474
9475        if(partyAliases == null) {
9476            partyAliasObjects = emptyList();
9477        } else {
9478            partyAliasObjects = new ArrayList<>(partyAliases.size());
9479
9480            partyAliases.stream()
9481                    .map(PartyAliasObject::new)
9482                    .forEachOrdered(partyAliasObjects::add);
9483        }
9484
9485        return partyAliasObjects;
9486    }
9487
9488    @GraphQLField
9489    @GraphQLName("party")
9490    static PartyObject party(final DataFetchingEnvironment env,
9491            @GraphQLName("partyName") final String partyName,
9492            @GraphQLName("id") @GraphQLID final String id) {
9493        Party party;
9494
9495        try {
9496            var commandForm = PartyUtil.getHome().getGetPartyForm();
9497
9498            commandForm.setPartyName(partyName);
9499            commandForm.setUuid(id);
9500
9501            party = CDI.current().select(GetPartyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9502        } catch (NamingException ex) {
9503            throw new RuntimeException(ex);
9504        }
9505
9506        return party == null ? null : new PartyObject(party);
9507    }
9508
9509    @GraphQLField
9510    @GraphQLName("parties")
9511    @GraphQLNonNull
9512    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9513    static CountingPaginatedData<PartyObject> parties(final DataFetchingEnvironment env) {
9514        CountingPaginatedData<PartyObject> data;
9515
9516        try {
9517            var commandForm = PartyUtil.getHome().getGetPartiesForm();
9518            var command = CDI.current().select(GetPartiesCommand.class).get();
9519
9520            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9521            if(totalEntities == null) {
9522                data = Connections.emptyConnection();
9523            } else {
9524                try(var objectLimiter = new ObjectLimiter(env, PartyConstants.COMPONENT_VENDOR_NAME, PartyConstants.ENTITY_TYPE_NAME, totalEntities)) {
9525                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9526
9527                    var parties = entities.stream()
9528                            .map(PartyObject::new)
9529                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9530
9531                    data = new CountedObjects<>(objectLimiter, parties);
9532                }
9533            }
9534        } catch (NamingException ex) {
9535            throw new RuntimeException(ex);
9536        }
9537
9538        return data;
9539    }
9540
9541    @GraphQLField
9542    @GraphQLName("company")
9543    static CompanyObject company(final DataFetchingEnvironment env,
9544            @GraphQLName("companyName") final String companyName,
9545            @GraphQLName("partyName") final String partyName,
9546            @GraphQLName("id") @GraphQLID final String id) {
9547        PartyCompany company;
9548
9549        try {
9550            var commandForm = PartyUtil.getHome().getGetCompanyForm();
9551
9552            commandForm.setCompanyName(companyName);
9553            commandForm.setPartyName(partyName);
9554            commandForm.setUuid(id);
9555
9556            company = CDI.current().select(GetCompanyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9557        } catch (NamingException ex) {
9558            throw new RuntimeException(ex);
9559        }
9560
9561        return company == null ? null : new CompanyObject(company);
9562    }
9563
9564    @GraphQLField
9565    @GraphQLName("companies")
9566    @GraphQLNonNull
9567    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9568    static CountingPaginatedData<CompanyObject> companies(final DataFetchingEnvironment env) {
9569        CountingPaginatedData<CompanyObject> data;
9570
9571        try {
9572            var commandForm = PartyUtil.getHome().getGetCompaniesForm();
9573            var command = CDI.current().select(GetCompaniesCommand.class).get();
9574
9575            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9576            if(totalEntities == null) {
9577                data = Connections.emptyConnection();
9578            } else {
9579                try(var objectLimiter = new ObjectLimiter(env, PartyCompanyConstants.COMPONENT_VENDOR_NAME, PartyCompanyConstants.ENTITY_TYPE_NAME, totalEntities)) {
9580                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9581
9582                    var companies = entities.stream()
9583                            .map(CompanyObject::new)
9584                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9585
9586                    data = new CountedObjects<>(objectLimiter, companies);
9587                }
9588            }
9589        } catch (NamingException ex) {
9590            throw new RuntimeException(ex);
9591        }
9592
9593        return data;
9594    }
9595
9596    @GraphQLField
9597    @GraphQLName("division")
9598    static DivisionObject division(final DataFetchingEnvironment env,
9599            @GraphQLName("companyName") final String companyName,
9600            @GraphQLName("divisionName") final String divisionName,
9601            @GraphQLName("partyName") final String partyName,
9602            @GraphQLName("id") @GraphQLID final String id) {
9603        PartyDivision division;
9604
9605        try {
9606            var commandForm = PartyUtil.getHome().getGetDivisionForm();
9607
9608            commandForm.setCompanyName(companyName);
9609            commandForm.setDivisionName(divisionName);
9610            commandForm.setPartyName(partyName);
9611            commandForm.setUuid(id);
9612
9613            division = CDI.current().select(GetDivisionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9614        } catch (NamingException ex) {
9615            throw new RuntimeException(ex);
9616        }
9617
9618        return division == null ? null : new DivisionObject(division);
9619    }
9620
9621    @GraphQLField
9622    @GraphQLName("divisions")
9623    @GraphQLNonNull
9624    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9625    static CountingPaginatedData<DivisionObject> divisions(final DataFetchingEnvironment env,
9626            @GraphQLName("companyName") @GraphQLNonNull final String companyName) {
9627        CountingPaginatedData<DivisionObject> data;
9628
9629        try {
9630            var commandForm = PartyUtil.getHome().getGetDivisionsForm();
9631            var command = CDI.current().select(GetDivisionsCommand.class).get();
9632
9633            commandForm.setCompanyName(companyName);
9634
9635            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9636            if(totalEntities == null) {
9637                data = Connections.emptyConnection();
9638            } else {
9639                try(var objectLimiter = new ObjectLimiter(env, PartyDivisionConstants.COMPONENT_VENDOR_NAME, PartyDivisionConstants.ENTITY_TYPE_NAME, totalEntities)) {
9640                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9641
9642                    var divisions = entities.stream()
9643                            .map(DivisionObject::new)
9644                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9645
9646                    data = new CountedObjects<>(objectLimiter, divisions);
9647                }
9648            }
9649        } catch (NamingException ex) {
9650            throw new RuntimeException(ex);
9651        }
9652
9653        return data;
9654    }
9655
9656    @GraphQLField
9657    @GraphQLName("department")
9658    static DepartmentObject department(final DataFetchingEnvironment env,
9659            @GraphQLName("companyName") final String companyName,
9660            @GraphQLName("divisionName") final String divisionName,
9661            @GraphQLName("departmentName") final String departmentName,
9662            @GraphQLName("partyName") final String partyName,
9663            @GraphQLName("id") @GraphQLID final String id) {
9664        PartyDepartment department;
9665
9666        try {
9667            var commandForm = PartyUtil.getHome().getGetDepartmentForm();
9668
9669            commandForm.setCompanyName(companyName);
9670            commandForm.setDivisionName(divisionName);
9671            commandForm.setDepartmentName(departmentName);
9672            commandForm.setPartyName(partyName);
9673            commandForm.setUuid(id);
9674
9675            department = CDI.current().select(GetDepartmentCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9676        } catch (NamingException ex) {
9677            throw new RuntimeException(ex);
9678        }
9679
9680        return department == null ? null : new DepartmentObject(department);
9681    }
9682
9683    @GraphQLField
9684    @GraphQLName("departments")
9685    @GraphQLNonNull
9686    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9687    static CountingPaginatedData<DepartmentObject> departments(final DataFetchingEnvironment env,
9688            @GraphQLName("companyName") @GraphQLNonNull final String companyName,
9689            @GraphQLName("divisionName") final String divisionName) {
9690        CountingPaginatedData<DepartmentObject> data;
9691
9692        try {
9693            var commandForm = PartyUtil.getHome().getGetDepartmentsForm();
9694            var command = CDI.current().select(GetDepartmentsCommand.class).get();
9695
9696            commandForm.setCompanyName(companyName);
9697            commandForm.setDivisionName(divisionName);
9698
9699            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9700            if(totalEntities == null) {
9701                data = Connections.emptyConnection();
9702            } else {
9703                try(var objectLimiter = new ObjectLimiter(env, PartyDepartmentConstants.COMPONENT_VENDOR_NAME, PartyDepartmentConstants.ENTITY_TYPE_NAME, totalEntities)) {
9704                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9705
9706                    var departments = entities.stream()
9707                            .map(DepartmentObject::new)
9708                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9709
9710                    data = new CountedObjects<>(objectLimiter, departments);
9711                }
9712            }
9713        } catch (NamingException ex) {
9714            throw new RuntimeException(ex);
9715        }
9716
9717        return data;
9718    }
9719
9720    @GraphQLField
9721    @GraphQLName("warehouseType")
9722    static WarehouseTypeObject warehouseType(final DataFetchingEnvironment env,
9723            @GraphQLName("warehouseTypeName") final String warehouseTypeName,
9724            @GraphQLName("id") @GraphQLID final String id) {
9725        WarehouseType warehouseType;
9726
9727        try {
9728            var commandForm = WarehouseUtil.getHome().getGetWarehouseTypeForm();
9729
9730            commandForm.setWarehouseTypeName(warehouseTypeName);
9731            commandForm.setUuid(id);
9732
9733            warehouseType = CDI.current().select(GetWarehouseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9734        } catch (NamingException ex) {
9735            throw new RuntimeException(ex);
9736        }
9737
9738        return warehouseType == null ? null : new WarehouseTypeObject(warehouseType);
9739    }
9740
9741    @GraphQLField
9742    @GraphQLName("warehouseTypes")
9743    @GraphQLNonNull
9744    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9745    static CountingPaginatedData<WarehouseTypeObject> warehouseTypes(final DataFetchingEnvironment env) {
9746        CountingPaginatedData<WarehouseTypeObject> data;
9747
9748        try {
9749            var commandForm = WarehouseUtil.getHome().getGetWarehouseTypesForm();
9750            var command = CDI.current().select(GetWarehouseTypesCommand.class).get();
9751
9752            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9753            if(totalEntities == null) {
9754                data = Connections.emptyConnection();
9755            } else {
9756                try(var objectLimiter = new ObjectLimiter(env, WarehouseTypeConstants.COMPONENT_VENDOR_NAME, WarehouseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9757                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9758
9759                    var warehouseTypes = entities.stream()
9760                            .map(WarehouseTypeObject::new)
9761                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9762
9763                    data = new CountedObjects<>(objectLimiter, warehouseTypes);
9764                }
9765            }
9766        } catch (NamingException ex) {
9767            throw new RuntimeException(ex);
9768        }
9769
9770        return data;
9771    }
9772
9773    @GraphQLField
9774    @GraphQLName("warehouse")
9775    static WarehouseObject warehouse(final DataFetchingEnvironment env,
9776            @GraphQLName("warehouseName") final String warehouseName,
9777            @GraphQLName("partyName") final String partyName,
9778            @GraphQLName("id") @GraphQLID final String id) {
9779        Warehouse warehouse;
9780
9781        try {
9782            var commandForm = WarehouseUtil.getHome().getGetWarehouseForm();
9783
9784            commandForm.setWarehouseName(warehouseName);
9785            commandForm.setPartyName(partyName);
9786            commandForm.setUuid(id);
9787
9788            warehouse = CDI.current().select(GetWarehouseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9789        } catch (NamingException ex) {
9790            throw new RuntimeException(ex);
9791        }
9792
9793        return warehouse == null ? null : new WarehouseObject(warehouse);
9794    }
9795
9796    @GraphQLField
9797    @GraphQLName("warehouses")
9798    @GraphQLNonNull
9799    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9800    static CountingPaginatedData<WarehouseObject> warehouses(final DataFetchingEnvironment env) {
9801        CountingPaginatedData<WarehouseObject> data;
9802
9803        try {
9804            var commandForm = WarehouseUtil.getHome().getGetWarehousesForm();
9805            var command = CDI.current().select(GetWarehousesCommand.class).get();
9806
9807            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9808            if(totalEntities == null) {
9809                data = Connections.emptyConnection();
9810            } else {
9811                try(var objectLimiter = new ObjectLimiter(env, WarehouseConstants.COMPONENT_VENDOR_NAME, WarehouseConstants.ENTITY_TYPE_NAME, totalEntities)) {
9812                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9813
9814                    var warehouses = entities.stream()
9815                            .map(WarehouseObject::new)
9816                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9817
9818                    data = new CountedObjects<>(objectLimiter, warehouses);
9819                }
9820            }
9821        } catch (NamingException ex) {
9822            throw new RuntimeException(ex);
9823        }
9824
9825        return data;
9826    }
9827
9828    @GraphQLField
9829    @GraphQLName("locationUseType")
9830    static LocationUseTypeObject locationUseType(final DataFetchingEnvironment env,
9831            @GraphQLName("locationUseTypeName") final String locationUseTypeName,
9832            @GraphQLName("id") @GraphQLID final String id) {
9833        LocationUseType locationUseType;
9834
9835        try {
9836            var commandForm = WarehouseUtil.getHome().getGetLocationUseTypeForm();
9837
9838            commandForm.setLocationUseTypeName(locationUseTypeName);
9839            commandForm.setUuid(id);
9840
9841            locationUseType = CDI.current().select(GetLocationUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9842        } catch (NamingException ex) {
9843            throw new RuntimeException(ex);
9844        }
9845
9846        return locationUseType == null ? null : new LocationUseTypeObject(locationUseType);
9847    }
9848
9849    @GraphQLField
9850    @GraphQLName("locationUseTypes")
9851    @GraphQLNonNull
9852    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9853    static CountingPaginatedData<LocationUseTypeObject> locationUseTypes(final DataFetchingEnvironment env) {
9854        CountingPaginatedData<LocationUseTypeObject> data;
9855
9856        try {
9857            var commandForm = WarehouseUtil.getHome().getGetLocationUseTypesForm();
9858            var command = CDI.current().select(GetLocationUseTypesCommand.class).get();
9859
9860            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9861            if(totalEntities == null) {
9862                data = Connections.emptyConnection();
9863            } else {
9864                try(var objectLimiter = new ObjectLimiter(env, LocationUseTypeConstants.COMPONENT_VENDOR_NAME, LocationUseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9865                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9866
9867                    var locationUseTypes = entities.stream()
9868                            .map(LocationUseTypeObject::new)
9869                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9870
9871                    data = new CountedObjects<>(objectLimiter, locationUseTypes);
9872                }
9873            }
9874        } catch (NamingException ex) {
9875            throw new RuntimeException(ex);
9876        }
9877
9878        return data;
9879    }
9880
9881    @GraphQLField
9882    @GraphQLName("inventoryLocation")
9883    static InventoryLocationObject inventoryLocation(final DataFetchingEnvironment env,
9884            @GraphQLName("partyName") final String partyName,
9885            @GraphQLName("warehouseName") final String warehouseName,
9886            @GraphQLName("locationName") @GraphQLNonNull final String locationName,
9887            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
9888        InventoryLocation inventoryLocation;
9889
9890        try {
9891            var commandForm = InventoryUtil.getHome().getGetInventoryLocationForm();
9892
9893            commandForm.setPartyName(partyName);
9894            commandForm.setWarehouseName(warehouseName);
9895            commandForm.setLocationName(locationName);
9896            commandForm.setItemName(itemName);
9897
9898            inventoryLocation = CDI.current().select(GetInventoryLocationCommand.class).get()
9899                    .getEntityForGraphQl(getUserVisitPK(env), commandForm);
9900        } catch (NamingException ex) {
9901            throw new RuntimeException(ex);
9902        }
9903
9904        return inventoryLocation == null ? null : new InventoryLocationObject(inventoryLocation);
9905    }
9906
9907    @GraphQLField
9908    @GraphQLName("inventoryLocations")
9909    @GraphQLNonNull
9910    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9911    static CountingPaginatedData<InventoryLocationObject> inventoryLocations(final DataFetchingEnvironment env,
9912            @GraphQLName("partyName") final String partyName,
9913            @GraphQLName("warehouseName") final String warehouseName,
9914            @GraphQLName("locationName") final String locationName,
9915            @GraphQLName("ownerPartyName") final String ownerPartyName,
9916            @GraphQLName("itemName") final String itemName,
9917            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName,
9918            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
9919            @GraphQLName("inventoryConditionName") final String inventoryConditionName) {
9920        CountingPaginatedData<InventoryLocationObject> data;
9921
9922        try {
9923            var commandForm = InventoryUtil.getHome().getGetInventoryLocationsForm();
9924            var command = CDI.current().select(GetInventoryLocationsCommand.class).get();
9925
9926            commandForm.setPartyName(partyName);
9927            commandForm.setWarehouseName(warehouseName);
9928            commandForm.setLocationName(locationName);
9929            commandForm.setOwnerPartyName(ownerPartyName);
9930            commandForm.setItemName(itemName);
9931            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
9932            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
9933            commandForm.setInventoryConditionName(inventoryConditionName);
9934
9935            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9936            if(totalEntities == null) {
9937                data = Connections.emptyConnection();
9938            } else {
9939                try(var objectLimiter = new ObjectLimiter(env, InventoryLocationConstants.COMPONENT_VENDOR_NAME,
9940                        InventoryLocationConstants.ENTITY_TYPE_NAME, totalEntities)) {
9941                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9942                    var inventoryLocations = entities.stream()
9943                            .map(InventoryLocationObject::new)
9944                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9945
9946                    data = new CountedObjects<>(objectLimiter, inventoryLocations);
9947                }
9948            }
9949        } catch (NamingException ex) {
9950            throw new RuntimeException(ex);
9951        }
9952
9953        return data;
9954    }
9955
9956    @GraphQLField
9957    @GraphQLName("inventoryLayerBucket")
9958    static InventoryLayerBucketObject inventoryLayerBucket(final DataFetchingEnvironment env,
9959            @GraphQLName("partyName") final String partyName,
9960            @GraphQLName("companyName") final String companyName,
9961            @GraphQLName("inventoryConditionName") @GraphQLNonNull final String inventoryConditionName,
9962            @GraphQLName("inventoryLayerSequence") @GraphQLNonNull final String inventoryLayerSequence,
9963            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
9964            @GraphQLName("inventoryBucketTypeName") @GraphQLNonNull final String inventoryBucketTypeName) {
9965        InventoryLayerBucket inventoryLayerBucket;
9966
9967        try {
9968            var commandForm = InventoryUtil.getHome().getGetInventoryLayerBucketForm();
9969
9970            commandForm.setPartyName(partyName);
9971            commandForm.setCompanyName(companyName);
9972            commandForm.setInventoryConditionName(inventoryConditionName);
9973            commandForm.setItemName(itemName);
9974            commandForm.setInventoryLayerSequence(inventoryLayerSequence);
9975            commandForm.setInventoryBucketTypeName(inventoryBucketTypeName);
9976
9977            inventoryLayerBucket = CDI.current().select(GetInventoryLayerBucketCommand.class).get()
9978                    .getEntityForGraphQl(getUserVisitPK(env), commandForm);
9979        } catch (NamingException ex) {
9980            throw new RuntimeException(ex);
9981        }
9982
9983        return inventoryLayerBucket == null ? null : new InventoryLayerBucketObject(inventoryLayerBucket);
9984    }
9985
9986    @GraphQLField
9987    @GraphQLName("inventoryLayerBuckets")
9988    @GraphQLNonNull
9989    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9990    static CountingPaginatedData<InventoryLayerBucketObject> inventoryLayerBuckets(final DataFetchingEnvironment env,
9991            @GraphQLName("partyName") final String partyName,
9992            @GraphQLName("companyName") final String companyName,
9993            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
9994            @GraphQLName("inventoryLayerSequence") final String inventoryLayerSequence,
9995            @GraphQLName("itemName") final String itemName,
9996            @GraphQLName("inventoryBucketTypeName") final String inventoryBucketTypeName) {
9997        CountingPaginatedData<InventoryLayerBucketObject> data;
9998
9999        try {
10000            var commandForm = InventoryUtil.getHome().getGetInventoryLayerBucketsForm();
10001            var command = CDI.current().select(GetInventoryLayerBucketsCommand.class).get();
10002
10003            commandForm.setPartyName(partyName);
10004            commandForm.setCompanyName(companyName);
10005            commandForm.setInventoryConditionName(inventoryConditionName);
10006            commandForm.setItemName(itemName);
10007            commandForm.setInventoryLayerSequence(inventoryLayerSequence);
10008            commandForm.setInventoryBucketTypeName(inventoryBucketTypeName);
10009
10010            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10011            if(totalEntities == null) {
10012                data = Connections.emptyConnection();
10013            } else {
10014                try(var objectLimiter = new ObjectLimiter(env, InventoryLayerBucketConstants.COMPONENT_VENDOR_NAME,
10015                        InventoryLayerBucketConstants.ENTITY_TYPE_NAME, totalEntities)) {
10016                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10017                    var inventoryLayerBuckets = entities.stream()
10018                            .map(InventoryLayerBucketObject::new)
10019                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10020
10021                    data = new CountedObjects<>(objectLimiter, inventoryLayerBuckets);
10022                }
10023            }
10024        } catch (NamingException ex) {
10025            throw new RuntimeException(ex);
10026        }
10027
10028        return data;
10029    }
10030
10031    @GraphQLField
10032    @GraphQLName("inventoryLocationBucket")
10033    static InventoryLocationBucketObject inventoryLocationBucket(final DataFetchingEnvironment env,
10034            @GraphQLName("partyName") final String partyName,
10035            @GraphQLName("warehouseName") final String warehouseName,
10036            @GraphQLName("locationName") @GraphQLNonNull final String locationName,
10037            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
10038            @GraphQLName("inventoryBucketTypeName") @GraphQLNonNull final String inventoryBucketTypeName) {
10039        InventoryLocationBucket inventoryLocationBucket;
10040
10041        try {
10042            var commandForm = InventoryUtil.getHome().getGetInventoryLocationBucketForm();
10043
10044            commandForm.setPartyName(partyName);
10045            commandForm.setWarehouseName(warehouseName);
10046            commandForm.setLocationName(locationName);
10047            commandForm.setItemName(itemName);
10048            commandForm.setInventoryBucketTypeName(inventoryBucketTypeName);
10049
10050            inventoryLocationBucket = CDI.current().select(GetInventoryLocationBucketCommand.class).get()
10051                    .getEntityForGraphQl(getUserVisitPK(env), commandForm);
10052        } catch (NamingException ex) {
10053            throw new RuntimeException(ex);
10054        }
10055
10056        return inventoryLocationBucket == null ? null : new InventoryLocationBucketObject(inventoryLocationBucket);
10057    }
10058
10059    @GraphQLField
10060    @GraphQLName("inventoryLocationBuckets")
10061    @GraphQLNonNull
10062    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10063    static CountingPaginatedData<InventoryLocationBucketObject> inventoryLocationBuckets(final DataFetchingEnvironment env,
10064            @GraphQLName("partyName") final String partyName,
10065            @GraphQLName("warehouseName") final String warehouseName,
10066            @GraphQLName("locationName") final String locationName,
10067            @GraphQLName("itemName") final String itemName,
10068            @GraphQLName("inventoryBucketTypeName") final String inventoryBucketTypeName) {
10069        CountingPaginatedData<InventoryLocationBucketObject> data;
10070
10071        try {
10072            var commandForm = InventoryUtil.getHome().getGetInventoryLocationBucketsForm();
10073            var command = CDI.current().select(GetInventoryLocationBucketsCommand.class).get();
10074
10075            commandForm.setPartyName(partyName);
10076            commandForm.setWarehouseName(warehouseName);
10077            commandForm.setLocationName(locationName);
10078            commandForm.setItemName(itemName);
10079            commandForm.setInventoryBucketTypeName(inventoryBucketTypeName);
10080
10081            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10082            if(totalEntities == null) {
10083                data = Connections.emptyConnection();
10084            } else {
10085                try(var objectLimiter = new ObjectLimiter(env, InventoryLocationBucketConstants.COMPONENT_VENDOR_NAME,
10086                        InventoryLocationBucketConstants.ENTITY_TYPE_NAME, totalEntities)) {
10087                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10088                    var inventoryLocationBuckets = entities.stream()
10089                            .map(InventoryLocationBucketObject::new)
10090                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10091
10092                    data = new CountedObjects<>(objectLimiter, inventoryLocationBuckets);
10093                }
10094            }
10095        } catch (NamingException ex) {
10096            throw new RuntimeException(ex);
10097        }
10098
10099        return data;
10100    }
10101
10102    @GraphQLField
10103    @GraphQLName("inventoryLocationGroup")
10104    static InventoryLocationGroupObject inventoryLocationGroup(final DataFetchingEnvironment env,
10105            @GraphQLName("warehouseName") final String warehouseName,
10106            @GraphQLName("inventoryLocationGroupName") final String inventoryLocationGroupName) {
10107        InventoryLocationGroup inventoryLocationGroup;
10108
10109        try {
10110            var commandForm = InventoryUtil.getHome().getGetInventoryLocationGroupForm();
10111
10112            commandForm.setWarehouseName(warehouseName);
10113            commandForm.setInventoryLocationGroupName(inventoryLocationGroupName);
10114
10115            inventoryLocationGroup = CDI.current().select(GetInventoryLocationGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10116        } catch (NamingException ex) {
10117            throw new RuntimeException(ex);
10118        }
10119
10120        return inventoryLocationGroup == null ? null : new InventoryLocationGroupObject(inventoryLocationGroup);
10121    }
10122
10123    @GraphQLField
10124    @GraphQLName("inventoryLocationGroups")
10125    @GraphQLNonNull
10126    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10127    static CountingPaginatedData<InventoryLocationGroupObject> inventoryLocationGroups(final DataFetchingEnvironment env,
10128            @GraphQLName("warehouseName") final String warehouseName) {
10129        CountingPaginatedData<InventoryLocationGroupObject> data;
10130
10131        try {
10132            var commandForm = InventoryUtil.getHome().getGetInventoryLocationGroupsForm();
10133            var command = CDI.current().select(GetInventoryLocationGroupsCommand.class).get();
10134
10135            commandForm.setWarehouseName(warehouseName);
10136
10137            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10138            if(totalEntities == null) {
10139                data = Connections.emptyConnection();
10140            } else {
10141                try(var objectLimiter = new ObjectLimiter(env, InventoryLocationGroupConstants.COMPONENT_VENDOR_NAME, InventoryLocationGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
10142                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10143
10144                    var inventoryLocationGroups = entities.stream()
10145                            .map(InventoryLocationGroupObject::new)
10146                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10147
10148                    data = new CountedObjects<>(objectLimiter, inventoryLocationGroups);
10149                }
10150            }
10151        } catch (NamingException ex) {
10152            throw new RuntimeException(ex);
10153        }
10154
10155        return data;
10156    }
10157
10158    @GraphQLField
10159    @GraphQLName("locationType")
10160    static LocationTypeObject locationType(final DataFetchingEnvironment env,
10161            @GraphQLName("warehouseName") final String warehouseName,
10162            @GraphQLName("locationTypeName") final String locationTypeName) {
10163        LocationType locationType;
10164
10165        try {
10166            var commandForm = WarehouseUtil.getHome().getGetLocationTypeForm();
10167
10168            commandForm.setWarehouseName(warehouseName);
10169            commandForm.setLocationTypeName(locationTypeName);
10170
10171            locationType = CDI.current().select(GetLocationTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10172        } catch (NamingException ex) {
10173            throw new RuntimeException(ex);
10174        }
10175
10176        return locationType == null ? null : new LocationTypeObject(locationType);
10177    }
10178
10179    @GraphQLField
10180    @GraphQLName("locationTypes")
10181    @GraphQLNonNull
10182    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10183    static CountingPaginatedData<LocationTypeObject> locationTypes(final DataFetchingEnvironment env,
10184            @GraphQLName("warehouseName") final String warehouseName) {
10185        CountingPaginatedData<LocationTypeObject> data;
10186
10187        try {
10188            var commandForm = WarehouseUtil.getHome().getGetLocationTypesForm();
10189            var command = CDI.current().select(GetLocationTypesCommand.class).get();
10190
10191            commandForm.setWarehouseName(warehouseName);
10192
10193            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10194            if(totalEntities == null) {
10195                data = Connections.emptyConnection();
10196            } else {
10197                try(var objectLimiter = new ObjectLimiter(env, LocationTypeConstants.COMPONENT_VENDOR_NAME, LocationTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10198                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10199
10200                    var locationTypes = entities.stream()
10201                            .map(LocationTypeObject::new)
10202                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10203
10204                    data = new CountedObjects<>(objectLimiter, locationTypes);
10205                }
10206            }
10207        } catch (NamingException ex) {
10208            throw new RuntimeException(ex);
10209        }
10210
10211        return data;
10212    }
10213
10214    @GraphQLField
10215    @GraphQLName("locationNameElement")
10216    static LocationNameElementObject locationNameElement(final DataFetchingEnvironment env,
10217            @GraphQLName("warehouseName") final String warehouseName,
10218            @GraphQLName("locationTypeName") final String locationTypeName,
10219            @GraphQLName("locationNameElementName") final String locationNameElementName) {
10220        LocationNameElement locationNameElement;
10221
10222        try {
10223            var commandForm = WarehouseUtil.getHome().getGetLocationNameElementForm();
10224
10225            commandForm.setWarehouseName(warehouseName);
10226            commandForm.setLocationTypeName(locationTypeName);
10227            commandForm.setLocationNameElementName(locationNameElementName);
10228
10229            locationNameElement = CDI.current().select(GetLocationNameElementCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10230        } catch (NamingException ex) {
10231            throw new RuntimeException(ex);
10232        }
10233
10234        return locationNameElement == null ? null : new LocationNameElementObject(locationNameElement);
10235    }
10236
10237    @GraphQLField
10238    @GraphQLName("locationNameElements")
10239    @GraphQLNonNull
10240    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10241    static CountingPaginatedData<LocationNameElementObject> locationNameElements(final DataFetchingEnvironment env,
10242            @GraphQLName("warehouseName") final String warehouseName,
10243            @GraphQLName("locationTypeName") final String locationTypeName) {
10244        CountingPaginatedData<LocationNameElementObject> data;
10245
10246        try {
10247            var commandForm = WarehouseUtil.getHome().getGetLocationNameElementsForm();
10248            var command = CDI.current().select(GetLocationNameElementsCommand.class).get();
10249
10250            commandForm.setWarehouseName(warehouseName);
10251            commandForm.setLocationTypeName(locationTypeName);
10252
10253            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10254            if(totalEntities == null) {
10255                data = Connections.emptyConnection();
10256            } else {
10257                try(var objectLimiter = new ObjectLimiter(env, LocationNameElementConstants.COMPONENT_VENDOR_NAME, LocationNameElementConstants.ENTITY_TYPE_NAME, totalEntities)) {
10258                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10259
10260                    var locationNameElements = entities.stream()
10261                            .map(LocationNameElementObject::new)
10262                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10263
10264                    data = new CountedObjects<>(objectLimiter, locationNameElements);
10265                }
10266            }
10267        } catch (NamingException ex) {
10268            throw new RuntimeException(ex);
10269        }
10270
10271        return data;
10272    }
10273
10274    @GraphQLField
10275    @GraphQLName("location")
10276    static LocationObject location(final DataFetchingEnvironment env,
10277            @GraphQLName("warehouseName") final String warehouseName,
10278            @GraphQLName("locationName") final String locationName) {
10279        Location location;
10280
10281        try {
10282            var commandForm = WarehouseUtil.getHome().getGetLocationForm();
10283
10284            commandForm.setWarehouseName(warehouseName);
10285            commandForm.setLocationName(locationName);
10286
10287            location = CDI.current().select(GetLocationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10288        } catch (NamingException ex) {
10289            throw new RuntimeException(ex);
10290        }
10291
10292        return location == null ? null : new LocationObject(location);
10293    }
10294
10295    @GraphQLField
10296    @GraphQLName("locations")
10297    @GraphQLNonNull
10298    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10299    static CountingPaginatedData<LocationObject> locations(final DataFetchingEnvironment env,
10300            @GraphQLName("warehouseName") final String warehouseName) {
10301        CountingPaginatedData<LocationObject> data;
10302
10303        try {
10304            var commandForm = WarehouseUtil.getHome().getGetLocationsForm();
10305            var command = CDI.current().select(GetLocationsCommand.class).get();
10306
10307            commandForm.setWarehouseName(warehouseName);
10308
10309            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10310            if(totalEntities == null) {
10311                data = Connections.emptyConnection();
10312            } else {
10313                try(var objectLimiter = new ObjectLimiter(env, LocationConstants.COMPONENT_VENDOR_NAME, LocationConstants.ENTITY_TYPE_NAME, totalEntities)) {
10314                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10315
10316                    var locations = entities.stream()
10317                            .map(LocationObject::new)
10318                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10319
10320                    data = new CountedObjects<>(objectLimiter, locations);
10321                }
10322            }
10323        } catch (NamingException ex) {
10324            throw new RuntimeException(ex);
10325        }
10326
10327        return data;
10328    }
10329
10330    @GraphQLField
10331    @GraphQLName("cancellationKind")
10332    static CancellationKindObject cancellationKind(final DataFetchingEnvironment env,
10333            @GraphQLName("cancellationKindName") final String cancellationKindName,
10334            @GraphQLName("id") @GraphQLID final String id) {
10335        CancellationKind cancellationKind;
10336
10337        try {
10338            var commandForm = CancellationPolicyUtil.getHome().getGetCancellationKindForm();
10339
10340            commandForm.setCancellationKindName(cancellationKindName);
10341            commandForm.setUuid(id);
10342
10343            cancellationKind = CDI.current().select(GetCancellationKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10344        } catch (NamingException ex) {
10345            throw new RuntimeException(ex);
10346        }
10347
10348        return cancellationKind == null ? null : new CancellationKindObject(cancellationKind);
10349    }
10350
10351    @GraphQLField
10352    @GraphQLName("cancellationKinds")
10353    @GraphQLNonNull
10354    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10355    static CountingPaginatedData<CancellationKindObject> cancellationKinds(final DataFetchingEnvironment env) {
10356        CountingPaginatedData<CancellationKindObject> data;
10357
10358        try {
10359            var commandForm = CancellationPolicyUtil.getHome().getGetCancellationKindsForm();
10360            var command = CDI.current().select(GetCancellationKindsCommand.class).get();
10361
10362            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10363            if(totalEntities == null) {
10364                data = Connections.emptyConnection();
10365            } else {
10366                try(var objectLimiter = new ObjectLimiter(env, CancellationKindConstants.COMPONENT_VENDOR_NAME, CancellationKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
10367                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10368
10369                    var cancellationKinds = entities.stream()
10370                            .map(CancellationKindObject::new)
10371                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10372
10373                    data = new CountedObjects<>(objectLimiter, cancellationKinds);
10374                }
10375            }
10376        } catch (NamingException ex) {
10377            throw new RuntimeException(ex);
10378        }
10379
10380        return data;
10381    }
10382
10383    @GraphQLField
10384    @GraphQLName("cancellationPolicy")
10385    static CancellationPolicyObject cancellationPolicy(final DataFetchingEnvironment env,
10386            @GraphQLName("cancellationKindName") final String cancellationKindName,
10387            @GraphQLName("cancellationPolicyName") final String cancellationPolicyName,
10388            @GraphQLName("id") @GraphQLID final String id) {
10389        CancellationPolicy cancellationPolicy;
10390
10391        try {
10392            var commandForm = CancellationPolicyUtil.getHome().getGetCancellationPolicyForm();
10393
10394            commandForm.setCancellationKindName(cancellationKindName);
10395            commandForm.setCancellationPolicyName(cancellationPolicyName);
10396            commandForm.setUuid(id);
10397
10398            cancellationPolicy = CDI.current().select(GetCancellationPolicyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10399        } catch (NamingException ex) {
10400            throw new RuntimeException(ex);
10401        }
10402
10403        return cancellationPolicy == null ? null : new CancellationPolicyObject(cancellationPolicy);
10404    }
10405
10406    @GraphQLField
10407    @GraphQLName("cancellationPolicies")
10408    @GraphQLNonNull
10409    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10410    static CountingPaginatedData<CancellationPolicyObject> cancellationPolicies(final DataFetchingEnvironment env,
10411            @GraphQLName("cancellationKindName") final String cancellationKindName) {
10412        CountingPaginatedData<CancellationPolicyObject> data;
10413
10414        try {
10415            var commandForm = CancellationPolicyUtil.getHome().getGetCancellationPoliciesForm();
10416            var command = CDI.current().select(GetCancellationPoliciesCommand.class).get();
10417
10418            commandForm.setCancellationKindName(cancellationKindName);
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, CancellationPolicyConstants.COMPONENT_VENDOR_NAME, CancellationPolicyConstants.ENTITY_TYPE_NAME, totalEntities)) {
10425                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10426
10427                    var cancellationPolicies = entities.stream()
10428                            .map(CancellationPolicyObject::new)
10429                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10430
10431                    data = new CountedObjects<>(objectLimiter, cancellationPolicies);
10432                }
10433            }
10434        } catch (NamingException ex) {
10435            throw new RuntimeException(ex);
10436        }
10437
10438        return data;
10439    }
10440
10441    @GraphQLField
10442    @GraphQLName("returnKind")
10443    static ReturnKindObject returnKind(final DataFetchingEnvironment env,
10444            @GraphQLName("returnKindName") final String returnKindName,
10445            @GraphQLName("id") @GraphQLID final String id) {
10446        ReturnKind returnKind;
10447
10448        try {
10449            var commandForm = ReturnPolicyUtil.getHome().getGetReturnKindForm();
10450
10451            commandForm.setReturnKindName(returnKindName);
10452            commandForm.setUuid(id);
10453
10454            returnKind = CDI.current().select(GetReturnKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10455        } catch (NamingException ex) {
10456            throw new RuntimeException(ex);
10457        }
10458
10459        return returnKind == null ? null : new ReturnKindObject(returnKind);
10460    }
10461
10462    @GraphQLField
10463    @GraphQLName("returnKinds")
10464    @GraphQLNonNull
10465    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10466    static CountingPaginatedData<ReturnKindObject> returnKinds(final DataFetchingEnvironment env) {
10467        CountingPaginatedData<ReturnKindObject> data;
10468
10469        try {
10470            var commandForm = ReturnPolicyUtil.getHome().getGetReturnKindsForm();
10471            var command = CDI.current().select(GetReturnKindsCommand.class).get();
10472
10473            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10474            if(totalEntities == null) {
10475                data = Connections.emptyConnection();
10476            } else {
10477                try(var objectLimiter = new ObjectLimiter(env, ReturnKindConstants.COMPONENT_VENDOR_NAME, ReturnKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
10478                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10479
10480                    var returnKinds = entities.stream()
10481                            .map(ReturnKindObject::new)
10482                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10483
10484                    data = new CountedObjects<>(objectLimiter, returnKinds);
10485                }
10486            }
10487        } catch (NamingException ex) {
10488            throw new RuntimeException(ex);
10489        }
10490
10491        return data;
10492    }
10493
10494    @GraphQLField
10495    @GraphQLName("returnPolicy")
10496    static ReturnPolicyObject returnPolicy(final DataFetchingEnvironment env,
10497            @GraphQLName("returnKindName") final String returnKindName,
10498            @GraphQLName("returnPolicyName") final String returnPolicyName,
10499            @GraphQLName("id") @GraphQLID final String id) {
10500        ReturnPolicy returnPolicy;
10501
10502        try {
10503            var commandForm = ReturnPolicyUtil.getHome().getGetReturnPolicyForm();
10504
10505            commandForm.setReturnKindName(returnKindName);
10506            commandForm.setReturnPolicyName(returnPolicyName);
10507            commandForm.setUuid(id);
10508
10509            returnPolicy = CDI.current().select(GetReturnPolicyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10510        } catch (NamingException ex) {
10511            throw new RuntimeException(ex);
10512        }
10513
10514        return returnPolicy == null ? null : new ReturnPolicyObject(returnPolicy);
10515    }
10516
10517    @GraphQLField
10518    @GraphQLName("returnPolicies")
10519    @GraphQLNonNull
10520    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10521    static CountingPaginatedData<ReturnPolicyObject> returnPolicies(final DataFetchingEnvironment env,
10522            @GraphQLName("returnKindName") final String returnKindName) {
10523        CountingPaginatedData<ReturnPolicyObject> data;
10524
10525        try {
10526            var commandForm = ReturnPolicyUtil.getHome().getGetReturnPoliciesForm();
10527            var command = CDI.current().select(GetReturnPoliciesCommand.class).get();
10528
10529            commandForm.setReturnKindName(returnKindName);
10530
10531            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10532            if(totalEntities == null) {
10533                data = Connections.emptyConnection();
10534            } else {
10535                try(var objectLimiter = new ObjectLimiter(env, ReturnPolicyConstants.COMPONENT_VENDOR_NAME, ReturnPolicyConstants.ENTITY_TYPE_NAME, totalEntities)) {
10536                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10537
10538                    var returnPolicies = entities.stream()
10539                            .map(ReturnPolicyObject::new)
10540                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10541
10542                    data = new CountedObjects<>(objectLimiter, returnPolicies);
10543                }
10544            }
10545        } catch(NamingException ex) {
10546            throw new RuntimeException(ex);
10547        }
10548
10549        return data;
10550    }
10551
10552    @GraphQLField
10553    @GraphQLName("item")
10554    static ItemObject item(final DataFetchingEnvironment env,
10555            @GraphQLName("itemName") final String itemName,
10556            @GraphQLName("itemNameOrAlias") final String itemNameOrAlias,
10557            @GraphQLName("id") @GraphQLID final String id) {
10558        Item item;
10559
10560        try {
10561            var commandForm = ItemUtil.getHome().getGetItemForm();
10562
10563            commandForm.setItemName(itemName);
10564            commandForm.setItemNameOrAlias(itemNameOrAlias);
10565            commandForm.setUuid(id);
10566
10567            item = CDI.current().select(GetItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10568        } catch (NamingException ex) {
10569            throw new RuntimeException(ex);
10570        }
10571
10572        return item == null ? null : new ItemObject(item);
10573    }
10574
10575    @GraphQLField
10576    @GraphQLName("items")
10577    @GraphQLNonNull
10578    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10579    static CountingPaginatedData<ItemObject> items(final DataFetchingEnvironment env) {
10580        CountingPaginatedData<ItemObject> data;
10581
10582        try {
10583            var commandForm = ItemUtil.getHome().getGetItemsForm();
10584            var command = CDI.current().select(GetItemsCommand.class).get();
10585
10586            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10587            if(totalEntities == null) {
10588                data = Connections.emptyConnection();
10589            } else {
10590                try(var objectLimiter = new ObjectLimiter(env, ItemConstants.COMPONENT_VENDOR_NAME, ItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
10591                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10592
10593                    var items = entities.stream()
10594                            .map(ItemObject::new)
10595                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10596
10597                    data = new CountedObjects<>(objectLimiter, items);
10598                }
10599            }
10600        } catch (NamingException ex) {
10601            throw new RuntimeException(ex);
10602        }
10603
10604        return data;
10605    }
10606
10607    @GraphQLField
10608    @GraphQLName("itemUnitOfMeasureType")
10609    static ItemUnitOfMeasureTypeObject itemUnitOfMeasureType(final DataFetchingEnvironment env,
10610            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
10611            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName) {
10612        ItemUnitOfMeasureType itemUnitOfMeasureType;
10613
10614        try {
10615            var commandForm = ItemUtil.getHome().getGetItemUnitOfMeasureTypeForm();
10616
10617            commandForm.setItemName(itemName);
10618            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
10619
10620            itemUnitOfMeasureType = CDI.current().select(GetItemUnitOfMeasureTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10621        } catch (NamingException ex) {
10622            throw new RuntimeException(ex);
10623        }
10624
10625        return itemUnitOfMeasureType == null ? null : new ItemUnitOfMeasureTypeObject(itemUnitOfMeasureType);
10626    }
10627
10628    @GraphQLField
10629    @GraphQLName("itemUnitOfMeasureTypes")
10630    @GraphQLNonNull
10631    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10632    static CountingPaginatedData<ItemUnitOfMeasureTypeObject> itemUnitOfMeasureTypes(final DataFetchingEnvironment env,
10633            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
10634        CountingPaginatedData<ItemUnitOfMeasureTypeObject> data;
10635
10636        try {
10637            var commandForm = ItemUtil.getHome().getGetItemUnitOfMeasureTypesForm();
10638            var command = CDI.current().select(GetItemUnitOfMeasureTypesCommand.class).get();
10639
10640            commandForm.setItemName(itemName);
10641
10642            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10643            if(totalEntities == null) {
10644                data = Connections.emptyConnection();
10645            } else {
10646                try(var objectLimiter = new ObjectLimiter(env, ItemUnitOfMeasureTypeConstants.COMPONENT_VENDOR_NAME, ItemUnitOfMeasureTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10647                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10648
10649                    var itemUnitOfMeasureTypeObjects = entities.stream()
10650                            .map(ItemUnitOfMeasureTypeObject::new)
10651                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10652
10653                    data = new CountedObjects<>(objectLimiter, itemUnitOfMeasureTypeObjects);
10654                }
10655            }
10656        } catch (NamingException ex) {
10657            throw new RuntimeException(ex);
10658        }
10659
10660        return data;
10661    }
10662
10663
10664    @GraphQLField
10665    @GraphQLName("itemDescription")
10666    static ItemDescriptionObject itemDescription(final DataFetchingEnvironment env,
10667            @GraphQLName("itemDescriptionTypeName") final String itemDescriptionTypeName,
10668            @GraphQLName("itemName") final String itemName,
10669            @GraphQLName("languageIsoName") final String languageIsoName,
10670            @GraphQLName("id") @GraphQLID final String id,
10671            @GraphQLName("referrer") final String referrer) {
10672        ItemDescription itemDescription;
10673
10674        try {
10675            var commandForm = ItemUtil.getHome().getGetItemDescriptionForm();
10676
10677            commandForm.setItemDescriptionTypeName(itemDescriptionTypeName);
10678            commandForm.setItemName(itemName);
10679            commandForm.setLanguageIsoName(languageIsoName);
10680            commandForm.setUuid(id);
10681            commandForm.setReferrer(referrer);
10682
10683            itemDescription = CDI.current().select(GetItemDescriptionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10684        } catch (NamingException ex) {
10685            throw new RuntimeException(ex);
10686        }
10687
10688        return itemDescription == null ? null : new ItemDescriptionObject(itemDescription);
10689    }
10690
10691    @GraphQLField
10692    @GraphQLName("itemDescriptions")
10693    @GraphQLNonNull
10694    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10695    static CountingPaginatedData<ItemDescriptionObject> itemDescriptions(final DataFetchingEnvironment env,
10696            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
10697            @GraphQLName("itemDescriptionTypeUseTypeName") final String itemDescriptionTypeUseTypeName,
10698            @GraphQLName("languageIsoName") final String languageIsoName) {
10699        CountingPaginatedData<ItemDescriptionObject> data;
10700
10701        try {
10702            var commandForm = ItemUtil.getHome().getGetItemDescriptionsForm();
10703            var command = CDI.current().select(GetItemDescriptionsCommand.class).get();
10704
10705            commandForm.setItemName(itemName);
10706            commandForm.setItemDescriptionTypeUseTypeName(itemDescriptionTypeUseTypeName);
10707            commandForm.setLanguageIsoName(languageIsoName);
10708
10709            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10710            if(totalEntities == null) {
10711                data = Connections.emptyConnection();
10712            } else {
10713                try(var objectLimiter = new ObjectLimiter(env, ItemDescriptionConstants.COMPONENT_VENDOR_NAME, ItemDescriptionConstants.ENTITY_TYPE_NAME, totalEntities)) {
10714                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10715                    var limitOffset = objectLimiter.getLimitOffset();
10716                    var limitCount = objectLimiter.getLimitCount();
10717
10718                    Collection<ItemDescription> limitedEntities;
10719                    if(itemDescriptionTypeUseTypeName != null) {
10720                        // A Limit must be manually applied.
10721                        limitedEntities = entities.stream()
10722                                .skip(limitOffset)
10723                                .limit(limitCount)
10724                                .toList();
10725                    } else {
10726                        // A Limit was applied in the SQL Query.
10727                        limitedEntities = entities;
10728                    }
10729
10730                    var itemDescriptions = limitedEntities.stream()
10731                            .skip(limitOffset)
10732                            .limit(limitCount)
10733                            .map(ItemDescriptionObject::new)
10734                            .collect(Collectors.toCollection(() -> new ArrayList<>(limitedEntities.size())));
10735
10736                    data = new CountedObjects<>(objectLimiter, itemDescriptions);
10737                }
10738            }
10739        } catch (NamingException ex) {
10740            throw new RuntimeException(ex);
10741        }
10742
10743        return data;
10744    }
10745
10746    @GraphQLField
10747    @GraphQLName("itemType")
10748    static ItemTypeObject itemType(final DataFetchingEnvironment env,
10749            @GraphQLName("itemTypeName") final String itemTypeName,
10750            @GraphQLName("id") @GraphQLID final String id) {
10751        ItemType itemType;
10752
10753        try {
10754            var commandForm = ItemUtil.getHome().getGetItemTypeForm();
10755
10756            commandForm.setItemTypeName(itemTypeName);
10757            commandForm.setUuid(id);
10758
10759            itemType = CDI.current().select(GetItemTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10760        } catch (NamingException ex) {
10761            throw new RuntimeException(ex);
10762        }
10763
10764        return itemType == null ? null : new ItemTypeObject(itemType);
10765    }
10766
10767    @GraphQLField
10768    @GraphQLName("itemTypes")
10769    @GraphQLNonNull
10770    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10771    static CountingPaginatedData<ItemTypeObject> itemTypes(final DataFetchingEnvironment env) {
10772        CountingPaginatedData<ItemTypeObject> data;
10773
10774        try {
10775            var commandForm = ItemUtil.getHome().getGetItemTypesForm();
10776            var command = CDI.current().select(GetItemTypesCommand.class).get();
10777
10778            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10779            if(totalEntities == null) {
10780                data = Connections.emptyConnection();
10781            } else {
10782                try(var objectLimiter = new ObjectLimiter(env, ItemTypeConstants.COMPONENT_VENDOR_NAME, ItemTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10783                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10784
10785                    var itemTypes = entities.stream()
10786                            .map(ItemTypeObject::new)
10787                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10788
10789                    data = new CountedObjects<>(objectLimiter, itemTypes);
10790                }
10791            }
10792        } catch (NamingException ex) {
10793            throw new RuntimeException(ex);
10794        }
10795
10796        return data;
10797    }
10798
10799    @GraphQLField
10800    @GraphQLName("itemUseType")
10801    static ItemUseTypeObject itemUseType(final DataFetchingEnvironment env,
10802            @GraphQLName("itemUseTypeName") final String itemUseTypeName,
10803            @GraphQLName("id") @GraphQLID final String id) {
10804        ItemUseType itemUseType;
10805
10806        try {
10807            var commandForm = ItemUtil.getHome().getGetItemUseTypeForm();
10808
10809            commandForm.setItemUseTypeName(itemUseTypeName);
10810            commandForm.setUuid(id);
10811
10812            itemUseType = CDI.current().select(GetItemUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10813        } catch (NamingException ex) {
10814            throw new RuntimeException(ex);
10815        }
10816
10817        return itemUseType == null ? null : new ItemUseTypeObject(itemUseType);
10818    }
10819
10820    @GraphQLField
10821    @GraphQLName("itemUseTypes")
10822    @GraphQLNonNull
10823    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10824    static CountingPaginatedData<ItemUseTypeObject> itemUseTypes(final DataFetchingEnvironment env) {
10825        CountingPaginatedData<ItemUseTypeObject> data;
10826
10827        try {
10828            var commandForm = ItemUtil.getHome().getGetItemUseTypesForm();
10829            var command = CDI.current().select(GetItemUseTypesCommand.class).get();
10830
10831            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10832            if(totalEntities == null) {
10833                data = Connections.emptyConnection();
10834            } else {
10835                try(var objectLimiter = new ObjectLimiter(env, ItemUseTypeConstants.COMPONENT_VENDOR_NAME, ItemUseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10836                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10837
10838                    var itemUseTypes = entities.stream()
10839                            .map(ItemUseTypeObject::new)
10840                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10841
10842                    data = new CountedObjects<>(objectLimiter, itemUseTypes);
10843                }
10844            }
10845        } catch (NamingException ex) {
10846            throw new RuntimeException(ex);
10847        }
10848
10849        return data;
10850    }
10851
10852    @GraphQLField
10853    @GraphQLName("itemPriceType")
10854    static ItemPriceTypeObject itemPriceType(final DataFetchingEnvironment env,
10855            @GraphQLName("itemPriceTypeName") final String itemPriceTypeName,
10856            @GraphQLName("id") @GraphQLID final String id) {
10857        ItemPriceType itemPriceType;
10858
10859        try {
10860            var commandForm = ItemUtil.getHome().getGetItemPriceTypeForm();
10861
10862            commandForm.setItemPriceTypeName(itemPriceTypeName);
10863            commandForm.setUuid(id);
10864
10865            itemPriceType = CDI.current().select(GetItemPriceTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10866        } catch (NamingException ex) {
10867            throw new RuntimeException(ex);
10868        }
10869
10870        return itemPriceType == null ? null : new ItemPriceTypeObject(itemPriceType);
10871    }
10872
10873    @GraphQLField
10874    @GraphQLName("itemPriceTypes")
10875    @GraphQLNonNull
10876    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10877    static CountingPaginatedData<ItemPriceTypeObject> itemPriceTypes(final DataFetchingEnvironment env) {
10878        CountingPaginatedData<ItemPriceTypeObject> data;
10879
10880        try {
10881            var commandForm = ItemUtil.getHome().getGetItemPriceTypesForm();
10882            var command = CDI.current().select(GetItemPriceTypesCommand.class).get();
10883
10884            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10885            if(totalEntities == null) {
10886                data = Connections.emptyConnection();
10887            } else {
10888                try(var objectLimiter = new ObjectLimiter(env, ItemPriceTypeConstants.COMPONENT_VENDOR_NAME, ItemPriceTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10889                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10890
10891                    var itemPriceTypes = entities.stream()
10892                            .map(ItemPriceTypeObject::new)
10893                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10894
10895                    data = new CountedObjects<>(objectLimiter, itemPriceTypes);
10896                }
10897            }
10898        } catch (NamingException ex) {
10899            throw new RuntimeException(ex);
10900        }
10901
10902        return data;
10903    }
10904
10905    @GraphQLField
10906    @GraphQLName("itemDeliveryType")
10907    static ItemDeliveryTypeObject itemDeliveryType(final DataFetchingEnvironment env,
10908            @GraphQLName("itemDeliveryTypeName") final String itemDeliveryTypeName,
10909            @GraphQLName("id") @GraphQLID final String id) {
10910        ItemDeliveryType itemDeliveryType;
10911
10912        try {
10913            var commandForm = ItemUtil.getHome().getGetItemDeliveryTypeForm();
10914
10915            commandForm.setItemDeliveryTypeName(itemDeliveryTypeName);
10916            commandForm.setUuid(id);
10917
10918            itemDeliveryType = CDI.current().select(GetItemDeliveryTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10919        } catch (NamingException ex) {
10920            throw new RuntimeException(ex);
10921        }
10922
10923        return itemDeliveryType == null ? null : new ItemDeliveryTypeObject(itemDeliveryType);
10924    }
10925
10926    @GraphQLField
10927    @GraphQLName("itemDeliveryTypes")
10928    @GraphQLNonNull
10929    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10930    static CountingPaginatedData<ItemDeliveryTypeObject> itemDeliveryTypes(final DataFetchingEnvironment env) {
10931        CountingPaginatedData<ItemDeliveryTypeObject> data;
10932
10933        try {
10934            var commandForm = ItemUtil.getHome().getGetItemDeliveryTypesForm();
10935            var command = CDI.current().select(GetItemDeliveryTypesCommand.class).get();
10936
10937            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10938            if(totalEntities == null) {
10939                data = Connections.emptyConnection();
10940            } else {
10941                try(var objectLimiter = new ObjectLimiter(env, ItemDeliveryTypeConstants.COMPONENT_VENDOR_NAME, ItemDeliveryTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10942                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10943
10944                    var itemDeliveryTypes = entities.stream()
10945                            .map(ItemDeliveryTypeObject::new)
10946                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10947
10948                    data = new CountedObjects<>(objectLimiter, itemDeliveryTypes);
10949                }
10950            }
10951        } catch (NamingException ex) {
10952            throw new RuntimeException(ex);
10953        }
10954
10955        return data;
10956    }
10957
10958    @GraphQLField
10959    @GraphQLName("itemInventoryType")
10960    static ItemInventoryTypeObject itemInventoryType(final DataFetchingEnvironment env,
10961            @GraphQLName("itemInventoryTypeName") final String itemInventoryTypeName,
10962            @GraphQLName("id") @GraphQLID final String id) {
10963        ItemInventoryType itemInventoryType;
10964
10965        try {
10966            var commandForm = ItemUtil.getHome().getGetItemInventoryTypeForm();
10967
10968            commandForm.setItemInventoryTypeName(itemInventoryTypeName);
10969            commandForm.setUuid(id);
10970
10971            itemInventoryType = CDI.current().select(GetItemInventoryTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10972        } catch (NamingException ex) {
10973            throw new RuntimeException(ex);
10974        }
10975
10976        return itemInventoryType == null ? null : new ItemInventoryTypeObject(itemInventoryType);
10977    }
10978
10979    @GraphQLField
10980    @GraphQLName("itemInventoryTypes")
10981    @GraphQLNonNull
10982    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10983    static CountingPaginatedData<ItemInventoryTypeObject> itemInventoryTypes(final DataFetchingEnvironment env) {
10984        CountingPaginatedData<ItemInventoryTypeObject> data;
10985
10986        try {
10987            var commandForm = ItemUtil.getHome().getGetItemInventoryTypesForm();
10988            var command = CDI.current().select(GetItemInventoryTypesCommand.class).get();
10989
10990            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10991            if(totalEntities == null) {
10992                data = Connections.emptyConnection();
10993            } else {
10994                try(var objectLimiter = new ObjectLimiter(env, ItemInventoryTypeConstants.COMPONENT_VENDOR_NAME, ItemInventoryTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10995                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10996
10997                    var itemInventoryTypes = entities.stream()
10998                            .map(ItemInventoryTypeObject::new)
10999                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11000
11001                    data = new CountedObjects<>(objectLimiter, itemInventoryTypes);
11002                }
11003            }
11004        } catch (NamingException ex) {
11005            throw new RuntimeException(ex);
11006        }
11007
11008        return data;
11009    }
11010
11011    @GraphQLField
11012    @GraphQLName("itemPrice")
11013    static ItemPriceObject itemPrice(final DataFetchingEnvironment env,
11014            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
11015            @GraphQLName("inventoryConditionName") @GraphQLNonNull final String inventoryConditionName,
11016            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName,
11017            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
11018        ItemPrice itemPrice;
11019
11020        try {
11021            var commandForm = ItemUtil.getHome().getGetItemPriceForm();
11022
11023            commandForm.setItemName(itemName);
11024            commandForm.setInventoryConditionName(inventoryConditionName);
11025            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
11026            commandForm.setCurrencyIsoName(currencyIsoName);
11027
11028            itemPrice = CDI.current().select(GetItemPriceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11029        } catch (NamingException ex) {
11030            throw new RuntimeException(ex);
11031        }
11032
11033        return itemPrice == null ? null : new ItemPriceObject(itemPrice);
11034    }
11035
11036    @GraphQLField
11037    @GraphQLName("itemPrices")
11038    @GraphQLNonNull
11039    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11040    static CountingPaginatedData<ItemPriceObject> itemPrices(final DataFetchingEnvironment env,
11041            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
11042        CountingPaginatedData<ItemPriceObject> data;
11043
11044        try {
11045            var commandForm = ItemUtil.getHome().getGetItemPricesForm();
11046            var command = CDI.current().select(GetItemPricesCommand.class).get();
11047
11048            commandForm.setItemName(itemName);
11049
11050            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11051            if(totalEntities == null) {
11052                data = Connections.emptyConnection();
11053            } else {
11054                try(var objectLimiter = new ObjectLimiter(env, ItemPriceConstants.COMPONENT_VENDOR_NAME, ItemPriceConstants.ENTITY_TYPE_NAME, totalEntities)) {
11055                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11056
11057                    var itemPriceObjects = entities.stream()
11058                            .map(ItemPriceObject::new)
11059                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11060
11061                    data = new CountedObjects<>(objectLimiter, itemPriceObjects);
11062                }
11063            }
11064        } catch (NamingException ex) {
11065            throw new RuntimeException(ex);
11066        }
11067
11068        return data;
11069    }
11070
11071    @GraphQLField
11072    @GraphQLName("itemAliasChecksumType")
11073    static ItemAliasChecksumTypeObject itemAliasChecksumType(final DataFetchingEnvironment env,
11074            @GraphQLName("itemAliasChecksumTypeName") final String itemAliasChecksumTypeName,
11075            @GraphQLName("id") @GraphQLID final String id) {
11076        ItemAliasChecksumType itemAliasChecksumType;
11077
11078        try {
11079            var commandForm = ItemUtil.getHome().getGetItemAliasChecksumTypeForm();
11080
11081            commandForm.setItemAliasChecksumTypeName(itemAliasChecksumTypeName);
11082            commandForm.setUuid(id);
11083
11084            itemAliasChecksumType = CDI.current().select(GetItemAliasChecksumTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11085        } catch (NamingException ex) {
11086            throw new RuntimeException(ex);
11087        }
11088
11089        return itemAliasChecksumType == null ? null : new ItemAliasChecksumTypeObject(itemAliasChecksumType);
11090    }
11091
11092    @GraphQLField
11093    @GraphQLName("itemAliasChecksumTypes")
11094    @GraphQLNonNull
11095    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11096    static CountingPaginatedData<ItemAliasChecksumTypeObject> itemAliasChecksumTypes(final DataFetchingEnvironment env) {
11097        CountingPaginatedData<ItemAliasChecksumTypeObject> data;
11098
11099        try {
11100            var commandForm = ItemUtil.getHome().getGetItemAliasChecksumTypesForm();
11101            var command = CDI.current().select(GetItemAliasChecksumTypesCommand.class).get();
11102
11103            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11104            if(totalEntities == null) {
11105                data = Connections.emptyConnection();
11106            } else {
11107                try(var objectLimiter = new ObjectLimiter(env, ItemAliasChecksumTypeConstants.COMPONENT_VENDOR_NAME, ItemAliasChecksumTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11108                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11109
11110                    var itemAliasChecksumTypes = entities.stream()
11111                            .map(ItemAliasChecksumTypeObject::new)
11112                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11113
11114                    data = new CountedObjects<>(objectLimiter, itemAliasChecksumTypes);
11115                }
11116            }
11117        } catch (NamingException ex) {
11118            throw new RuntimeException(ex);
11119        }
11120
11121        return data;
11122    }
11123
11124    @GraphQLField
11125    @GraphQLName("itemAlias")
11126    static ItemAliasObject itemAlias(final DataFetchingEnvironment env,
11127            @GraphQLName("alias") @GraphQLNonNull final String alias) {
11128        ItemAlias itemAlias;
11129
11130        try {
11131            var commandForm = ItemUtil.getHome().getGetItemAliasForm();
11132
11133            commandForm.setAlias(alias);
11134
11135            itemAlias = CDI.current().select(GetItemAliasCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11136        } catch (NamingException ex) {
11137            throw new RuntimeException(ex);
11138        }
11139
11140        return itemAlias == null ? null : new ItemAliasObject(itemAlias);
11141    }
11142
11143    @GraphQLField
11144    @GraphQLName("itemAliases")
11145    @GraphQLNonNull
11146    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11147    static CountingPaginatedData<ItemAliasObject> itemAliases(final DataFetchingEnvironment env,
11148            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
11149        CountingPaginatedData<ItemAliasObject> data;
11150
11151        try {
11152            var commandForm = ItemUtil.getHome().getGetItemAliasesForm();
11153            var command = CDI.current().select(GetItemAliasesCommand.class).get();
11154
11155            commandForm.setItemName(itemName);
11156
11157            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11158            if(totalEntities == null) {
11159                data = Connections.emptyConnection();
11160            } else {
11161                try(var objectLimiter = new ObjectLimiter(env, ItemAliasConstants.COMPONENT_VENDOR_NAME, ItemAliasConstants.ENTITY_TYPE_NAME, totalEntities)) {
11162                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11163
11164                    var itemAliasObjects = entities.stream()
11165                            .map(ItemAliasObject::new)
11166                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11167
11168                    data = new CountedObjects<>(objectLimiter, itemAliasObjects);
11169                }
11170            }
11171        } catch (NamingException ex) {
11172            throw new RuntimeException(ex);
11173        }
11174
11175        return data;
11176    }
11177
11178    @GraphQLField
11179    @GraphQLName("itemCategory")
11180    static ItemCategoryObject itemCategory(final DataFetchingEnvironment env,
11181            @GraphQLName("itemCategoryName") final String itemCategoryName,
11182            @GraphQLName("id") @GraphQLID final String id) {
11183        ItemCategory itemCategory;
11184
11185        try {
11186            var commandForm = ItemUtil.getHome().getGetItemCategoryForm();
11187
11188            commandForm.setItemCategoryName(itemCategoryName);
11189            commandForm.setUuid(id);
11190
11191            itemCategory = CDI.current().select(GetItemCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11192        } catch (NamingException ex) {
11193            throw new RuntimeException(ex);
11194        }
11195
11196        return itemCategory == null ? null : new ItemCategoryObject(itemCategory);
11197    }
11198
11199    @GraphQLField
11200    @GraphQLName("itemCategories")
11201    @GraphQLNonNull
11202    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11203    static CountingPaginatedData<ItemCategoryObject> itemCategories(final DataFetchingEnvironment env,
11204            @GraphQLName("parentItemCategoryName") final String parentItemCategoryName) {
11205        CountingPaginatedData<ItemCategoryObject> data;
11206
11207        try {
11208            var commandForm = ItemUtil.getHome().getGetItemCategoriesForm();
11209            var command = CDI.current().select(GetItemCategoriesCommand.class).get();
11210
11211            commandForm.setParentItemCategoryName(parentItemCategoryName);
11212
11213            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11214            if(totalEntities == null) {
11215                data = Connections.emptyConnection();
11216            } else {
11217                try(var objectLimiter = new ObjectLimiter(env, ItemCategoryConstants.COMPONENT_VENDOR_NAME, ItemCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
11218                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11219
11220                    var itemCategories = entities.stream()
11221                            .map(ItemCategoryObject::new)
11222                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11223
11224                    data = new CountedObjects<>(objectLimiter, itemCategories);
11225                }
11226            }
11227        } catch (NamingException ex) {
11228            throw new RuntimeException(ex);
11229        }
11230
11231        return data;
11232    }
11233
11234    @GraphQLField
11235    @GraphQLName("itemAccountingCategory")
11236    static ItemAccountingCategoryObject itemAccountingCategory(final DataFetchingEnvironment env,
11237            @GraphQLName("itemAccountingCategoryName") final String itemAccountingCategoryName,
11238            @GraphQLName("id") @GraphQLID final String id) {
11239        ItemAccountingCategory itemAccountingCategory;
11240
11241        try {
11242            var commandForm = AccountingUtil.getHome().getGetItemAccountingCategoryForm();
11243
11244            commandForm.setItemAccountingCategoryName(itemAccountingCategoryName);
11245            commandForm.setUuid(id);
11246
11247            itemAccountingCategory = CDI.current().select(GetItemAccountingCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11248        } catch (NamingException ex) {
11249            throw new RuntimeException(ex);
11250        }
11251
11252        return itemAccountingCategory == null ? null : new ItemAccountingCategoryObject(itemAccountingCategory);
11253    }
11254
11255    @GraphQLField
11256    @GraphQLName("itemAccountingCategories")
11257    @GraphQLNonNull
11258    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11259    static CountingPaginatedData<ItemAccountingCategoryObject> itemAccountingCategories(final DataFetchingEnvironment env) {
11260        CountingPaginatedData<ItemAccountingCategoryObject> data;
11261
11262        try {
11263            var commandForm = AccountingUtil.getHome().getGetItemAccountingCategoriesForm();
11264            var command = CDI.current().select(GetItemAccountingCategoriesCommand.class).get();
11265
11266            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11267            if(totalEntities == null) {
11268                data = Connections.emptyConnection();
11269            } else {
11270                try(var objectLimiter = new ObjectLimiter(env, ItemAccountingCategoryConstants.COMPONENT_VENDOR_NAME, ItemAccountingCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
11271                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11272
11273                    var itemAccountingCategories = entities.stream()
11274                            .map(ItemAccountingCategoryObject::new)
11275                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11276
11277                    data = new CountedObjects<>(objectLimiter, itemAccountingCategories);
11278                }
11279            }
11280        } catch (NamingException ex) {
11281            throw new RuntimeException(ex);
11282        }
11283
11284        return data;
11285    }
11286
11287    @GraphQLField
11288    @GraphQLName("glAccount")
11289    static GlAccountObject glAccount(final DataFetchingEnvironment env,
11290            @GraphQLName("glAccountName") final String glAccountName,
11291            @GraphQLName("id") @GraphQLID final String id) {
11292        GlAccount glAccount;
11293
11294        try {
11295            var commandForm = AccountingUtil.getHome().getGetGlAccountForm();
11296
11297            commandForm.setGlAccountName(glAccountName);
11298            commandForm.setUuid(id);
11299
11300            glAccount = CDI.current().select(GetGlAccountCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11301        } catch (NamingException ex) {
11302            throw new RuntimeException(ex);
11303        }
11304
11305        return glAccount == null ? null : new GlAccountObject(glAccount);
11306    }
11307
11308    @GraphQLField
11309    @GraphQLName("glAccounts")
11310    @GraphQLNonNull
11311    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11312    static CountingPaginatedData<GlAccountObject> glAccounts(final DataFetchingEnvironment env,
11313            @GraphQLName("glAccountCategoryName") final String glAccountCategoryName) {
11314        CountingPaginatedData<GlAccountObject> data;
11315
11316        try {
11317            var commandForm = AccountingUtil.getHome().getGetGlAccountsForm();
11318            var command = CDI.current().select(GetGlAccountsCommand.class).get();
11319
11320            commandForm.setGlAccountCategoryName(glAccountCategoryName);
11321
11322            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11323            if(totalEntities == null) {
11324                data = Connections.emptyConnection();
11325            } else {
11326                try(var objectLimiter = new ObjectLimiter(env, GlAccountConstants.COMPONENT_VENDOR_NAME, GlAccountConstants.ENTITY_TYPE_NAME, totalEntities)) {
11327                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11328
11329                    var glAccounts = entities.stream()
11330                            .map(GlAccountObject::new)
11331                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11332
11333                    data = new CountedObjects<>(objectLimiter, glAccounts);
11334                }
11335            }
11336        } catch (NamingException ex) {
11337            throw new RuntimeException(ex);
11338        }
11339
11340        return data;
11341    }
11342
11343    @GraphQLField
11344    @GraphQLName("glAccountType")
11345    static GlAccountTypeObject glAccountType(final DataFetchingEnvironment env,
11346            @GraphQLName("glAccountTypeName") final String glAccountTypeName,
11347            @GraphQLName("id") @GraphQLID final String id) {
11348        GlAccountType glAccountType;
11349
11350        try {
11351            var commandForm = AccountingUtil.getHome().getGetGlAccountTypeForm();
11352
11353            commandForm.setGlAccountTypeName(glAccountTypeName);
11354            commandForm.setUuid(id);
11355
11356            glAccountType = CDI.current().select(GetGlAccountTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11357        } catch (NamingException ex) {
11358            throw new RuntimeException(ex);
11359        }
11360
11361        return glAccountType == null ? null : new GlAccountTypeObject(glAccountType);
11362    }
11363
11364    @GraphQLField
11365    @GraphQLName("glAccountTypes")
11366    @GraphQLNonNull
11367    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11368    static CountingPaginatedData<GlAccountTypeObject> glAccountTypes(final DataFetchingEnvironment env) {
11369        CountingPaginatedData<GlAccountTypeObject> data;
11370
11371        try {
11372            var commandForm = AccountingUtil.getHome().getGetGlAccountTypesForm();
11373            var command = CDI.current().select(GetGlAccountTypesCommand.class).get();
11374
11375            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11376            if(totalEntities == null) {
11377                data = Connections.emptyConnection();
11378            } else {
11379                try(var objectLimiter = new ObjectLimiter(env, GlAccountTypeConstants.COMPONENT_VENDOR_NAME, GlAccountTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11380                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11381
11382                    var glAccountTypes = entities.stream()
11383                            .map(GlAccountTypeObject::new)
11384                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11385
11386                    data = new CountedObjects<>(objectLimiter, glAccountTypes);
11387                }
11388            }
11389        } catch (NamingException ex) {
11390            throw new RuntimeException(ex);
11391        }
11392
11393        return data;
11394    }
11395
11396    @GraphQLField
11397    @GraphQLName("glAccountClass")
11398    static GlAccountClassObject glAccountClass(final DataFetchingEnvironment env,
11399            @GraphQLName("glAccountClassName") final String glAccountClassName,
11400            @GraphQLName("id") @GraphQLID final String id) {
11401        GlAccountClass glAccountClass;
11402
11403        try {
11404            var commandForm = AccountingUtil.getHome().getGetGlAccountClassForm();
11405
11406            commandForm.setGlAccountClassName(glAccountClassName);
11407            commandForm.setUuid(id);
11408
11409            glAccountClass = CDI.current().select(GetGlAccountClassCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11410        } catch (NamingException ex) {
11411            throw new RuntimeException(ex);
11412        }
11413
11414        return glAccountClass == null ? null : new GlAccountClassObject(glAccountClass);
11415    }
11416
11417    @GraphQLField
11418    @GraphQLName("glAccountClasses")
11419    @GraphQLNonNull
11420    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11421    static CountingPaginatedData<GlAccountClassObject> glAccountClasses(final DataFetchingEnvironment env) {
11422        CountingPaginatedData<GlAccountClassObject> data;
11423
11424        try {
11425            var commandForm = AccountingUtil.getHome().getGetGlAccountClassesForm();
11426            var command = CDI.current().select(GetGlAccountClassesCommand.class).get();
11427
11428            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11429            if(totalEntities == null) {
11430                data = Connections.emptyConnection();
11431            } else {
11432                try(var objectLimiter = new ObjectLimiter(env, GlAccountClassConstants.COMPONENT_VENDOR_NAME, GlAccountClassConstants.ENTITY_TYPE_NAME, totalEntities)) {
11433                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11434
11435                    var glAccountClasses = entities.stream()
11436                            .map(GlAccountClassObject::new)
11437                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11438
11439                    data = new CountedObjects<>(objectLimiter, glAccountClasses);
11440                }
11441            }
11442        } catch (NamingException ex) {
11443            throw new RuntimeException(ex);
11444        }
11445
11446        return data;
11447    }
11448
11449    @GraphQLField
11450    @GraphQLName("glAccountCategory")
11451    static GlAccountCategoryObject glAccountCategory(final DataFetchingEnvironment env,
11452            @GraphQLName("glAccountCategoryName") final String glAccountCategoryName,
11453            @GraphQLName("id") @GraphQLID final String id) {
11454        GlAccountCategory glAccountCategory;
11455
11456        try {
11457            var commandForm = AccountingUtil.getHome().getGetGlAccountCategoryForm();
11458
11459            commandForm.setGlAccountCategoryName(glAccountCategoryName);
11460            commandForm.setUuid(id);
11461
11462            glAccountCategory = CDI.current().select(GetGlAccountCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11463        } catch (NamingException ex) {
11464            throw new RuntimeException(ex);
11465        }
11466
11467        return glAccountCategory == null ? null : new GlAccountCategoryObject(glAccountCategory);
11468    }
11469
11470    @GraphQLField
11471    @GraphQLName("glAccountCategories")
11472    @GraphQLNonNull
11473    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11474    static CountingPaginatedData<GlAccountCategoryObject> glAccountCategories(final DataFetchingEnvironment env) {
11475        CountingPaginatedData<GlAccountCategoryObject> data;
11476
11477        try {
11478            var commandForm = AccountingUtil.getHome().getGetGlAccountCategoriesForm();
11479            var command = CDI.current().select(GetGlAccountCategoriesCommand.class).get();
11480
11481            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11482            if(totalEntities == null) {
11483                data = Connections.emptyConnection();
11484            } else {
11485                try(var objectLimiter = new ObjectLimiter(env, GlAccountCategoryConstants.COMPONENT_VENDOR_NAME, GlAccountCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
11486                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11487
11488                    var glAccountCategories = entities.stream()
11489                            .map(GlAccountCategoryObject::new)
11490                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11491
11492                    data = new CountedObjects<>(objectLimiter, glAccountCategories);
11493                }
11494            }
11495        } catch (NamingException ex) {
11496            throw new RuntimeException(ex);
11497        }
11498
11499        return data;
11500    }
11501
11502    @GraphQLField
11503    @GraphQLName("glResourceType")
11504    static GlResourceTypeObject glResourceType(final DataFetchingEnvironment env,
11505            @GraphQLName("glResourceTypeName") final String glResourceTypeName,
11506            @GraphQLName("id") @GraphQLID final String id) {
11507        GlResourceType glResourceType;
11508
11509        try {
11510            var commandForm = AccountingUtil.getHome().getGetGlResourceTypeForm();
11511
11512            commandForm.setGlResourceTypeName(glResourceTypeName);
11513            commandForm.setUuid(id);
11514
11515            glResourceType = CDI.current().select(GetGlResourceTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11516        } catch (NamingException ex) {
11517            throw new RuntimeException(ex);
11518        }
11519
11520        return glResourceType == null ? null : new GlResourceTypeObject(glResourceType);
11521    }
11522
11523    @GraphQLField
11524    @GraphQLName("glResourceTypes")
11525    @GraphQLNonNull
11526    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11527    static CountingPaginatedData<GlResourceTypeObject> glResourceTypes(final DataFetchingEnvironment env) {
11528        CountingPaginatedData<GlResourceTypeObject> data;
11529
11530        try {
11531            var commandForm = AccountingUtil.getHome().getGetGlResourceTypesForm();
11532            var command = CDI.current().select(GetGlResourceTypesCommand.class).get();
11533
11534            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11535            if(totalEntities == null) {
11536                data = Connections.emptyConnection();
11537            } else {
11538                try(var objectLimiter = new ObjectLimiter(env, GlResourceTypeConstants.COMPONENT_VENDOR_NAME, GlResourceTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11539                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11540
11541                    var glResourceTypes = entities.stream()
11542                            .map(GlResourceTypeObject::new)
11543                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11544
11545                    data = new CountedObjects<>(objectLimiter, glResourceTypes);
11546                }
11547            }
11548        } catch (NamingException ex) {
11549            throw new RuntimeException(ex);
11550        }
11551
11552        return data;
11553    }
11554
11555    @GraphQLField
11556    @GraphQLName("itemPurchasingCategory")
11557    static ItemPurchasingCategoryObject itemPurchasingCategory(final DataFetchingEnvironment env,
11558            @GraphQLName("itemPurchasingCategoryName") final String itemPurchasingCategoryName,
11559            @GraphQLName("id") @GraphQLID final String id) {
11560        ItemPurchasingCategory itemPurchasingCategory;
11561
11562        try {
11563            var commandForm = VendorUtil.getHome().getGetItemPurchasingCategoryForm();
11564
11565            commandForm.setItemPurchasingCategoryName(itemPurchasingCategoryName);
11566            commandForm.setUuid(id);
11567
11568            itemPurchasingCategory = CDI.current().select(GetItemPurchasingCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11569        } catch (NamingException ex) {
11570            throw new RuntimeException(ex);
11571        }
11572
11573        return itemPurchasingCategory == null ? null : new ItemPurchasingCategoryObject(itemPurchasingCategory);
11574    }
11575
11576    @GraphQLField
11577    @GraphQLName("itemPurchasingCategories")
11578    @GraphQLNonNull
11579    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11580    static CountingPaginatedData<ItemPurchasingCategoryObject> itemPurchasingCategories(final DataFetchingEnvironment env) {
11581        CountingPaginatedData<ItemPurchasingCategoryObject> data;
11582
11583        try {
11584            var commandForm = VendorUtil.getHome().getGetItemPurchasingCategoriesForm();
11585            var command = CDI.current().select(GetItemPurchasingCategoriesCommand.class).get();
11586
11587            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11588            if(totalEntities == null) {
11589                data = Connections.emptyConnection();
11590            } else {
11591                try(var objectLimiter = new ObjectLimiter(env, ItemPurchasingCategoryConstants.COMPONENT_VENDOR_NAME, ItemPurchasingCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
11592                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11593
11594                    var itemPurchasingCategories = entities.stream()
11595                            .map(ItemPurchasingCategoryObject::new)
11596                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11597
11598                    data = new CountedObjects<>(objectLimiter, itemPurchasingCategories);
11599                }
11600            }
11601        } catch (NamingException ex) {
11602            throw new RuntimeException(ex);
11603        }
11604
11605        return data;
11606    }
11607
11608    @GraphQLField
11609    @GraphQLName("itemDescriptionType")
11610    static ItemDescriptionTypeObject itemDescriptionType(final DataFetchingEnvironment env,
11611            @GraphQLName("itemDescriptionTypeName") final String itemDescriptionTypeName,
11612            @GraphQLName("id") @GraphQLID final String id) {
11613        ItemDescriptionType itemDescriptionType;
11614
11615        try {
11616            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeForm();
11617
11618            commandForm.setItemDescriptionTypeName(itemDescriptionTypeName);
11619            commandForm.setUuid(id);
11620
11621            itemDescriptionType = CDI.current().select(GetItemDescriptionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11622        } catch (NamingException ex) {
11623            throw new RuntimeException(ex);
11624        }
11625
11626        return itemDescriptionType == null ? null : new ItemDescriptionTypeObject(itemDescriptionType);
11627    }
11628
11629    @GraphQLField
11630    @GraphQLName("itemDescriptionTypes")
11631    @GraphQLNonNull
11632    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11633    static CountingPaginatedData<ItemDescriptionTypeObject> itemDescriptionTypes(final DataFetchingEnvironment env,
11634            @GraphQLName("parentItemDescriptionTypeName") final String parentItemDescriptionTypeName) {
11635        CountingPaginatedData<ItemDescriptionTypeObject> data;
11636
11637        try {
11638            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypesForm();
11639            var command = CDI.current().select(GetItemDescriptionTypesCommand.class).get();
11640
11641            commandForm.setParentItemDescriptionTypeName(parentItemDescriptionTypeName);
11642
11643            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11644            if(totalEntities == null) {
11645                data = Connections.emptyConnection();
11646            } else {
11647                try(var objectLimiter = new ObjectLimiter(env, ItemDescriptionTypeConstants.COMPONENT_VENDOR_NAME, ItemDescriptionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11648                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11649
11650                    var itemDescriptionTypes = entities.stream()
11651                            .map(ItemDescriptionTypeObject::new)
11652                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11653
11654                    data = new CountedObjects<>(objectLimiter, itemDescriptionTypes);
11655                }
11656            }
11657        } catch (NamingException ex) {
11658            throw new RuntimeException(ex);
11659        }
11660
11661        return data;
11662    }
11663
11664    @GraphQLField
11665    @GraphQLName("itemImageType")
11666    static ItemImageTypeObject itemImageType(final DataFetchingEnvironment env,
11667            @GraphQLName("itemImageTypeName") final String itemImageTypeName,
11668            @GraphQLName("id") @GraphQLID final String id) {
11669        ItemImageType itemImageType;
11670
11671        try {
11672            var commandForm = ItemUtil.getHome().getGetItemImageTypeForm();
11673
11674            commandForm.setItemImageTypeName(itemImageTypeName);
11675            commandForm.setUuid(id);
11676
11677            itemImageType = CDI.current().select(GetItemImageTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11678        } catch (NamingException ex) {
11679            throw new RuntimeException(ex);
11680        }
11681
11682        return itemImageType == null ? null : new ItemImageTypeObject(itemImageType);
11683    }
11684
11685    @GraphQLField
11686    @GraphQLName("itemImageTypes")
11687    @GraphQLNonNull
11688    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11689    static CountingPaginatedData<ItemImageTypeObject> itemImageTypes(final DataFetchingEnvironment env) {
11690        CountingPaginatedData<ItemImageTypeObject> data;
11691
11692        try {
11693            var commandForm = ItemUtil.getHome().getGetItemImageTypesForm();
11694            var command = CDI.current().select(GetItemImageTypesCommand.class).get();
11695
11696            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11697            if(totalEntities == null) {
11698                data = Connections.emptyConnection();
11699            } else {
11700                try(var objectLimiter = new ObjectLimiter(env, ItemImageTypeConstants.COMPONENT_VENDOR_NAME, ItemImageTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11701                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11702
11703                    var itemImageTypes = entities.stream()
11704                            .map(ItemImageTypeObject::new)
11705                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11706
11707                    data = new CountedObjects<>(objectLimiter, itemImageTypes);
11708                }
11709            }
11710        } catch (NamingException ex) {
11711            throw new RuntimeException(ex);
11712        }
11713
11714        return data;
11715    }
11716
11717    @GraphQLField
11718    @GraphQLName("itemDescriptionTypeUseType")
11719    static ItemDescriptionTypeUseTypeObject itemDescriptionTypeUseType(final DataFetchingEnvironment env,
11720            @GraphQLName("itemDescriptionTypeUseTypeName") final String itemDescriptionTypeUseTypeName,
11721            @GraphQLName("id") @GraphQLID final String id) {
11722        ItemDescriptionTypeUseType itemDescriptionTypeUseType;
11723
11724        try {
11725            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeUseTypeForm();
11726
11727            commandForm.setItemDescriptionTypeUseTypeName(itemDescriptionTypeUseTypeName);
11728            commandForm.setUuid(id);
11729
11730            itemDescriptionTypeUseType = CDI.current().select(GetItemDescriptionTypeUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11731        } catch (NamingException ex) {
11732            throw new RuntimeException(ex);
11733        }
11734
11735        return itemDescriptionTypeUseType == null ? null : new ItemDescriptionTypeUseTypeObject(itemDescriptionTypeUseType);
11736    }
11737
11738    @GraphQLField
11739    @GraphQLName("itemDescriptionTypeUseTypes")
11740    @GraphQLNonNull
11741    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11742    static CountingPaginatedData<ItemDescriptionTypeUseTypeObject> itemDescriptionTypeUseTypes(final DataFetchingEnvironment env) {
11743        CountingPaginatedData<ItemDescriptionTypeUseTypeObject> data;
11744
11745        try {
11746            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeUseTypesForm();
11747            var command = CDI.current().select(GetItemDescriptionTypeUseTypesCommand.class).get();
11748
11749            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11750            if(totalEntities == null) {
11751                data = Connections.emptyConnection();
11752            } else {
11753                try(var objectLimiter = new ObjectLimiter(env, ItemDescriptionTypeUseTypeConstants.COMPONENT_VENDOR_NAME, ItemDescriptionTypeUseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11754                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11755
11756                    var itemDescriptionTypeUseTypes = entities.stream()
11757                            .map(ItemDescriptionTypeUseTypeObject::new)
11758                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11759
11760                    data = new CountedObjects<>(objectLimiter, itemDescriptionTypeUseTypes);
11761                }
11762            }
11763        } catch (NamingException ex) {
11764            throw new RuntimeException(ex);
11765        }
11766
11767        return data;
11768    }
11769
11770    @GraphQLField
11771    @GraphQLName("itemDescriptionTypeUse")
11772    static ItemDescriptionTypeUseObject itemDescriptionTypeUse(final DataFetchingEnvironment env,
11773            @GraphQLName("itemDescriptionTypeUseTypeName") @GraphQLNonNull final String itemDescriptionTypeUseTypeName,
11774            @GraphQLName("itemDescriptionTypeName") @GraphQLNonNull final String itemDescriptionTypeName) {
11775        ItemDescriptionTypeUse itemDescriptionTypeUse;
11776
11777        try {
11778            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeUseForm();
11779
11780            commandForm.setItemDescriptionTypeUseTypeName(itemDescriptionTypeUseTypeName);
11781            commandForm.setItemDescriptionTypeName(itemDescriptionTypeName);
11782
11783            itemDescriptionTypeUse = CDI.current().select(GetItemDescriptionTypeUseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11784        } catch (NamingException ex) {
11785            throw new RuntimeException(ex);
11786        }
11787
11788        return itemDescriptionTypeUse == null ? null : new ItemDescriptionTypeUseObject(itemDescriptionTypeUse);
11789    }
11790
11791    @GraphQLField
11792    @GraphQLName("itemDescriptionTypeUses")
11793    @GraphQLNonNull
11794    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11795    static CountingPaginatedData<ItemDescriptionTypeUseObject> itemDescriptionTypeUses(final DataFetchingEnvironment env,
11796            @GraphQLName("itemDescriptionTypeUseTypeName") final String itemDescriptionTypeUseTypeName,
11797            @GraphQLName("itemDescriptionTypeName") final String itemDescriptionTypeName) {
11798        CountingPaginatedData<ItemDescriptionTypeUseObject> data;
11799
11800        try {
11801            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeUsesForm();
11802            var command = CDI.current().select(GetItemDescriptionTypeUsesCommand.class).get();
11803
11804            commandForm.setItemDescriptionTypeUseTypeName(itemDescriptionTypeUseTypeName);
11805            commandForm.setItemDescriptionTypeName(itemDescriptionTypeName);
11806
11807            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11808            if(totalEntities == null) {
11809                data = Connections.emptyConnection();
11810            } else {
11811                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)) {
11812                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11813
11814                    var objects = entities.stream()
11815                            .map(ItemDescriptionTypeUseObject::new)
11816                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11817
11818                    data = new CountedObjects<>(objectLimiter, objects);
11819                }
11820            }
11821        } catch (NamingException ex) {
11822            throw new RuntimeException(ex);
11823        }
11824
11825        return data;
11826    }
11827
11828    @GraphQLField
11829    @GraphQLName("itemAliasType")
11830    static ItemAliasTypeObject itemAliasType(final DataFetchingEnvironment env,
11831            @GraphQLName("itemAliasTypeName") final String itemAliasTypeName,
11832            @GraphQLName("id") @GraphQLID final String id) {
11833        ItemAliasType itemAliasType;
11834
11835        try {
11836            var commandForm = ItemUtil.getHome().getGetItemAliasTypeForm();
11837
11838            commandForm.setItemAliasTypeName(itemAliasTypeName);
11839            commandForm.setUuid(id);
11840
11841            itemAliasType = CDI.current().select(GetItemAliasTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11842        } catch (NamingException ex) {
11843            throw new RuntimeException(ex);
11844        }
11845
11846        return itemAliasType == null ? null : new ItemAliasTypeObject(itemAliasType);
11847    }
11848
11849    @GraphQLField
11850    @GraphQLName("itemAliasTypes")
11851    @GraphQLNonNull
11852    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11853    static CountingPaginatedData<ItemAliasTypeObject> itemAliasTypes(final DataFetchingEnvironment env) {
11854        CountingPaginatedData<ItemAliasTypeObject> data;
11855
11856        try {
11857            var commandForm = ItemUtil.getHome().getGetItemAliasTypesForm();
11858            var command = CDI.current().select(GetItemAliasTypesCommand.class).get();
11859
11860            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11861            if(totalEntities == null) {
11862                data = Connections.emptyConnection();
11863            } else {
11864                try(var objectLimiter = new ObjectLimiter(env, ItemAliasTypeConstants.COMPONENT_VENDOR_NAME, ItemAliasTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11865                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11866
11867                    var itemAliasTypes = entities.stream()
11868                            .map(ItemAliasTypeObject::new)
11869                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11870
11871                    data = new CountedObjects<>(objectLimiter, itemAliasTypes);
11872                }
11873            }
11874        } catch (NamingException ex) {
11875            throw new RuntimeException(ex);
11876        }
11877
11878        return data;
11879    }
11880
11881    @GraphQLField
11882    @GraphQLName("itemWeightType")
11883    static ItemWeightTypeObject itemWeightType(final DataFetchingEnvironment env,
11884            @GraphQLName("itemWeightTypeName") final String itemWeightTypeName,
11885            @GraphQLName("id") @GraphQLID final String id) {
11886        ItemWeightType itemWeightType;
11887
11888        try {
11889            var commandForm = ItemUtil.getHome().getGetItemWeightTypeForm();
11890
11891            commandForm.setItemWeightTypeName(itemWeightTypeName);
11892            commandForm.setUuid(id);
11893
11894            itemWeightType = CDI.current().select(GetItemWeightTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11895        } catch (NamingException ex) {
11896            throw new RuntimeException(ex);
11897        }
11898
11899        return itemWeightType == null ? null : new ItemWeightTypeObject(itemWeightType);
11900    }
11901
11902    @GraphQLField
11903    @GraphQLName("itemWeightTypes")
11904    @GraphQLNonNull
11905    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11906    static CountingPaginatedData<ItemWeightTypeObject> itemWeightTypes(final DataFetchingEnvironment env) {
11907        CountingPaginatedData<ItemWeightTypeObject> data;
11908
11909        try {
11910            var commandForm = ItemUtil.getHome().getGetItemWeightTypesForm();
11911            var command = CDI.current().select(GetItemWeightTypesCommand.class).get();
11912
11913            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11914            if(totalEntities == null) {
11915                data = Connections.emptyConnection();
11916            } else {
11917                try(var objectLimiter = new ObjectLimiter(env, ItemWeightTypeConstants.COMPONENT_VENDOR_NAME, ItemWeightTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11918                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11919
11920                    var itemWeightTypes = entities.stream()
11921                            .map(ItemWeightTypeObject::new)
11922                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11923
11924                    data = new CountedObjects<>(objectLimiter, itemWeightTypes);
11925                }
11926            }
11927        } catch (NamingException ex) {
11928            throw new RuntimeException(ex);
11929        }
11930
11931        return data;
11932    }
11933
11934    @GraphQLField
11935    @GraphQLName("itemVolumeType")
11936    static ItemVolumeTypeObject itemVolumeType(final DataFetchingEnvironment env,
11937            @GraphQLName("itemVolumeTypeName") final String itemVolumeTypeName,
11938            @GraphQLName("id") @GraphQLID final String id) {
11939        ItemVolumeType itemVolumeType;
11940
11941        try {
11942            var commandForm = ItemUtil.getHome().getGetItemVolumeTypeForm();
11943
11944            commandForm.setItemVolumeTypeName(itemVolumeTypeName);
11945            commandForm.setUuid(id);
11946
11947            itemVolumeType = CDI.current().select(GetItemVolumeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11948        } catch (NamingException ex) {
11949            throw new RuntimeException(ex);
11950        }
11951
11952        return itemVolumeType == null ? null : new ItemVolumeTypeObject(itemVolumeType);
11953    }
11954
11955    @GraphQLField
11956    @GraphQLName("itemVolumeTypes")
11957    @GraphQLNonNull
11958    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11959    static CountingPaginatedData<ItemVolumeTypeObject> itemVolumeTypes(final DataFetchingEnvironment env) {
11960        CountingPaginatedData<ItemVolumeTypeObject> data;
11961
11962        try {
11963            var commandForm = ItemUtil.getHome().getGetItemVolumeTypesForm();
11964            var command = CDI.current().select(GetItemVolumeTypesCommand.class).get();
11965
11966            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11967            if(totalEntities == null) {
11968                data = Connections.emptyConnection();
11969            } else {
11970                try(var objectLimiter = new ObjectLimiter(env, ItemVolumeTypeConstants.COMPONENT_VENDOR_NAME, ItemVolumeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11971                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11972
11973                    var itemVolumeTypes = entities.stream()
11974                            .map(ItemVolumeTypeObject::new)
11975                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11976
11977                    data = new CountedObjects<>(objectLimiter, itemVolumeTypes);
11978                }
11979            }
11980        } catch (NamingException ex) {
11981            throw new RuntimeException(ex);
11982        }
11983
11984        return data;
11985    }
11986
11987    @GraphQLField
11988    @GraphQLName("relatedItemType")
11989    static RelatedItemTypeObject relatedItemType(final DataFetchingEnvironment env,
11990            @GraphQLName("relatedItemTypeName") final String relatedItemTypeName,
11991            @GraphQLName("id") @GraphQLID final String id) {
11992        RelatedItemType relatedItemType;
11993
11994        try {
11995            var commandForm = ItemUtil.getHome().getGetRelatedItemTypeForm();
11996
11997            commandForm.setRelatedItemTypeName(relatedItemTypeName);
11998            commandForm.setUuid(id);
11999
12000            relatedItemType = CDI.current().select(GetRelatedItemTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12001        } catch (NamingException ex) {
12002            throw new RuntimeException(ex);
12003        }
12004
12005        return relatedItemType == null ? null : new RelatedItemTypeObject(relatedItemType, null);
12006    }
12007
12008    @GraphQLField
12009    @GraphQLName("relatedItemTypes")
12010    @GraphQLNonNull
12011    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12012    static CountingPaginatedData<RelatedItemTypeObject> relatedItemTypes(final DataFetchingEnvironment env) {
12013        CountingPaginatedData<RelatedItemTypeObject> data;
12014
12015        try {
12016            var commandForm = ItemUtil.getHome().getGetRelatedItemTypesForm();
12017            var command = CDI.current().select(GetRelatedItemTypesCommand.class).get();
12018
12019            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12020            if(totalEntities == null) {
12021                data = Connections.emptyConnection();
12022            } else {
12023                try(var objectLimiter = new ObjectLimiter(env, RelatedItemTypeConstants.COMPONENT_VENDOR_NAME, RelatedItemTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12024                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12025
12026                    var relatedItemTypes = entities.stream()
12027                            .map((RelatedItemType relatedItemType) -> new RelatedItemTypeObject(relatedItemType, null))
12028                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12029
12030                    data = new CountedObjects<>(objectLimiter, relatedItemTypes);
12031                }
12032            }
12033        } catch (NamingException ex) {
12034            throw new RuntimeException(ex);
12035        }
12036
12037        return data;
12038    }
12039
12040    @GraphQLField
12041    @GraphQLName("relatedItem")
12042    static RelatedItemObject relatedItem(final DataFetchingEnvironment env,
12043            @GraphQLName("relatedItemTypeName") @GraphQLNonNull final String relatedItemTypeName,
12044            @GraphQLName("fromItemName") @GraphQLNonNull final String fromItemName,
12045            @GraphQLName("toItemName") @GraphQLNonNull final String toItemName) {
12046        RelatedItem relatedItem;
12047
12048        try {
12049            var commandForm = ItemUtil.getHome().getGetRelatedItemForm();
12050
12051            commandForm.setRelatedItemTypeName(relatedItemTypeName);
12052            commandForm.setFromItemName(fromItemName);
12053            commandForm.setToItemName(toItemName);
12054
12055            relatedItem = CDI.current().select(GetRelatedItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12056        } catch (NamingException ex) {
12057            throw new RuntimeException(ex);
12058        }
12059
12060        return relatedItem == null ? null : new RelatedItemObject(relatedItem);
12061    }
12062
12063    @GraphQLField
12064    @GraphQLName("relatedItems")
12065    @GraphQLNonNull
12066    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12067    static CountingPaginatedData<RelatedItemObject> relatedItems(final DataFetchingEnvironment env,
12068            @GraphQLName("relatedItemTypeName") final String relatedItemTypeName,
12069            @GraphQLName("fromItemName") final String fromItemName,
12070            @GraphQLName("toItemName") final String toItemName) {
12071        CountingPaginatedData<RelatedItemObject> data;
12072
12073        try {
12074            var commandForm = ItemUtil.getHome().getGetRelatedItemsForm();
12075            var command = CDI.current().select(GetRelatedItemsCommand.class).get();
12076
12077            commandForm.setRelatedItemTypeName(relatedItemTypeName);
12078            commandForm.setFromItemName(fromItemName);
12079            commandForm.setToItemName(toItemName);
12080
12081            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12082            if(totalEntities == null) {
12083                data = Connections.emptyConnection();
12084            } else {
12085                try(var objectLimiter = new ObjectLimiter(env, RelatedItemConstants.COMPONENT_VENDOR_NAME, RelatedItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
12086                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12087
12088                    var relatedItemObjects = entities.stream()
12089                            .map(RelatedItemObject::new)
12090                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12091
12092                    data = new CountedObjects<>(objectLimiter, relatedItemObjects);
12093                }
12094            }
12095        } catch (NamingException ex) {
12096            throw new RuntimeException(ex);
12097        }
12098
12099        return data;
12100    }
12101
12102    @GraphQLField
12103    @GraphQLName("orderType")
12104    static OrderTypeObject orderType(final DataFetchingEnvironment env,
12105            @GraphQLName("orderTypeName") final String orderTypeName,
12106            @GraphQLName("id") @GraphQLID final String id) {
12107        OrderType orderType;
12108
12109        try {
12110            var commandForm = OrderUtil.getHome().getGetOrderTypeForm();
12111
12112            commandForm.setOrderTypeName(orderTypeName);
12113            commandForm.setUuid(id);
12114
12115            orderType = CDI.current().select(GetOrderTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12116        } catch (NamingException ex) {
12117            throw new RuntimeException(ex);
12118        }
12119
12120        return orderType == null ? null : new OrderTypeObject(orderType);
12121    }
12122
12123    @GraphQLField
12124    @GraphQLName("orderTypes")
12125    @GraphQLNonNull
12126    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12127    static CountingPaginatedData<OrderTypeObject> orderTypes(final DataFetchingEnvironment env) {
12128        CountingPaginatedData<OrderTypeObject> data;
12129
12130        try {
12131            var commandForm = OrderUtil.getHome().getGetOrderTypesForm();
12132            var command = CDI.current().select(GetOrderTypesCommand.class).get();
12133
12134            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12135            if(totalEntities == null) {
12136                data = Connections.emptyConnection();
12137            } else {
12138                try(var objectLimiter = new ObjectLimiter(env, OrderTypeConstants.COMPONENT_VENDOR_NAME, OrderTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12139                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12140
12141                    var orderTypes = entities.stream()
12142                            .map(OrderTypeObject::new)
12143                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12144
12145                    data = new CountedObjects<>(objectLimiter, orderTypes);
12146                }
12147            }
12148        } catch (NamingException ex) {
12149            throw new RuntimeException(ex);
12150        }
12151
12152        return data;
12153    }
12154
12155    @GraphQLField
12156    @GraphQLName("orderPriority")
12157    static OrderPriorityObject orderPriority(final DataFetchingEnvironment env,
12158            @GraphQLName("orderTypeName") final String orderTypeName,
12159            @GraphQLName("orderPriorityName") final String orderPriorityName,
12160            @GraphQLName("id") @GraphQLID final String id) {
12161        OrderPriority orderPriority;
12162
12163        try {
12164            var commandForm = OrderUtil.getHome().getGetOrderPriorityForm();
12165
12166            commandForm.setOrderTypeName(orderTypeName);
12167            commandForm.setOrderPriorityName(orderPriorityName);
12168            commandForm.setUuid(id);
12169
12170            orderPriority = CDI.current().select(GetOrderPriorityCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12171        } catch (NamingException ex) {
12172            throw new RuntimeException(ex);
12173        }
12174
12175        return orderPriority == null ? null : new OrderPriorityObject(orderPriority);
12176    }
12177
12178    @GraphQLField
12179    @GraphQLName("orderPriorities")
12180    @GraphQLNonNull
12181    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12182    static CountingPaginatedData<OrderPriorityObject> orderPriorities(final DataFetchingEnvironment env,
12183            @GraphQLName("orderTypeName") final String orderTypeName) {
12184        CountingPaginatedData<OrderPriorityObject> data;
12185
12186        try {
12187            var commandForm = OrderUtil.getHome().getGetOrderPrioritiesForm();
12188            var command = CDI.current().select(GetOrderPrioritiesCommand.class).get();
12189
12190            commandForm.setOrderTypeName(orderTypeName);
12191
12192            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12193            if(totalEntities == null) {
12194                data = Connections.emptyConnection();
12195            } else {
12196                try(var objectLimiter = new ObjectLimiter(env, OrderPriorityConstants.COMPONENT_VENDOR_NAME, OrderPriorityConstants.ENTITY_TYPE_NAME, totalEntities)) {
12197                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12198
12199                    var orderPriorities = entities.stream()
12200                            .map(OrderPriorityObject::new)
12201                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12202
12203                    data = new CountedObjects<>(objectLimiter, orderPriorities);
12204                }
12205            }
12206        } catch (NamingException ex) {
12207            throw new RuntimeException(ex);
12208        }
12209
12210        return data;
12211    }
12212
12213    @GraphQLField
12214    @GraphQLName("orderTimeType")
12215    static OrderTimeTypeObject orderTimeType(final DataFetchingEnvironment env,
12216            @GraphQLName("orderTypeName") final String orderTypeName,
12217            @GraphQLName("orderTimeTypeName") final String orderTimeTypeName,
12218            @GraphQLName("id") @GraphQLID final String id) {
12219        OrderTimeType orderTimeType;
12220
12221        try {
12222            var commandForm = OrderUtil.getHome().getGetOrderTimeTypeForm();
12223
12224            commandForm.setOrderTypeName(orderTypeName);
12225            commandForm.setOrderTimeTypeName(orderTimeTypeName);
12226            commandForm.setUuid(id);
12227
12228            orderTimeType = CDI.current().select(GetOrderTimeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12229        } catch (NamingException ex) {
12230            throw new RuntimeException(ex);
12231        }
12232
12233        return orderTimeType == null ? null : new OrderTimeTypeObject(orderTimeType);
12234    }
12235
12236    @GraphQLField
12237    @GraphQLName("orderTimeTypes")
12238    @GraphQLNonNull
12239    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12240    static CountingPaginatedData<OrderTimeTypeObject> orderTimeTypes(final DataFetchingEnvironment env,
12241            @GraphQLName("orderTypeName") final String orderTypeName) {
12242        CountingPaginatedData<OrderTimeTypeObject> data;
12243
12244        try {
12245            var commandForm = OrderUtil.getHome().getGetOrderTimeTypesForm();
12246            var command = CDI.current().select(GetOrderTimeTypesCommand.class).get();
12247
12248            commandForm.setOrderTypeName(orderTypeName);
12249
12250            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12251            if(totalEntities == null) {
12252                data = Connections.emptyConnection();
12253            } else {
12254                try(var objectLimiter = new ObjectLimiter(env, OrderTimeTypeConstants.COMPONENT_VENDOR_NAME, OrderTimeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12255                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12256
12257                    var orderTimeTypes = entities.stream()
12258                            .map(OrderTimeTypeObject::new)
12259                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12260
12261                    data = new CountedObjects<>(objectLimiter, orderTimeTypes);
12262                }
12263            }
12264        } catch (NamingException ex) {
12265            throw new RuntimeException(ex);
12266        }
12267
12268        return data;
12269    }
12270
12271    @GraphQLField
12272    @GraphQLName("wishlistType")
12273    static WishlistTypeObject wishlistType(final DataFetchingEnvironment env,
12274            @GraphQLName("wishlistTypeName") final String wishlistTypeName,
12275            @GraphQLName("id") @GraphQLID final String id) {
12276        WishlistType wishlistType;
12277
12278        try {
12279            var commandForm = WishlistUtil.getHome().getGetWishlistTypeForm();
12280
12281            commandForm.setWishlistTypeName(wishlistTypeName);
12282            commandForm.setUuid(id);
12283
12284            wishlistType = CDI.current().select(GetWishlistTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12285        } catch (NamingException ex) {
12286            throw new RuntimeException(ex);
12287        }
12288
12289        return wishlistType == null ? null : new WishlistTypeObject(wishlistType);
12290    }
12291
12292    @GraphQLField
12293    @GraphQLName("wishlistTypes")
12294    @GraphQLNonNull
12295    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12296    static CountingPaginatedData<WishlistTypeObject> wishlistTypes(final DataFetchingEnvironment env) {
12297        CountingPaginatedData<WishlistTypeObject> data;
12298
12299        try {
12300            var commandForm = WishlistUtil.getHome().getGetWishlistTypesForm();
12301            var command = CDI.current().select(GetWishlistTypesCommand.class).get();
12302
12303            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12304            if(totalEntities == null) {
12305                data = Connections.emptyConnection();
12306            } else {
12307                try(var objectLimiter = new ObjectLimiter(env, WishlistTypeConstants.COMPONENT_VENDOR_NAME, WishlistTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12308                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12309
12310                    var wishlistTypes = entities.stream()
12311                            .map(WishlistTypeObject::new)
12312                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12313
12314                    data = new CountedObjects<>(objectLimiter, wishlistTypes);
12315                }
12316            }
12317        } catch (NamingException ex) {
12318            throw new RuntimeException(ex);
12319        }
12320
12321        return data;
12322    }
12323
12324    @GraphQLField
12325    @GraphQLName("wishlistPriority")
12326    static WishlistPriorityObject wishlistPriority(final DataFetchingEnvironment env,
12327            @GraphQLName("wishlistTypeName") final String wishlistTypeName,
12328            @GraphQLName("wishlistPriorityName") final String wishlistPriorityName,
12329            @GraphQLName("id") @GraphQLID final String id) {
12330        WishlistPriority wishlistPriority;
12331
12332        try {
12333            var commandForm = WishlistUtil.getHome().getGetWishlistPriorityForm();
12334
12335            commandForm.setWishlistTypeName(wishlistTypeName);
12336            commandForm.setWishlistPriorityName(wishlistPriorityName);
12337            commandForm.setUuid(id);
12338
12339            wishlistPriority = CDI.current().select(GetWishlistPriorityCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12340        } catch (NamingException ex) {
12341            throw new RuntimeException(ex);
12342        }
12343
12344        return wishlistPriority == null ? null : new WishlistPriorityObject(wishlistPriority);
12345    }
12346
12347    @GraphQLField
12348    @GraphQLName("wishlistPriorities")
12349    @GraphQLNonNull
12350    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12351    static CountingPaginatedData<WishlistPriorityObject> wishlistPriorities(final DataFetchingEnvironment env,
12352            @GraphQLName("wishlistTypeName") @GraphQLNonNull final String wishlistTypeName) {
12353        CountingPaginatedData<WishlistPriorityObject> data;
12354
12355        try {
12356            var commandForm = WishlistUtil.getHome().getGetWishlistPrioritiesForm();
12357            var command = CDI.current().select(GetWishlistPrioritiesCommand.class).get();
12358
12359            commandForm.setWishlistTypeName(wishlistTypeName);
12360
12361            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12362            if(totalEntities == null) {
12363                data = Connections.emptyConnection();
12364            } else {
12365                try(var objectLimiter = new ObjectLimiter(env, WishlistPriorityConstants.COMPONENT_VENDOR_NAME, WishlistPriorityConstants.ENTITY_TYPE_NAME, totalEntities)) {
12366                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12367
12368                    var wishlistPriorities = entities.stream()
12369                            .map(WishlistPriorityObject::new)
12370                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12371
12372                    data = new CountedObjects<>(objectLimiter, wishlistPriorities);
12373                }
12374            }
12375        } catch (NamingException ex) {
12376            throw new RuntimeException(ex);
12377        }
12378
12379        return data;
12380    }
12381
12382    @GraphQLField
12383    @GraphQLName("termType")
12384    static TermTypeObject termType(final DataFetchingEnvironment env,
12385            @GraphQLName("termTypeName") final String termTypeName,
12386            @GraphQLName("id") @GraphQLID final String id) {
12387        TermType termType;
12388
12389        try {
12390            var commandForm = TermUtil.getHome().getGetTermTypeForm();
12391
12392            commandForm.setTermTypeName(termTypeName);
12393            commandForm.setUuid(id);
12394
12395            termType = CDI.current().select(GetTermTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12396        } catch (NamingException ex) {
12397            throw new RuntimeException(ex);
12398        }
12399
12400        return termType == null ? null : new TermTypeObject(termType);
12401    }
12402
12403    @GraphQLField
12404    @GraphQLName("termTypes")
12405    @GraphQLNonNull
12406    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12407    static CountingPaginatedData<TermTypeObject> termTypes(final DataFetchingEnvironment env) {
12408        CountingPaginatedData<TermTypeObject> data;
12409
12410        try {
12411            var commandForm = TermUtil.getHome().getGetTermTypesForm();
12412            var command = CDI.current().select(GetTermTypesCommand.class).get();
12413
12414            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12415            if(totalEntities == null) {
12416                data = Connections.emptyConnection();
12417            } else {
12418                try(var objectLimiter = new ObjectLimiter(env, TermTypeConstants.COMPONENT_VENDOR_NAME, TermTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12419                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12420
12421                    var termTypes = entities.stream()
12422                            .map(TermTypeObject::new)
12423                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12424
12425                    data = new CountedObjects<>(objectLimiter, termTypes);
12426                }
12427            }
12428        } catch (NamingException ex) {
12429            throw new RuntimeException(ex);
12430        }
12431
12432        return data;
12433    }
12434
12435    @GraphQLField
12436    @GraphQLName("term")
12437    static TermObject term(final DataFetchingEnvironment env,
12438            @GraphQLName("termName") final String termName,
12439            @GraphQLName("id") @GraphQLID final String id) {
12440        Term term;
12441
12442        try {
12443            var commandForm = TermUtil.getHome().getGetTermForm();
12444
12445            commandForm.setTermName(termName);
12446            commandForm.setUuid(id);
12447
12448            term = CDI.current().select(GetTermCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12449        } catch (NamingException ex) {
12450            throw new RuntimeException(ex);
12451        }
12452
12453        return term == null ? null : new TermObject(term);
12454    }
12455
12456    @GraphQLField
12457    @GraphQLName("terms")
12458    @GraphQLNonNull
12459    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12460    static CountingPaginatedData<TermObject> terms(final DataFetchingEnvironment env) {
12461        CountingPaginatedData<TermObject> data;
12462
12463        try {
12464            var commandForm = TermUtil.getHome().getGetTermsForm();
12465            var command = CDI.current().select(GetTermsCommand.class).get();
12466
12467            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12468            if(totalEntities == null) {
12469                data = Connections.emptyConnection();
12470            } else {
12471                try(var objectLimiter = new ObjectLimiter(env, TermConstants.COMPONENT_VENDOR_NAME, TermConstants.ENTITY_TYPE_NAME, totalEntities)) {
12472                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12473
12474                    var terms = entities.stream()
12475                            .map(TermObject::new)
12476                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12477
12478                    data = new CountedObjects<>(objectLimiter, terms);
12479                }
12480            }
12481        } catch (NamingException ex) {
12482            throw new RuntimeException(ex);
12483        }
12484
12485        return data;
12486    }
12487
12488    @GraphQLField
12489    @GraphQLName("securityRoleGroup")
12490    static SecurityRoleGroupObject securityRoleGroup(final DataFetchingEnvironment env,
12491            @GraphQLName("securityRoleGroupName") final String securityRoleGroupName,
12492            @GraphQLName("id") @GraphQLID final String id) {
12493        SecurityRoleGroup securityRoleGroup;
12494
12495        try {
12496            var commandForm = SecurityUtil.getHome().getGetSecurityRoleGroupForm();
12497
12498            commandForm.setSecurityRoleGroupName(securityRoleGroupName);
12499            commandForm.setUuid(id);
12500
12501            securityRoleGroup = CDI.current().select(GetSecurityRoleGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12502        } catch (NamingException ex) {
12503            throw new RuntimeException(ex);
12504        }
12505
12506        return securityRoleGroup == null ? null : new SecurityRoleGroupObject(securityRoleGroup);
12507    }
12508
12509    @GraphQLField
12510    @GraphQLName("securityRoleGroups")
12511    @GraphQLNonNull
12512    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12513    static CountingPaginatedData<SecurityRoleGroupObject> securityRoleGroups(final DataFetchingEnvironment env,
12514            @GraphQLName("parentSecurityRoleGroupName") final String parentSecurityRoleGroupName) {
12515        CountingPaginatedData<SecurityRoleGroupObject> data;
12516
12517        try {
12518            var commandForm = SecurityUtil.getHome().getGetSecurityRoleGroupsForm();
12519            var command = CDI.current().select(GetSecurityRoleGroupsCommand.class).get();
12520
12521            commandForm.setParentSecurityRoleGroupName(parentSecurityRoleGroupName);
12522
12523            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12524            if(totalEntities == null) {
12525                data = Connections.emptyConnection();
12526            } else {
12527                try(var objectLimiter = new ObjectLimiter(env, SecurityRoleGroupConstants.COMPONENT_VENDOR_NAME, SecurityRoleGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
12528                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12529
12530                    var securityRoleGroups = entities.stream()
12531                            .map(SecurityRoleGroupObject::new)
12532                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12533
12534                    data = new CountedObjects<>(objectLimiter, securityRoleGroups);
12535                }
12536            }
12537        } catch (NamingException ex) {
12538            throw new RuntimeException(ex);
12539        }
12540
12541        return data;
12542    }
12543
12544    @GraphQLField
12545    @GraphQLName("securityRole")
12546    static SecurityRoleObject securityRole(final DataFetchingEnvironment env,
12547            @GraphQLName("securityRoleGroupName") final String securityRoleGroupName,
12548            @GraphQLName("securityRoleName") final String securityRoleName,
12549            @GraphQLName("id") @GraphQLID final String id) {
12550        SecurityRole securityRole;
12551
12552        try {
12553            var commandForm = SecurityUtil.getHome().getGetSecurityRoleForm();
12554
12555            commandForm.setSecurityRoleGroupName(securityRoleGroupName);
12556            commandForm.setSecurityRoleName(securityRoleName);
12557            commandForm.setUuid(id);
12558
12559            securityRole = CDI.current().select(GetSecurityRoleCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12560        } catch (NamingException ex) {
12561            throw new RuntimeException(ex);
12562        }
12563
12564        return securityRole == null ? null : new SecurityRoleObject(securityRole);
12565    }
12566
12567    @GraphQLField
12568    @GraphQLName("securityRoles")
12569    @GraphQLNonNull
12570    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12571    static CountingPaginatedData<SecurityRoleObject> securityRoles(final DataFetchingEnvironment env,
12572            @GraphQLName("securityRoleGroupName") @GraphQLNonNull final String securityRoleGroupName) {
12573        CountingPaginatedData<SecurityRoleObject> data;
12574
12575        try {
12576            var commandForm = SecurityUtil.getHome().getGetSecurityRolesForm();
12577            var command = CDI.current().select(GetSecurityRolesCommand.class).get();
12578
12579            commandForm.setSecurityRoleGroupName(securityRoleGroupName);
12580
12581            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12582            if(totalEntities == null) {
12583                data = Connections.emptyConnection();
12584            } else {
12585                try(var objectLimiter = new ObjectLimiter(env, SecurityRoleConstants.COMPONENT_VENDOR_NAME, SecurityRoleConstants.ENTITY_TYPE_NAME, totalEntities)) {
12586                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12587
12588                    var securityRoles = entities.stream()
12589                            .map(SecurityRoleObject::new)
12590                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12591
12592                    data = new CountedObjects<>(objectLimiter, securityRoles);
12593                }
12594            }
12595        } catch (NamingException ex) {
12596            throw new RuntimeException(ex);
12597        }
12598
12599        return data;
12600    }
12601
12602    @GraphQLField
12603    @GraphQLName("personalTitles")
12604    @GraphQLNonNull
12605    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12606    static CountingPaginatedData<PersonalTitleObject> personalTitles(final DataFetchingEnvironment env) {
12607        CountingPaginatedData<PersonalTitleObject> data;
12608
12609        try {
12610            var commandForm = PartyUtil.getHome().getGetPersonalTitlesForm();
12611            var command = CDI.current().select(GetPersonalTitlesCommand.class).get();
12612
12613            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12614            if(totalEntities == null) {
12615                data = Connections.emptyConnection();
12616            } else {
12617                try(var objectLimiter = new ObjectLimiter(env, PersonalTitleConstants.COMPONENT_VENDOR_NAME, PersonalTitleConstants.ENTITY_TYPE_NAME, totalEntities)) {
12618                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12619
12620                    var personalTitles = entities.stream()
12621                            .map(PersonalTitleObject::new)
12622                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12623
12624                    data = new CountedObjects<>(objectLimiter, personalTitles);
12625                }
12626            }
12627        } catch (NamingException ex) {
12628            throw new RuntimeException(ex);
12629        }
12630
12631        return data;
12632    }
12633
12634    @GraphQLField
12635    @GraphQLName("nameSuffixes")
12636    @GraphQLNonNull
12637    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12638    static CountingPaginatedData<NameSuffixObject> nameSuffixes(final DataFetchingEnvironment env) {
12639        CountingPaginatedData<NameSuffixObject> data;
12640
12641        try {
12642            var commandForm = PartyUtil.getHome().getGetNameSuffixesForm();
12643            var command = CDI.current().select(GetNameSuffixesCommand.class).get();
12644
12645            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12646            if(totalEntities == null) {
12647                data = Connections.emptyConnection();
12648            } else {
12649                try(var objectLimiter = new ObjectLimiter(env, NameSuffixConstants.COMPONENT_VENDOR_NAME, NameSuffixConstants.ENTITY_TYPE_NAME, totalEntities)) {
12650                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12651
12652                    var nameSuffixes = entities.stream()
12653                            .map(NameSuffixObject::new)
12654                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12655
12656                    data = new CountedObjects<>(objectLimiter, nameSuffixes);
12657                }
12658            }
12659        } catch (NamingException ex) {
12660            throw new RuntimeException(ex);
12661        }
12662
12663        return data;
12664    }
12665
12666    @GraphQLField
12667    @GraphQLName("tagScope")
12668    static TagScopeObject tagScope(final DataFetchingEnvironment env,
12669            @GraphQLName("tagScopeName") final String tagScopeName,
12670            @GraphQLName("id") @GraphQLID final String id) {
12671        TagScope tagScope;
12672
12673        try {
12674            var commandForm = TagUtil.getHome().getGetTagScopeForm();
12675
12676            commandForm.setTagScopeName(tagScopeName);
12677            commandForm.setUuid(id);
12678
12679            tagScope = CDI.current().select(GetTagScopeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12680        } catch (NamingException ex) {
12681            throw new RuntimeException(ex);
12682        }
12683
12684        return tagScope == null ? null : new TagScopeObject(tagScope, null);
12685    }
12686
12687    @GraphQLField
12688    @GraphQLName("tagScopes")
12689    @GraphQLNonNull
12690    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12691    static CountingPaginatedData<TagScopeObject> tagScopes(final DataFetchingEnvironment env) {
12692        CountingPaginatedData<TagScopeObject> data;
12693
12694        try {
12695            var commandForm = TagUtil.getHome().getGetTagScopesForm();
12696            var command = CDI.current().select(GetTagScopesCommand.class).get();
12697
12698            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12699            if(totalEntities == null) {
12700                data = Connections.emptyConnection();
12701            } else {
12702                try(var objectLimiter = new ObjectLimiter(env, TagScopeConstants.COMPONENT_VENDOR_NAME, TagScopeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12703                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12704
12705                    var tagScopes = entities.stream()
12706                            .map(TagScopeObject::new)
12707                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12708
12709                    data = new CountedObjects<>(objectLimiter, tagScopes);
12710                }
12711            }
12712        } catch (NamingException ex) {
12713            throw new RuntimeException(ex);
12714        }
12715
12716        return data;
12717    }
12718
12719    @GraphQLField
12720    @GraphQLName("tagScopeEntityType")
12721    static TagScopeEntityTypeObject tagScopeEntityType(final DataFetchingEnvironment env,
12722            @GraphQLName("tagScopeName") @GraphQLNonNull final String tagScopeName,
12723            @GraphQLName("componentVendorName") @GraphQLNonNull final String componentVendorName,
12724            @GraphQLName("entityTypeName") @GraphQLNonNull final String entityTypeName) {
12725        TagScopeEntityType tagScopeEntityType;
12726
12727        try {
12728            var commandForm = TagUtil.getHome().getGetTagScopeEntityTypeForm();
12729
12730            commandForm.setTagScopeName(tagScopeName);
12731            commandForm.setComponentVendorName(componentVendorName);
12732            commandForm.setEntityTypeName(entityTypeName);
12733
12734            tagScopeEntityType = CDI.current().select(GetTagScopeEntityTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12735        } catch (NamingException ex) {
12736            throw new RuntimeException(ex);
12737        }
12738
12739        return tagScopeEntityType == null ? null : new TagScopeEntityTypeObject(tagScopeEntityType);
12740    }
12741
12742    @GraphQLField
12743    @GraphQLName("tagScopeEntityTypes")
12744    @GraphQLNonNull
12745    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12746    static CountingPaginatedData<TagScopeEntityTypeObject> tagScopeEntityTypes(final DataFetchingEnvironment env,
12747            @GraphQLName("tagScopeName") final String tagScopeName,
12748            @GraphQLName("componentVendorName") final String componentVendorName,
12749            @GraphQLName("entityTypeName") final String entityTypeName) {
12750        try {
12751            var commandForm = TagUtil.getHome().getGetTagScopeEntityTypesForm();
12752            var command = CDI.current().select(GetTagScopeEntityTypesCommand.class).get();
12753
12754            commandForm.setTagScopeName(tagScopeName);
12755            commandForm.setComponentVendorName(componentVendorName);
12756            commandForm.setEntityTypeName(entityTypeName);
12757
12758            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12759            if(totalEntities == null) {
12760                return Connections.emptyConnection();
12761            } else {
12762                try(var objectLimiter = new ObjectLimiter(env, TagScopeEntityTypeConstants.COMPONENT_VENDOR_NAME, TagScopeEntityTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12763                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12764
12765                    return new CountedObjects<>(objectLimiter, entities.stream().map(TagScopeEntityTypeObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size()))));
12766                }
12767            }
12768        } catch (NamingException ex) {
12769            throw new RuntimeException(ex);
12770        }
12771    }
12772
12773    @GraphQLField
12774    @GraphQLName("tag")
12775    static TagObject tag(final DataFetchingEnvironment env,
12776            @GraphQLName("tagScopeName") final String tagScopeName,
12777            @GraphQLName("tagName") final String tagName,
12778            @GraphQLName("id") @GraphQLID final String id) {
12779        Tag tag;
12780
12781        try {
12782            var commandForm = TagUtil.getHome().getGetTagForm();
12783
12784            commandForm.setTagScopeName(tagScopeName);
12785            commandForm.setTagName(tagName);
12786            commandForm.setUuid(id);
12787
12788            tag = CDI.current().select(GetTagCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12789        } catch (NamingException ex) {
12790            throw new RuntimeException(ex);
12791        }
12792
12793        return tag == null ? null : new TagObject(tag);
12794    }
12795
12796    @GraphQLField
12797    @GraphQLName("tags")
12798    @GraphQLNonNull
12799    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12800    static CountingPaginatedData<TagObject> tags(final DataFetchingEnvironment env,
12801            @GraphQLName("tagScopeName") @GraphQLNonNull final String tagScopeName) {
12802        CountingPaginatedData<TagObject> data;
12803
12804        try {
12805            var commandForm = TagUtil.getHome().getGetTagsForm();
12806            var command = CDI.current().select(GetTagsCommand.class).get();
12807
12808            commandForm.setTagScopeName(tagScopeName);
12809
12810            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12811            if(totalEntities == null) {
12812                data = Connections.emptyConnection();
12813            } else {
12814                try(var objectLimiter = new ObjectLimiter(env, TagConstants.COMPONENT_VENDOR_NAME, TagConstants.ENTITY_TYPE_NAME, totalEntities)) {
12815                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12816
12817                    var tagObjects = entities.stream()
12818                            .map(TagObject::new)
12819                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12820
12821                    data = new CountedObjects<>(objectLimiter, tagObjects);
12822                }
12823            }
12824        } catch (NamingException ex) {
12825            throw new RuntimeException(ex);
12826        }
12827
12828        return data;
12829    }
12830
12831    @GraphQLField
12832    @GraphQLName("entityTag")
12833    static EntityTagObject entityTag(final DataFetchingEnvironment env,
12834            @GraphQLName("id") @GraphQLNonNull final String id,
12835            @GraphQLName("tagScopeName") @GraphQLNonNull final String tagScopeName,
12836            @GraphQLName("tagName") @GraphQLNonNull final String tagName) {
12837        EntityTag entityTag;
12838
12839        try {
12840            var commandForm = TagUtil.getHome().getGetEntityTagForm();
12841
12842            commandForm.setUuid(id);
12843            commandForm.setTagScopeName(tagScopeName);
12844            commandForm.setTagName(tagName);
12845
12846            entityTag = CDI.current().select(GetEntityTagCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12847        } catch (NamingException ex) {
12848            throw new RuntimeException(ex);
12849        }
12850
12851        return entityTag == null ? null : new EntityTagObject(entityTag);
12852    }
12853
12854    @GraphQLField
12855    @GraphQLName("entityTags")
12856    @GraphQLNonNull
12857    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12858    static CountingPaginatedData<EntityTagObject> entityTags(final DataFetchingEnvironment env,
12859            @GraphQLName("id") final String id,
12860            @GraphQLName("tagScopeName") final String tagScopeName,
12861            @GraphQLName("tagName") final String tagName) {
12862        CountingPaginatedData<EntityTagObject> data;
12863
12864        try {
12865            var commandForm = TagUtil.getHome().getGetEntityTagsForm();
12866            var command = CDI.current().select(GetEntityTagsCommand.class).get();
12867
12868            commandForm.setUuid(id);
12869            commandForm.setTagScopeName(tagScopeName);
12870            commandForm.setTagName(tagName);
12871
12872            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12873            if(totalEntities == null) {
12874                data = Connections.emptyConnection();
12875            } else {
12876                try(var objectLimiter = new ObjectLimiter(env, EntityTagConstants.COMPONENT_VENDOR_NAME, EntityTagConstants.ENTITY_TYPE_NAME, totalEntities)) {
12877                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12878
12879                    var entityTags = entities.stream()
12880                            .map(EntityTagObject::new)
12881                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12882
12883                    data = new CountedObjects<>(objectLimiter, entityTags);
12884                }
12885            }
12886        } catch (NamingException ex) {
12887            throw new RuntimeException(ex);
12888        }
12889
12890        return data;
12891    }
12892
12893    @GraphQLField
12894    @GraphQLName("geoCodeType")
12895    static GeoCodeTypeObject geoCodeType(final DataFetchingEnvironment env,
12896            @GraphQLName("geoCodeTypeName") final String geoCodeTypeName,
12897            @GraphQLName("id") @GraphQLID final String id) {
12898        GeoCodeType geoCodeType;
12899
12900        try {
12901            var commandForm = GeoUtil.getHome().getGetGeoCodeTypeForm();
12902
12903            commandForm.setGeoCodeTypeName(geoCodeTypeName);
12904            commandForm.setUuid(id);
12905
12906            geoCodeType = CDI.current().select(GetGeoCodeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12907        } catch (NamingException ex) {
12908            throw new RuntimeException(ex);
12909        }
12910
12911        return geoCodeType == null ? null : new GeoCodeTypeObject(geoCodeType);
12912    }
12913
12914    @GraphQLField
12915    @GraphQLName("geoCodeTypes")
12916    @GraphQLNonNull
12917    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12918    static CountingPaginatedData<GeoCodeTypeObject> geoCodeTypes(final DataFetchingEnvironment env) {
12919        CountingPaginatedData<GeoCodeTypeObject> data;
12920
12921        try {
12922            var commandForm = GeoUtil.getHome().getGetGeoCodeTypesForm();
12923            var command = CDI.current().select(GetGeoCodeTypesCommand.class).get();
12924
12925            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12926            if(totalEntities == null) {
12927                data = Connections.emptyConnection();
12928            } else {
12929                try(var objectLimiter = new ObjectLimiter(env, GeoCodeTypeConstants.COMPONENT_VENDOR_NAME, GeoCodeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12930                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12931
12932                    var geoCodeTypes = entities.stream()
12933                            .map(GeoCodeTypeObject::new)
12934                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12935
12936                    data = new CountedObjects<>(objectLimiter, geoCodeTypes);
12937                }
12938            }
12939        } catch (NamingException ex) {
12940            throw new RuntimeException(ex);
12941        }
12942
12943        return data;
12944    }
12945
12946    @GraphQLField
12947    @GraphQLName("geoCodeAliasType")
12948    static GeoCodeAliasTypeObject geoCodeAliasType(final DataFetchingEnvironment env,
12949            @GraphQLName("geoCodeTypeName") @GraphQLNonNull final String geoCodeTypeName,
12950            @GraphQLName("geoCodeAliasTypeName") @GraphQLNonNull final String geoCodeAliasTypeName) {
12951        GeoCodeAliasType geoCodeAliasType;
12952
12953        try {
12954            var commandForm = GeoUtil.getHome().getGetGeoCodeAliasTypeForm();
12955
12956            commandForm.setGeoCodeTypeName(geoCodeTypeName);
12957            commandForm.setGeoCodeAliasTypeName(geoCodeAliasTypeName);
12958
12959            geoCodeAliasType = CDI.current().select(GetGeoCodeAliasTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12960        } catch (NamingException ex) {
12961            throw new RuntimeException(ex);
12962        }
12963
12964        return geoCodeAliasType == null ? null : new GeoCodeAliasTypeObject(geoCodeAliasType);
12965    }
12966
12967    @GraphQLField
12968    @GraphQLName("geoCodeAliasTypes")
12969    @GraphQLNonNull
12970    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12971    static CountingPaginatedData<GeoCodeAliasTypeObject> geoCodeAliasTypes(final DataFetchingEnvironment env,
12972            @GraphQLName("geoCodeTypeName") @GraphQLNonNull final String geoCodeTypeName) {
12973        CountingPaginatedData<GeoCodeAliasTypeObject> data;
12974
12975        try {
12976            var commandForm = GeoUtil.getHome().getGetGeoCodeAliasTypesForm();
12977            var command = CDI.current().select(GetGeoCodeAliasTypesCommand.class).get();
12978
12979            commandForm.setGeoCodeTypeName(geoCodeTypeName);
12980
12981            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12982            if(totalEntities == null) {
12983                data = Connections.emptyConnection();
12984            } else {
12985                try(var objectLimiter = new ObjectLimiter(env, GeoCodeAliasTypeConstants.COMPONENT_VENDOR_NAME, GeoCodeAliasTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12986                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12987
12988                    var geoCodeAliasTypes = entities.stream()
12989                            .map(GeoCodeAliasTypeObject::new)
12990                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12991
12992                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
12993                }
12994            }
12995        } catch (NamingException ex) {
12996            throw new RuntimeException(ex);
12997        }
12998
12999        return data;
13000    }
13001
13002    @GraphQLField
13003    @GraphQLName("geoCodeScope")
13004    static GeoCodeScopeObject geoCodeScope(final DataFetchingEnvironment env,
13005            @GraphQLName("geoCodeScopeName") final String geoCodeScopeName,
13006            @GraphQLName("id") @GraphQLID final String id) {
13007        GeoCodeScope geoCodeScope;
13008
13009        try {
13010            var commandForm = GeoUtil.getHome().getGetGeoCodeScopeForm();
13011
13012            commandForm.setGeoCodeScopeName(geoCodeScopeName);
13013            commandForm.setUuid(id);
13014
13015            geoCodeScope = CDI.current().select(GetGeoCodeScopeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13016        } catch (NamingException ex) {
13017            throw new RuntimeException(ex);
13018        }
13019
13020        return geoCodeScope == null ? null : new GeoCodeScopeObject(geoCodeScope);
13021    }
13022
13023    @GraphQLField
13024    @GraphQLName("geoCodeScopes")
13025    @GraphQLNonNull
13026    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13027    static CountingPaginatedData<GeoCodeScopeObject> geoCodeScopes(final DataFetchingEnvironment env) {
13028        CountingPaginatedData<GeoCodeScopeObject> data;
13029
13030        try {
13031            var commandForm = GeoUtil.getHome().getGetGeoCodeScopesForm();
13032            var command = CDI.current().select(GetGeoCodeScopesCommand.class).get();
13033
13034            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13035            if(totalEntities == null) {
13036                data = Connections.emptyConnection();
13037            } else {
13038                try(var objectLimiter = new ObjectLimiter(env, GeoCodeScopeConstants.COMPONENT_VENDOR_NAME, GeoCodeScopeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13039                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13040
13041                    var geoCodeScopes = entities.stream()
13042                            .map(GeoCodeScopeObject::new)
13043                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13044
13045                    data = new CountedObjects<>(objectLimiter, geoCodeScopes);
13046                }
13047            }
13048        } catch (NamingException ex) {
13049            throw new RuntimeException(ex);
13050        }
13051
13052        return data;
13053    }
13054
13055    @GraphQLField
13056    @GraphQLName("geoCode")
13057    static GeoCodeObject geoCode(final DataFetchingEnvironment env,
13058            @GraphQLName("geoCodeName") final String geoCodeName,
13059            @GraphQLName("id") @GraphQLID final String id) {
13060        GeoCode geoCode;
13061
13062        try {
13063            var commandForm = GeoUtil.getHome().getGetGeoCodeForm();
13064
13065            commandForm.setGeoCodeName(geoCodeName);
13066            commandForm.setUuid(id);
13067
13068            geoCode = CDI.current().select(GetGeoCodeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13069        } catch (NamingException ex) {
13070            throw new RuntimeException(ex);
13071        }
13072
13073        return geoCode == null ? null : new GeoCodeObject(geoCode);
13074    }
13075
13076    @GraphQLField
13077    @GraphQLName("geoCodeAlias")
13078    static GeoCodeAliasObject geoCodeAlias(final DataFetchingEnvironment env,
13079            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
13080            @GraphQLName("geoCodeAliasTypeName") @GraphQLNonNull final String geoCodeAliasTypeName) {
13081        GeoCodeAlias geoCodeAlias;
13082
13083        try {
13084            var commandForm = GeoUtil.getHome().getGetGeoCodeAliasForm();
13085
13086            commandForm.setGeoCodeName(geoCodeName);
13087            commandForm.setGeoCodeAliasTypeName(geoCodeAliasTypeName);
13088
13089            geoCodeAlias = CDI.current().select(GetGeoCodeAliasCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13090        } catch (NamingException ex) {
13091            throw new RuntimeException(ex);
13092        }
13093
13094        return geoCodeAlias == null ? null : new GeoCodeAliasObject(geoCodeAlias);
13095    }
13096
13097    @GraphQLField
13098    @GraphQLName("geoCodeAliases")
13099    @GraphQLNonNull
13100    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13101    static CountingPaginatedData<GeoCodeAliasObject> geoCodeAliases(final DataFetchingEnvironment env,
13102            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName) {
13103        CountingPaginatedData<GeoCodeAliasObject> data;
13104
13105        try {
13106            var commandForm = GeoUtil.getHome().getGetGeoCodeAliasesForm();
13107            var command = CDI.current().select(GetGeoCodeAliasesCommand.class).get();
13108
13109            commandForm.setGeoCodeName(geoCodeName);
13110
13111            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13112            if(totalEntities == null) {
13113                data = Connections.emptyConnection();
13114            } else {
13115                try(var objectLimiter = new ObjectLimiter(env, GeoCodeAliasConstants.COMPONENT_VENDOR_NAME, GeoCodeAliasConstants.ENTITY_TYPE_NAME, totalEntities)) {
13116                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13117
13118                    var geoCodeAliass = entities.stream()
13119                            .map(GeoCodeAliasObject::new)
13120                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13121
13122                    data = new CountedObjects<>(objectLimiter, geoCodeAliass);
13123                }
13124            }
13125        } catch (NamingException ex) {
13126            throw new RuntimeException(ex);
13127        }
13128
13129        return data;
13130    }
13131
13132    @GraphQLField
13133    @GraphQLName("geoCodeLanguage")
13134    static GeoCodeLanguageObject geoCodeLanguage(final DataFetchingEnvironment env,
13135            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
13136            @GraphQLName("languageIsoName") @GraphQLNonNull final String languageIsoName) {
13137        GeoCodeLanguage geoCodeLanguage;
13138
13139        try {
13140            var commandForm = GeoUtil.getHome().getGetGeoCodeLanguageForm();
13141
13142            commandForm.setGeoCodeName(geoCodeName);
13143            commandForm.setLanguageIsoName(languageIsoName);
13144
13145            geoCodeLanguage = CDI.current().select(GetGeoCodeLanguageCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13146        } catch (NamingException ex) {
13147            throw new RuntimeException(ex);
13148        }
13149
13150        return geoCodeLanguage == null ? null : new GeoCodeLanguageObject(geoCodeLanguage);
13151    }
13152
13153    @GraphQLField
13154    @GraphQLName("geoCodeLanguages")
13155    @GraphQLNonNull
13156    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13157    static CountingPaginatedData<GeoCodeLanguageObject> geoCodeLanguages(final DataFetchingEnvironment env,
13158            @GraphQLName("geoCodeName") final String geoCodeName,
13159            @GraphQLName("languageIsoName") final String languageIsoName) {
13160        CountingPaginatedData<GeoCodeLanguageObject> data;
13161
13162        try {
13163            var commandForm = GeoUtil.getHome().getGetGeoCodeLanguagesForm();
13164            var command = CDI.current().select(GetGeoCodeLanguagesCommand.class).get();
13165
13166            commandForm.setGeoCodeName(geoCodeName);
13167            commandForm.setLanguageIsoName(languageIsoName);
13168
13169            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13170            if(totalEntities == null) {
13171                data = Connections.emptyConnection();
13172            } else {
13173                try(var objectLimiter = new ObjectLimiter(env, GeoCodeLanguageConstants.COMPONENT_VENDOR_NAME, GeoCodeLanguageConstants.ENTITY_TYPE_NAME, totalEntities)) {
13174                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13175
13176                    var transactionTypes = entities.stream()
13177                            .map(GeoCodeLanguageObject::new)
13178                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13179
13180                    data = new CountedObjects<>(objectLimiter, transactionTypes);
13181                }
13182            }
13183        } catch (NamingException ex) {
13184            throw new RuntimeException(ex);
13185        }
13186
13187        return data;
13188    }
13189
13190    @GraphQLField
13191    @GraphQLName("geoCodeCurrency")
13192    static GeoCodeCurrencyObject geoCodeCurrency(final DataFetchingEnvironment env,
13193            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
13194            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
13195        GeoCodeCurrency geoCodeCurrency;
13196
13197        try {
13198            var commandForm = GeoUtil.getHome().getGetGeoCodeCurrencyForm();
13199
13200            commandForm.setGeoCodeName(geoCodeName);
13201            commandForm.setCurrencyIsoName(currencyIsoName);
13202
13203            geoCodeCurrency = CDI.current().select(GetGeoCodeCurrencyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13204        } catch (NamingException ex) {
13205            throw new RuntimeException(ex);
13206        }
13207
13208        return geoCodeCurrency == null ? null : new GeoCodeCurrencyObject(geoCodeCurrency);
13209    }
13210
13211    @GraphQLField
13212    @GraphQLName("geoCodeCurrencies")
13213    @GraphQLNonNull
13214    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13215    static CountingPaginatedData<GeoCodeCurrencyObject> geoCodeCurrencies(final DataFetchingEnvironment env,
13216            @GraphQLName("geoCodeName") final String geoCodeName,
13217            @GraphQLName("currencyIsoName") final String currencyIsoName) {
13218        CountingPaginatedData<GeoCodeCurrencyObject> data;
13219
13220        try {
13221            var commandForm = GeoUtil.getHome().getGetGeoCodeCurrenciesForm();
13222            var command = CDI.current().select(GetGeoCodeCurrenciesCommand.class).get();
13223
13224            commandForm.setGeoCodeName(geoCodeName);
13225            commandForm.setCurrencyIsoName(currencyIsoName);
13226
13227            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13228            if(totalEntities == null) {
13229                data = Connections.emptyConnection();
13230            } else {
13231                try(var objectLimiter = new ObjectLimiter(env, GeoCodeCurrencyConstants.COMPONENT_VENDOR_NAME, GeoCodeCurrencyConstants.ENTITY_TYPE_NAME, totalEntities)) {
13232                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13233
13234                    var transactionTypes = entities.stream()
13235                            .map(GeoCodeCurrencyObject::new)
13236                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13237
13238                    data = new CountedObjects<>(objectLimiter, transactionTypes);
13239                }
13240            }
13241        } catch (NamingException ex) {
13242            throw new RuntimeException(ex);
13243        }
13244
13245        return data;
13246    }
13247
13248    @GraphQLField
13249    @GraphQLName("geoCodeTimeZone")
13250    static GeoCodeTimeZoneObject geoCodeTimeZone(final DataFetchingEnvironment env,
13251            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
13252            @GraphQLName("javaTimeZoneName") @GraphQLNonNull final String javaTimeZoneName) {
13253        GeoCodeTimeZone geoCodeTimeZone;
13254
13255        try {
13256            var commandForm = GeoUtil.getHome().getGetGeoCodeTimeZoneForm();
13257
13258            commandForm.setGeoCodeName(geoCodeName);
13259            commandForm.setJavaTimeZoneName(javaTimeZoneName);
13260
13261            geoCodeTimeZone = CDI.current().select(GetGeoCodeTimeZoneCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13262        } catch (NamingException ex) {
13263            throw new RuntimeException(ex);
13264        }
13265
13266        return geoCodeTimeZone == null ? null : new GeoCodeTimeZoneObject(geoCodeTimeZone);
13267    }
13268
13269    @GraphQLField
13270    @GraphQLName("geoCodeTimeZones")
13271    @GraphQLNonNull
13272    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13273    static CountingPaginatedData<GeoCodeTimeZoneObject> geoCodeTimeZones(final DataFetchingEnvironment env,
13274            @GraphQLName("geoCodeName") final String geoCodeName,
13275            @GraphQLName("javaTimeZoneName") final String javaTimeZoneName) {
13276        CountingPaginatedData<GeoCodeTimeZoneObject> data;
13277
13278        try {
13279            var commandForm = GeoUtil.getHome().getGetGeoCodeTimeZonesForm();
13280            var command = CDI.current().select(GetGeoCodeTimeZonesCommand.class).get();
13281
13282            commandForm.setGeoCodeName(geoCodeName);
13283            commandForm.setJavaTimeZoneName(javaTimeZoneName);
13284
13285            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13286            if(totalEntities == null) {
13287                data = Connections.emptyConnection();
13288            } else {
13289                try(var objectLimiter = new ObjectLimiter(env, GeoCodeTimeZoneConstants.COMPONENT_VENDOR_NAME, GeoCodeTimeZoneConstants.ENTITY_TYPE_NAME, totalEntities)) {
13290                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13291
13292                    var transactionTypes = entities.stream()
13293                            .map(GeoCodeTimeZoneObject::new)
13294                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13295
13296                    data = new CountedObjects<>(objectLimiter, transactionTypes);
13297                }
13298            }
13299        } catch (NamingException ex) {
13300            throw new RuntimeException(ex);
13301        }
13302
13303        return data;
13304    }
13305
13306    @GraphQLField
13307    @GraphQLName("geoCodeDateTimeFormat")
13308    static GeoCodeDateTimeFormatObject geoCodeDateTimeFormat(final DataFetchingEnvironment env,
13309            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
13310            @GraphQLName("dateTimeFormatName") @GraphQLNonNull final String dateTimeFormatName) {
13311        GeoCodeDateTimeFormat geoCodeDateTimeFormat;
13312
13313        try {
13314            var commandForm = GeoUtil.getHome().getGetGeoCodeDateTimeFormatForm();
13315
13316            commandForm.setGeoCodeName(geoCodeName);
13317            commandForm.setDateTimeFormatName(dateTimeFormatName);
13318
13319            geoCodeDateTimeFormat = CDI.current().select(GetGeoCodeDateTimeFormatCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13320        } catch (NamingException ex) {
13321            throw new RuntimeException(ex);
13322        }
13323
13324        return geoCodeDateTimeFormat == null ? null : new GeoCodeDateTimeFormatObject(geoCodeDateTimeFormat);
13325    }
13326
13327    @GraphQLField
13328    @GraphQLName("geoCodeDateTimeFormats")
13329    @GraphQLNonNull
13330    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13331    static CountingPaginatedData<GeoCodeDateTimeFormatObject> geoCodeDateTimeFormats(final DataFetchingEnvironment env,
13332            @GraphQLName("geoCodeName") final String geoCodeName,
13333            @GraphQLName("dateTimeFormatName") final String dateTimeFormatName) {
13334        CountingPaginatedData<GeoCodeDateTimeFormatObject> data;
13335
13336        try {
13337            var commandForm = GeoUtil.getHome().getGetGeoCodeDateTimeFormatsForm();
13338            var command = CDI.current().select(GetGeoCodeDateTimeFormatsCommand.class).get();
13339
13340            commandForm.setGeoCodeName(geoCodeName);
13341            commandForm.setDateTimeFormatName(dateTimeFormatName);
13342
13343            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13344            if(totalEntities == null) {
13345                data = Connections.emptyConnection();
13346            } else {
13347                try(var objectLimiter = new ObjectLimiter(env, GeoCodeDateTimeFormatConstants.COMPONENT_VENDOR_NAME, GeoCodeDateTimeFormatConstants.ENTITY_TYPE_NAME, totalEntities)) {
13348                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13349
13350                    var transactionTypes = entities.stream()
13351                            .map(GeoCodeDateTimeFormatObject::new)
13352                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13353
13354                    data = new CountedObjects<>(objectLimiter, transactionTypes);
13355                }
13356            }
13357        } catch (NamingException ex) {
13358            throw new RuntimeException(ex);
13359        }
13360
13361        return data;
13362    }
13363
13364    @GraphQLField
13365    @GraphQLName("country")
13366    static GeoCodeObject country(final DataFetchingEnvironment env,
13367            @GraphQLName("geoCodeName") final String geoCodeName,
13368            @GraphQLName("countryName") final String countryName,
13369            @GraphQLName("iso3Number") final String iso3Number,
13370            @GraphQLName("iso3Letter") final String iso3Letter,
13371            @GraphQLName("iso2Letter") final String iso2Letter,
13372            @GraphQLName("alias") final String alias) {
13373        GeoCode geoCode;
13374
13375        try {
13376            var commandForm = GeoUtil.getHome().getGetCountryForm();
13377
13378            commandForm.setGeoCodeName(geoCodeName);
13379            commandForm.setCountryName(countryName);
13380            commandForm.setIso3Number(iso3Number);
13381            commandForm.setIso3Letter(iso3Letter);
13382            commandForm.setIso2Letter(iso2Letter);
13383            commandForm.setAlias(alias);
13384
13385            geoCode = CDI.current().select(GetCountryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13386        } catch (NamingException ex) {
13387            throw new RuntimeException(ex);
13388        }
13389
13390        return geoCode == null ? null : new GeoCodeObject(geoCode);
13391    }
13392
13393    @GraphQLField
13394    @GraphQLName("countries")
13395    @GraphQLNonNull
13396    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13397    static CountingPaginatedData<GeoCodeObject> countries(final DataFetchingEnvironment env) {
13398        CountingPaginatedData<GeoCodeObject> data;
13399
13400        try {
13401            var commandForm = GeoUtil.getHome().getGetCountriesForm();
13402            var command = CDI.current().select(GetCountriesCommand.class).get();
13403
13404            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13405            if(totalEntities == null) {
13406                data = Connections.emptyConnection();
13407            } else {
13408                try(var objectLimiter = new ObjectLimiter(env, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13409                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13410
13411                    var geoCodeAliasTypes = entities.stream()
13412                            .map(GeoCodeObject::new)
13413                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13414
13415                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
13416                }
13417            }
13418        } catch (NamingException ex) {
13419            throw new RuntimeException(ex);
13420        }
13421
13422        return data;
13423    }
13424
13425    @GraphQLField
13426    @GraphQLName("zipCode")
13427    static GeoCodeObject zipCode(final DataFetchingEnvironment env,
13428            @GraphQLName("countryGeoCodeName") @GraphQLNonNull final String countryGeoCodeName,
13429            @GraphQLName("zipCodeName") @GraphQLNonNull final String zipCodeName) {
13430        GeoCode geoCode;
13431
13432        try {
13433            var commandForm = GeoUtil.getHome().getGetZipCodeForm();
13434
13435            commandForm.setCountryGeoCodeName(countryGeoCodeName);
13436            commandForm.setZipCodeName(zipCodeName);
13437
13438            geoCode = CDI.current().select(GetZipCodeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13439        } catch (NamingException ex) {
13440            throw new RuntimeException(ex);
13441        }
13442
13443        return geoCode == null ? null : new GeoCodeObject(geoCode);
13444    }
13445
13446    @GraphQLField
13447    @GraphQLName("zipCodes")
13448    @GraphQLNonNull
13449    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13450    static CountingPaginatedData<GeoCodeObject> zipCodes(final DataFetchingEnvironment env,
13451            @GraphQLName("countryName") @GraphQLNonNull final String countryName) {
13452        CountingPaginatedData<GeoCodeObject> data;
13453
13454        try {
13455            var commandForm = GeoUtil.getHome().getGetZipCodesForm();
13456            var command = CDI.current().select(GetZipCodesCommand.class).get();
13457
13458            commandForm.setCountryName(countryName);
13459
13460            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13461            if(totalEntities == null) {
13462                data = Connections.emptyConnection();
13463            } else {
13464                try(var objectLimiter = new ObjectLimiter(env, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13465                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13466
13467                    var geoCodeAliasTypes = entities.stream()
13468                            .map(GeoCodeObject::new)
13469                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13470
13471                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
13472                }
13473            }
13474        } catch (NamingException ex) {
13475            throw new RuntimeException(ex);
13476        }
13477
13478        return data;
13479    }
13480
13481    @GraphQLField
13482    @GraphQLName("state")
13483    static GeoCodeObject state(final DataFetchingEnvironment env,
13484            @GraphQLName("countryGeoCodeName") @GraphQLNonNull final String countryGeoCodeName,
13485            @GraphQLName("stateName") final String stateName,
13486            @GraphQLName("postal2Letter") final String postal2Letter) {
13487        GeoCode geoCode;
13488
13489        try {
13490            var commandForm = GeoUtil.getHome().getGetStateForm();
13491
13492            commandForm.setCountryGeoCodeName(countryGeoCodeName);
13493            commandForm.setStateName(stateName);
13494            commandForm.setPostal2Letter(postal2Letter);
13495
13496            geoCode = CDI.current().select(GetStateCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13497        } catch (NamingException ex) {
13498            throw new RuntimeException(ex);
13499        }
13500
13501        return geoCode == null ? null : new GeoCodeObject(geoCode);
13502    }
13503
13504    @GraphQLField
13505    @GraphQLName("states")
13506    @GraphQLNonNull
13507    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13508    static CountingPaginatedData<GeoCodeObject> states(final DataFetchingEnvironment env,
13509            @GraphQLName("countryName") @GraphQLNonNull final String countryName) {
13510        CountingPaginatedData<GeoCodeObject> data;
13511
13512        try {
13513            var commandForm = GeoUtil.getHome().getGetStatesForm();
13514            var command = CDI.current().select(GetStatesCommand.class).get();
13515
13516            commandForm.setCountryName(countryName);
13517
13518            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13519            if(totalEntities == null) {
13520                data = Connections.emptyConnection();
13521            } else {
13522                try(var objectLimiter = new ObjectLimiter(env, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13523                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13524
13525                    var geoCodeAliasTypes = entities.stream()
13526                            .map(GeoCodeObject::new)
13527                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13528
13529                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
13530                }
13531            }
13532        } catch (NamingException ex) {
13533            throw new RuntimeException(ex);
13534        }
13535
13536        return data;
13537    }
13538
13539    @GraphQLField
13540    @GraphQLName("county")
13541    static GeoCodeObject county(final DataFetchingEnvironment env,
13542            @GraphQLName("stateGeoCodeName") @GraphQLNonNull final String stateGeoCodeName,
13543            @GraphQLName("countyName") final String countyName,
13544            @GraphQLName("countyNumber") final String countyNumber) {
13545        GeoCode geoCode;
13546
13547        try {
13548            var commandForm = GeoUtil.getHome().getGetCountyForm();
13549
13550            commandForm.setStateGeoCodeName(stateGeoCodeName);
13551            commandForm.setCountyName(countyName);
13552            commandForm.setCountyNumber(countyNumber);
13553
13554            geoCode = CDI.current().select(GetCountyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13555        } catch (NamingException ex) {
13556            throw new RuntimeException(ex);
13557        }
13558
13559        return geoCode == null ? null : new GeoCodeObject(geoCode);
13560    }
13561
13562    @GraphQLField
13563    @GraphQLName("counties")
13564    @GraphQLNonNull
13565    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13566    static CountingPaginatedData<GeoCodeObject> counties(final DataFetchingEnvironment env,
13567            @GraphQLName("countryName") @GraphQLNonNull final String countryName,
13568            @GraphQLName("stateName") @GraphQLNonNull final String stateName) {
13569        CountingPaginatedData<GeoCodeObject> data;
13570
13571        try {
13572            var commandForm = GeoUtil.getHome().getGetCountiesForm();
13573            var command = CDI.current().select(GetCountiesCommand.class).get();
13574
13575            commandForm.setCountryName(countryName);
13576            commandForm.setStateName(stateName);
13577
13578            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13579            if(totalEntities == null) {
13580                data = Connections.emptyConnection();
13581            } else {
13582                try(var objectLimiter = new ObjectLimiter(env, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13583                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13584
13585                    var geoCodeAliasTypes = entities.stream()
13586                            .map(GeoCodeObject::new)
13587                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13588
13589                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
13590                }
13591            }
13592        } catch (NamingException ex) {
13593            throw new RuntimeException(ex);
13594        }
13595
13596        return data;
13597    }
13598
13599    @GraphQLField
13600    @GraphQLName("city")
13601    static GeoCodeObject city(final DataFetchingEnvironment env,
13602            @GraphQLName("stateGeoCodeName") @GraphQLNonNull final String stateGeoCodeName,
13603            @GraphQLName("cityName") @GraphQLNonNull final String cityName) {
13604        GeoCode geoCode;
13605
13606        try {
13607            var commandForm = GeoUtil.getHome().getGetCityForm();
13608
13609            commandForm.setStateGeoCodeName(stateGeoCodeName);
13610            commandForm.setCityName(cityName);
13611
13612            geoCode = CDI.current().select(GetCityCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13613        } catch (NamingException ex) {
13614            throw new RuntimeException(ex);
13615        }
13616
13617        return geoCode == null ? null : new GeoCodeObject(geoCode);
13618    }
13619
13620    @GraphQLField
13621    @GraphQLName("cities")
13622    @GraphQLNonNull
13623    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13624    static CountingPaginatedData<GeoCodeObject> cities(final DataFetchingEnvironment env,
13625            @GraphQLName("countryName") @GraphQLNonNull final String countryName,
13626            @GraphQLName("stateName") @GraphQLNonNull final String stateName) {
13627        CountingPaginatedData<GeoCodeObject> data;
13628
13629        try {
13630            var commandForm = GeoUtil.getHome().getGetCitiesForm();
13631            var command = CDI.current().select(GetCitiesCommand.class).get();
13632
13633            commandForm.setCountryName(countryName);
13634            commandForm.setStateName(stateName);
13635
13636            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13637            if(totalEntities == null) {
13638                data = Connections.emptyConnection();
13639            } else {
13640                try(var objectLimiter = new ObjectLimiter(env, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13641                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13642
13643                    var geoCodeAliasTypes = entities.stream()
13644                            .map(GeoCodeObject::new)
13645                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13646
13647                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
13648                }
13649            }
13650        } catch (NamingException ex) {
13651            throw new RuntimeException(ex);
13652        }
13653
13654        return data;
13655    }
13656
13657    @GraphQLField
13658    @GraphQLName("shippingMethod")
13659    static ShippingMethodObject shippingMethod(final DataFetchingEnvironment env,
13660            @GraphQLName("shippingMethodName") final String shippingMethodName,
13661            @GraphQLName("id") @GraphQLID final String id) {
13662        ShippingMethod shippingMethod;
13663
13664        try {
13665            var commandForm = ShippingUtil.getHome().getGetShippingMethodForm();
13666
13667            commandForm.setShippingMethodName(shippingMethodName);
13668            commandForm.setUuid(id);
13669
13670            shippingMethod = CDI.current().select(GetShippingMethodCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13671        } catch (NamingException ex) {
13672            throw new RuntimeException(ex);
13673        }
13674
13675        return shippingMethod == null ? null : new ShippingMethodObject(shippingMethod);
13676    }
13677
13678    @GraphQLField
13679    @GraphQLName("shippingMethods")
13680    @GraphQLNonNull
13681    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13682    static CountingPaginatedData<ShippingMethodObject> shippingMethods(final DataFetchingEnvironment env) {
13683        CountingPaginatedData<ShippingMethodObject> data;
13684
13685        try {
13686            var shippingControl = Session.getModelController(ShippingControl.class);
13687            var totalCount = shippingControl.countShippingMethods();
13688
13689            try(var objectLimiter = new ObjectLimiter(env, ShippingMethodConstants.COMPONENT_VENDOR_NAME, ShippingMethodConstants.ENTITY_TYPE_NAME, totalCount)) {
13690                var commandForm = ShippingUtil.getHome().getGetShippingMethodsForm();
13691                var entities = CDI.current().select(GetShippingMethodsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13692
13693                if(entities == null) {
13694                    data = Connections.emptyConnection();
13695                } else {
13696                    var shippingMethods = entities.stream().map(ShippingMethodObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13697
13698                    data = new CountedObjects<>(objectLimiter, shippingMethods);
13699                }
13700            }
13701        } catch (NamingException ex) {
13702            throw new RuntimeException(ex);
13703        }
13704
13705        return data;
13706    }
13707
13708    @GraphQLField
13709    @GraphQLName("transactionTimeType")
13710    static TransactionTimeTypeObject transactionTimeType(final DataFetchingEnvironment env,
13711            @GraphQLName("transactionTimeTypeName") final String transactionTimeTypeName,
13712            @GraphQLName("id") @GraphQLID final String id) {
13713        TransactionTimeType transactionTimeType;
13714
13715        try {
13716            var commandForm = AccountingUtil.getHome().getGetTransactionTimeTypeForm();
13717
13718            commandForm.setTransactionTimeTypeName(transactionTimeTypeName);
13719            commandForm.setUuid(id);
13720
13721            transactionTimeType = CDI.current().select(GetTransactionTimeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13722        } catch (NamingException ex) {
13723            throw new RuntimeException(ex);
13724        }
13725
13726        return transactionTimeType == null ? null : new TransactionTimeTypeObject(transactionTimeType);
13727    }
13728
13729    @GraphQLField
13730    @GraphQLName("transactionTimeTypes")
13731    @GraphQLNonNull
13732    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13733    static CountingPaginatedData<TransactionTimeTypeObject> transactionTimeTypes(final DataFetchingEnvironment env) {
13734        CountingPaginatedData<TransactionTimeTypeObject> data;
13735
13736        try {
13737            var commandForm = AccountingUtil.getHome().getGetTransactionTimeTypesForm();
13738            var command = CDI.current().select(GetTransactionTimeTypesCommand.class).get();
13739
13740            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13741            if(totalEntities == null) {
13742                data = Connections.emptyConnection();
13743            } else {
13744                try(var objectLimiter = new ObjectLimiter(env, TransactionTimeTypeConstants.COMPONENT_VENDOR_NAME, TransactionTimeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13745                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13746
13747                    var transactionTimeTypes = entities.stream()
13748                            .map(TransactionTimeTypeObject::new)
13749                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13750
13751                    data = new CountedObjects<>(objectLimiter, transactionTimeTypes);
13752                }
13753            }
13754        } catch (NamingException ex) {
13755            throw new RuntimeException(ex);
13756        }
13757
13758        return data;
13759    }
13760
13761    @GraphQLField
13762    @GraphQLName("transactionType")
13763    static TransactionTypeObject transactionType(final DataFetchingEnvironment env,
13764            @GraphQLName("transactionTypeName") final String transactionTypeName,
13765            @GraphQLName("id") @GraphQLID final String id) {
13766        TransactionType transactionType;
13767
13768        try {
13769            var commandForm = AccountingUtil.getHome().getGetTransactionTypeForm();
13770
13771            commandForm.setTransactionTypeName(transactionTypeName);
13772            commandForm.setUuid(id);
13773
13774            transactionType = CDI.current().select(GetTransactionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13775        } catch (NamingException ex) {
13776            throw new RuntimeException(ex);
13777        }
13778
13779        return transactionType == null ? null : new TransactionTypeObject(transactionType);
13780    }
13781
13782    @GraphQLField
13783    @GraphQLName("transactionTypes")
13784    @GraphQLNonNull
13785    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13786    static CountingPaginatedData<TransactionTypeObject> transactionTypes(final DataFetchingEnvironment env) {
13787        CountingPaginatedData<TransactionTypeObject> data;
13788
13789        try {
13790            var commandForm = AccountingUtil.getHome().getGetTransactionTypesForm();
13791            var command = CDI.current().select(GetTransactionTypesCommand.class).get();
13792
13793            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13794            if(totalEntities == null) {
13795                data = Connections.emptyConnection();
13796            } else {
13797                try(var objectLimiter = new ObjectLimiter(env, TransactionTypeConstants.COMPONENT_VENDOR_NAME, TransactionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13798                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13799
13800                    var transactionTypes = entities.stream()
13801                            .map(TransactionTypeObject::new)
13802                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13803
13804                    data = new CountedObjects<>(objectLimiter, transactionTypes);
13805                }
13806            }
13807        } catch (NamingException ex) {
13808            throw new RuntimeException(ex);
13809        }
13810
13811        return data;
13812    }
13813
13814    @GraphQLField
13815    @GraphQLName("transactionGlAccountCategory")
13816    static TransactionGlAccountCategoryObject transactionGlAccountCategory(final DataFetchingEnvironment env,
13817            @GraphQLName("transactionTypeName") final String transactionTypeName,
13818            @GraphQLName("transactionGlAccountCategoryName") final String transactionGlAccountCategoryName,
13819            @GraphQLName("id") @GraphQLID final String id) {
13820        TransactionGlAccountCategory transactionGlAccountCategory;
13821
13822        try {
13823            var commandForm = AccountingUtil.getHome().getGetTransactionGlAccountCategoryForm();
13824
13825            commandForm.setTransactionTypeName(transactionTypeName);
13826            commandForm.setTransactionGlAccountCategoryName(transactionGlAccountCategoryName);
13827            commandForm.setUuid(id);
13828
13829            transactionGlAccountCategory = CDI.current().select(GetTransactionGlAccountCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13830        } catch (NamingException ex) {
13831            throw new RuntimeException(ex);
13832        }
13833
13834        return transactionGlAccountCategory == null ? null : new TransactionGlAccountCategoryObject(transactionGlAccountCategory);
13835    }
13836
13837    @GraphQLField
13838    @GraphQLName("transactionGlAccountCategories")
13839    @GraphQLNonNull
13840    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13841    static CountingPaginatedData<TransactionGlAccountCategoryObject> transactionGlAccountCategories(final DataFetchingEnvironment env,
13842            @GraphQLName("transactionTypeName") final String transactionTypeName) {
13843        CountingPaginatedData<TransactionGlAccountCategoryObject> data;
13844
13845        try {
13846            var commandForm = AccountingUtil.getHome().getGetTransactionGlAccountCategoriesForm();
13847            var command = CDI.current().select(GetTransactionGlAccountCategoriesCommand.class).get();
13848
13849            commandForm.setTransactionTypeName(transactionTypeName);
13850
13851            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13852            if(totalEntities == null) {
13853                data = Connections.emptyConnection();
13854            } else {
13855                try(var objectLimiter = new ObjectLimiter(env, TransactionGlAccountCategoryConstants.COMPONENT_VENDOR_NAME, TransactionGlAccountCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
13856                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13857
13858                    var transactionGlAccountCategories = entities.stream()
13859                            .map(TransactionGlAccountCategoryObject::new)
13860                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13861
13862                    data = new CountedObjects<>(objectLimiter, transactionGlAccountCategories);
13863                }
13864            }
13865        } catch (NamingException ex) {
13866            throw new RuntimeException(ex);
13867        }
13868
13869        return data;
13870    }
13871
13872    @GraphQLField
13873    @GraphQLName("transactionEntityRoleType")
13874    static TransactionEntityRoleTypeObject transactionEntityRoleType(final DataFetchingEnvironment env,
13875            @GraphQLName("transactionTypeName") final String transactionTypeName,
13876            @GraphQLName("transactionEntityRoleTypeName") final String transactionEntityRoleTypeName,
13877            @GraphQLName("id") @GraphQLID final String id) {
13878        TransactionEntityRoleType transactionEntityRoleType;
13879
13880        try {
13881            var commandForm = AccountingUtil.getHome().getGetTransactionEntityRoleTypeForm();
13882
13883            commandForm.setTransactionTypeName(transactionTypeName);
13884            commandForm.setTransactionEntityRoleTypeName(transactionEntityRoleTypeName);
13885            commandForm.setUuid(id);
13886
13887            transactionEntityRoleType = CDI.current().select(GetTransactionEntityRoleTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13888        } catch (NamingException ex) {
13889            throw new RuntimeException(ex);
13890        }
13891
13892        return transactionEntityRoleType == null ? null : new TransactionEntityRoleTypeObject(transactionEntityRoleType);
13893    }
13894
13895    @GraphQLField
13896    @GraphQLName("transactionEntityRoleTypes")
13897    @GraphQLNonNull
13898    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13899    static CountingPaginatedData<TransactionEntityRoleTypeObject> transactionEntityRoleTypes(final DataFetchingEnvironment env,
13900            @GraphQLName("transactionTypeName") final String transactionTypeName) {
13901        CountingPaginatedData<TransactionEntityRoleTypeObject> data;
13902
13903        try {
13904            var commandForm = AccountingUtil.getHome().getGetTransactionEntityRoleTypesForm();
13905            var command = CDI.current().select(GetTransactionEntityRoleTypesCommand.class).get();
13906
13907            commandForm.setTransactionTypeName(transactionTypeName);
13908
13909            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13910            if(totalEntities == null) {
13911                data = Connections.emptyConnection();
13912            } else {
13913                try(var objectLimiter = new ObjectLimiter(env, TransactionEntityRoleTypeConstants.COMPONENT_VENDOR_NAME, TransactionEntityRoleTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13914                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13915
13916                    var transactionEntityRoleTypes = entities.stream()
13917                            .map(TransactionEntityRoleTypeObject::new)
13918                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13919
13920                    data = new CountedObjects<>(objectLimiter, transactionEntityRoleTypes);
13921                }
13922            }
13923        } catch (NamingException ex) {
13924            throw new RuntimeException(ex);
13925        }
13926
13927        return data;
13928    }
13929
13930    @GraphQLField
13931    @GraphQLName("transactionGroup")
13932    static TransactionGroupObject transactionGroup(final DataFetchingEnvironment env,
13933            @GraphQLName("transactionGroupName") final String transactionGroupName,
13934            @GraphQLName("id") @GraphQLID final String id) {
13935        TransactionGroup transactionGroup;
13936
13937        try {
13938            var commandForm = AccountingUtil.getHome().getGetTransactionGroupForm();
13939
13940            commandForm.setTransactionGroupName(transactionGroupName);
13941            commandForm.setUuid(id);
13942
13943            transactionGroup = CDI.current().select(GetTransactionGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13944        } catch (NamingException ex) {
13945            throw new RuntimeException(ex);
13946        }
13947
13948        return transactionGroup == null ? null : new TransactionGroupObject(transactionGroup);
13949    }
13950
13951    @GraphQLField
13952    @GraphQLName("transactionGroups")
13953    @GraphQLNonNull
13954    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13955    static CountingPaginatedData<TransactionGroupObject> transactionGroups(final DataFetchingEnvironment env) {
13956        CountingPaginatedData<TransactionGroupObject> data;
13957
13958        try {
13959            var commandForm = AccountingUtil.getHome().getGetTransactionGroupsForm();
13960            var command = CDI.current().select(GetTransactionGroupsCommand.class).get();
13961
13962            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13963            if(totalEntities == null) {
13964                data = Connections.emptyConnection();
13965            } else {
13966                try(var objectLimiter = new ObjectLimiter(env, TransactionGroupConstants.COMPONENT_VENDOR_NAME, TransactionGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
13967                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13968
13969                    var transactionGroups = entities.stream()
13970                            .map(TransactionGroupObject::new)
13971                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13972
13973                    data = new CountedObjects<>(objectLimiter, transactionGroups);
13974                }
13975            }
13976        } catch (NamingException ex) {
13977            throw new RuntimeException(ex);
13978        }
13979
13980        return data;
13981    }
13982
13983    @GraphQLField
13984    @GraphQLName("transaction")
13985    static TransactionObject transaction(final DataFetchingEnvironment env,
13986            @GraphQLName("transactionName") final String transactionName,
13987            @GraphQLName("id") @GraphQLID final String id) {
13988        Transaction transaction;
13989
13990        try {
13991            var commandForm = AccountingUtil.getHome().getGetTransactionForm();
13992
13993            commandForm.setTransactionName(transactionName);
13994            commandForm.setUuid(id);
13995
13996            transaction = CDI.current().select(GetTransactionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13997        } catch (NamingException ex) {
13998            throw new RuntimeException(ex);
13999        }
14000
14001        return transaction == null ? null : new TransactionObject(transaction);
14002    }
14003
14004    @GraphQLField
14005    @GraphQLName("transactions")
14006    @GraphQLNonNull
14007    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14008    static CountingPaginatedData<TransactionObject> transactions(final DataFetchingEnvironment env,
14009            @GraphQLName("transactionGroupName") final String transactionGroupName) {
14010        CountingPaginatedData<TransactionObject> data;
14011
14012        try {
14013            var commandForm = AccountingUtil.getHome().getGetTransactionsForm();
14014            var command = CDI.current().select(GetTransactionsCommand.class).get();
14015
14016            commandForm.setTransactionGroupName(transactionGroupName);
14017
14018            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14019            if(totalEntities == null) {
14020                data = Connections.emptyConnection();
14021            } else {
14022                try(var objectLimiter = new ObjectLimiter(env, TransactionConstants.COMPONENT_VENDOR_NAME, TransactionConstants.ENTITY_TYPE_NAME, totalEntities)) {
14023                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14024
14025                    var transactions = entities.stream()
14026                            .map(TransactionObject::new)
14027                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14028
14029                    data = new CountedObjects<>(objectLimiter, transactions);
14030                }
14031            }
14032        } catch (NamingException ex) {
14033            throw new RuntimeException(ex);
14034        }
14035
14036        return data;
14037    }
14038
14039    @GraphQLField
14040    @GraphQLName("campaign")
14041    static CampaignObject campaign(final DataFetchingEnvironment env,
14042            @GraphQLName("campaignName") final String campaignName,
14043            @GraphQLName("id") @GraphQLID final String id) {
14044        Campaign campaign;
14045
14046        try {
14047            var commandForm = CampaignUtil.getHome().getGetCampaignForm();
14048
14049            commandForm.setCampaignName(campaignName);
14050            commandForm.setUuid(id);
14051
14052            campaign = CDI.current().select(GetCampaignCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14053        } catch (NamingException ex) {
14054            throw new RuntimeException(ex);
14055        }
14056
14057        return campaign == null ? null : new CampaignObject(campaign);
14058    }
14059
14060    @GraphQLField
14061    @GraphQLName("campaigns")
14062    @GraphQLNonNull
14063    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14064    static CountingPaginatedData<CampaignObject> campaigns(final DataFetchingEnvironment env) {
14065        CountingPaginatedData<CampaignObject> data;
14066
14067        try {
14068            var commandForm = CampaignUtil.getHome().getGetCampaignsForm();
14069            var command = CDI.current().select(GetCampaignsCommand.class).get();
14070
14071            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14072            if(totalEntities == null) {
14073                data = Connections.emptyConnection();
14074            } else {
14075                try(var objectLimiter = new ObjectLimiter(env, CampaignConstants.COMPONENT_VENDOR_NAME, CampaignConstants.ENTITY_TYPE_NAME, totalEntities)) {
14076                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14077
14078                    var campaigns = entities.stream()
14079                            .map(CampaignObject::new)
14080                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14081
14082                    data = new CountedObjects<>(objectLimiter, campaigns);
14083                }
14084            }
14085        } catch (NamingException ex) {
14086            throw new RuntimeException(ex);
14087        }
14088
14089        return data;
14090    }
14091
14092    @GraphQLField
14093    @GraphQLName("campaignContent")
14094    static CampaignContentObject campaignContent(final DataFetchingEnvironment env,
14095            @GraphQLName("campaignContentName") final String campaignContentName,
14096            @GraphQLName("id") @GraphQLID final String id) {
14097        CampaignContent campaignContent;
14098
14099        try {
14100            var commandForm = CampaignUtil.getHome().getGetCampaignContentForm();
14101
14102            commandForm.setCampaignContentName(campaignContentName);
14103            commandForm.setUuid(id);
14104
14105            campaignContent = CDI.current().select(GetCampaignContentCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14106        } catch (NamingException ex) {
14107            throw new RuntimeException(ex);
14108        }
14109
14110        return campaignContent == null ? null : new CampaignContentObject(campaignContent);
14111    }
14112
14113    @GraphQLField
14114    @GraphQLName("campaignContents")
14115    @GraphQLNonNull
14116    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14117    static CountingPaginatedData<CampaignContentObject> campaignContents(final DataFetchingEnvironment env) {
14118        CountingPaginatedData<CampaignContentObject> data;
14119
14120        try {
14121            var commandForm = CampaignUtil.getHome().getGetCampaignContentsForm();
14122            var command = CDI.current().select(GetCampaignContentsCommand.class).get();
14123
14124            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14125            if(totalEntities == null) {
14126                data = Connections.emptyConnection();
14127            } else {
14128                try(var objectLimiter = new ObjectLimiter(env, CampaignContentConstants.COMPONENT_VENDOR_NAME, CampaignContentConstants.ENTITY_TYPE_NAME, totalEntities)) {
14129                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14130
14131                    var campaignContents = entities.stream()
14132                            .map(CampaignContentObject::new)
14133                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14134
14135                    data = new CountedObjects<>(objectLimiter, campaignContents);
14136                }
14137            }
14138        } catch (NamingException ex) {
14139            throw new RuntimeException(ex);
14140        }
14141
14142        return data;
14143    }
14144
14145    @GraphQLField
14146    @GraphQLName("campaignMedium")
14147    static CampaignMediumObject campaignMedium(final DataFetchingEnvironment env,
14148            @GraphQLName("campaignMediumName") final String campaignMediumName,
14149            @GraphQLName("id") @GraphQLID final String id) {
14150        CampaignMedium campaignMedium;
14151
14152        try {
14153            var commandForm = CampaignUtil.getHome().getGetCampaignMediumForm();
14154
14155            commandForm.setCampaignMediumName(campaignMediumName);
14156            commandForm.setUuid(id);
14157
14158            campaignMedium = CDI.current().select(GetCampaignMediumCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14159        } catch (NamingException ex) {
14160            throw new RuntimeException(ex);
14161        }
14162
14163        return campaignMedium == null ? null : new CampaignMediumObject(campaignMedium);
14164    }
14165
14166    @GraphQLField
14167    @GraphQLName("campaignMediums")
14168    @GraphQLNonNull
14169    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14170    static CountingPaginatedData<CampaignMediumObject> campaignMediums(final DataFetchingEnvironment env) {
14171        CountingPaginatedData<CampaignMediumObject> data;
14172
14173        try {
14174            var commandForm = CampaignUtil.getHome().getGetCampaignMediumsForm();
14175            var command = CDI.current().select(GetCampaignMediumsCommand.class).get();
14176
14177            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14178            if(totalEntities == null) {
14179                data = Connections.emptyConnection();
14180            } else {
14181                try(var objectLimiter = new ObjectLimiter(env, CampaignMediumConstants.COMPONENT_VENDOR_NAME, CampaignMediumConstants.ENTITY_TYPE_NAME, totalEntities)) {
14182                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14183
14184                    var campaignMediums = entities.stream()
14185                            .map(CampaignMediumObject::new)
14186                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14187
14188                    data = new CountedObjects<>(objectLimiter, campaignMediums);
14189                }
14190            }
14191        } catch (NamingException ex) {
14192            throw new RuntimeException(ex);
14193        }
14194
14195        return data;
14196    }
14197
14198    @GraphQLField
14199    @GraphQLName("campaignTerm")
14200    static CampaignTermObject campaignTerm(final DataFetchingEnvironment env,
14201            @GraphQLName("campaignTermName") final String campaignTermName,
14202            @GraphQLName("id") @GraphQLID final String id) {
14203        CampaignTerm campaignTerm;
14204
14205        try {
14206            var commandForm = CampaignUtil.getHome().getGetCampaignTermForm();
14207
14208            commandForm.setCampaignTermName(campaignTermName);
14209            commandForm.setUuid(id);
14210
14211            campaignTerm = CDI.current().select(GetCampaignTermCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14212        } catch (NamingException ex) {
14213            throw new RuntimeException(ex);
14214        }
14215
14216        return campaignTerm == null ? null : new CampaignTermObject(campaignTerm);
14217    }
14218
14219    @GraphQLField
14220    @GraphQLName("campaignTerms")
14221    @GraphQLNonNull
14222    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14223    static CountingPaginatedData<CampaignTermObject> campaignTerms(final DataFetchingEnvironment env) {
14224        CountingPaginatedData<CampaignTermObject> data;
14225
14226        try {
14227            var commandForm = CampaignUtil.getHome().getGetCampaignTermsForm();
14228            var command = CDI.current().select(GetCampaignTermsCommand.class).get();
14229
14230            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14231            if(totalEntities == null) {
14232                data = Connections.emptyConnection();
14233            } else {
14234                try(var objectLimiter = new ObjectLimiter(env, CampaignTermConstants.COMPONENT_VENDOR_NAME, CampaignTermConstants.ENTITY_TYPE_NAME, totalEntities)) {
14235                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14236
14237                    var campaignTerms = entities.stream()
14238                            .map(CampaignTermObject::new)
14239                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14240
14241                    data = new CountedObjects<>(objectLimiter, campaignTerms);
14242                }
14243            }
14244        } catch (NamingException ex) {
14245            throw new RuntimeException(ex);
14246        }
14247
14248        return data;
14249    }
14250
14251    @GraphQLField
14252    @GraphQLName("campaignSource")
14253    static CampaignSourceObject campaignSource(final DataFetchingEnvironment env,
14254            @GraphQLName("campaignSourceName") final String campaignSourceName,
14255            @GraphQLName("id") @GraphQLID final String id) {
14256        CampaignSource campaignSource;
14257
14258        try {
14259            var commandForm = CampaignUtil.getHome().getGetCampaignSourceForm();
14260
14261            commandForm.setCampaignSourceName(campaignSourceName);
14262            commandForm.setUuid(id);
14263
14264            campaignSource = CDI.current().select(GetCampaignSourceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14265        } catch (NamingException ex) {
14266            throw new RuntimeException(ex);
14267        }
14268
14269        return campaignSource == null ? null : new CampaignSourceObject(campaignSource);
14270    }
14271
14272    @GraphQLField
14273    @GraphQLName("campaignSources")
14274    @GraphQLNonNull
14275    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14276    static CountingPaginatedData<CampaignSourceObject> campaignSources(final DataFetchingEnvironment env) {
14277        CountingPaginatedData<CampaignSourceObject> data;
14278
14279        try {
14280            var commandForm = CampaignUtil.getHome().getGetCampaignSourcesForm();
14281            var command = CDI.current().select(GetCampaignSourcesCommand.class).get();
14282
14283            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14284            if(totalEntities == null) {
14285                data = Connections.emptyConnection();
14286            } else {
14287                try(var objectLimiter = new ObjectLimiter(env, CampaignSourceConstants.COMPONENT_VENDOR_NAME, CampaignSourceConstants.ENTITY_TYPE_NAME, totalEntities)) {
14288                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14289
14290                    var campaignSources = entities.stream()
14291                            .map(CampaignSourceObject::new)
14292                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14293
14294                    data = new CountedObjects<>(objectLimiter, campaignSources);
14295                }
14296            }
14297        } catch (NamingException ex) {
14298            throw new RuntimeException(ex);
14299        }
14300
14301        return data;
14302    }
14303
14304    @GraphQLField
14305    @GraphQLName("subscriptionKind")
14306    static SubscriptionKindObject subscriptionKind(final DataFetchingEnvironment env,
14307            @GraphQLName("subscriptionKindName") final String subscriptionKindName,
14308            @GraphQLName("id") @GraphQLID final String id) {
14309        SubscriptionKind subscriptionKind;
14310
14311        try {
14312            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionKindForm();
14313
14314            commandForm.setSubscriptionKindName(subscriptionKindName);
14315            commandForm.setUuid(id);
14316
14317            subscriptionKind = CDI.current().select(GetSubscriptionKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14318        } catch (NamingException ex) {
14319            throw new RuntimeException(ex);
14320        }
14321
14322        return subscriptionKind == null ? null : new SubscriptionKindObject(subscriptionKind);
14323    }
14324
14325    @GraphQLField
14326    @GraphQLName("subscriptionKinds")
14327    @GraphQLNonNull
14328    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14329    static CountingPaginatedData<SubscriptionKindObject> subscriptionKinds(final DataFetchingEnvironment env) {
14330        CountingPaginatedData<SubscriptionKindObject> data;
14331
14332        try {
14333            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionKindsForm();
14334            var command = CDI.current().select(GetSubscriptionKindsCommand.class).get();
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, SubscriptionKindConstants.COMPONENT_VENDOR_NAME, SubscriptionKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
14341                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14342
14343                    var subscriptionKinds = entities.stream()
14344                            .map(SubscriptionKindObject::new)
14345                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14346
14347                    data = new CountedObjects<>(objectLimiter, subscriptionKinds);
14348                }
14349            }
14350        } catch (NamingException ex) {
14351            throw new RuntimeException(ex);
14352        }
14353
14354        return data;
14355    }
14356
14357    @GraphQLField
14358    @GraphQLName("subscriptionType")
14359    static SubscriptionTypeObject subscriptionType(final DataFetchingEnvironment env,
14360            @GraphQLName("subscriptionKindName") final String subscriptionKindName,
14361            @GraphQLName("subscriptionTypeName") final String subscriptionTypeName,
14362            @GraphQLName("id") @GraphQLID final String id) {
14363        SubscriptionType subscriptionType;
14364
14365        try {
14366            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionTypeForm();
14367
14368            commandForm.setSubscriptionKindName(subscriptionKindName);
14369            commandForm.setSubscriptionTypeName(subscriptionTypeName);
14370            commandForm.setUuid(id);
14371
14372            subscriptionType = CDI.current().select(GetSubscriptionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14373        } catch (NamingException ex) {
14374            throw new RuntimeException(ex);
14375        }
14376
14377        return subscriptionType == null ? null : new SubscriptionTypeObject(subscriptionType);
14378    }
14379
14380    @GraphQLField
14381    @GraphQLName("subscriptionTypes")
14382    @GraphQLNonNull
14383    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14384    static CountingPaginatedData<SubscriptionTypeObject> subscriptionTypes(final DataFetchingEnvironment env,
14385            @GraphQLName("subscriptionKindName") @GraphQLNonNull final String subscriptionKindName) {
14386        CountingPaginatedData<SubscriptionTypeObject> data;
14387
14388        try {
14389            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionTypesForm();
14390            var command = CDI.current().select(GetSubscriptionTypesCommand.class).get();
14391
14392            commandForm.setSubscriptionKindName(subscriptionKindName);
14393
14394            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14395            if(totalEntities == null) {
14396                data = Connections.emptyConnection();
14397            } else {
14398                try(var objectLimiter = new ObjectLimiter(env, SubscriptionTypeConstants.COMPONENT_VENDOR_NAME, SubscriptionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
14399                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14400
14401                    var subscriptionTypes = entities.stream()
14402                            .map(SubscriptionTypeObject::new)
14403                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14404
14405                    data = new CountedObjects<>(objectLimiter, subscriptionTypes);
14406                }
14407            }
14408        } catch (NamingException ex) {
14409            throw new RuntimeException(ex);
14410        }
14411
14412        return data;
14413    }
14414
14415    @GraphQLField
14416    @GraphQLName("subscription")
14417    static SubscriptionObject subscription(final DataFetchingEnvironment env,
14418            @GraphQLName("subscriptionName") final String subscriptionName,
14419            @GraphQLName("id") @GraphQLID final String id) {
14420        Subscription subscription;
14421
14422        try {
14423            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionForm();
14424
14425            commandForm.setSubscriptionName(subscriptionName);
14426            commandForm.setUuid(id);
14427
14428            subscription = CDI.current().select(GetSubscriptionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14429        } catch (NamingException ex) {
14430            throw new RuntimeException(ex);
14431        }
14432
14433        return subscription == null ? null : new SubscriptionObject(subscription);
14434    }
14435
14436    @GraphQLField
14437    @GraphQLName("subscriptions")
14438    @GraphQLNonNull
14439    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14440    static CountingPaginatedData<SubscriptionObject> subscriptions(final DataFetchingEnvironment env,
14441            @GraphQLName("subscriptionKindName") @GraphQLNonNull final String subscriptionKindName,
14442            @GraphQLName("subscriptionTypeName") @GraphQLNonNull final String subscriptionTypeName) {
14443        CountingPaginatedData<SubscriptionObject> data;
14444
14445        try {
14446            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionsForm();
14447            var command = CDI.current().select(GetSubscriptionsCommand.class).get();
14448
14449            commandForm.setSubscriptionKindName(subscriptionKindName);
14450            commandForm.setSubscriptionTypeName(subscriptionTypeName);
14451
14452            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14453            if(totalEntities == null) {
14454                data = Connections.emptyConnection();
14455            } else {
14456                try(var objectLimiter = new ObjectLimiter(env, SubscriptionConstants.COMPONENT_VENDOR_NAME, SubscriptionConstants.ENTITY_TYPE_NAME, totalEntities)) {
14457                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14458
14459                    var subscriptions = entities.stream()
14460                            .map(SubscriptionObject::new)
14461                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14462
14463                    data = new CountedObjects<>(objectLimiter, subscriptions);
14464                }
14465            }
14466        } catch (NamingException ex) {
14467            throw new RuntimeException(ex);
14468        }
14469
14470        return data;
14471    }
14472
14473    @GraphQLField
14474    @GraphQLName("chainKind")
14475    static ChainKindObject chainKind(final DataFetchingEnvironment env,
14476            @GraphQLName("chainKindName") final String chainKindName,
14477            @GraphQLName("id") @GraphQLID final String id) {
14478        ChainKind chainKind;
14479
14480        try {
14481            var commandForm = ChainUtil.getHome().getGetChainKindForm();
14482
14483            commandForm.setChainKindName(chainKindName);
14484            commandForm.setUuid(id);
14485
14486            chainKind = CDI.current().select(GetChainKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14487        } catch (NamingException ex) {
14488            throw new RuntimeException(ex);
14489        }
14490
14491        return chainKind == null ? null : new ChainKindObject(chainKind);
14492    }
14493
14494    @GraphQLField
14495    @GraphQLName("chainKinds")
14496    @GraphQLNonNull
14497    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14498    static CountingPaginatedData<ChainKindObject> chainKinds(final DataFetchingEnvironment env) {
14499        CountingPaginatedData<ChainKindObject> data;
14500
14501        try {
14502            var commandForm = ChainUtil.getHome().getGetChainKindsForm();
14503            var command = CDI.current().select(GetChainKindsCommand.class).get();
14504
14505            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14506            if(totalEntities == null) {
14507                data = Connections.emptyConnection();
14508            } else {
14509                try(var objectLimiter = new ObjectLimiter(env, ChainKindConstants.COMPONENT_VENDOR_NAME, ChainKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
14510                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14511
14512                    var chainKinds = entities.stream()
14513                            .map(ChainKindObject::new)
14514                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14515
14516                    data = new CountedObjects<>(objectLimiter, chainKinds);
14517                }
14518            }
14519        } catch (NamingException ex) {
14520            throw new RuntimeException(ex);
14521        }
14522
14523        return data;
14524    }
14525
14526    @GraphQLField
14527    @GraphQLName("chainType")
14528    static ChainTypeObject chainType(final DataFetchingEnvironment env,
14529            @GraphQLName("chainKindName") final String chainKindName,
14530            @GraphQLName("chainTypeName") final String chainTypeName,
14531            @GraphQLName("id") @GraphQLID final String id) {
14532        ChainType chainType;
14533
14534        try {
14535            var commandForm = ChainUtil.getHome().getGetChainTypeForm();
14536
14537            commandForm.setChainKindName(chainKindName);
14538            commandForm.setChainTypeName(chainTypeName);
14539            commandForm.setUuid(id);
14540
14541            chainType = CDI.current().select(GetChainTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14542        } catch (NamingException ex) {
14543            throw new RuntimeException(ex);
14544        }
14545
14546        return chainType == null ? null : new ChainTypeObject(chainType);
14547    }
14548
14549    @GraphQLField
14550    @GraphQLName("chainTypes")
14551    @GraphQLNonNull
14552    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14553    static CountingPaginatedData<ChainTypeObject> chainTypes(final DataFetchingEnvironment env,
14554            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName) {
14555        CountingPaginatedData<ChainTypeObject> data;
14556
14557        try {
14558            var commandForm = ChainUtil.getHome().getGetChainTypesForm();
14559            var command = CDI.current().select(GetChainTypesCommand.class).get();
14560
14561            commandForm.setChainKindName(chainKindName);
14562
14563            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14564            if(totalEntities == null) {
14565                data = Connections.emptyConnection();
14566            } else {
14567                try(var objectLimiter = new ObjectLimiter(env, ChainTypeConstants.COMPONENT_VENDOR_NAME, ChainTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
14568                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14569
14570                    var chainTypes = entities.stream()
14571                            .map(ChainTypeObject::new)
14572                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14573
14574                    data = new CountedObjects<>(objectLimiter, chainTypes);
14575                }
14576            }
14577        } catch (NamingException ex) {
14578            throw new RuntimeException(ex);
14579        }
14580
14581        return data;
14582    }
14583
14584    @GraphQLField
14585    @GraphQLName("chain")
14586    static ChainObject chain(final DataFetchingEnvironment env,
14587            @GraphQLName("chainKindName") final String chainKindName,
14588            @GraphQLName("chainTypeName") final String chainTypeName,
14589            @GraphQLName("chainName") final String chainName,
14590            @GraphQLName("id") @GraphQLID final String id) {
14591        Chain chain;
14592
14593        try {
14594            var commandForm = ChainUtil.getHome().getGetChainForm();
14595
14596            commandForm.setChainKindName(chainKindName);
14597            commandForm.setChainTypeName(chainTypeName);
14598            commandForm.setChainName(chainName);
14599            commandForm.setUuid(id);
14600
14601            chain = CDI.current().select(GetChainCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14602        } catch (NamingException ex) {
14603            throw new RuntimeException(ex);
14604        }
14605
14606        return chain == null ? null : new ChainObject(chain);
14607    }
14608
14609    @GraphQLField
14610    @GraphQLName("chains")
14611    @GraphQLNonNull
14612    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14613    static CountingPaginatedData<ChainObject> chains(final DataFetchingEnvironment env,
14614            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName,
14615            @GraphQLName("chainTypeName") @GraphQLNonNull final String chainTypeName) {
14616        CountingPaginatedData<ChainObject> data;
14617
14618        try {
14619            var commandForm = ChainUtil.getHome().getGetChainsForm();
14620            var command = CDI.current().select(GetChainsCommand.class).get();
14621
14622            commandForm.setChainKindName(chainKindName);
14623            commandForm.setChainTypeName(chainTypeName);
14624
14625            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14626            if(totalEntities == null) {
14627                data = Connections.emptyConnection();
14628            } else {
14629                try(var objectLimiter = new ObjectLimiter(env, ChainConstants.COMPONENT_VENDOR_NAME, ChainConstants.ENTITY_TYPE_NAME, totalEntities)) {
14630                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14631
14632                    var chains = entities.stream()
14633                            .map(ChainObject::new)
14634                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14635
14636                    data = new CountedObjects<>(objectLimiter, chains);
14637                }
14638            }
14639        } catch (NamingException ex) {
14640            throw new RuntimeException(ex);
14641        }
14642
14643        return data;
14644    }
14645
14646    @GraphQLField
14647    @GraphQLName("chainActionSet")
14648    static ChainActionSetObject chainActionSet(final DataFetchingEnvironment env,
14649            @GraphQLName("chainKindName") final String chainKindName,
14650            @GraphQLName("chainTypeName") final String chainTypeName,
14651            @GraphQLName("chainName") final String chainName,
14652            @GraphQLName("chainActionSetName") final String chainActionSetName,
14653            @GraphQLName("id") @GraphQLID final String id) {
14654        ChainActionSet chainActionSet;
14655
14656        try {
14657            var commandForm = ChainUtil.getHome().getGetChainActionSetForm();
14658
14659            commandForm.setChainKindName(chainKindName);
14660            commandForm.setChainTypeName(chainTypeName);
14661            commandForm.setChainName(chainName);
14662            commandForm.setChainActionSetName(chainActionSetName);
14663            commandForm.setUuid(id);
14664
14665            chainActionSet = CDI.current().select(GetChainActionSetCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14666        } catch (NamingException ex) {
14667            throw new RuntimeException(ex);
14668        }
14669
14670        return chainActionSet == null ? null : new ChainActionSetObject(chainActionSet);
14671    }
14672
14673    @GraphQLField
14674    @GraphQLName("chainActionSets")
14675    @GraphQLNonNull
14676    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14677    static CountingPaginatedData<ChainActionSetObject> chainActionSets(final DataFetchingEnvironment env,
14678            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName,
14679            @GraphQLName("chainTypeName") @GraphQLNonNull final String chainTypeName,
14680            @GraphQLName("chainName") @GraphQLNonNull final String chainName) {
14681        CountingPaginatedData<ChainActionSetObject> data;
14682
14683        try {
14684            var commandForm = ChainUtil.getHome().getGetChainActionSetsForm();
14685            var command = CDI.current().select(GetChainActionSetsCommand.class).get();
14686
14687            commandForm.setChainKindName(chainKindName);
14688            commandForm.setChainTypeName(chainTypeName);
14689            commandForm.setChainName(chainName);
14690
14691            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14692            if(totalEntities == null) {
14693                data = Connections.emptyConnection();
14694            } else {
14695                try(var objectLimiter = new ObjectLimiter(env, ChainActionSetConstants.COMPONENT_VENDOR_NAME, ChainActionSetConstants.ENTITY_TYPE_NAME, totalEntities)) {
14696                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14697
14698                    var chainActionSets = entities.stream()
14699                            .map(ChainActionSetObject::new)
14700                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14701
14702                    data = new CountedObjects<>(objectLimiter, chainActionSets);
14703                }
14704            }
14705        } catch (NamingException ex) {
14706            throw new RuntimeException(ex);
14707        }
14708
14709        return data;
14710    }
14711
14712    @GraphQLField
14713    @GraphQLName("chainActionType")
14714    static ChainActionTypeObject chainActionType(final DataFetchingEnvironment env,
14715            @GraphQLName("chainActionTypeName") final String chainActionTypeName,
14716            @GraphQLName("id") @GraphQLID final String id) {
14717        ChainActionType chainActionType;
14718
14719        try {
14720            var commandForm = ChainUtil.getHome().getGetChainActionTypeForm();
14721
14722            commandForm.setChainActionTypeName(chainActionTypeName);
14723            commandForm.setUuid(id);
14724
14725            chainActionType = CDI.current().select(GetChainActionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14726        } catch (NamingException ex) {
14727            throw new RuntimeException(ex);
14728        }
14729
14730        return chainActionType == null ? null : new ChainActionTypeObject(chainActionType);
14731    }
14732
14733    @GraphQLField
14734    @GraphQLName("chainActionTypes")
14735    @GraphQLNonNull
14736    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14737    static CountingPaginatedData<ChainActionTypeObject> chainActionTypes(final DataFetchingEnvironment env) {
14738        CountingPaginatedData<ChainActionTypeObject> data;
14739
14740        try {
14741            var commandForm = ChainUtil.getHome().getGetChainActionTypesForm();
14742            var command = CDI.current().select(GetChainActionTypesCommand.class).get();
14743
14744            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14745            if(totalEntities == null) {
14746                data = Connections.emptyConnection();
14747            } else {
14748                try(var objectLimiter = new ObjectLimiter(env, ChainActionTypeConstants.COMPONENT_VENDOR_NAME, ChainActionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
14749                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14750
14751                    var chainActionTypes = entities.stream()
14752                            .map(ChainActionTypeObject::new)
14753                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14754
14755                    data = new CountedObjects<>(objectLimiter, chainActionTypes);
14756                }
14757            }
14758        } catch (NamingException ex) {
14759            throw new RuntimeException(ex);
14760        }
14761
14762        return data;
14763    }
14764
14765    @GraphQLField
14766    @GraphQLName("chainEntityTypeRole")
14767    static ChainEntityRoleTypeObject chainEntityTypeRole(final DataFetchingEnvironment env,
14768            @GraphQLName("chainKindName") final String chainKindName,
14769            @GraphQLName("chainTypeName") final String chainTypeName,
14770            @GraphQLName("chainEntityRoleTypeName") final String chainEntityRoleTypeName,
14771            @GraphQLName("id") @GraphQLID final String id) {
14772        ChainEntityRoleType chainEntityRoleType;
14773
14774        try {
14775            var commandForm = ChainUtil.getHome().getGetChainEntityRoleTypeForm();
14776
14777            commandForm.setChainKindName(chainKindName);
14778            commandForm.setChainTypeName(chainTypeName);
14779            commandForm.setChainEntityRoleTypeName(chainEntityRoleTypeName);
14780            commandForm.setUuid(id);
14781
14782            chainEntityRoleType = CDI.current().select(GetChainEntityRoleTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14783        } catch (NamingException ex) {
14784            throw new RuntimeException(ex);
14785        }
14786
14787        return chainEntityRoleType == null ? null : new ChainEntityRoleTypeObject(chainEntityRoleType);
14788    }
14789
14790    @GraphQLField
14791    @GraphQLName("chainEntityTypeRoles")
14792    @GraphQLNonNull
14793    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14794    static CountingPaginatedData<ChainEntityRoleTypeObject> chainEntityTypeRoles(final DataFetchingEnvironment env,
14795            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName,
14796            @GraphQLName("chainTypeName") @GraphQLNonNull final String chainTypeName) {
14797        CountingPaginatedData<ChainEntityRoleTypeObject> data;
14798
14799        try {
14800            var commandForm = ChainUtil.getHome().getGetChainEntityRoleTypesForm();
14801            var command = CDI.current().select(GetChainEntityRoleTypesCommand.class).get();
14802
14803            commandForm.setChainKindName(chainKindName);
14804            commandForm.setChainTypeName(chainTypeName);
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, ChainEntityRoleTypeConstants.COMPONENT_VENDOR_NAME, ChainEntityRoleTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
14811                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14812
14813                    var chainEntityTypeRoles = entities.stream()
14814                            .map(ChainEntityRoleTypeObject::new)
14815                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14816
14817                    data = new CountedObjects<>(objectLimiter, chainEntityTypeRoles);
14818                }
14819            }
14820        } catch (NamingException ex) {
14821            throw new RuntimeException(ex);
14822        }
14823
14824        return data;
14825    }
14826
14827    @GraphQLField
14828    @GraphQLName("chainAction")
14829    static ChainActionObject chainAction(final DataFetchingEnvironment env,
14830            @GraphQLName("chainKindName") final String chainKindName,
14831            @GraphQLName("chainTypeName") final String chainTypeName,
14832            @GraphQLName("chainName") final String chainName,
14833            @GraphQLName("chainActionSetName") final String chainActionSetName,
14834            @GraphQLName("chainActionName") final String chainActionName,
14835            @GraphQLName("id") @GraphQLID final String id) {
14836        ChainAction chainAction;
14837
14838        try {
14839            var commandForm = ChainUtil.getHome().getGetChainActionForm();
14840
14841            commandForm.setChainKindName(chainKindName);
14842            commandForm.setChainTypeName(chainTypeName);
14843            commandForm.setChainName(chainName);
14844            commandForm.setChainActionSetName(chainActionSetName);
14845            commandForm.setChainActionName(chainActionName);
14846            commandForm.setUuid(id);
14847
14848            chainAction = CDI.current().select(GetChainActionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14849        } catch (NamingException ex) {
14850            throw new RuntimeException(ex);
14851        }
14852
14853        return chainAction == null ? null : new ChainActionObject(chainAction);
14854    }
14855
14856    @GraphQLField
14857    @GraphQLName("chainActions")
14858    @GraphQLNonNull
14859    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14860    static CountingPaginatedData<ChainActionObject> chainActions(final DataFetchingEnvironment env,
14861            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName,
14862            @GraphQLName("chainTypeName") @GraphQLNonNull final String chainTypeName,
14863            @GraphQLName("chainName") @GraphQLNonNull final String chainName,
14864            @GraphQLName("chainActionSetName") @GraphQLNonNull final String chainActionSetName) {
14865        CountingPaginatedData<ChainActionObject> data;
14866
14867        try {
14868            var commandForm = ChainUtil.getHome().getGetChainActionsForm();
14869            var command = CDI.current().select(GetChainActionsCommand.class).get();
14870
14871            commandForm.setChainKindName(chainKindName);
14872            commandForm.setChainTypeName(chainTypeName);
14873            commandForm.setChainName(chainName);
14874            commandForm.setChainActionSetName(chainActionSetName);
14875
14876            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14877            if(totalEntities == null) {
14878                data = Connections.emptyConnection();
14879            } else {
14880                try(var objectLimiter = new ObjectLimiter(env, ChainActionConstants.COMPONENT_VENDOR_NAME, ChainActionConstants.ENTITY_TYPE_NAME, totalEntities)) {
14881                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14882
14883                    var chainActions = entities.stream()
14884                            .map(ChainActionObject::new)
14885                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14886
14887                    data = new CountedObjects<>(objectLimiter, chainActions);
14888                }
14889            }
14890        } catch (NamingException ex) {
14891            throw new RuntimeException(ex);
14892        }
14893
14894        return data;
14895    }
14896
14897    @GraphQLField
14898    @GraphQLName("chainInstance")
14899    static ChainInstanceObject chainInstance(final DataFetchingEnvironment env,
14900            @GraphQLName("chainInstanceName") final String chainInstanceName,
14901            @GraphQLName("id") @GraphQLID final String id) {
14902        ChainInstance chainInstance;
14903
14904        try {
14905            var commandForm = ChainUtil.getHome().getGetChainInstanceForm();
14906
14907            commandForm.setChainInstanceName(chainInstanceName);
14908            commandForm.setUuid(id);
14909
14910            chainInstance = CDI.current().select(GetChainInstanceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14911        } catch (NamingException ex) {
14912            throw new RuntimeException(ex);
14913        }
14914
14915        return chainInstance == null ? null : new ChainInstanceObject(chainInstance);
14916    }
14917
14918    @GraphQLField
14919    @GraphQLName("chainInstances")
14920    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14921    static CountingPaginatedData<ChainInstanceObject> chainInstances(final DataFetchingEnvironment env,
14922            @GraphQLName("chainKindName") final String chainKindName,
14923            @GraphQLName("chainTypeName") final String chainTypeName,
14924            @GraphQLName("chainName") final String chainName) {
14925        CountingPaginatedData<ChainInstanceObject> data;
14926
14927        try {
14928            var commandForm = ChainUtil.getHome().getGetChainInstancesForm();
14929            var command = CDI.current().select(GetChainInstancesCommand.class).get();
14930
14931            commandForm.setChainKindName(chainKindName);
14932            commandForm.setChainTypeName(chainTypeName);
14933            commandForm.setChainName(chainName);
14934
14935            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14936            if(totalEntities == null) {
14937                data = Connections.emptyConnection();
14938            } else {
14939                try(var objectLimiter = new ObjectLimiter(env, ChainInstanceConstants.COMPONENT_VENDOR_NAME, ChainInstanceConstants.ENTITY_TYPE_NAME, totalEntities)) {
14940                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14941
14942                    var chainInstances = entities.stream()
14943                            .map(ChainInstanceObject::new)
14944                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14945
14946                    data = new CountedObjects<>(objectLimiter, chainInstances);
14947                }
14948            }
14949        } catch (NamingException ex) {
14950            throw new RuntimeException(ex);
14951        }
14952
14953        return data;
14954    }
14955
14956
14957    @GraphQLField
14958    @GraphQLName("contactListFrequency")
14959    static ContactListFrequencyObject contactListFrequency(final DataFetchingEnvironment env,
14960            @GraphQLName("contactListFrequencyName") final String contactListFrequencyName,
14961            @GraphQLName("id") @GraphQLID final String id) {
14962        ContactListFrequency contactListFrequency;
14963
14964        try {
14965            var commandForm = ContactListUtil.getHome().getGetContactListFrequencyForm();
14966
14967            commandForm.setContactListFrequencyName(contactListFrequencyName);
14968            commandForm.setUuid(id);
14969
14970            contactListFrequency = CDI.current().select(GetContactListFrequencyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14971        } catch (NamingException ex) {
14972            throw new RuntimeException(ex);
14973        }
14974
14975        return contactListFrequency == null ? null : new ContactListFrequencyObject(contactListFrequency);
14976    }
14977
14978    @GraphQLField
14979    @GraphQLName("contactListFrequencies")
14980    @GraphQLNonNull
14981    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14982    static CountingPaginatedData<ContactListFrequencyObject> contactListFrequencies(final DataFetchingEnvironment env) {
14983        CountingPaginatedData<ContactListFrequencyObject> data;
14984
14985        try {
14986            var commandForm = ContactListUtil.getHome().getGetContactListFrequenciesForm();
14987            var command = CDI.current().select(GetContactListFrequenciesCommand.class).get();
14988
14989            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14990            if(totalEntities == null) {
14991                data = Connections.emptyConnection();
14992            } else {
14993                try(var objectLimiter = new ObjectLimiter(env, ContactListFrequencyConstants.COMPONENT_VENDOR_NAME, ContactListFrequencyConstants.ENTITY_TYPE_NAME, totalEntities)) {
14994                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14995
14996                    var contactListFrequencies = entities.stream()
14997                            .map(ContactListFrequencyObject::new)
14998                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14999
15000                    data = new CountedObjects<>(objectLimiter, contactListFrequencies);
15001                }
15002            }
15003        } catch (NamingException ex) {
15004            throw new RuntimeException(ex);
15005        }
15006
15007        return data;
15008    }
15009
15010    @GraphQLField
15011    @GraphQLName("contactMechanismPurpose")
15012    static ContactMechanismPurposeObject contactMechanismPurpose(final DataFetchingEnvironment env,
15013            @GraphQLName("contactMechanismPurposeName") final String contactMechanismPurposeName,
15014            @GraphQLName("id") @GraphQLID final String id) {
15015        ContactMechanismPurpose contactMechanismPurpose;
15016
15017        try {
15018            var commandForm = ContactUtil.getHome().getGetContactMechanismPurposeForm();
15019
15020            commandForm.setContactMechanismPurposeName(contactMechanismPurposeName);
15021            commandForm.setUuid(id);
15022
15023            contactMechanismPurpose = CDI.current().select(GetContactMechanismPurposeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15024        } catch (NamingException ex) {
15025            throw new RuntimeException(ex);
15026        }
15027
15028        return contactMechanismPurpose == null ? null : new ContactMechanismPurposeObject(contactMechanismPurpose);
15029    }
15030
15031    @GraphQLField
15032    @GraphQLName("contactMechanismPurposes")
15033    @GraphQLNonNull
15034    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15035    static CountingPaginatedData<ContactMechanismPurposeObject> contactMechanismPurposes(final DataFetchingEnvironment env) {
15036        CountingPaginatedData<ContactMechanismPurposeObject> data;
15037
15038        try {
15039            var commandForm = ContactUtil.getHome().getGetContactMechanismPurposesForm();
15040            var command = CDI.current().select(GetContactMechanismPurposesCommand.class).get();
15041
15042            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15043            if(totalEntities == null) {
15044                data = Connections.emptyConnection();
15045            } else {
15046                try(var objectLimiter = new ObjectLimiter(env, ContactMechanismPurposeConstants.COMPONENT_VENDOR_NAME, ContactMechanismPurposeConstants.ENTITY_TYPE_NAME, totalEntities)) {
15047                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15048
15049                    var contactMechanismPurposes = entities.stream()
15050                            .map(ContactMechanismPurposeObject::new)
15051                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15052
15053                    data = new CountedObjects<>(objectLimiter, contactMechanismPurposes);
15054                }
15055            }
15056        } catch (NamingException ex) {
15057            throw new RuntimeException(ex);
15058        }
15059
15060        return data;
15061    }
15062
15063    @GraphQLField
15064    @GraphQLName("contactListGroup")
15065    static ContactListGroupObject contactListGroup(final DataFetchingEnvironment env,
15066            @GraphQLName("contactListGroupName") final String contactListGroupName,
15067            @GraphQLName("id") @GraphQLID final String id) {
15068        ContactListGroup contactListGroup;
15069
15070        try {
15071            var commandForm = ContactListUtil.getHome().getGetContactListGroupForm();
15072
15073            commandForm.setContactListGroupName(contactListGroupName);
15074            commandForm.setUuid(id);
15075
15076            contactListGroup = CDI.current().select(GetContactListGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15077        } catch (NamingException ex) {
15078            throw new RuntimeException(ex);
15079        }
15080
15081        return contactListGroup == null ? null : new ContactListGroupObject(contactListGroup);
15082    }
15083
15084    @GraphQLField
15085    @GraphQLName("contactListGroups")
15086    @GraphQLNonNull
15087    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15088    static CountingPaginatedData<ContactListGroupObject> contactListGroups(final DataFetchingEnvironment env) {
15089        CountingPaginatedData<ContactListGroupObject> data;
15090
15091        try {
15092            var commandForm = ContactListUtil.getHome().getGetContactListGroupsForm();
15093            var command = CDI.current().select(GetContactListGroupsCommand.class).get();
15094
15095            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15096            if(totalEntities == null) {
15097                data = Connections.emptyConnection();
15098            } else {
15099                try(var objectLimiter = new ObjectLimiter(env, ContactListGroupConstants.COMPONENT_VENDOR_NAME, ContactListGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
15100                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15101
15102                    var contactListGroups = entities.stream()
15103                            .map(ContactListGroupObject::new)
15104                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15105
15106                    data = new CountedObjects<>(objectLimiter, contactListGroups);
15107                }
15108            }
15109        } catch (NamingException ex) {
15110            throw new RuntimeException(ex);
15111        }
15112
15113        return data;
15114    }
15115
15116    @GraphQLField
15117    @GraphQLName("customerTypeContactListGroup")
15118    static CustomerTypeContactListGroupObject customerTypeContactListGroup(final DataFetchingEnvironment env,
15119            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName,
15120            @GraphQLName("contactListGroupName") @GraphQLNonNull final String contactListGroupName) {
15121        CustomerTypeContactListGroup customerTypeContactListGroup;
15122
15123        try {
15124            var commandForm = ContactListUtil.getHome().getGetCustomerTypeContactListGroupForm();
15125
15126            commandForm.setCustomerTypeName(customerTypeName);
15127            commandForm.setContactListGroupName(contactListGroupName);
15128
15129            customerTypeContactListGroup = CDI.current().select(GetCustomerTypeContactListGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15130        } catch (NamingException ex) {
15131            throw new RuntimeException(ex);
15132        }
15133
15134        return customerTypeContactListGroup == null ? null : new CustomerTypeContactListGroupObject(customerTypeContactListGroup);
15135    }
15136
15137    @GraphQLField
15138    @GraphQLName("customerTypeContactListGroups")
15139    @GraphQLNonNull
15140    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15141    static CountingPaginatedData<CustomerTypeContactListGroupObject> customerTypeContactListGroups(final DataFetchingEnvironment env,
15142            @GraphQLName("customerTypeName") final String customerTypeName,
15143            @GraphQLName("contactListGroupName") final String contactListGroupName) {
15144        CountingPaginatedData<CustomerTypeContactListGroupObject> data;
15145
15146        try {
15147            var commandForm = ContactListUtil.getHome().getGetCustomerTypeContactListGroupsForm();
15148            var command = CDI.current().select(GetCustomerTypeContactListGroupsCommand.class).get();
15149
15150            commandForm.setCustomerTypeName(customerTypeName);
15151            commandForm.setContactListGroupName(contactListGroupName);
15152
15153            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15154            if(totalEntities == null) {
15155                data = Connections.emptyConnection();
15156            } else {
15157                try(var objectLimiter = new ObjectLimiter(env, CustomerTypeContactListGroupConstants.COMPONENT_VENDOR_NAME, CustomerTypeContactListGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
15158                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15159
15160                    var customerTypeContactListGroups = entities.stream()
15161                            .map(CustomerTypeContactListGroupObject::new)
15162                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15163
15164                    data = new CountedObjects<>(objectLimiter, customerTypeContactListGroups);
15165                }
15166            }
15167        } catch (NamingException ex) {
15168            throw new RuntimeException(ex);
15169        }
15170
15171        return data;
15172    }
15173
15174    @GraphQLField
15175    @GraphQLName("partyTypeContactListGroup")
15176    static PartyTypeContactListGroupObject partyTypeContactListGroup(final DataFetchingEnvironment env,
15177            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName,
15178            @GraphQLName("contactListGroupName") @GraphQLNonNull final String contactListGroupName) {
15179        PartyTypeContactListGroup partyTypeContactListGroup;
15180
15181        try {
15182            var commandForm = ContactListUtil.getHome().getGetPartyTypeContactListGroupForm();
15183
15184            commandForm.setPartyTypeName(partyTypeName);
15185            commandForm.setContactListGroupName(contactListGroupName);
15186
15187            partyTypeContactListGroup = CDI.current().select(GetPartyTypeContactListGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15188        } catch (NamingException ex) {
15189            throw new RuntimeException(ex);
15190        }
15191
15192        return partyTypeContactListGroup == null ? null : new PartyTypeContactListGroupObject(partyTypeContactListGroup);
15193    }
15194
15195    @GraphQLField
15196    @GraphQLName("partyTypeContactListGroups")
15197    @GraphQLNonNull
15198    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15199    static CountingPaginatedData<PartyTypeContactListGroupObject> partyTypeContactListGroups(final DataFetchingEnvironment env,
15200            @GraphQLName("partyTypeName") final String partyTypeName,
15201            @GraphQLName("contactListGroupName") final String contactListGroupName) {
15202        CountingPaginatedData<PartyTypeContactListGroupObject> data;
15203
15204        try {
15205            var commandForm = ContactListUtil.getHome().getGetPartyTypeContactListGroupsForm();
15206            var command = CDI.current().select(GetPartyTypeContactListGroupsCommand.class).get();
15207
15208            commandForm.setPartyTypeName(partyTypeName);
15209            commandForm.setContactListGroupName(contactListGroupName);
15210
15211            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15212            if(totalEntities == null) {
15213                data = Connections.emptyConnection();
15214            } else {
15215                try(var objectLimiter = new ObjectLimiter(env, PartyTypeContactListGroupConstants.COMPONENT_VENDOR_NAME, PartyTypeContactListGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
15216                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15217
15218                    var partyTypeContactListGroups = entities.stream()
15219                            .map(PartyTypeContactListGroupObject::new)
15220                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15221
15222                    data = new CountedObjects<>(objectLimiter, partyTypeContactListGroups);
15223                }
15224            }
15225        } catch (NamingException ex) {
15226            throw new RuntimeException(ex);
15227        }
15228
15229        return data;
15230    }
15231
15232    @GraphQLField
15233    @GraphQLName("contactListType")
15234    static ContactListTypeObject contactListType(final DataFetchingEnvironment env,
15235            @GraphQLName("contactListTypeName") final String contactListTypeName,
15236            @GraphQLName("id") @GraphQLID final String id) {
15237        ContactListType contactListType;
15238
15239        try {
15240            var commandForm = ContactListUtil.getHome().getGetContactListTypeForm();
15241
15242            commandForm.setContactListTypeName(contactListTypeName);
15243            commandForm.setUuid(id);
15244
15245            contactListType = CDI.current().select(GetContactListTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15246        } catch (NamingException ex) {
15247            throw new RuntimeException(ex);
15248        }
15249
15250        return contactListType == null ? null : new ContactListTypeObject(contactListType);
15251    }
15252
15253    @GraphQLField
15254    @GraphQLName("contactListTypes")
15255    @GraphQLNonNull
15256    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15257    static CountingPaginatedData<ContactListTypeObject> contactListTypes(final DataFetchingEnvironment env) {
15258        CountingPaginatedData<ContactListTypeObject> data;
15259
15260        try {
15261            var commandForm = ContactListUtil.getHome().getGetContactListTypesForm();
15262            var command = CDI.current().select(GetContactListTypesCommand.class).get();
15263
15264            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15265            if(totalEntities == null) {
15266                data = Connections.emptyConnection();
15267            } else {
15268                try(var objectLimiter = new ObjectLimiter(env, ContactListTypeConstants.COMPONENT_VENDOR_NAME, ContactListTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
15269                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15270
15271                    var contactListTypes = entities.stream()
15272                            .map(ContactListTypeObject::new)
15273                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15274
15275                    data = new CountedObjects<>(objectLimiter, contactListTypes);
15276                }
15277            }
15278        } catch (NamingException ex) {
15279            throw new RuntimeException(ex);
15280        }
15281
15282        return data;
15283    }
15284
15285    @GraphQLField
15286    @GraphQLName("contactList")
15287    static ContactListObject contactList(final DataFetchingEnvironment env,
15288            @GraphQLName("contactListName") final String contactListName,
15289            @GraphQLName("id") @GraphQLID final String id) {
15290        ContactList contactList;
15291
15292        try {
15293            var commandForm = ContactListUtil.getHome().getGetContactListForm();
15294
15295            commandForm.setContactListName(contactListName);
15296            commandForm.setUuid(id);
15297
15298            contactList = CDI.current().select(GetContactListCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15299        } catch (NamingException ex) {
15300            throw new RuntimeException(ex);
15301        }
15302
15303        return contactList == null ? null : new ContactListObject(contactList);
15304    }
15305
15306    @GraphQLField
15307    @GraphQLName("contactLists")
15308    @GraphQLNonNull
15309    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15310    static CountingPaginatedData<ContactListObject> contactLists(final DataFetchingEnvironment env) {
15311        CountingPaginatedData<ContactListObject> data;
15312
15313        try {
15314            var commandForm = ContactListUtil.getHome().getGetContactListsForm();
15315            var command = CDI.current().select(GetContactListsCommand.class).get();
15316
15317            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15318            if(totalEntities == null) {
15319                data = Connections.emptyConnection();
15320            } else {
15321                try(var objectLimiter = new ObjectLimiter(env, ContactListConstants.COMPONENT_VENDOR_NAME, ContactListConstants.ENTITY_TYPE_NAME, totalEntities)) {
15322                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15323
15324                    var contactLists = entities.stream()
15325                            .map(ContactListObject::new)
15326                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15327
15328                    data = new CountedObjects<>(objectLimiter, contactLists);
15329                }
15330            }
15331        } catch (NamingException ex) {
15332            throw new RuntimeException(ex);
15333        }
15334
15335        return data;
15336    }
15337
15338    @GraphQLField
15339    @GraphQLName("customerTypeContactList")
15340    static CustomerTypeContactListObject customerTypeContactList(final DataFetchingEnvironment env,
15341            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName,
15342            @GraphQLName("contactListName") @GraphQLNonNull final String contactListName) {
15343        CustomerTypeContactList customerTypeContactList;
15344
15345        try {
15346            var commandForm = ContactListUtil.getHome().getGetCustomerTypeContactListForm();
15347
15348            commandForm.setCustomerTypeName(customerTypeName);
15349            commandForm.setContactListName(contactListName);
15350
15351            customerTypeContactList = CDI.current().select(GetCustomerTypeContactListCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15352        } catch (NamingException ex) {
15353            throw new RuntimeException(ex);
15354        }
15355
15356        return customerTypeContactList == null ? null : new CustomerTypeContactListObject(customerTypeContactList);
15357    }
15358
15359    @GraphQLField
15360    @GraphQLName("customerTypeContactLists")
15361    @GraphQLNonNull
15362    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15363    static CountingPaginatedData<CustomerTypeContactListObject> customerTypeContactLists(final DataFetchingEnvironment env,
15364            @GraphQLName("customerTypeName") final String customerTypeName,
15365            @GraphQLName("contactListName") final String contactListName) {
15366        CountingPaginatedData<CustomerTypeContactListObject> data;
15367
15368        try {
15369            var commandForm = ContactListUtil.getHome().getGetCustomerTypeContactListsForm();
15370            var command = CDI.current().select(GetCustomerTypeContactListsCommand.class).get();
15371
15372            commandForm.setCustomerTypeName(customerTypeName);
15373            commandForm.setContactListName(contactListName);
15374
15375            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15376            if(totalEntities == null) {
15377                data = Connections.emptyConnection();
15378            } else {
15379                try(var objectLimiter = new ObjectLimiter(env, CustomerTypeContactListConstants.COMPONENT_VENDOR_NAME, CustomerTypeContactListConstants.ENTITY_TYPE_NAME, totalEntities)) {
15380                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15381
15382                    var customerTypeContactLists = entities.stream()
15383                            .map(CustomerTypeContactListObject::new)
15384                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15385
15386                    data = new CountedObjects<>(objectLimiter, customerTypeContactLists);
15387                }
15388            }
15389        } catch (NamingException ex) {
15390            throw new RuntimeException(ex);
15391        }
15392
15393        return data;
15394    }
15395
15396    @GraphQLField
15397    @GraphQLName("partyTypeContactList")
15398    static PartyTypeContactListObject partyTypeContactList(final DataFetchingEnvironment env,
15399            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName,
15400            @GraphQLName("contactListName") @GraphQLNonNull final String contactListName) {
15401        PartyTypeContactList partyTypeContactList;
15402
15403        try {
15404            var commandForm = ContactListUtil.getHome().getGetPartyTypeContactListForm();
15405
15406            commandForm.setPartyTypeName(partyTypeName);
15407            commandForm.setContactListName(contactListName);
15408
15409            partyTypeContactList = CDI.current().select(GetPartyTypeContactListCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15410        } catch (NamingException ex) {
15411            throw new RuntimeException(ex);
15412        }
15413
15414        return partyTypeContactList == null ? null : new PartyTypeContactListObject(partyTypeContactList);
15415    }
15416
15417    @GraphQLField
15418    @GraphQLName("partyTypeContactLists")
15419    @GraphQLNonNull
15420    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15421    static CountingPaginatedData<PartyTypeContactListObject> partyTypeContactLists(final DataFetchingEnvironment env,
15422            @GraphQLName("partyTypeName") final String partyTypeName,
15423            @GraphQLName("contactListName") final String contactListName) {
15424        CountingPaginatedData<PartyTypeContactListObject> data;
15425
15426        try {
15427            var commandForm = ContactListUtil.getHome().getGetPartyTypeContactListsForm();
15428            var command = CDI.current().select(GetPartyTypeContactListsCommand.class).get();
15429
15430            commandForm.setPartyTypeName(partyTypeName);
15431            commandForm.setContactListName(contactListName);
15432
15433            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15434            if(totalEntities == null) {
15435                data = Connections.emptyConnection();
15436            } else {
15437                try(var objectLimiter = new ObjectLimiter(env, PartyTypeContactListConstants.COMPONENT_VENDOR_NAME, PartyTypeContactListConstants.ENTITY_TYPE_NAME, totalEntities)) {
15438                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15439
15440                    var partyTypeContactLists = entities.stream()
15441                            .map(PartyTypeContactListObject::new)
15442                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15443
15444                    data = new CountedObjects<>(objectLimiter, partyTypeContactLists);
15445                }
15446            }
15447        } catch (NamingException ex) {
15448            throw new RuntimeException(ex);
15449        }
15450
15451        return data;
15452    }
15453
15454    @GraphQLField
15455    @GraphQLName("partyContactList")
15456    static PartyContactListObject partyContactList(final DataFetchingEnvironment env,
15457            @GraphQLName("partyName") final String partyName,
15458            @GraphQLName("contactListName") final String contactListName,
15459            @GraphQLName("id") @GraphQLID final String id) {
15460        PartyContactList partyContactList;
15461
15462        try {
15463            var commandForm = ContactListUtil.getHome().getGetPartyContactListForm();
15464
15465            commandForm.setPartyName(partyName);
15466            commandForm.setContactListName(contactListName);
15467            commandForm.setUuid(id);
15468
15469            partyContactList = CDI.current().select(GetPartyContactListCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15470        } catch (NamingException ex) {
15471            throw new RuntimeException(ex);
15472        }
15473
15474        return partyContactList == null ? null : new PartyContactListObject(partyContactList);
15475    }
15476
15477    @GraphQLField
15478    @GraphQLName("partyContactLists")
15479    @GraphQLNonNull
15480    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15481    static CountingPaginatedData<PartyContactListObject> partyContactLists(final DataFetchingEnvironment env,
15482            @GraphQLName("partyName") final String partyName,
15483            @GraphQLName("contactListName") final String contactListName) {
15484        CountingPaginatedData<PartyContactListObject> data;
15485
15486        try {
15487            var commandForm = ContactListUtil.getHome().getGetPartyContactListsForm();
15488            var command = CDI.current().select(GetPartyContactListsCommand.class).get();
15489
15490            commandForm.setPartyName(partyName);
15491            commandForm.setContactListName(contactListName);
15492
15493            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15494            if(totalEntities == null) {
15495                data = Connections.emptyConnection();
15496            } else {
15497                try(var objectLimiter = new ObjectLimiter(env, PartyContactListConstants.COMPONENT_VENDOR_NAME, PartyContactListConstants.ENTITY_TYPE_NAME, totalEntities)) {
15498                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15499
15500                    var partyContactLists = entities.stream()
15501                            .map(PartyContactListObject::new)
15502                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15503
15504                    data = new CountedObjects<>(objectLimiter, partyContactLists);
15505                }
15506            }
15507        } catch (NamingException ex) {
15508            throw new RuntimeException(ex);
15509        }
15510
15511        return data;
15512    }
15513
15514    @GraphQLField
15515    @GraphQLName("contactListContactMechanismPurpose")
15516    static ContactListContactMechanismPurposeObject contactListContactMechanismPurpose(final DataFetchingEnvironment env,
15517            @GraphQLName("contactListName") final String contactListName,
15518            @GraphQLName("contactMechanismPurposeName") final String contactMechanismPurposeName) {
15519        ContactListContactMechanismPurpose contactListContactMechanismPurpose = null;
15520
15521        try {
15522            var commandForm = ContactListUtil.getHome().getGetContactListContactMechanismPurposeForm();
15523
15524            commandForm.setContactListName(contactListName);
15525            commandForm.setContactMechanismPurposeName(contactMechanismPurposeName);
15526
15527            contactListContactMechanismPurpose = CDI.current().select(GetContactListContactMechanismPurposeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15528        } catch (NamingException ex) {
15529            throw new RuntimeException(ex);
15530        }
15531
15532        return contactListContactMechanismPurpose == null ? null : new ContactListContactMechanismPurposeObject(contactListContactMechanismPurpose);
15533    }
15534
15535    @GraphQLField
15536    @GraphQLName("contactListContactMechanismPurposes")
15537    @GraphQLNonNull
15538    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15539    static CountingPaginatedData<ContactListContactMechanismPurposeObject> contactListContactMechanismPurposes(final DataFetchingEnvironment env,
15540            @GraphQLName("contactListName") final String contactListName) {
15541        CountingPaginatedData<ContactListContactMechanismPurposeObject> data;
15542
15543        try {
15544            var commandForm = ContactListUtil.getHome().getGetContactListContactMechanismPurposesForm();
15545            var command = CDI.current().select(GetContactListContactMechanismPurposesCommand.class).get();
15546
15547            commandForm.setContactListName(contactListName);
15548
15549            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15550            if(totalEntities == null) {
15551                data = Connections.emptyConnection();
15552            } else {
15553                try(var objectLimiter = new ObjectLimiter(env, ContactListContactMechanismPurposeConstants.COMPONENT_VENDOR_NAME, ContactListContactMechanismPurposeConstants.ENTITY_TYPE_NAME, totalEntities)) {
15554                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15555
15556                    var contactListContactMechanismPurposes = entities.stream()
15557                            .map(ContactListContactMechanismPurposeObject::new)
15558                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15559
15560                    data = new CountedObjects<>(objectLimiter, contactListContactMechanismPurposes);
15561                }
15562            }
15563        } catch (NamingException ex) {
15564            throw new RuntimeException(ex);
15565        }
15566
15567        return data;
15568    }
15569
15570    @GraphQLField
15571    @GraphQLName("periodKind")
15572    static PeriodKindObject periodKind(final DataFetchingEnvironment env,
15573            @GraphQLName("periodKindName") final String periodKindName,
15574            @GraphQLName("id") @GraphQLID final String id) {
15575        PeriodKind periodKind;
15576
15577        try {
15578            var commandForm = PeriodUtil.getHome().getGetPeriodKindForm();
15579
15580            commandForm.setPeriodKindName(periodKindName);
15581            commandForm.setUuid(id);
15582
15583            periodKind = CDI.current().select(GetPeriodKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
15584        } catch (NamingException ex) {
15585            throw new RuntimeException(ex);
15586        }
15587
15588        return periodKind == null ? null : new PeriodKindObject(periodKind);
15589    }
15590
15591    @GraphQLField
15592    @GraphQLName("periodKinds")
15593    @GraphQLNonNull
15594    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
15595    static CountingPaginatedData<PeriodKindObject> periodKinds(final DataFetchingEnvironment env) {
15596        CountingPaginatedData<PeriodKindObject> data;
15597
15598        try {
15599            var commandForm = PeriodUtil.getHome().getGetPeriodKindsForm();
15600            var command = CDI.current().select(GetPeriodKindsCommand.class).get();
15601
15602            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15603            if(totalEntities == null) {
15604                data = Connections.emptyConnection();
15605            } else {
15606                try(var objectLimiter = new ObjectLimiter(env, PeriodKindConstants.COMPONENT_VENDOR_NAME, PeriodKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
15607                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
15608
15609                    var periodKinds = entities.stream()
15610                            .map(PeriodKindObject::new)
15611                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
15612
15613                    data = new CountedObjects<>(objectLimiter, periodKinds);
15614                }
15615            }
15616        } catch (NamingException ex) {
15617            throw new RuntimeException(ex);
15618        }
15619
15620        return data;
15621    }
15622
15623}