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.GetFontStyleCommand;
156import com.echothree.control.user.core.server.command.GetFontStylesCommand;
157import com.echothree.control.user.core.server.command.GetFontWeightCommand;
158import com.echothree.control.user.core.server.command.GetFontWeightsCommand;
159import com.echothree.control.user.core.server.command.GetMimeTypeCommand;
160import com.echothree.control.user.core.server.command.GetMimeTypeFileExtensionCommand;
161import com.echothree.control.user.core.server.command.GetMimeTypeFileExtensionsCommand;
162import com.echothree.control.user.core.server.command.GetMimeTypeUsageTypeCommand;
163import com.echothree.control.user.core.server.command.GetMimeTypeUsageTypesCommand;
164import com.echothree.control.user.core.server.command.GetMimeTypesCommand;
165import com.echothree.control.user.core.server.command.GetTextDecorationCommand;
166import com.echothree.control.user.core.server.command.GetTextDecorationsCommand;
167import com.echothree.control.user.core.server.command.GetTextTransformationCommand;
168import com.echothree.control.user.core.server.command.GetTextTransformationsCommand;
169import com.echothree.control.user.customer.common.CustomerUtil;
170import com.echothree.control.user.customer.server.command.GetCustomerCommand;
171import com.echothree.control.user.customer.server.command.GetCustomerTypeCommand;
172import com.echothree.control.user.customer.server.command.GetCustomerTypePaymentMethodCommand;
173import com.echothree.control.user.customer.server.command.GetCustomerTypePaymentMethodsCommand;
174import com.echothree.control.user.customer.server.command.GetCustomerTypeShippingMethodCommand;
175import com.echothree.control.user.customer.server.command.GetCustomerTypeShippingMethodsCommand;
176import com.echothree.control.user.customer.server.command.GetCustomerTypesCommand;
177import com.echothree.control.user.customer.server.command.GetCustomersCommand;
178import com.echothree.control.user.employee.common.EmployeeUtil;
179import com.echothree.control.user.employee.server.command.GetEmployeeCommand;
180import com.echothree.control.user.employee.server.command.GetEmployeesCommand;
181import com.echothree.control.user.filter.common.FilterUtil;
182import com.echothree.control.user.filter.server.command.GetFilterAdjustmentAmountCommand;
183import com.echothree.control.user.filter.server.command.GetFilterAdjustmentAmountsCommand;
184import com.echothree.control.user.filter.server.command.GetFilterAdjustmentCommand;
185import com.echothree.control.user.filter.server.command.GetFilterAdjustmentFixedAmountCommand;
186import com.echothree.control.user.filter.server.command.GetFilterAdjustmentFixedAmountsCommand;
187import com.echothree.control.user.filter.server.command.GetFilterAdjustmentPercentCommand;
188import com.echothree.control.user.filter.server.command.GetFilterAdjustmentPercentsCommand;
189import com.echothree.control.user.filter.server.command.GetFilterAdjustmentSourceCommand;
190import com.echothree.control.user.filter.server.command.GetFilterAdjustmentSourcesCommand;
191import com.echothree.control.user.filter.server.command.GetFilterAdjustmentTypeCommand;
192import com.echothree.control.user.filter.server.command.GetFilterAdjustmentTypesCommand;
193import com.echothree.control.user.filter.server.command.GetFilterAdjustmentsCommand;
194import com.echothree.control.user.filter.server.command.GetFilterCommand;
195import com.echothree.control.user.filter.server.command.GetFilterEntranceStepCommand;
196import com.echothree.control.user.filter.server.command.GetFilterEntranceStepsCommand;
197import com.echothree.control.user.filter.server.command.GetFilterKindCommand;
198import com.echothree.control.user.filter.server.command.GetFilterKindsCommand;
199import com.echothree.control.user.filter.server.command.GetFilterStepCommand;
200import com.echothree.control.user.filter.server.command.GetFilterStepDestinationCommand;
201import com.echothree.control.user.filter.server.command.GetFilterStepDestinationsCommand;
202import com.echothree.control.user.filter.server.command.GetFilterStepElementCommand;
203import com.echothree.control.user.filter.server.command.GetFilterStepElementsCommand;
204import com.echothree.control.user.filter.server.command.GetFilterStepsCommand;
205import com.echothree.control.user.filter.server.command.GetFilterTypeCommand;
206import com.echothree.control.user.filter.server.command.GetFilterTypesCommand;
207import com.echothree.control.user.filter.server.command.GetFiltersCommand;
208import com.echothree.control.user.geo.common.GeoUtil;
209import com.echothree.control.user.geo.server.command.GetCitiesCommand;
210import com.echothree.control.user.geo.server.command.GetCityCommand;
211import com.echothree.control.user.geo.server.command.GetCountiesCommand;
212import com.echothree.control.user.geo.server.command.GetCountriesCommand;
213import com.echothree.control.user.geo.server.command.GetCountryCommand;
214import com.echothree.control.user.geo.server.command.GetCountyCommand;
215import com.echothree.control.user.geo.server.command.GetGeoCodeAliasCommand;
216import com.echothree.control.user.geo.server.command.GetGeoCodeAliasTypeCommand;
217import com.echothree.control.user.geo.server.command.GetGeoCodeAliasTypesCommand;
218import com.echothree.control.user.geo.server.command.GetGeoCodeAliasesCommand;
219import com.echothree.control.user.geo.server.command.GetGeoCodeCommand;
220import com.echothree.control.user.geo.server.command.GetGeoCodeCurrenciesCommand;
221import com.echothree.control.user.geo.server.command.GetGeoCodeCurrencyCommand;
222import com.echothree.control.user.geo.server.command.GetGeoCodeDateTimeFormatCommand;
223import com.echothree.control.user.geo.server.command.GetGeoCodeDateTimeFormatsCommand;
224import com.echothree.control.user.geo.server.command.GetGeoCodeLanguageCommand;
225import com.echothree.control.user.geo.server.command.GetGeoCodeLanguagesCommand;
226import com.echothree.control.user.geo.server.command.GetGeoCodeScopeCommand;
227import com.echothree.control.user.geo.server.command.GetGeoCodeScopesCommand;
228import com.echothree.control.user.geo.server.command.GetGeoCodeTimeZoneCommand;
229import com.echothree.control.user.geo.server.command.GetGeoCodeTimeZonesCommand;
230import com.echothree.control.user.geo.server.command.GetGeoCodeTypeCommand;
231import com.echothree.control.user.geo.server.command.GetGeoCodeTypesCommand;
232import com.echothree.control.user.geo.server.command.GetStateCommand;
233import com.echothree.control.user.geo.server.command.GetStatesCommand;
234import com.echothree.control.user.geo.server.command.GetZipCodeCommand;
235import com.echothree.control.user.geo.server.command.GetZipCodesCommand;
236import com.echothree.control.user.inventory.common.InventoryUtil;
237import com.echothree.control.user.inventory.server.command.GetAllocationPrioritiesCommand;
238import com.echothree.control.user.inventory.server.command.GetAllocationPriorityCommand;
239import com.echothree.control.user.inventory.server.command.GetInventoryAdjustmentTypeCommand;
240import com.echothree.control.user.inventory.server.command.GetInventoryAdjustmentTypesCommand;
241import com.echothree.control.user.inventory.server.command.GetInventoryConditionCommand;
242import com.echothree.control.user.inventory.server.command.GetInventoryConditionsCommand;
243import com.echothree.control.user.inventory.server.command.GetInventoryLocationGroupCommand;
244import com.echothree.control.user.inventory.server.command.GetInventoryLocationGroupsCommand;
245import com.echothree.control.user.inventory.server.command.GetInventoryTransactionTypeCommand;
246import com.echothree.control.user.inventory.server.command.GetInventoryTransactionTypesCommand;
247import com.echothree.control.user.inventory.server.command.GetLotCommand;
248import com.echothree.control.user.inventory.server.command.GetLotsCommand;
249import com.echothree.control.user.item.common.ItemUtil;
250import com.echothree.control.user.item.server.command.GetItemAliasChecksumTypeCommand;
251import com.echothree.control.user.item.server.command.GetItemAliasChecksumTypesCommand;
252import com.echothree.control.user.item.server.command.GetItemAliasCommand;
253import com.echothree.control.user.item.server.command.GetItemAliasTypeCommand;
254import com.echothree.control.user.item.server.command.GetItemAliasTypesCommand;
255import com.echothree.control.user.item.server.command.GetItemAliasesCommand;
256import com.echothree.control.user.item.server.command.GetItemCategoriesCommand;
257import com.echothree.control.user.item.server.command.GetItemCategoryCommand;
258import com.echothree.control.user.item.server.command.GetItemCommand;
259import com.echothree.control.user.item.server.command.GetItemDeliveryTypeCommand;
260import com.echothree.control.user.item.server.command.GetItemDeliveryTypesCommand;
261import com.echothree.control.user.item.server.command.GetItemDescriptionCommand;
262import com.echothree.control.user.item.server.command.GetItemDescriptionTypeCommand;
263import com.echothree.control.user.item.server.command.GetItemDescriptionTypeUseCommand;
264import com.echothree.control.user.item.server.command.GetItemDescriptionTypeUseTypeCommand;
265import com.echothree.control.user.item.server.command.GetItemDescriptionTypeUseTypesCommand;
266import com.echothree.control.user.item.server.command.GetItemDescriptionTypeUsesCommand;
267import com.echothree.control.user.item.server.command.GetItemDescriptionTypesCommand;
268import com.echothree.control.user.item.server.command.GetItemDescriptionsCommand;
269import com.echothree.control.user.item.server.command.GetItemImageTypeCommand;
270import com.echothree.control.user.item.server.command.GetItemImageTypesCommand;
271import com.echothree.control.user.item.server.command.GetItemInventoryTypeCommand;
272import com.echothree.control.user.item.server.command.GetItemInventoryTypesCommand;
273import com.echothree.control.user.item.server.command.GetItemPriceCommand;
274import com.echothree.control.user.item.server.command.GetItemPriceTypeCommand;
275import com.echothree.control.user.item.server.command.GetItemPriceTypesCommand;
276import com.echothree.control.user.item.server.command.GetItemPricesCommand;
277import com.echothree.control.user.item.server.command.GetItemTypeCommand;
278import com.echothree.control.user.item.server.command.GetItemTypesCommand;
279import com.echothree.control.user.item.server.command.GetItemUnitOfMeasureTypeCommand;
280import com.echothree.control.user.item.server.command.GetItemUnitOfMeasureTypesCommand;
281import com.echothree.control.user.item.server.command.GetItemUseTypeCommand;
282import com.echothree.control.user.item.server.command.GetItemUseTypesCommand;
283import com.echothree.control.user.item.server.command.GetItemVolumeTypeCommand;
284import com.echothree.control.user.item.server.command.GetItemVolumeTypesCommand;
285import com.echothree.control.user.item.server.command.GetItemWeightTypeCommand;
286import com.echothree.control.user.item.server.command.GetItemWeightTypesCommand;
287import com.echothree.control.user.item.server.command.GetItemsCommand;
288import com.echothree.control.user.item.server.command.GetRelatedItemCommand;
289import com.echothree.control.user.item.server.command.GetRelatedItemTypeCommand;
290import com.echothree.control.user.item.server.command.GetRelatedItemTypesCommand;
291import com.echothree.control.user.item.server.command.GetRelatedItemsCommand;
292import com.echothree.control.user.offer.common.OfferUtil;
293import com.echothree.control.user.offer.server.command.GetOfferCommand;
294import com.echothree.control.user.offer.server.command.GetOfferCustomerTypeCommand;
295import com.echothree.control.user.offer.server.command.GetOfferCustomerTypesCommand;
296import com.echothree.control.user.offer.server.command.GetOfferItemCommand;
297import com.echothree.control.user.offer.server.command.GetOfferItemPriceCommand;
298import com.echothree.control.user.offer.server.command.GetOfferItemPricesCommand;
299import com.echothree.control.user.offer.server.command.GetOfferItemsCommand;
300import com.echothree.control.user.offer.server.command.GetOfferNameElementCommand;
301import com.echothree.control.user.offer.server.command.GetOfferNameElementsCommand;
302import com.echothree.control.user.offer.server.command.GetOfferUseCommand;
303import com.echothree.control.user.offer.server.command.GetOfferUsesCommand;
304import com.echothree.control.user.offer.server.command.GetOffersCommand;
305import com.echothree.control.user.offer.server.command.GetUseCommand;
306import com.echothree.control.user.offer.server.command.GetUseNameElementCommand;
307import com.echothree.control.user.offer.server.command.GetUseNameElementsCommand;
308import com.echothree.control.user.offer.server.command.GetUseTypeCommand;
309import com.echothree.control.user.offer.server.command.GetUseTypesCommand;
310import com.echothree.control.user.offer.server.command.GetUsesCommand;
311import com.echothree.control.user.order.common.OrderUtil;
312import com.echothree.control.user.order.server.command.GetOrderPrioritiesCommand;
313import com.echothree.control.user.order.server.command.GetOrderPriorityCommand;
314import com.echothree.control.user.order.server.command.GetOrderTimeTypeCommand;
315import com.echothree.control.user.order.server.command.GetOrderTimeTypesCommand;
316import com.echothree.control.user.order.server.command.GetOrderTypeCommand;
317import com.echothree.control.user.order.server.command.GetOrderTypesCommand;
318import com.echothree.control.user.party.common.PartyUtil;
319import com.echothree.control.user.party.server.command.GetCompaniesCommand;
320import com.echothree.control.user.party.server.command.GetCompanyCommand;
321import com.echothree.control.user.party.server.command.GetDateTimeFormatCommand;
322import com.echothree.control.user.party.server.command.GetDateTimeFormatsCommand;
323import com.echothree.control.user.party.server.command.GetDepartmentCommand;
324import com.echothree.control.user.party.server.command.GetDepartmentsCommand;
325import com.echothree.control.user.party.server.command.GetDivisionCommand;
326import com.echothree.control.user.party.server.command.GetDivisionsCommand;
327import com.echothree.control.user.party.server.command.GetLanguageCommand;
328import com.echothree.control.user.party.server.command.GetLanguagesCommand;
329import com.echothree.control.user.party.server.command.GetNameSuffixesCommand;
330import com.echothree.control.user.party.server.command.GetPartiesCommand;
331import com.echothree.control.user.party.server.command.GetPartyAliasCommand;
332import com.echothree.control.user.party.server.command.GetPartyAliasTypeCommand;
333import com.echothree.control.user.party.server.command.GetPartyAliasTypesCommand;
334import com.echothree.control.user.party.server.command.GetPartyAliasesCommand;
335import com.echothree.control.user.party.server.command.GetPartyCommand;
336import com.echothree.control.user.party.server.command.GetPartyTypeCommand;
337import com.echothree.control.user.party.server.command.GetPartyTypesCommand;
338import com.echothree.control.user.party.server.command.GetPersonalTitlesCommand;
339import com.echothree.control.user.party.server.command.GetRoleTypeCommand;
340import com.echothree.control.user.party.server.command.GetRoleTypesCommand;
341import com.echothree.control.user.party.server.command.GetTimeZoneCommand;
342import com.echothree.control.user.party.server.command.GetTimeZonesCommand;
343import com.echothree.control.user.payment.common.PaymentUtil;
344import com.echothree.control.user.payment.server.command.GetPaymentMethodCommand;
345import com.echothree.control.user.payment.server.command.GetPaymentMethodTypeCommand;
346import com.echothree.control.user.payment.server.command.GetPaymentMethodTypesCommand;
347import com.echothree.control.user.payment.server.command.GetPaymentMethodsCommand;
348import com.echothree.control.user.payment.server.command.GetPaymentProcessorActionTypeCommand;
349import com.echothree.control.user.payment.server.command.GetPaymentProcessorActionTypesCommand;
350import com.echothree.control.user.payment.server.command.GetPaymentProcessorCommand;
351import com.echothree.control.user.payment.server.command.GetPaymentProcessorResultCodeCommand;
352import com.echothree.control.user.payment.server.command.GetPaymentProcessorResultCodesCommand;
353import com.echothree.control.user.payment.server.command.GetPaymentProcessorTransactionCommand;
354import com.echothree.control.user.payment.server.command.GetPaymentProcessorTransactionsCommand;
355import com.echothree.control.user.payment.server.command.GetPaymentProcessorTypeCodeCommand;
356import com.echothree.control.user.payment.server.command.GetPaymentProcessorTypeCodeTypeCommand;
357import com.echothree.control.user.payment.server.command.GetPaymentProcessorTypeCommand;
358import com.echothree.control.user.payment.server.command.GetPaymentProcessorTypesCommand;
359import com.echothree.control.user.payment.server.command.GetPaymentProcessorsCommand;
360import com.echothree.control.user.queue.common.QueueUtil;
361import com.echothree.control.user.queue.server.command.GetQueueTypeCommand;
362import com.echothree.control.user.queue.server.command.GetQueueTypesCommand;
363import com.echothree.control.user.returnpolicy.common.ReturnPolicyUtil;
364import com.echothree.control.user.returnpolicy.server.command.GetReturnKindCommand;
365import com.echothree.control.user.returnpolicy.server.command.GetReturnKindsCommand;
366import com.echothree.control.user.returnpolicy.server.command.GetReturnPoliciesCommand;
367import com.echothree.control.user.returnpolicy.server.command.GetReturnPolicyCommand;
368import com.echothree.control.user.search.common.SearchUtil;
369import com.echothree.control.user.search.common.result.CheckItemSpellingResult;
370import com.echothree.control.user.search.server.command.GetComponentVendorResultsCommand;
371import com.echothree.control.user.search.server.command.GetContentCatalogItemResultsCommand;
372import com.echothree.control.user.search.server.command.GetContentCatalogResultsCommand;
373import com.echothree.control.user.search.server.command.GetContentCategoryResultsCommand;
374import com.echothree.control.user.search.server.command.GetCustomerResultsCommand;
375import com.echothree.control.user.search.server.command.GetEmployeeResultsCommand;
376import com.echothree.control.user.search.server.command.GetEntityAliasTypeResultsCommand;
377import com.echothree.control.user.search.server.command.GetEntityAttributeGroupResultsCommand;
378import com.echothree.control.user.search.server.command.GetEntityAttributeResultsCommand;
379import com.echothree.control.user.search.server.command.GetEntityListItemResultsCommand;
380import com.echothree.control.user.search.server.command.GetEntityTypeResultsCommand;
381import com.echothree.control.user.search.server.command.GetItemResultsCommand;
382import com.echothree.control.user.search.server.command.GetSearchCheckSpellingActionTypeCommand;
383import com.echothree.control.user.search.server.command.GetSearchCheckSpellingActionTypesCommand;
384import com.echothree.control.user.search.server.command.GetSearchDefaultOperatorCommand;
385import com.echothree.control.user.search.server.command.GetSearchDefaultOperatorsCommand;
386import com.echothree.control.user.search.server.command.GetSearchKindCommand;
387import com.echothree.control.user.search.server.command.GetSearchKindsCommand;
388import com.echothree.control.user.search.server.command.GetSearchResultActionTypeCommand;
389import com.echothree.control.user.search.server.command.GetSearchResultActionTypesCommand;
390import com.echothree.control.user.search.server.command.GetSearchSortDirectionCommand;
391import com.echothree.control.user.search.server.command.GetSearchSortDirectionsCommand;
392import com.echothree.control.user.search.server.command.GetSearchSortOrderCommand;
393import com.echothree.control.user.search.server.command.GetSearchSortOrdersCommand;
394import com.echothree.control.user.search.server.command.GetSearchTypeCommand;
395import com.echothree.control.user.search.server.command.GetSearchTypesCommand;
396import com.echothree.control.user.search.server.command.GetSearchUseTypeCommand;
397import com.echothree.control.user.search.server.command.GetSearchUseTypesCommand;
398import com.echothree.control.user.search.server.command.GetShippingMethodResultsCommand;
399import com.echothree.control.user.search.server.command.GetVendorResultsCommand;
400import com.echothree.control.user.search.server.command.GetWarehouseResultsCommand;
401import com.echothree.control.user.security.common.SecurityUtil;
402import com.echothree.control.user.security.server.command.GetSecurityRoleCommand;
403import com.echothree.control.user.security.server.command.GetSecurityRoleGroupCommand;
404import com.echothree.control.user.security.server.command.GetSecurityRoleGroupsCommand;
405import com.echothree.control.user.security.server.command.GetSecurityRolesCommand;
406import com.echothree.control.user.selector.common.SelectorUtil;
407import com.echothree.control.user.selector.server.command.GetSelectorCommand;
408import com.echothree.control.user.selector.server.command.GetSelectorKindCommand;
409import com.echothree.control.user.selector.server.command.GetSelectorKindsCommand;
410import com.echothree.control.user.selector.server.command.GetSelectorTypeCommand;
411import com.echothree.control.user.selector.server.command.GetSelectorTypesCommand;
412import com.echothree.control.user.selector.server.command.GetSelectorsCommand;
413import com.echothree.control.user.sequence.common.SequenceUtil;
414import com.echothree.control.user.sequence.common.result.GetSequenceValueResult;
415import com.echothree.control.user.sequence.server.command.GetSequenceChecksumTypeCommand;
416import com.echothree.control.user.sequence.server.command.GetSequenceChecksumTypesCommand;
417import com.echothree.control.user.sequence.server.command.GetSequenceCommand;
418import com.echothree.control.user.sequence.server.command.GetSequenceEncoderTypeCommand;
419import com.echothree.control.user.sequence.server.command.GetSequenceEncoderTypesCommand;
420import com.echothree.control.user.sequence.server.command.GetSequenceTypeCommand;
421import com.echothree.control.user.sequence.server.command.GetSequenceTypesCommand;
422import com.echothree.control.user.sequence.server.command.GetSequencesCommand;
423import com.echothree.control.user.shipment.common.ShipmentUtil;
424import com.echothree.control.user.shipment.server.command.GetFreeOnBoardCommand;
425import com.echothree.control.user.shipment.server.command.GetFreeOnBoardsCommand;
426import com.echothree.control.user.shipping.common.ShippingUtil;
427import com.echothree.control.user.shipping.server.command.GetShippingMethodCommand;
428import com.echothree.control.user.shipping.server.command.GetShippingMethodsCommand;
429import com.echothree.control.user.subscription.common.SubscriptionUtil;
430import com.echothree.control.user.subscription.server.command.GetSubscriptionCommand;
431import com.echothree.control.user.subscription.server.command.GetSubscriptionKindCommand;
432import com.echothree.control.user.subscription.server.command.GetSubscriptionKindsCommand;
433import com.echothree.control.user.subscription.server.command.GetSubscriptionTypeCommand;
434import com.echothree.control.user.subscription.server.command.GetSubscriptionTypesCommand;
435import com.echothree.control.user.subscription.server.command.GetSubscriptionsCommand;
436import com.echothree.control.user.tag.common.TagUtil;
437import com.echothree.control.user.tag.server.command.GetEntityTagCommand;
438import com.echothree.control.user.tag.server.command.GetEntityTagsCommand;
439import com.echothree.control.user.tag.server.command.GetTagCommand;
440import com.echothree.control.user.tag.server.command.GetTagScopeCommand;
441import com.echothree.control.user.tag.server.command.GetTagScopeEntityTypeCommand;
442import com.echothree.control.user.tag.server.command.GetTagScopeEntityTypesCommand;
443import com.echothree.control.user.tag.server.command.GetTagScopesCommand;
444import com.echothree.control.user.tag.server.command.GetTagsCommand;
445import com.echothree.control.user.term.common.TermUtil;
446import com.echothree.control.user.term.server.command.GetTermCommand;
447import com.echothree.control.user.term.server.command.GetTermTypeCommand;
448import com.echothree.control.user.term.server.command.GetTermTypesCommand;
449import com.echothree.control.user.term.server.command.GetTermsCommand;
450import com.echothree.control.user.uom.common.UomUtil;
451import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindCommand;
452import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindUseCommand;
453import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindUseTypeCommand;
454import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindUseTypesCommand;
455import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindUsesCommand;
456import com.echothree.control.user.uom.server.command.GetUnitOfMeasureKindsCommand;
457import com.echothree.control.user.uom.server.command.GetUnitOfMeasureTypeCommand;
458import com.echothree.control.user.uom.server.command.GetUnitOfMeasureTypesCommand;
459import com.echothree.control.user.user.common.UserUtil;
460import com.echothree.control.user.user.server.command.GetRecoveryQuestionCommand;
461import com.echothree.control.user.user.server.command.GetRecoveryQuestionsCommand;
462import com.echothree.control.user.user.server.command.GetUserLoginCommand;
463import com.echothree.control.user.user.server.command.GetUserVisitGroupCommand;
464import com.echothree.control.user.user.server.command.GetUserVisitGroupsCommand;
465import com.echothree.control.user.vendor.common.VendorUtil;
466import com.echothree.control.user.vendor.server.command.GetItemPurchasingCategoriesCommand;
467import com.echothree.control.user.vendor.server.command.GetItemPurchasingCategoryCommand;
468import com.echothree.control.user.vendor.server.command.GetVendorCommand;
469import com.echothree.control.user.vendor.server.command.GetVendorItemCommand;
470import com.echothree.control.user.vendor.server.command.GetVendorItemCostCommand;
471import com.echothree.control.user.vendor.server.command.GetVendorItemCostsCommand;
472import com.echothree.control.user.vendor.server.command.GetVendorItemsCommand;
473import com.echothree.control.user.vendor.server.command.GetVendorTypeCommand;
474import com.echothree.control.user.vendor.server.command.GetVendorTypesCommand;
475import com.echothree.control.user.vendor.server.command.GetVendorsCommand;
476import com.echothree.control.user.warehouse.common.WarehouseUtil;
477import com.echothree.control.user.warehouse.server.command.GetLocationCommand;
478import com.echothree.control.user.warehouse.server.command.GetLocationNameElementCommand;
479import com.echothree.control.user.warehouse.server.command.GetLocationNameElementsCommand;
480import com.echothree.control.user.warehouse.server.command.GetLocationTypeCommand;
481import com.echothree.control.user.warehouse.server.command.GetLocationTypesCommand;
482import com.echothree.control.user.warehouse.server.command.GetLocationUseTypeCommand;
483import com.echothree.control.user.warehouse.server.command.GetLocationUseTypesCommand;
484import com.echothree.control.user.warehouse.server.command.GetLocationsCommand;
485import com.echothree.control.user.warehouse.server.command.GetWarehouseCommand;
486import com.echothree.control.user.warehouse.server.command.GetWarehouseTypeCommand;
487import com.echothree.control.user.warehouse.server.command.GetWarehouseTypesCommand;
488import com.echothree.control.user.warehouse.server.command.GetWarehousesCommand;
489import com.echothree.control.user.wishlist.common.WishlistUtil;
490import com.echothree.control.user.wishlist.server.command.GetWishlistPrioritiesCommand;
491import com.echothree.control.user.wishlist.server.command.GetWishlistPriorityCommand;
492import com.echothree.control.user.wishlist.server.command.GetWishlistTypeCommand;
493import com.echothree.control.user.wishlist.server.command.GetWishlistTypesCommand;
494import com.echothree.control.user.workflow.common.WorkflowUtil;
495import com.echothree.control.user.workflow.server.command.GetWorkflowCommand;
496import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationCommand;
497import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationPartyTypeCommand;
498import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationPartyTypesCommand;
499import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationSecurityRoleCommand;
500import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationSecurityRolesCommand;
501import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationSelectorCommand;
502import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationSelectorsCommand;
503import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationStepCommand;
504import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationStepsCommand;
505import com.echothree.control.user.workflow.server.command.GetWorkflowDestinationsCommand;
506import com.echothree.control.user.workflow.server.command.GetWorkflowEntityStatusesCommand;
507import com.echothree.control.user.workflow.server.command.GetWorkflowEntityTypeCommand;
508import com.echothree.control.user.workflow.server.command.GetWorkflowEntityTypesCommand;
509import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceCommand;
510import com.echothree.control.user.workflow.server.command.GetWorkflowEntrancePartyTypeCommand;
511import com.echothree.control.user.workflow.server.command.GetWorkflowEntrancePartyTypesCommand;
512import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceSecurityRoleCommand;
513import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceSecurityRolesCommand;
514import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceSelectorCommand;
515import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceSelectorsCommand;
516import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceStepCommand;
517import com.echothree.control.user.workflow.server.command.GetWorkflowEntranceStepsCommand;
518import com.echothree.control.user.workflow.server.command.GetWorkflowEntrancesCommand;
519import com.echothree.control.user.workflow.server.command.GetWorkflowSelectorKindCommand;
520import com.echothree.control.user.workflow.server.command.GetWorkflowSelectorKindsCommand;
521import com.echothree.control.user.workflow.server.command.GetWorkflowStepCommand;
522import com.echothree.control.user.workflow.server.command.GetWorkflowStepTypeCommand;
523import com.echothree.control.user.workflow.server.command.GetWorkflowStepTypesCommand;
524import com.echothree.control.user.workflow.server.command.GetWorkflowStepsCommand;
525import com.echothree.control.user.workflow.server.command.GetWorkflowsCommand;
526import com.echothree.model.control.accounting.server.graphql.CurrencyObject;
527import com.echothree.model.control.accounting.server.graphql.GlAccountCategoryObject;
528import com.echothree.model.control.accounting.server.graphql.GlAccountClassObject;
529import com.echothree.model.control.accounting.server.graphql.GlAccountObject;
530import com.echothree.model.control.accounting.server.graphql.GlAccountTypeObject;
531import com.echothree.model.control.accounting.server.graphql.GlResourceTypeObject;
532import com.echothree.model.control.accounting.server.graphql.ItemAccountingCategoryObject;
533import com.echothree.model.control.accounting.server.graphql.SymbolPositionObject;
534import com.echothree.model.control.accounting.server.graphql.TransactionEntityRoleTypeObject;
535import com.echothree.model.control.accounting.server.graphql.TransactionGlAccountCategoryObject;
536import com.echothree.model.control.accounting.server.graphql.TransactionGroupObject;
537import com.echothree.model.control.accounting.server.graphql.TransactionObject;
538import com.echothree.model.control.accounting.server.graphql.TransactionTimeTypeObject;
539import com.echothree.model.control.accounting.server.graphql.TransactionTypeObject;
540import com.echothree.model.control.campaign.server.graphql.CampaignContentObject;
541import com.echothree.model.control.campaign.server.graphql.CampaignMediumObject;
542import com.echothree.model.control.campaign.server.graphql.CampaignObject;
543import com.echothree.model.control.campaign.server.graphql.CampaignSourceObject;
544import com.echothree.model.control.campaign.server.graphql.CampaignTermObject;
545import com.echothree.model.control.cancellationpolicy.server.graphql.CancellationKindObject;
546import com.echothree.model.control.cancellationpolicy.server.graphql.CancellationPolicyObject;
547import com.echothree.model.control.chain.server.graphql.ChainActionObject;
548import com.echothree.model.control.chain.server.graphql.ChainActionSetObject;
549import com.echothree.model.control.chain.server.graphql.ChainActionTypeObject;
550import com.echothree.model.control.chain.server.graphql.ChainEntityRoleTypeObject;
551import com.echothree.model.control.chain.server.graphql.ChainInstanceObject;
552import com.echothree.model.control.chain.server.graphql.ChainKindObject;
553import com.echothree.model.control.chain.server.graphql.ChainObject;
554import com.echothree.model.control.chain.server.graphql.ChainTypeObject;
555import com.echothree.model.control.contact.server.graphql.ContactMechanismPurposeObject;
556import com.echothree.model.control.contactlist.server.graphql.ContactListContactMechanismPurposeObject;
557import com.echothree.model.control.contactlist.server.graphql.ContactListFrequencyObject;
558import com.echothree.model.control.contactlist.server.graphql.ContactListGroupObject;
559import com.echothree.model.control.contactlist.server.graphql.ContactListObject;
560import com.echothree.model.control.contactlist.server.graphql.ContactListTypeObject;
561import com.echothree.model.control.contactlist.server.graphql.CustomerTypeContactListGroupObject;
562import com.echothree.model.control.contactlist.server.graphql.CustomerTypeContactListObject;
563import com.echothree.model.control.contactlist.server.graphql.PartyContactListObject;
564import com.echothree.model.control.contactlist.server.graphql.PartyTypeContactListGroupObject;
565import com.echothree.model.control.contactlist.server.graphql.PartyTypeContactListObject;
566import com.echothree.model.control.content.server.graphql.ContentCatalogItemObject;
567import com.echothree.model.control.content.server.graphql.ContentCatalogObject;
568import com.echothree.model.control.content.server.graphql.ContentCategoryItemObject;
569import com.echothree.model.control.content.server.graphql.ContentCategoryObject;
570import com.echothree.model.control.content.server.graphql.ContentCollectionObject;
571import com.echothree.model.control.content.server.graphql.ContentPageAreaObject;
572import com.echothree.model.control.content.server.graphql.ContentPageAreaTypeObject;
573import com.echothree.model.control.content.server.graphql.ContentPageLayoutAreaObject;
574import com.echothree.model.control.content.server.graphql.ContentPageLayoutObject;
575import com.echothree.model.control.content.server.graphql.ContentPageObject;
576import com.echothree.model.control.content.server.graphql.ContentSectionObject;
577import com.echothree.model.control.content.server.graphql.ContentWebAddressObject;
578import com.echothree.model.control.core.server.graphql.AppearanceObject;
579import com.echothree.model.control.core.server.graphql.ColorObject;
580import com.echothree.model.control.core.server.graphql.ComponentVendorObject;
581import com.echothree.model.control.core.server.graphql.EntityAliasObject;
582import com.echothree.model.control.core.server.graphql.EntityAliasTypeObject;
583import com.echothree.model.control.core.server.graphql.EntityAttributeEntityAttributeGroupObject;
584import com.echothree.model.control.core.server.graphql.EntityAttributeGroupObject;
585import com.echothree.model.control.core.server.graphql.EntityAttributeObject;
586import com.echothree.model.control.core.server.graphql.EntityAttributeTypeObject;
587import com.echothree.model.control.core.server.graphql.EntityInstanceObject;
588import com.echothree.model.control.core.server.graphql.EntityTypeObject;
589import com.echothree.model.control.core.server.graphql.EventTypeObject;
590import com.echothree.model.control.core.server.graphql.FontStyleObject;
591import com.echothree.model.control.core.server.graphql.FontWeightObject;
592import com.echothree.model.control.core.server.graphql.MimeTypeFileExtensionObject;
593import com.echothree.model.control.core.server.graphql.MimeTypeObject;
594import com.echothree.model.control.core.server.graphql.MimeTypeUsageTypeObject;
595import com.echothree.model.control.core.server.graphql.TextDecorationObject;
596import com.echothree.model.control.core.server.graphql.TextTransformationObject;
597import com.echothree.model.control.customer.server.graphql.CustomerObject;
598import com.echothree.model.control.customer.server.graphql.CustomerTypeObject;
599import com.echothree.model.control.customer.server.graphql.CustomerTypePaymentMethodObject;
600import com.echothree.model.control.customer.server.graphql.CustomerTypeShippingMethodObject;
601import com.echothree.model.control.employee.server.graphql.EmployeeObject;
602import com.echothree.model.control.filter.server.graphql.FilterAdjustmentAmountObject;
603import com.echothree.model.control.filter.server.graphql.FilterAdjustmentFixedAmountObject;
604import com.echothree.model.control.filter.server.graphql.FilterAdjustmentObject;
605import com.echothree.model.control.filter.server.graphql.FilterAdjustmentPercentObject;
606import com.echothree.model.control.filter.server.graphql.FilterAdjustmentSourceObject;
607import com.echothree.model.control.filter.server.graphql.FilterAdjustmentTypeObject;
608import com.echothree.model.control.filter.server.graphql.FilterEntranceStepObject;
609import com.echothree.model.control.filter.server.graphql.FilterKindObject;
610import com.echothree.model.control.filter.server.graphql.FilterObject;
611import com.echothree.model.control.filter.server.graphql.FilterStepDestinationObject;
612import com.echothree.model.control.filter.server.graphql.FilterStepElementObject;
613import com.echothree.model.control.filter.server.graphql.FilterStepObject;
614import com.echothree.model.control.filter.server.graphql.FilterTypeObject;
615import com.echothree.model.control.geo.server.graphql.GeoCodeAliasObject;
616import com.echothree.model.control.geo.server.graphql.GeoCodeAliasTypeObject;
617import com.echothree.model.control.geo.server.graphql.GeoCodeCurrencyObject;
618import com.echothree.model.control.geo.server.graphql.GeoCodeDateTimeFormatObject;
619import com.echothree.model.control.geo.server.graphql.GeoCodeLanguageObject;
620import com.echothree.model.control.geo.server.graphql.GeoCodeObject;
621import com.echothree.model.control.geo.server.graphql.GeoCodeScopeObject;
622import com.echothree.model.control.geo.server.graphql.GeoCodeTimeZoneObject;
623import com.echothree.model.control.geo.server.graphql.GeoCodeTypeObject;
624import com.echothree.model.control.graphql.server.graphql.count.Connections;
625import com.echothree.model.control.graphql.server.graphql.count.CountedObjects;
626import com.echothree.model.control.graphql.server.graphql.count.CountingDataConnectionFetcher;
627import com.echothree.model.control.graphql.server.graphql.count.CountingPaginatedData;
628import com.echothree.model.control.graphql.server.util.BaseGraphQl;
629import static com.echothree.model.control.graphql.server.util.BaseGraphQl.getUserVisitPK;
630import com.echothree.model.control.graphql.server.util.count.ObjectLimiter;
631import com.echothree.model.control.inventory.server.graphql.AllocationPriorityObject;
632import com.echothree.model.control.inventory.server.graphql.InventoryAdjustmentTypeObject;
633import com.echothree.model.control.inventory.server.graphql.InventoryConditionObject;
634import com.echothree.model.control.inventory.server.graphql.InventoryLocationGroupObject;
635import com.echothree.model.control.inventory.server.graphql.InventoryTransactionTypeObject;
636import com.echothree.model.control.inventory.server.graphql.LotObject;
637import com.echothree.model.control.item.server.graphql.ItemAliasChecksumTypeObject;
638import com.echothree.model.control.item.server.graphql.ItemAliasObject;
639import com.echothree.model.control.item.server.graphql.ItemAliasTypeObject;
640import com.echothree.model.control.item.server.graphql.ItemCategoryObject;
641import com.echothree.model.control.item.server.graphql.ItemDeliveryTypeObject;
642import com.echothree.model.control.item.server.graphql.ItemDescriptionObject;
643import com.echothree.model.control.item.server.graphql.ItemDescriptionTypeObject;
644import com.echothree.model.control.item.server.graphql.ItemDescriptionTypeUseObject;
645import com.echothree.model.control.item.server.graphql.ItemDescriptionTypeUseTypeObject;
646import com.echothree.model.control.item.server.graphql.ItemImageTypeObject;
647import com.echothree.model.control.item.server.graphql.ItemInventoryTypeObject;
648import com.echothree.model.control.item.server.graphql.ItemObject;
649import com.echothree.model.control.item.server.graphql.ItemPriceObject;
650import com.echothree.model.control.item.server.graphql.ItemPriceTypeObject;
651import com.echothree.model.control.item.server.graphql.ItemTypeObject;
652import com.echothree.model.control.item.server.graphql.ItemUnitOfMeasureTypeObject;
653import com.echothree.model.control.item.server.graphql.ItemUseTypeObject;
654import com.echothree.model.control.item.server.graphql.ItemVolumeTypeObject;
655import com.echothree.model.control.item.server.graphql.ItemWeightTypeObject;
656import com.echothree.model.control.item.server.graphql.RelatedItemObject;
657import com.echothree.model.control.item.server.graphql.RelatedItemTypeObject;
658import com.echothree.model.control.offer.server.graphql.OfferCustomerTypeObject;
659import com.echothree.model.control.offer.server.graphql.OfferItemObject;
660import com.echothree.model.control.offer.server.graphql.OfferItemPriceObject;
661import com.echothree.model.control.offer.server.graphql.OfferNameElementObject;
662import com.echothree.model.control.offer.server.graphql.OfferObject;
663import com.echothree.model.control.offer.server.graphql.OfferUseObject;
664import com.echothree.model.control.offer.server.graphql.UseNameElementObject;
665import com.echothree.model.control.offer.server.graphql.UseObject;
666import com.echothree.model.control.offer.server.graphql.UseTypeObject;
667import com.echothree.model.control.order.server.graphql.OrderPriorityObject;
668import com.echothree.model.control.order.server.graphql.OrderTimeTypeObject;
669import com.echothree.model.control.order.server.graphql.OrderTypeObject;
670import com.echothree.model.control.party.server.graphql.CompanyObject;
671import com.echothree.model.control.party.server.graphql.DateTimeFormatObject;
672import com.echothree.model.control.party.server.graphql.DepartmentObject;
673import com.echothree.model.control.party.server.graphql.DivisionObject;
674import com.echothree.model.control.party.server.graphql.LanguageObject;
675import com.echothree.model.control.party.server.graphql.NameSuffixObject;
676import com.echothree.model.control.party.server.graphql.PartyAliasObject;
677import com.echothree.model.control.party.server.graphql.PartyAliasTypeObject;
678import com.echothree.model.control.party.server.graphql.PartyObject;
679import com.echothree.model.control.party.server.graphql.PartyTypeObject;
680import com.echothree.model.control.party.server.graphql.PersonalTitleObject;
681import com.echothree.model.control.party.server.graphql.RoleTypeObject;
682import com.echothree.model.control.party.server.graphql.TimeZoneObject;
683import com.echothree.model.control.payment.server.graphql.PaymentMethodObject;
684import com.echothree.model.control.payment.server.graphql.PaymentMethodTypeObject;
685import com.echothree.model.control.payment.server.graphql.PaymentProcessorActionTypeObject;
686import com.echothree.model.control.payment.server.graphql.PaymentProcessorObject;
687import com.echothree.model.control.payment.server.graphql.PaymentProcessorResultCodeObject;
688import com.echothree.model.control.payment.server.graphql.PaymentProcessorTransactionObject;
689import com.echothree.model.control.payment.server.graphql.PaymentProcessorTypeCodeObject;
690import com.echothree.model.control.payment.server.graphql.PaymentProcessorTypeCodeTypeObject;
691import com.echothree.model.control.payment.server.graphql.PaymentProcessorTypeObject;
692import com.echothree.model.control.queue.server.graphql.QueueTypeObject;
693import com.echothree.model.control.returnpolicy.server.graphql.ReturnKindObject;
694import com.echothree.model.control.returnpolicy.server.graphql.ReturnPolicyObject;
695import com.echothree.model.control.search.server.control.SearchControl;
696import com.echothree.model.control.search.server.graphql.CheckItemSpellingObject;
697import com.echothree.model.control.search.server.graphql.ComponentVendorResultsObject;
698import com.echothree.model.control.search.server.graphql.ContentCatalogItemResultsObject;
699import com.echothree.model.control.search.server.graphql.ContentCatalogResultsObject;
700import com.echothree.model.control.search.server.graphql.ContentCategoryResultsObject;
701import com.echothree.model.control.search.server.graphql.CustomerResultsObject;
702import com.echothree.model.control.search.server.graphql.EmployeeResultsObject;
703import com.echothree.model.control.search.server.graphql.EntityAliasTypeResultsObject;
704import com.echothree.model.control.search.server.graphql.EntityAttributeGroupResultsObject;
705import com.echothree.model.control.search.server.graphql.EntityAttributeResultsObject;
706import com.echothree.model.control.search.server.graphql.EntityListItemResultsObject;
707import com.echothree.model.control.search.server.graphql.EntityTypeResultsObject;
708import com.echothree.model.control.search.server.graphql.ItemResultsObject;
709import com.echothree.model.control.search.server.graphql.SearchCheckSpellingActionTypeObject;
710import com.echothree.model.control.search.server.graphql.SearchDefaultOperatorObject;
711import com.echothree.model.control.search.server.graphql.SearchKindObject;
712import com.echothree.model.control.search.server.graphql.SearchResultActionTypeObject;
713import com.echothree.model.control.search.server.graphql.SearchSortDirectionObject;
714import com.echothree.model.control.search.server.graphql.SearchSortOrderObject;
715import com.echothree.model.control.search.server.graphql.SearchTypeObject;
716import com.echothree.model.control.search.server.graphql.SearchUseTypeObject;
717import com.echothree.model.control.search.server.graphql.ShippingMethodResultsObject;
718import com.echothree.model.control.search.server.graphql.VendorResultsObject;
719import com.echothree.model.control.search.server.graphql.WarehouseResultsObject;
720import com.echothree.model.control.security.server.graphql.SecurityRoleGroupObject;
721import com.echothree.model.control.security.server.graphql.SecurityRoleObject;
722import com.echothree.model.control.selector.server.graphql.SelectorKindObject;
723import com.echothree.model.control.selector.server.graphql.SelectorObject;
724import com.echothree.model.control.selector.server.graphql.SelectorTypeObject;
725import com.echothree.model.control.sequence.server.graphql.GetSequenceValueResultObject;
726import com.echothree.model.control.sequence.server.graphql.SequenceChecksumTypeObject;
727import com.echothree.model.control.sequence.server.graphql.SequenceEncoderTypeObject;
728import com.echothree.model.control.sequence.server.graphql.SequenceObject;
729import com.echothree.model.control.sequence.server.graphql.SequenceTypeObject;
730import com.echothree.model.control.shipment.server.graphql.FreeOnBoardObject;
731import com.echothree.model.control.shipping.server.control.ShippingControl;
732import com.echothree.model.control.shipping.server.graphql.ShippingMethodObject;
733import com.echothree.model.control.subscription.server.graphql.SubscriptionKindObject;
734import com.echothree.model.control.subscription.server.graphql.SubscriptionObject;
735import com.echothree.model.control.subscription.server.graphql.SubscriptionTypeObject;
736import com.echothree.model.control.tag.server.graphql.EntityTagObject;
737import com.echothree.model.control.tag.server.graphql.TagObject;
738import com.echothree.model.control.tag.server.graphql.TagScopeEntityTypeObject;
739import com.echothree.model.control.tag.server.graphql.TagScopeObject;
740import com.echothree.model.control.term.server.graphql.TermObject;
741import com.echothree.model.control.term.server.graphql.TermTypeObject;
742import com.echothree.model.control.uom.server.graphql.UnitOfMeasureKindObject;
743import com.echothree.model.control.uom.server.graphql.UnitOfMeasureKindUseObject;
744import com.echothree.model.control.uom.server.graphql.UnitOfMeasureKindUseTypeObject;
745import com.echothree.model.control.uom.server.graphql.UnitOfMeasureTypeObject;
746import com.echothree.model.control.user.server.graphql.RecoveryQuestionObject;
747import com.echothree.model.control.user.server.graphql.UserLoginObject;
748import com.echothree.model.control.user.server.graphql.UserSessionObject;
749import com.echothree.model.control.user.server.graphql.UserVisitGroupObject;
750import com.echothree.model.control.user.server.graphql.UserVisitObject;
751import com.echothree.model.control.vendor.server.graphql.ItemPurchasingCategoryObject;
752import com.echothree.model.control.vendor.server.graphql.VendorItemCostObject;
753import com.echothree.model.control.vendor.server.graphql.VendorItemObject;
754import com.echothree.model.control.vendor.server.graphql.VendorObject;
755import com.echothree.model.control.vendor.server.graphql.VendorTypeObject;
756import com.echothree.model.control.warehouse.server.graphql.LocationNameElementObject;
757import com.echothree.model.control.warehouse.server.graphql.LocationObject;
758import com.echothree.model.control.warehouse.server.graphql.LocationTypeObject;
759import com.echothree.model.control.warehouse.server.graphql.LocationUseTypeObject;
760import com.echothree.model.control.warehouse.server.graphql.WarehouseObject;
761import com.echothree.model.control.warehouse.server.graphql.WarehouseTypeObject;
762import com.echothree.model.control.wishlist.server.graphql.WishlistPriorityObject;
763import com.echothree.model.control.wishlist.server.graphql.WishlistTypeObject;
764import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationObject;
765import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationPartyTypeObject;
766import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationSecurityRoleObject;
767import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationSelectorObject;
768import com.echothree.model.control.workflow.server.graphql.WorkflowDestinationStepObject;
769import com.echothree.model.control.workflow.server.graphql.WorkflowEntityStatusObject;
770import com.echothree.model.control.workflow.server.graphql.WorkflowEntityTypeObject;
771import com.echothree.model.control.workflow.server.graphql.WorkflowEntranceObject;
772import com.echothree.model.control.workflow.server.graphql.WorkflowEntrancePartyTypeObject;
773import com.echothree.model.control.workflow.server.graphql.WorkflowEntranceSecurityRoleObject;
774import com.echothree.model.control.workflow.server.graphql.WorkflowEntranceSelectorObject;
775import com.echothree.model.control.workflow.server.graphql.WorkflowEntranceStepObject;
776import com.echothree.model.control.workflow.server.graphql.WorkflowObject;
777import com.echothree.model.control.workflow.server.graphql.WorkflowSelectorKindObject;
778import com.echothree.model.control.workflow.server.graphql.WorkflowStepObject;
779import com.echothree.model.control.workflow.server.graphql.WorkflowStepTypeObject;
780import com.echothree.model.data.accounting.common.CurrencyConstants;
781import com.echothree.model.data.accounting.common.GlAccountCategoryConstants;
782import com.echothree.model.data.accounting.common.GlAccountClassConstants;
783import com.echothree.model.data.accounting.common.GlAccountConstants;
784import com.echothree.model.data.accounting.common.GlAccountTypeConstants;
785import com.echothree.model.data.accounting.common.GlResourceTypeConstants;
786import com.echothree.model.data.accounting.common.ItemAccountingCategoryConstants;
787import com.echothree.model.data.accounting.common.SymbolPositionConstants;
788import com.echothree.model.data.accounting.common.TransactionConstants;
789import com.echothree.model.data.accounting.common.TransactionEntityRoleTypeConstants;
790import com.echothree.model.data.accounting.common.TransactionGlAccountCategoryConstants;
791import com.echothree.model.data.accounting.common.TransactionGroupConstants;
792import com.echothree.model.data.accounting.common.TransactionTimeTypeConstants;
793import com.echothree.model.data.accounting.common.TransactionTypeConstants;
794import com.echothree.model.data.accounting.server.entity.Currency;
795import com.echothree.model.data.accounting.server.entity.GlAccount;
796import com.echothree.model.data.accounting.server.entity.GlAccountCategory;
797import com.echothree.model.data.accounting.server.entity.GlAccountClass;
798import com.echothree.model.data.accounting.server.entity.GlAccountType;
799import com.echothree.model.data.accounting.server.entity.GlResourceType;
800import com.echothree.model.data.accounting.server.entity.ItemAccountingCategory;
801import com.echothree.model.data.accounting.server.entity.SymbolPosition;
802import com.echothree.model.data.accounting.server.entity.Transaction;
803import com.echothree.model.data.accounting.server.entity.TransactionEntityRoleType;
804import com.echothree.model.data.accounting.server.entity.TransactionGlAccountCategory;
805import com.echothree.model.data.accounting.server.entity.TransactionGroup;
806import com.echothree.model.data.accounting.server.entity.TransactionTimeType;
807import com.echothree.model.data.accounting.server.entity.TransactionType;
808import com.echothree.model.data.campaign.common.CampaignConstants;
809import com.echothree.model.data.campaign.common.CampaignContentConstants;
810import com.echothree.model.data.campaign.common.CampaignMediumConstants;
811import com.echothree.model.data.campaign.common.CampaignSourceConstants;
812import com.echothree.model.data.campaign.common.CampaignTermConstants;
813import com.echothree.model.data.campaign.server.entity.Campaign;
814import com.echothree.model.data.campaign.server.entity.CampaignContent;
815import com.echothree.model.data.campaign.server.entity.CampaignMedium;
816import com.echothree.model.data.campaign.server.entity.CampaignSource;
817import com.echothree.model.data.campaign.server.entity.CampaignTerm;
818import com.echothree.model.data.cancellationpolicy.common.CancellationKindConstants;
819import com.echothree.model.data.cancellationpolicy.common.CancellationPolicyConstants;
820import com.echothree.model.data.cancellationpolicy.server.entity.CancellationKind;
821import com.echothree.model.data.cancellationpolicy.server.entity.CancellationPolicy;
822import com.echothree.model.data.chain.common.ChainActionConstants;
823import com.echothree.model.data.chain.common.ChainActionSetConstants;
824import com.echothree.model.data.chain.common.ChainActionTypeConstants;
825import com.echothree.model.data.chain.common.ChainConstants;
826import com.echothree.model.data.chain.common.ChainEntityRoleTypeConstants;
827import com.echothree.model.data.chain.common.ChainInstanceConstants;
828import com.echothree.model.data.chain.common.ChainKindConstants;
829import com.echothree.model.data.chain.common.ChainTypeConstants;
830import com.echothree.model.data.chain.server.entity.Chain;
831import com.echothree.model.data.chain.server.entity.ChainAction;
832import com.echothree.model.data.chain.server.entity.ChainActionSet;
833import com.echothree.model.data.chain.server.entity.ChainActionType;
834import com.echothree.model.data.chain.server.entity.ChainEntityRoleType;
835import com.echothree.model.data.chain.server.entity.ChainInstance;
836import com.echothree.model.data.chain.server.entity.ChainKind;
837import com.echothree.model.data.chain.server.entity.ChainType;
838import com.echothree.model.data.contact.common.ContactMechanismPurposeConstants;
839import com.echothree.model.data.contact.server.entity.ContactMechanismPurpose;
840import com.echothree.model.data.contactlist.common.ContactListConstants;
841import com.echothree.model.data.contactlist.common.ContactListContactMechanismPurposeConstants;
842import com.echothree.model.data.contactlist.common.ContactListFrequencyConstants;
843import com.echothree.model.data.contactlist.common.ContactListGroupConstants;
844import com.echothree.model.data.contactlist.common.ContactListTypeConstants;
845import com.echothree.model.data.contactlist.common.CustomerTypeContactListConstants;
846import com.echothree.model.data.contactlist.common.CustomerTypeContactListGroupConstants;
847import com.echothree.model.data.contactlist.common.PartyContactListConstants;
848import com.echothree.model.data.contactlist.common.PartyTypeContactListConstants;
849import com.echothree.model.data.contactlist.common.PartyTypeContactListGroupConstants;
850import com.echothree.model.data.contactlist.server.entity.ContactList;
851import com.echothree.model.data.contactlist.server.entity.ContactListContactMechanismPurpose;
852import com.echothree.model.data.contactlist.server.entity.ContactListFrequency;
853import com.echothree.model.data.contactlist.server.entity.ContactListGroup;
854import com.echothree.model.data.contactlist.server.entity.ContactListType;
855import com.echothree.model.data.contactlist.server.entity.CustomerTypeContactList;
856import com.echothree.model.data.contactlist.server.entity.CustomerTypeContactListGroup;
857import com.echothree.model.data.contactlist.server.entity.PartyContactList;
858import com.echothree.model.data.contactlist.server.entity.PartyTypeContactList;
859import com.echothree.model.data.contactlist.server.entity.PartyTypeContactListGroup;
860import com.echothree.model.data.content.common.ContentCatalogConstants;
861import com.echothree.model.data.content.common.ContentCatalogItemConstants;
862import com.echothree.model.data.content.common.ContentCategoryConstants;
863import com.echothree.model.data.content.common.ContentCategoryItemConstants;
864import com.echothree.model.data.content.common.ContentCollectionConstants;
865import com.echothree.model.data.content.common.ContentPageAreaConstants;
866import com.echothree.model.data.content.common.ContentPageAreaTypeConstants;
867import com.echothree.model.data.content.common.ContentPageConstants;
868import com.echothree.model.data.content.common.ContentPageLayoutAreaConstants;
869import com.echothree.model.data.content.common.ContentPageLayoutConstants;
870import com.echothree.model.data.content.common.ContentSectionConstants;
871import com.echothree.model.data.content.common.ContentWebAddressConstants;
872import com.echothree.model.data.content.server.entity.ContentCatalog;
873import com.echothree.model.data.content.server.entity.ContentCatalogItem;
874import com.echothree.model.data.content.server.entity.ContentCategory;
875import com.echothree.model.data.content.server.entity.ContentCategoryItem;
876import com.echothree.model.data.content.server.entity.ContentCollection;
877import com.echothree.model.data.content.server.entity.ContentPage;
878import com.echothree.model.data.content.server.entity.ContentPageArea;
879import com.echothree.model.data.content.server.entity.ContentPageAreaType;
880import com.echothree.model.data.content.server.entity.ContentPageLayout;
881import com.echothree.model.data.content.server.entity.ContentPageLayoutArea;
882import com.echothree.model.data.content.server.entity.ContentSection;
883import com.echothree.model.data.content.server.entity.ContentWebAddress;
884import com.echothree.model.data.core.common.AppearanceConstants;
885import com.echothree.model.data.core.common.ColorConstants;
886import com.echothree.model.data.core.common.ComponentVendorConstants;
887import com.echothree.model.data.core.common.EntityAliasConstants;
888import com.echothree.model.data.core.common.EntityAliasTypeConstants;
889import com.echothree.model.data.core.common.EntityAttributeConstants;
890import com.echothree.model.data.core.common.EntityAttributeEntityAttributeGroupConstants;
891import com.echothree.model.data.core.common.EntityAttributeGroupConstants;
892import com.echothree.model.data.core.common.EntityAttributeTypeConstants;
893import com.echothree.model.data.core.common.EntityInstanceConstants;
894import com.echothree.model.data.core.common.EntityTypeConstants;
895import com.echothree.model.data.core.common.EventTypeConstants;
896import com.echothree.model.data.core.common.FontStyleConstants;
897import com.echothree.model.data.core.common.FontWeightConstants;
898import com.echothree.model.data.core.common.MimeTypeConstants;
899import com.echothree.model.data.core.common.MimeTypeFileExtensionConstants;
900import com.echothree.model.data.core.common.TextDecorationConstants;
901import com.echothree.model.data.core.common.TextTransformationConstants;
902import com.echothree.model.data.core.server.entity.Appearance;
903import com.echothree.model.data.core.server.entity.Color;
904import com.echothree.model.data.core.server.entity.ComponentVendor;
905import com.echothree.model.data.core.server.entity.EntityAlias;
906import com.echothree.model.data.core.server.entity.EntityAliasType;
907import com.echothree.model.data.core.server.entity.EntityAttribute;
908import com.echothree.model.data.core.server.entity.EntityAttributeEntityAttributeGroup;
909import com.echothree.model.data.core.server.entity.EntityAttributeGroup;
910import com.echothree.model.data.core.server.entity.EntityAttributeType;
911import com.echothree.model.data.core.server.entity.EntityInstance;
912import com.echothree.model.data.core.server.entity.EntityType;
913import com.echothree.model.data.core.server.entity.EventType;
914import com.echothree.model.data.core.server.entity.FontStyle;
915import com.echothree.model.data.core.server.entity.FontWeight;
916import com.echothree.model.data.core.server.entity.MimeType;
917import com.echothree.model.data.core.server.entity.MimeTypeFileExtension;
918import com.echothree.model.data.core.server.entity.MimeTypeUsageType;
919import com.echothree.model.data.core.server.entity.TextDecoration;
920import com.echothree.model.data.core.server.entity.TextTransformation;
921import com.echothree.model.data.customer.common.CustomerConstants;
922import com.echothree.model.data.customer.common.CustomerTypeConstants;
923import com.echothree.model.data.customer.common.CustomerTypePaymentMethodConstants;
924import com.echothree.model.data.customer.common.CustomerTypeShippingMethodConstants;
925import com.echothree.model.data.customer.server.entity.Customer;
926import com.echothree.model.data.customer.server.entity.CustomerType;
927import com.echothree.model.data.customer.server.entity.CustomerTypePaymentMethod;
928import com.echothree.model.data.customer.server.entity.CustomerTypeShippingMethod;
929import com.echothree.model.data.employee.common.PartyEmployeeConstants;
930import com.echothree.model.data.employee.server.entity.PartyEmployee;
931import com.echothree.model.data.filter.common.FilterAdjustmentTypeConstants;
932import com.echothree.model.data.filter.common.FilterConstants;
933import com.echothree.model.data.filter.common.FilterEntranceStepConstants;
934import com.echothree.model.data.filter.common.FilterKindConstants;
935import com.echothree.model.data.filter.common.FilterStepConstants;
936import com.echothree.model.data.filter.common.FilterStepDestinationConstants;
937import com.echothree.model.data.filter.common.FilterStepElementConstants;
938import com.echothree.model.data.filter.common.FilterTypeConstants;
939import com.echothree.model.data.filter.server.entity.Filter;
940import com.echothree.model.data.filter.server.entity.FilterAdjustment;
941import com.echothree.model.data.filter.server.entity.FilterAdjustmentAmount;
942import com.echothree.model.data.filter.server.entity.FilterAdjustmentFixedAmount;
943import com.echothree.model.data.filter.server.entity.FilterAdjustmentPercent;
944import com.echothree.model.data.filter.server.entity.FilterAdjustmentSource;
945import com.echothree.model.data.filter.server.entity.FilterAdjustmentType;
946import com.echothree.model.data.filter.server.entity.FilterEntranceStep;
947import com.echothree.model.data.filter.server.entity.FilterKind;
948import com.echothree.model.data.filter.server.entity.FilterStep;
949import com.echothree.model.data.filter.server.entity.FilterStepDestination;
950import com.echothree.model.data.filter.server.entity.FilterStepElement;
951import com.echothree.model.data.filter.server.entity.FilterType;
952import com.echothree.model.data.geo.common.GeoCodeAliasConstants;
953import com.echothree.model.data.geo.common.GeoCodeAliasTypeConstants;
954import com.echothree.model.data.geo.common.GeoCodeConstants;
955import com.echothree.model.data.geo.common.GeoCodeCurrencyConstants;
956import com.echothree.model.data.geo.common.GeoCodeDateTimeFormatConstants;
957import com.echothree.model.data.geo.common.GeoCodeLanguageConstants;
958import com.echothree.model.data.geo.common.GeoCodeScopeConstants;
959import com.echothree.model.data.geo.common.GeoCodeTimeZoneConstants;
960import com.echothree.model.data.geo.common.GeoCodeTypeConstants;
961import com.echothree.model.data.geo.server.entity.GeoCode;
962import com.echothree.model.data.geo.server.entity.GeoCodeAlias;
963import com.echothree.model.data.geo.server.entity.GeoCodeAliasType;
964import com.echothree.model.data.geo.server.entity.GeoCodeCurrency;
965import com.echothree.model.data.geo.server.entity.GeoCodeDateTimeFormat;
966import com.echothree.model.data.geo.server.entity.GeoCodeLanguage;
967import com.echothree.model.data.geo.server.entity.GeoCodeScope;
968import com.echothree.model.data.geo.server.entity.GeoCodeTimeZone;
969import com.echothree.model.data.geo.server.entity.GeoCodeType;
970import com.echothree.model.data.inventory.common.AllocationPriorityConstants;
971import com.echothree.model.data.inventory.common.InventoryAdjustmentTypeConstants;
972import com.echothree.model.data.inventory.common.InventoryConditionConstants;
973import com.echothree.model.data.inventory.common.InventoryLocationGroupConstants;
974import com.echothree.model.data.inventory.common.InventoryTransactionTypeConstants;
975import com.echothree.model.data.inventory.common.LotConstants;
976import com.echothree.model.data.inventory.server.entity.AllocationPriority;
977import com.echothree.model.data.inventory.server.entity.InventoryAdjustmentType;
978import com.echothree.model.data.inventory.server.entity.InventoryCondition;
979import com.echothree.model.data.inventory.server.entity.InventoryLocationGroup;
980import com.echothree.model.data.inventory.server.entity.InventoryTransactionType;
981import com.echothree.model.data.inventory.server.entity.Lot;
982import com.echothree.model.data.item.common.ItemAliasChecksumTypeConstants;
983import com.echothree.model.data.item.common.ItemAliasConstants;
984import com.echothree.model.data.item.common.ItemAliasTypeConstants;
985import com.echothree.model.data.item.common.ItemCategoryConstants;
986import com.echothree.model.data.item.common.ItemConstants;
987import com.echothree.model.data.item.common.ItemDeliveryTypeConstants;
988import com.echothree.model.data.item.common.ItemDescriptionConstants;
989import com.echothree.model.data.item.common.ItemDescriptionTypeConstants;
990import com.echothree.model.data.item.common.ItemDescriptionTypeUseTypeConstants;
991import com.echothree.model.data.item.common.ItemImageTypeConstants;
992import com.echothree.model.data.item.common.ItemInventoryTypeConstants;
993import com.echothree.model.data.item.common.ItemPriceConstants;
994import com.echothree.model.data.item.common.ItemPriceTypeConstants;
995import com.echothree.model.data.item.common.ItemTypeConstants;
996import com.echothree.model.data.item.common.ItemUnitOfMeasureTypeConstants;
997import com.echothree.model.data.item.common.ItemUseTypeConstants;
998import com.echothree.model.data.item.common.ItemVolumeTypeConstants;
999import com.echothree.model.data.item.common.ItemWeightTypeConstants;
1000import com.echothree.model.data.item.common.RelatedItemConstants;
1001import com.echothree.model.data.item.common.RelatedItemTypeConstants;
1002import com.echothree.model.data.item.server.entity.Item;
1003import com.echothree.model.data.item.server.entity.ItemAlias;
1004import com.echothree.model.data.item.server.entity.ItemAliasChecksumType;
1005import com.echothree.model.data.item.server.entity.ItemAliasType;
1006import com.echothree.model.data.item.server.entity.ItemCategory;
1007import com.echothree.model.data.item.server.entity.ItemDeliveryType;
1008import com.echothree.model.data.item.server.entity.ItemDescription;
1009import com.echothree.model.data.item.server.entity.ItemDescriptionType;
1010import com.echothree.model.data.item.server.entity.ItemDescriptionTypeUse;
1011import com.echothree.model.data.item.server.entity.ItemDescriptionTypeUseType;
1012import com.echothree.model.data.item.server.entity.ItemImageType;
1013import com.echothree.model.data.item.server.entity.ItemInventoryType;
1014import com.echothree.model.data.item.server.entity.ItemPrice;
1015import com.echothree.model.data.item.server.entity.ItemPriceType;
1016import com.echothree.model.data.item.server.entity.ItemType;
1017import com.echothree.model.data.item.server.entity.ItemUnitOfMeasureType;
1018import com.echothree.model.data.item.server.entity.ItemUseType;
1019import com.echothree.model.data.item.server.entity.ItemVolumeType;
1020import com.echothree.model.data.item.server.entity.ItemWeightType;
1021import com.echothree.model.data.item.server.entity.RelatedItem;
1022import com.echothree.model.data.item.server.entity.RelatedItemType;
1023import com.echothree.model.data.offer.common.OfferConstants;
1024import com.echothree.model.data.offer.common.OfferCustomerTypeConstants;
1025import com.echothree.model.data.offer.common.OfferItemConstants;
1026import com.echothree.model.data.offer.common.OfferItemPriceConstants;
1027import com.echothree.model.data.offer.common.OfferNameElementConstants;
1028import com.echothree.model.data.offer.common.UseConstants;
1029import com.echothree.model.data.offer.common.UseNameElementConstants;
1030import com.echothree.model.data.offer.common.UseTypeConstants;
1031import com.echothree.model.data.offer.server.entity.Offer;
1032import com.echothree.model.data.offer.server.entity.OfferCustomerType;
1033import com.echothree.model.data.offer.server.entity.OfferItem;
1034import com.echothree.model.data.offer.server.entity.OfferItemPrice;
1035import com.echothree.model.data.offer.server.entity.OfferNameElement;
1036import com.echothree.model.data.offer.server.entity.OfferUse;
1037import com.echothree.model.data.offer.server.entity.Use;
1038import com.echothree.model.data.offer.server.entity.UseNameElement;
1039import com.echothree.model.data.offer.server.entity.UseType;
1040import com.echothree.model.data.order.common.OrderPriorityConstants;
1041import com.echothree.model.data.order.common.OrderTimeTypeConstants;
1042import com.echothree.model.data.order.common.OrderTypeConstants;
1043import com.echothree.model.data.order.server.entity.OrderPriority;
1044import com.echothree.model.data.order.server.entity.OrderTimeType;
1045import com.echothree.model.data.order.server.entity.OrderType;
1046import com.echothree.model.data.party.common.DateTimeFormatConstants;
1047import com.echothree.model.data.party.common.LanguageConstants;
1048import com.echothree.model.data.party.common.NameSuffixConstants;
1049import com.echothree.model.data.party.common.PartyAliasTypeConstants;
1050import com.echothree.model.data.party.common.PartyCompanyConstants;
1051import com.echothree.model.data.party.common.PartyConstants;
1052import com.echothree.model.data.party.common.PartyDepartmentConstants;
1053import com.echothree.model.data.party.common.PartyDivisionConstants;
1054import com.echothree.model.data.party.common.PartyTypeConstants;
1055import com.echothree.model.data.party.common.PersonalTitleConstants;
1056import com.echothree.model.data.party.common.RoleTypeConstants;
1057import com.echothree.model.data.party.common.TimeZoneConstants;
1058import com.echothree.model.data.party.server.entity.DateTimeFormat;
1059import com.echothree.model.data.party.server.entity.Language;
1060import com.echothree.model.data.party.server.entity.Party;
1061import com.echothree.model.data.party.server.entity.PartyAlias;
1062import com.echothree.model.data.party.server.entity.PartyAliasType;
1063import com.echothree.model.data.party.server.entity.PartyCompany;
1064import com.echothree.model.data.party.server.entity.PartyDepartment;
1065import com.echothree.model.data.party.server.entity.PartyDivision;
1066import com.echothree.model.data.party.server.entity.PartyType;
1067import com.echothree.model.data.party.server.entity.RoleType;
1068import com.echothree.model.data.party.server.entity.TimeZone;
1069import com.echothree.model.data.payment.common.PaymentMethodConstants;
1070import com.echothree.model.data.payment.common.PaymentMethodTypeConstants;
1071import com.echothree.model.data.payment.common.PaymentProcessorActionTypeConstants;
1072import com.echothree.model.data.payment.common.PaymentProcessorConstants;
1073import com.echothree.model.data.payment.common.PaymentProcessorResultCodeConstants;
1074import com.echothree.model.data.payment.common.PaymentProcessorTransactionConstants;
1075import com.echothree.model.data.payment.common.PaymentProcessorTypeConstants;
1076import com.echothree.model.data.payment.server.entity.PaymentMethod;
1077import com.echothree.model.data.payment.server.entity.PaymentMethodType;
1078import com.echothree.model.data.payment.server.entity.PaymentProcessor;
1079import com.echothree.model.data.payment.server.entity.PaymentProcessorActionType;
1080import com.echothree.model.data.payment.server.entity.PaymentProcessorResultCode;
1081import com.echothree.model.data.payment.server.entity.PaymentProcessorTransaction;
1082import com.echothree.model.data.payment.server.entity.PaymentProcessorType;
1083import com.echothree.model.data.payment.server.entity.PaymentProcessorTypeCode;
1084import com.echothree.model.data.payment.server.entity.PaymentProcessorTypeCodeType;
1085import com.echothree.model.data.queue.common.QueueTypeConstants;
1086import com.echothree.model.data.queue.server.entity.QueueType;
1087import com.echothree.model.data.returnpolicy.common.ReturnKindConstants;
1088import com.echothree.model.data.returnpolicy.common.ReturnPolicyConstants;
1089import com.echothree.model.data.returnpolicy.server.entity.ReturnKind;
1090import com.echothree.model.data.returnpolicy.server.entity.ReturnPolicy;
1091import com.echothree.model.data.search.common.SearchCheckSpellingActionTypeConstants;
1092import com.echothree.model.data.search.common.SearchDefaultOperatorConstants;
1093import com.echothree.model.data.search.common.SearchKindConstants;
1094import com.echothree.model.data.search.common.SearchResultActionTypeConstants;
1095import com.echothree.model.data.search.common.SearchSortDirectionConstants;
1096import com.echothree.model.data.search.common.SearchSortOrderConstants;
1097import com.echothree.model.data.search.common.SearchTypeConstants;
1098import com.echothree.model.data.search.common.SearchUseTypeConstants;
1099import com.echothree.model.data.search.server.entity.SearchCheckSpellingActionType;
1100import com.echothree.model.data.search.server.entity.SearchDefaultOperator;
1101import com.echothree.model.data.search.server.entity.SearchKind;
1102import com.echothree.model.data.search.server.entity.SearchResultActionType;
1103import com.echothree.model.data.search.server.entity.SearchSortDirection;
1104import com.echothree.model.data.search.server.entity.SearchSortOrder;
1105import com.echothree.model.data.search.server.entity.SearchType;
1106import com.echothree.model.data.search.server.entity.SearchUseType;
1107import com.echothree.model.data.security.common.SecurityRoleConstants;
1108import com.echothree.model.data.security.common.SecurityRoleGroupConstants;
1109import com.echothree.model.data.security.server.entity.SecurityRole;
1110import com.echothree.model.data.security.server.entity.SecurityRoleGroup;
1111import com.echothree.model.data.selector.common.SelectorKindConstants;
1112import com.echothree.model.data.selector.common.SelectorTypeConstants;
1113import com.echothree.model.data.selector.server.entity.Selector;
1114import com.echothree.model.data.selector.server.entity.SelectorKind;
1115import com.echothree.model.data.selector.server.entity.SelectorType;
1116import com.echothree.model.data.sequence.common.SequenceChecksumTypeConstants;
1117import com.echothree.model.data.sequence.common.SequenceConstants;
1118import com.echothree.model.data.sequence.common.SequenceEncoderTypeConstants;
1119import com.echothree.model.data.sequence.common.SequenceTypeConstants;
1120import com.echothree.model.data.sequence.server.entity.Sequence;
1121import com.echothree.model.data.sequence.server.entity.SequenceChecksumType;
1122import com.echothree.model.data.sequence.server.entity.SequenceEncoderType;
1123import com.echothree.model.data.sequence.server.entity.SequenceType;
1124import com.echothree.model.data.shipment.common.FreeOnBoardConstants;
1125import com.echothree.model.data.shipment.server.entity.FreeOnBoard;
1126import com.echothree.model.data.shipping.common.ShippingMethodConstants;
1127import com.echothree.model.data.shipping.server.entity.ShippingMethod;
1128import com.echothree.model.data.subscription.common.SubscriptionConstants;
1129import com.echothree.model.data.subscription.common.SubscriptionKindConstants;
1130import com.echothree.model.data.subscription.common.SubscriptionTypeConstants;
1131import com.echothree.model.data.subscription.server.entity.Subscription;
1132import com.echothree.model.data.subscription.server.entity.SubscriptionKind;
1133import com.echothree.model.data.subscription.server.entity.SubscriptionType;
1134import com.echothree.model.data.tag.common.EntityTagConstants;
1135import com.echothree.model.data.tag.common.TagConstants;
1136import com.echothree.model.data.tag.common.TagScopeConstants;
1137import com.echothree.model.data.tag.common.TagScopeEntityTypeConstants;
1138import com.echothree.model.data.tag.server.entity.EntityTag;
1139import com.echothree.model.data.tag.server.entity.Tag;
1140import com.echothree.model.data.tag.server.entity.TagScope;
1141import com.echothree.model.data.tag.server.entity.TagScopeEntityType;
1142import com.echothree.model.data.term.common.TermConstants;
1143import com.echothree.model.data.term.common.TermTypeConstants;
1144import com.echothree.model.data.term.server.entity.Term;
1145import com.echothree.model.data.term.server.entity.TermType;
1146import com.echothree.model.data.uom.common.UnitOfMeasureKindConstants;
1147import com.echothree.model.data.uom.common.UnitOfMeasureKindUseConstants;
1148import com.echothree.model.data.uom.common.UnitOfMeasureKindUseTypeConstants;
1149import com.echothree.model.data.uom.common.UnitOfMeasureTypeConstants;
1150import com.echothree.model.data.uom.server.entity.UnitOfMeasureKind;
1151import com.echothree.model.data.uom.server.entity.UnitOfMeasureKindUse;
1152import com.echothree.model.data.uom.server.entity.UnitOfMeasureKindUseType;
1153import com.echothree.model.data.uom.server.entity.UnitOfMeasureType;
1154import com.echothree.model.data.user.common.RecoveryQuestionConstants;
1155import com.echothree.model.data.user.common.UserVisitGroupConstants;
1156import com.echothree.model.data.user.server.entity.RecoveryQuestion;
1157import com.echothree.model.data.user.server.entity.UserLogin;
1158import com.echothree.model.data.user.server.entity.UserVisitGroup;
1159import com.echothree.model.data.vendor.common.ItemPurchasingCategoryConstants;
1160import com.echothree.model.data.vendor.common.VendorConstants;
1161import com.echothree.model.data.vendor.common.VendorItemConstants;
1162import com.echothree.model.data.vendor.common.VendorItemCostConstants;
1163import com.echothree.model.data.vendor.common.VendorTypeConstants;
1164import com.echothree.model.data.vendor.server.entity.ItemPurchasingCategory;
1165import com.echothree.model.data.vendor.server.entity.Vendor;
1166import com.echothree.model.data.vendor.server.entity.VendorItem;
1167import com.echothree.model.data.vendor.server.entity.VendorItemCost;
1168import com.echothree.model.data.vendor.server.entity.VendorType;
1169import com.echothree.model.data.warehouse.common.LocationConstants;
1170import com.echothree.model.data.warehouse.common.LocationNameElementConstants;
1171import com.echothree.model.data.warehouse.common.LocationTypeConstants;
1172import com.echothree.model.data.warehouse.common.LocationUseTypeConstants;
1173import com.echothree.model.data.warehouse.common.WarehouseConstants;
1174import com.echothree.model.data.warehouse.common.WarehouseTypeConstants;
1175import com.echothree.model.data.warehouse.server.entity.Location;
1176import com.echothree.model.data.warehouse.server.entity.LocationNameElement;
1177import com.echothree.model.data.warehouse.server.entity.LocationType;
1178import com.echothree.model.data.warehouse.server.entity.LocationUseType;
1179import com.echothree.model.data.warehouse.server.entity.Warehouse;
1180import com.echothree.model.data.warehouse.server.entity.WarehouseType;
1181import com.echothree.model.data.wishlist.common.WishlistPriorityConstants;
1182import com.echothree.model.data.wishlist.common.WishlistTypeConstants;
1183import com.echothree.model.data.wishlist.server.entity.WishlistPriority;
1184import com.echothree.model.data.wishlist.server.entity.WishlistType;
1185import com.echothree.model.data.workflow.common.WorkflowConstants;
1186import com.echothree.model.data.workflow.common.WorkflowDestinationConstants;
1187import com.echothree.model.data.workflow.common.WorkflowDestinationPartyTypeConstants;
1188import com.echothree.model.data.workflow.common.WorkflowDestinationSecurityRoleConstants;
1189import com.echothree.model.data.workflow.common.WorkflowDestinationSelectorConstants;
1190import com.echothree.model.data.workflow.common.WorkflowDestinationStepConstants;
1191import com.echothree.model.data.workflow.common.WorkflowEntityStatusConstants;
1192import com.echothree.model.data.workflow.common.WorkflowEntityTypeConstants;
1193import com.echothree.model.data.workflow.common.WorkflowEntranceConstants;
1194import com.echothree.model.data.workflow.common.WorkflowEntrancePartyTypeConstants;
1195import com.echothree.model.data.workflow.common.WorkflowEntranceSecurityRoleConstants;
1196import com.echothree.model.data.workflow.common.WorkflowEntranceSelectorConstants;
1197import com.echothree.model.data.workflow.common.WorkflowEntranceStepConstants;
1198import com.echothree.model.data.workflow.common.WorkflowSelectorKindConstants;
1199import com.echothree.model.data.workflow.common.WorkflowStepConstants;
1200import com.echothree.model.data.workflow.common.WorkflowStepTypeConstants;
1201import com.echothree.model.data.workflow.server.entity.Workflow;
1202import com.echothree.model.data.workflow.server.entity.WorkflowDestination;
1203import com.echothree.model.data.workflow.server.entity.WorkflowDestinationPartyType;
1204import com.echothree.model.data.workflow.server.entity.WorkflowDestinationSecurityRole;
1205import com.echothree.model.data.workflow.server.entity.WorkflowDestinationSelector;
1206import com.echothree.model.data.workflow.server.entity.WorkflowDestinationStep;
1207import com.echothree.model.data.workflow.server.entity.WorkflowEntityType;
1208import com.echothree.model.data.workflow.server.entity.WorkflowEntrance;
1209import com.echothree.model.data.workflow.server.entity.WorkflowEntrancePartyType;
1210import com.echothree.model.data.workflow.server.entity.WorkflowEntranceSecurityRole;
1211import com.echothree.model.data.workflow.server.entity.WorkflowEntranceSelector;
1212import com.echothree.model.data.workflow.server.entity.WorkflowEntranceStep;
1213import com.echothree.model.data.workflow.server.entity.WorkflowSelectorKind;
1214import com.echothree.model.data.workflow.server.entity.WorkflowStep;
1215import com.echothree.model.data.workflow.server.entity.WorkflowStepType;
1216import com.echothree.util.server.persistence.Session;
1217import graphql.annotations.annotationTypes.GraphQLField;
1218import graphql.annotations.annotationTypes.GraphQLID;
1219import graphql.annotations.annotationTypes.GraphQLName;
1220import graphql.annotations.annotationTypes.GraphQLNonNull;
1221import graphql.annotations.connection.GraphQLConnection;
1222import graphql.schema.DataFetchingEnvironment;
1223import java.util.ArrayList;
1224import java.util.Collection;
1225import static java.util.Collections.emptyList;
1226import java.util.stream.Collectors;
1227import javax.enterprise.inject.spi.CDI;
1228import javax.naming.NamingException;
1229
1230@GraphQLName("query")
1231public interface GraphQlQueries {
1232
1233    @GraphQLField
1234    @GraphQLName("searchKind")
1235    static SearchKindObject searchKind(final DataFetchingEnvironment env,
1236            @GraphQLName("searchKindName") final String searchKindName,
1237            @GraphQLName("id") @GraphQLID final String id) {
1238        SearchKind searchKind;
1239
1240        try {
1241            var commandForm = SearchUtil.getHome().getGetSearchKindForm();
1242
1243            commandForm.setSearchKindName(searchKindName);
1244            commandForm.setUuid(id);
1245
1246            searchKind = CDI.current().select(GetSearchKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1247        } catch (NamingException ex) {
1248            throw new RuntimeException(ex);
1249        }
1250
1251        return searchKind == null ? null : new SearchKindObject(searchKind);
1252    }
1253
1254    @GraphQLField
1255    @GraphQLName("searchKinds")
1256    @GraphQLNonNull
1257    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1258    static CountingPaginatedData<SearchKindObject> searchKinds(final DataFetchingEnvironment env) {
1259        CountingPaginatedData<SearchKindObject> data;
1260
1261        try {
1262            var searchControl = Session.getModelController(SearchControl.class);
1263            var totalCount = searchControl.countSearchKinds();
1264
1265            try(var objectLimiter = new ObjectLimiter(env, SearchKindConstants.COMPONENT_VENDOR_NAME, SearchKindConstants.ENTITY_TYPE_NAME, totalCount)) {
1266                var commandForm = SearchUtil.getHome().getGetSearchKindsForm();
1267                var entities = CDI.current().select(GetSearchKindsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1268
1269                if(entities == null) {
1270                    data = Connections.emptyConnection();
1271                } else {
1272                    var searchKinds = entities.stream().map(SearchKindObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1273
1274                    data = new CountedObjects<>(objectLimiter, searchKinds);
1275                }
1276            }
1277        } catch (NamingException ex) {
1278            throw new RuntimeException(ex);
1279        }
1280
1281        return data;
1282    }
1283
1284    @GraphQLField
1285    @GraphQLName("searchType")
1286    static SearchTypeObject searchType(final DataFetchingEnvironment env,
1287            @GraphQLName("searchKindName") final String searchKindName,
1288            @GraphQLName("searchTypeName") final String searchTypeName,
1289            @GraphQLName("id") @GraphQLID final String id) {
1290        SearchType searchType;
1291
1292        try {
1293            var commandForm = SearchUtil.getHome().getGetSearchTypeForm();
1294
1295            commandForm.setSearchKindName(searchKindName);
1296            commandForm.setSearchTypeName(searchTypeName);
1297            commandForm.setUuid(id);
1298
1299            searchType = CDI.current().select(GetSearchTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1300        } catch (NamingException ex) {
1301            throw new RuntimeException(ex);
1302        }
1303
1304        return searchType == null ? null : new SearchTypeObject(searchType);
1305    }
1306
1307    @GraphQLField
1308    @GraphQLName("searchTypes")
1309    @GraphQLNonNull
1310    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1311    static CountingPaginatedData<SearchTypeObject> searchTypes(final DataFetchingEnvironment env,
1312            @GraphQLName("searchKindName") @GraphQLNonNull final String searchKindName) {
1313        CountingPaginatedData<SearchTypeObject> data;
1314
1315        try {
1316            var commandForm = SearchUtil.getHome().getGetSearchTypesForm();
1317            var command = CDI.current().select(GetSearchTypesCommand.class).get();
1318
1319            commandForm.setSearchKindName(searchKindName);
1320
1321            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1322            if(totalEntities == null) {
1323                data = Connections.emptyConnection();
1324            } else {
1325                try(var objectLimiter = new ObjectLimiter(env, SearchTypeConstants.COMPONENT_VENDOR_NAME, SearchTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
1326                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1327
1328                    var searchTypes = entities.stream()
1329                            .map(SearchTypeObject::new)
1330                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1331
1332                    data = new CountedObjects<>(objectLimiter, searchTypes);
1333                }
1334            }
1335        } catch (NamingException ex) {
1336            throw new RuntimeException(ex);
1337        }
1338
1339        return data;
1340    }
1341
1342    @GraphQLField
1343    @GraphQLName("searchSortOrder")
1344    static SearchSortOrderObject searchSortOrder(final DataFetchingEnvironment env,
1345            @GraphQLName("searchKindName") final String searchKindName,
1346            @GraphQLName("searchSortOrderName") final String searchSortOrderName,
1347            @GraphQLName("id") @GraphQLID final String id) {
1348        SearchSortOrder searchSortOrder;
1349
1350        try {
1351            var commandForm = SearchUtil.getHome().getGetSearchSortOrderForm();
1352
1353            commandForm.setSearchKindName(searchKindName);
1354            commandForm.setSearchSortOrderName(searchSortOrderName);
1355            commandForm.setUuid(id);
1356
1357            searchSortOrder = CDI.current().select(GetSearchSortOrderCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1358        } catch (NamingException ex) {
1359            throw new RuntimeException(ex);
1360        }
1361
1362        return searchSortOrder == null ? null : new SearchSortOrderObject(searchSortOrder);
1363    }
1364
1365    @GraphQLField
1366    @GraphQLName("searchSortOrders")
1367    @GraphQLNonNull
1368    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1369    static CountingPaginatedData<SearchSortOrderObject> searchSortOrders(final DataFetchingEnvironment env,
1370            @GraphQLName("searchKindName") @GraphQLNonNull final String searchKindName) {
1371        CountingPaginatedData<SearchSortOrderObject> data;
1372
1373        try {
1374            var commandForm = SearchUtil.getHome().getGetSearchSortOrdersForm();
1375            var command = CDI.current().select(GetSearchSortOrdersCommand.class).get();
1376
1377            commandForm.setSearchKindName(searchKindName);
1378
1379            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1380            if(totalEntities == null) {
1381                data = Connections.emptyConnection();
1382            } else {
1383                try(var objectLimiter = new ObjectLimiter(env, SearchSortOrderConstants.COMPONENT_VENDOR_NAME, SearchSortOrderConstants.ENTITY_TYPE_NAME, totalEntities)) {
1384                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1385
1386                    var searchSortOrders = entities.stream()
1387                            .map(SearchSortOrderObject::new)
1388                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1389
1390                    data = new CountedObjects<>(objectLimiter, searchSortOrders);
1391                }
1392            }
1393        } catch (NamingException ex) {
1394            throw new RuntimeException(ex);
1395        }
1396
1397        return data;
1398    }
1399
1400    @GraphQLField
1401    @GraphQLName("searchUseType")
1402    static SearchUseTypeObject searchUseType(final DataFetchingEnvironment env,
1403            @GraphQLName("searchUseTypeName") final String searchUseTypeName,
1404            @GraphQLName("id") @GraphQLID final String id) {
1405        SearchUseType searchUseType;
1406
1407        try {
1408            var commandForm = SearchUtil.getHome().getGetSearchUseTypeForm();
1409
1410            commandForm.setSearchUseTypeName(searchUseTypeName);
1411            commandForm.setUuid(id);
1412
1413            searchUseType = CDI.current().select(GetSearchUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1414        } catch (NamingException ex) {
1415            throw new RuntimeException(ex);
1416        }
1417
1418        return searchUseType == null ? null : new SearchUseTypeObject(searchUseType);
1419    }
1420
1421    @GraphQLField
1422    @GraphQLName("searchUseTypes")
1423    @GraphQLNonNull
1424    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1425    static CountingPaginatedData<SearchUseTypeObject> searchUseTypes(final DataFetchingEnvironment env) {
1426        CountingPaginatedData<SearchUseTypeObject> data;
1427
1428        try {
1429            var searchControl = Session.getModelController(SearchControl.class);
1430            var totalCount = searchControl.countSearchUseTypes();
1431
1432            try(var objectLimiter = new ObjectLimiter(env, SearchUseTypeConstants.COMPONENT_VENDOR_NAME, SearchUseTypeConstants.ENTITY_TYPE_NAME, totalCount)) {
1433                var commandForm = SearchUtil.getHome().getGetSearchUseTypesForm();
1434                var entities = CDI.current().select(GetSearchUseTypesCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1435
1436                if(entities == null) {
1437                    data = Connections.emptyConnection();
1438                } else {
1439                    var searchUseTypes = entities.stream().map(SearchUseTypeObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1440
1441                    data = new CountedObjects<>(objectLimiter, searchUseTypes);
1442                }
1443            }
1444        } catch (NamingException ex) {
1445            throw new RuntimeException(ex);
1446        }
1447
1448        return data;
1449    }
1450
1451    @GraphQLField
1452    @GraphQLName("searchDefaultOperator")
1453    static SearchDefaultOperatorObject searchDefaultOperator(final DataFetchingEnvironment env,
1454            @GraphQLName("searchDefaultOperatorName") final String searchDefaultOperatorName,
1455            @GraphQLName("id") @GraphQLID final String id) {
1456        SearchDefaultOperator searchDefaultOperator;
1457
1458        try {
1459            var commandForm = SearchUtil.getHome().getGetSearchDefaultOperatorForm();
1460
1461            commandForm.setSearchDefaultOperatorName(searchDefaultOperatorName);
1462            commandForm.setUuid(id);
1463
1464            searchDefaultOperator = CDI.current().select(GetSearchDefaultOperatorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1465        } catch (NamingException ex) {
1466            throw new RuntimeException(ex);
1467        }
1468
1469        return searchDefaultOperator == null ? null : new SearchDefaultOperatorObject(searchDefaultOperator);
1470    }
1471
1472    @GraphQLField
1473    @GraphQLName("searchDefaultOperators")
1474    @GraphQLNonNull
1475    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1476    static CountingPaginatedData<SearchDefaultOperatorObject> searchDefaultOperators(final DataFetchingEnvironment env) {
1477        CountingPaginatedData<SearchDefaultOperatorObject> data;
1478
1479        try {
1480            var searchControl = Session.getModelController(SearchControl.class);
1481            var totalCount = searchControl.countSearchDefaultOperators();
1482
1483            try(var objectLimiter = new ObjectLimiter(env, SearchDefaultOperatorConstants.COMPONENT_VENDOR_NAME, SearchDefaultOperatorConstants.ENTITY_TYPE_NAME, totalCount)) {
1484                var commandForm = SearchUtil.getHome().getGetSearchDefaultOperatorsForm();
1485                var entities = CDI.current().select(GetSearchDefaultOperatorsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1486
1487                if(entities == null) {
1488                    data = Connections.emptyConnection();
1489                } else {
1490                    var searchDefaultOperators = entities.stream().map(SearchDefaultOperatorObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1491
1492                    data = new CountedObjects<>(objectLimiter, searchDefaultOperators);
1493                }
1494            }
1495        } catch (NamingException ex) {
1496            throw new RuntimeException(ex);
1497        }
1498
1499        return data;
1500    }
1501
1502    @GraphQLField
1503    @GraphQLName("searchSortDirection")
1504    static SearchSortDirectionObject searchSortDirection(final DataFetchingEnvironment env,
1505            @GraphQLName("searchSortDirectionName") final String searchSortDirectionName,
1506            @GraphQLName("id") @GraphQLID final String id) {
1507        SearchSortDirection searchSortDirection;
1508
1509        try {
1510            var commandForm = SearchUtil.getHome().getGetSearchSortDirectionForm();
1511
1512            commandForm.setSearchSortDirectionName(searchSortDirectionName);
1513            commandForm.setUuid(id);
1514
1515            searchSortDirection = CDI.current().select(GetSearchSortDirectionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1516        } catch (NamingException ex) {
1517            throw new RuntimeException(ex);
1518        }
1519
1520        return searchSortDirection == null ? null : new SearchSortDirectionObject(searchSortDirection);
1521    }
1522
1523    @GraphQLField
1524    @GraphQLName("searchSortDirections")
1525    @GraphQLNonNull
1526    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1527    static CountingPaginatedData<SearchSortDirectionObject> searchSortDirections(final DataFetchingEnvironment env) {
1528        CountingPaginatedData<SearchSortDirectionObject> data;
1529
1530        try {
1531            var searchControl = Session.getModelController(SearchControl.class);
1532            var totalCount = searchControl.countSearchSortDirections();
1533
1534            try(var objectLimiter = new ObjectLimiter(env, SearchSortDirectionConstants.COMPONENT_VENDOR_NAME, SearchSortDirectionConstants.ENTITY_TYPE_NAME, totalCount)) {
1535                var commandForm = SearchUtil.getHome().getGetSearchSortDirectionsForm();
1536                var entities = CDI.current().select(GetSearchSortDirectionsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1537
1538                if(entities == null) {
1539                    data = Connections.emptyConnection();
1540                } else {
1541                    var searchSortDirections = entities.stream().map(SearchSortDirectionObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1542
1543                    data = new CountedObjects<>(objectLimiter, searchSortDirections);
1544                }
1545            }
1546        } catch (NamingException ex) {
1547            throw new RuntimeException(ex);
1548        }
1549
1550        return data;
1551    }
1552
1553    @GraphQLField
1554    @GraphQLName("searchResultActionType")
1555    static SearchResultActionTypeObject searchResultActionType(final DataFetchingEnvironment env,
1556            @GraphQLName("searchResultActionTypeName") final String searchResultActionTypeName,
1557            @GraphQLName("id") @GraphQLID final String id) {
1558        SearchResultActionType searchResultActionType;
1559
1560        try {
1561            var commandForm = SearchUtil.getHome().getGetSearchResultActionTypeForm();
1562
1563            commandForm.setSearchResultActionTypeName(searchResultActionTypeName);
1564            commandForm.setUuid(id);
1565
1566            searchResultActionType = CDI.current().select(GetSearchResultActionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1567        } catch (NamingException ex) {
1568            throw new RuntimeException(ex);
1569        }
1570
1571        return searchResultActionType == null ? null : new SearchResultActionTypeObject(searchResultActionType);
1572    }
1573
1574    @GraphQLField
1575    @GraphQLName("searchResultActionTypes")
1576    @GraphQLNonNull
1577    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1578    static CountingPaginatedData<SearchResultActionTypeObject> searchResultActionTypes(final DataFetchingEnvironment env) {
1579        CountingPaginatedData<SearchResultActionTypeObject> data;
1580
1581        try {
1582            var commandForm = SearchUtil.getHome().getGetSearchResultActionTypesForm();
1583            var command = CDI.current().select(GetSearchResultActionTypesCommand.class).get();
1584
1585            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1586            if(totalEntities == null) {
1587                data = Connections.emptyConnection();
1588            } else {
1589                try(var objectLimiter = new ObjectLimiter(env, SearchResultActionTypeConstants.COMPONENT_VENDOR_NAME, SearchResultActionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
1590                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1591
1592                    var searchResultActionTypes = entities.stream()
1593                            .map(SearchResultActionTypeObject::new)
1594                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1595
1596                    data = new CountedObjects<>(objectLimiter, searchResultActionTypes);
1597                }
1598            }
1599        } catch (NamingException ex) {
1600            throw new RuntimeException(ex);
1601        }
1602
1603        return data;
1604    }
1605
1606    @GraphQLField
1607    @GraphQLName("searchCheckSpellingActionType")
1608    static SearchCheckSpellingActionTypeObject searchCheckSpellingActionType(final DataFetchingEnvironment env,
1609            @GraphQLName("searchCheckSpellingActionTypeName") final String searchCheckSpellingActionTypeName,
1610            @GraphQLName("id") @GraphQLID final String id) {
1611        SearchCheckSpellingActionType searchCheckSpellingActionType;
1612
1613        try {
1614            var commandForm = SearchUtil.getHome().getGetSearchCheckSpellingActionTypeForm();
1615
1616            commandForm.setSearchCheckSpellingActionTypeName(searchCheckSpellingActionTypeName);
1617            commandForm.setUuid(id);
1618
1619            searchCheckSpellingActionType = CDI.current().select(GetSearchCheckSpellingActionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1620        } catch (NamingException ex) {
1621            throw new RuntimeException(ex);
1622        }
1623
1624        return searchCheckSpellingActionType == null ? null : new SearchCheckSpellingActionTypeObject(searchCheckSpellingActionType);
1625    }
1626
1627    @GraphQLField
1628    @GraphQLName("searchCheckSpellingActionTypes")
1629    @GraphQLNonNull
1630    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1631    static CountingPaginatedData<SearchCheckSpellingActionTypeObject> searchCheckSpellingActionTypes(final DataFetchingEnvironment env) {
1632        CountingPaginatedData<SearchCheckSpellingActionTypeObject> data;
1633
1634        try {
1635            var commandForm = SearchUtil.getHome().getGetSearchCheckSpellingActionTypesForm();
1636            var command = CDI.current().select(GetSearchCheckSpellingActionTypesCommand.class).get();
1637
1638            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1639            if(totalEntities == null) {
1640                data = Connections.emptyConnection();
1641            } else {
1642                try(var objectLimiter = new ObjectLimiter(env, SearchCheckSpellingActionTypeConstants.COMPONENT_VENDOR_NAME, SearchCheckSpellingActionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
1643                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1644
1645                    var searchCheckSpellingActionTypes = entities.stream()
1646                            .map(SearchCheckSpellingActionTypeObject::new)
1647                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1648
1649                    data = new CountedObjects<>(objectLimiter, searchCheckSpellingActionTypes);
1650                }
1651            }
1652        } catch (NamingException ex) {
1653            throw new RuntimeException(ex);
1654        }
1655
1656        return data;
1657    }
1658
1659    @GraphQLField
1660    @GraphQLName("workflow")
1661    static WorkflowObject workflow(final DataFetchingEnvironment env,
1662            @GraphQLName("workflowName") final String workflowName,
1663            @GraphQLName("id") @GraphQLID final String id) {
1664        Workflow workflow;
1665
1666        try {
1667            var commandForm = WorkflowUtil.getHome().getGetWorkflowForm();
1668
1669            commandForm.setWorkflowName(workflowName);
1670            commandForm.setUuid(id);
1671
1672            workflow = CDI.current().select(GetWorkflowCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1673        } catch (NamingException ex) {
1674            throw new RuntimeException(ex);
1675        }
1676
1677        return workflow == null ? null : new WorkflowObject(workflow);
1678    }
1679
1680    @GraphQLField
1681    @GraphQLName("workflows")
1682    @GraphQLNonNull
1683    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1684    static CountingPaginatedData<WorkflowObject> workflows(final DataFetchingEnvironment env,
1685            @GraphQLName("selectorKindName") final String selectorKindName) {
1686        CountingPaginatedData<WorkflowObject> data;
1687
1688        try {
1689            var commandForm = WorkflowUtil.getHome().getGetWorkflowsForm();
1690            var command = CDI.current().select(GetWorkflowsCommand.class).get();
1691
1692            commandForm.setSelectorKindName(selectorKindName);
1693
1694            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1695            if(totalEntities == null) {
1696                data = Connections.emptyConnection();
1697            } else {
1698                try(var objectLimiter = new ObjectLimiter(env, WorkflowConstants.COMPONENT_VENDOR_NAME, WorkflowConstants.ENTITY_TYPE_NAME, totalEntities)) {
1699                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1700
1701                    var workflows = entities.stream()
1702                            .map(WorkflowObject::new)
1703                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1704
1705                    data = new CountedObjects<>(objectLimiter, workflows);
1706                }
1707            }
1708        } catch (NamingException ex) {
1709            throw new RuntimeException(ex);
1710        }
1711
1712        return data;
1713    }
1714    
1715    @GraphQLField
1716    @GraphQLName("workflowEntityType")
1717    static WorkflowEntityTypeObject workflowEntityType(final DataFetchingEnvironment env,
1718            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
1719            @GraphQLName("componentVendorName") @GraphQLNonNull final String componentVendorName,
1720            @GraphQLName("entityTypeName") @GraphQLNonNull final String entityTypeName) {
1721        WorkflowEntityType workflowEntityType;
1722
1723        try {
1724            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntityTypeForm();
1725
1726            commandForm.setWorkflowName(workflowName);
1727            commandForm.setComponentVendorName(componentVendorName);
1728            commandForm.setEntityTypeName(entityTypeName);
1729
1730            workflowEntityType = CDI.current().select(GetWorkflowEntityTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1731        } catch (NamingException ex) {
1732            throw new RuntimeException(ex);
1733        }
1734
1735        return workflowEntityType == null ? null : new WorkflowEntityTypeObject(workflowEntityType);
1736    }
1737
1738    @GraphQLField
1739    @GraphQLName("workflowEntityTypes")
1740    @GraphQLNonNull
1741    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1742    static CountingPaginatedData<WorkflowEntityTypeObject> workflowEntityTypes(final DataFetchingEnvironment env,
1743            @GraphQLName("workflowName") final String workflowName,
1744            @GraphQLName("componentVendorName") final String componentVendorName,
1745            @GraphQLName("entityTypeName") final String entityTypeName) {
1746        CountingPaginatedData<WorkflowEntityTypeObject> data;
1747
1748        try {
1749            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntityTypesForm();
1750            var command = CDI.current().select(GetWorkflowEntityTypesCommand.class).get();
1751
1752            commandForm.setWorkflowName(workflowName);
1753            commandForm.setComponentVendorName(componentVendorName);
1754            commandForm.setEntityTypeName(entityTypeName);
1755
1756            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1757            if(totalEntities == null) {
1758                data = Connections.emptyConnection();
1759            } else {
1760                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntityTypeConstants.COMPONENT_VENDOR_NAME, WorkflowEntityTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
1761                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1762
1763                    var workflowEntityTypes = entities.stream()
1764                            .map(WorkflowEntityTypeObject::new)
1765                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1766
1767                    data = new CountedObjects<>(objectLimiter, workflowEntityTypes);
1768                }
1769            }
1770        } catch (NamingException ex) {
1771            throw new RuntimeException(ex);
1772        }
1773
1774        return data;
1775    }
1776
1777    @GraphQLField
1778    @GraphQLName("workflowSelectorKind")
1779    static WorkflowSelectorKindObject workflowSelectorKind(final DataFetchingEnvironment env,
1780            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
1781            @GraphQLName("selectorKindName") @GraphQLNonNull final String selectorKindName) {
1782        WorkflowSelectorKind workflowSelectorKind;
1783
1784        try {
1785            var commandForm = WorkflowUtil.getHome().getGetWorkflowSelectorKindForm();
1786
1787            commandForm.setWorkflowName(workflowName);
1788            commandForm.setSelectorKindName(selectorKindName);
1789
1790            workflowSelectorKind = CDI.current().select(GetWorkflowSelectorKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1791        } catch (NamingException ex) {
1792            throw new RuntimeException(ex);
1793        }
1794
1795        return workflowSelectorKind == null ? null : new WorkflowSelectorKindObject(workflowSelectorKind);
1796    }
1797
1798    @GraphQLField
1799    @GraphQLName("workflowSelectorKinds")
1800    @GraphQLNonNull
1801    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1802    static CountingPaginatedData<WorkflowSelectorKindObject> workflowSelectorKinds(final DataFetchingEnvironment env,
1803            @GraphQLName("workflowName") final String workflowName,
1804            @GraphQLName("selectorKindName") final String selectorKindName) {
1805        CountingPaginatedData<WorkflowSelectorKindObject> data;
1806
1807        try {
1808            var commandForm = WorkflowUtil.getHome().getGetWorkflowSelectorKindsForm();
1809            var command = CDI.current().select(GetWorkflowSelectorKindsCommand.class).get();
1810
1811            commandForm.setWorkflowName(workflowName);
1812            commandForm.setSelectorKindName(selectorKindName);
1813
1814            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1815            if(totalEntities == null) {
1816                data = Connections.emptyConnection();
1817            } else {
1818                try(var objectLimiter = new ObjectLimiter(env, WorkflowSelectorKindConstants.COMPONENT_VENDOR_NAME, WorkflowSelectorKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
1819                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1820
1821                    var workflowSelectorKinds = entities.stream()
1822                            .map(WorkflowSelectorKindObject::new)
1823                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1824
1825                    data = new CountedObjects<>(objectLimiter, workflowSelectorKinds);
1826                }
1827            }
1828        } catch (NamingException ex) {
1829            throw new RuntimeException(ex);
1830        }
1831
1832        return data;
1833    }
1834
1835    @GraphQLField
1836    @GraphQLName("workflowEntityStatuses")
1837    @GraphQLNonNull
1838    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1839    static CountingPaginatedData<WorkflowEntityStatusObject> workflowEntityStatuses(final DataFetchingEnvironment env,
1840            @GraphQLName("workflowName") final String workflowName) {
1841        CountingPaginatedData<WorkflowEntityStatusObject> data;
1842
1843        try {
1844            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntityStatusesForm();
1845            var command = CDI.current().select(GetWorkflowEntityStatusesCommand.class).get();
1846
1847            commandForm.setWorkflowName(workflowName);
1848
1849            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1850            if(totalEntities == null) {
1851                data = Connections.emptyConnection();
1852            } else {
1853                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntityStatusConstants.COMPONENT_VENDOR_NAME, WorkflowEntityStatusConstants.ENTITY_TYPE_NAME, totalEntities)) {
1854                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1855
1856                    var workflowEntityStatuses = entities.stream()
1857                            .map(WorkflowEntityStatusObject::new)
1858                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1859
1860                    data = new CountedObjects<>(objectLimiter, workflowEntityStatuses);
1861                }
1862            }
1863        } catch (NamingException ex) {
1864            throw new RuntimeException(ex);
1865        }
1866
1867        return data;
1868    }
1869
1870    @GraphQLField
1871    @GraphQLName("workflowStep")
1872    static WorkflowStepObject workflowStep(final DataFetchingEnvironment env,
1873            @GraphQLName("workflowName") final String workflowName,
1874            @GraphQLName("workflowStepName") final String workflowStepName,
1875            @GraphQLName("id") @GraphQLID final String id) {
1876        WorkflowStep workflowStep;
1877
1878        try {
1879            var commandForm = WorkflowUtil.getHome().getGetWorkflowStepForm();
1880
1881            commandForm.setWorkflowName(workflowName);
1882            commandForm.setWorkflowStepName(workflowStepName);
1883            commandForm.setUuid(id);
1884
1885            workflowStep = CDI.current().select(GetWorkflowStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1886        } catch (NamingException ex) {
1887            throw new RuntimeException(ex);
1888        }
1889
1890        return workflowStep == null ? null : new WorkflowStepObject(workflowStep);
1891    }
1892
1893    @GraphQLField
1894    @GraphQLName("workflowSteps")
1895    @GraphQLNonNull
1896    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1897    static CountingPaginatedData<WorkflowStepObject> workflowSteps(final DataFetchingEnvironment env,
1898            @GraphQLName("workflowName") final String workflowName) {
1899        CountingPaginatedData<WorkflowStepObject> data;
1900
1901        try {
1902            var commandForm = WorkflowUtil.getHome().getGetWorkflowStepsForm();
1903            var command = CDI.current().select(GetWorkflowStepsCommand.class).get();
1904
1905            commandForm.setWorkflowName(workflowName);
1906
1907            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1908            if(totalEntities == null) {
1909                data = Connections.emptyConnection();
1910            } else {
1911                try(var objectLimiter = new ObjectLimiter(env, WorkflowStepConstants.COMPONENT_VENDOR_NAME, WorkflowStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
1912                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1913
1914                    var workflowSteps = entities.stream()
1915                            .map(WorkflowStepObject::new)
1916                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1917
1918                    data = new CountedObjects<>(objectLimiter, workflowSteps);
1919                }
1920            }
1921        } catch (NamingException ex) {
1922            throw new RuntimeException(ex);
1923        }
1924
1925        return data;
1926    }
1927    
1928    @GraphQLField
1929    @GraphQLName("workflowDestination")
1930    static WorkflowDestinationObject workflowDestination(final DataFetchingEnvironment env,
1931            @GraphQLName("workflowName") final String workflowName,
1932            @GraphQLName("workflowStepName") final String workflowStepName,
1933            @GraphQLName("workflowDestinationName") final String workflowDestinationName,
1934            @GraphQLName("id") @GraphQLID final String id) {
1935        WorkflowDestination workflowDestination;
1936
1937        try {
1938            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationForm();
1939
1940            commandForm.setWorkflowName(workflowName);
1941            commandForm.setWorkflowStepName(workflowStepName);
1942            commandForm.setWorkflowDestinationName(workflowDestinationName);
1943            commandForm.setUuid(id);
1944
1945            workflowDestination = CDI.current().select(GetWorkflowDestinationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
1946        } catch (NamingException ex) {
1947            throw new RuntimeException(ex);
1948        }
1949
1950        return workflowDestination == null ? null : new WorkflowDestinationObject(workflowDestination);
1951    }
1952
1953    @GraphQLField
1954    @GraphQLName("workflowDestinations")
1955    @GraphQLNonNull
1956    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
1957    static CountingPaginatedData<WorkflowDestinationObject> workflowDestinations(final DataFetchingEnvironment env,
1958            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
1959            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName) {
1960        CountingPaginatedData<WorkflowDestinationObject> data;
1961
1962        try {
1963            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationsForm();
1964            var command = CDI.current().select(GetWorkflowDestinationsCommand.class).get();
1965
1966            commandForm.setWorkflowName(workflowName);
1967            commandForm.setWorkflowStepName(workflowStepName);
1968
1969            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1970            if(totalEntities == null) {
1971                data = Connections.emptyConnection();
1972            } else {
1973                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationConstants.ENTITY_TYPE_NAME, totalEntities)) {
1974                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
1975
1976                    var workflowDestinations = entities.stream()
1977                            .map(WorkflowDestinationObject::new)
1978                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
1979
1980                    data = new CountedObjects<>(objectLimiter, workflowDestinations);
1981                }
1982            }
1983        } catch (NamingException ex) {
1984            throw new RuntimeException(ex);
1985        }
1986
1987        return data;
1988    }
1989
1990    @GraphQLField
1991    @GraphQLName("workflowDestinationStep")
1992    static WorkflowDestinationStepObject workflowDestinationStep(final DataFetchingEnvironment env,
1993            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
1994            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
1995            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
1996            @GraphQLName("destinationWorkflowName") @GraphQLNonNull final String destinationWorkflowName,
1997            @GraphQLName("destinationWorkflowStepName") @GraphQLNonNull final String destinationWorkflowStepName) {
1998        WorkflowDestinationStep workflowDestinationStep;
1999
2000        try {
2001            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationStepForm();
2002
2003            commandForm.setWorkflowName(workflowName);
2004            commandForm.setWorkflowStepName(workflowStepName);
2005            commandForm.setWorkflowDestinationName(workflowDestinationName);
2006            commandForm.setDestinationWorkflowName(destinationWorkflowName);
2007            commandForm.setDestinationWorkflowStepName(destinationWorkflowStepName);
2008
2009            workflowDestinationStep = CDI.current().select(GetWorkflowDestinationStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2010        } catch (NamingException ex) {
2011            throw new RuntimeException(ex);
2012        }
2013
2014        return workflowDestinationStep == null ? null : new WorkflowDestinationStepObject(workflowDestinationStep);
2015    }
2016
2017    @GraphQLField
2018    @GraphQLName("workflowDestinationSteps")
2019    @GraphQLNonNull
2020    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2021    static CountingPaginatedData<WorkflowDestinationStepObject> workflowDestinationSteps(final DataFetchingEnvironment env,
2022            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2023            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2024            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName) {
2025        CountingPaginatedData<WorkflowDestinationStepObject> data;
2026
2027        try {
2028            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationStepsForm();
2029            var command = CDI.current().select(GetWorkflowDestinationStepsCommand.class).get();
2030
2031            commandForm.setWorkflowName(workflowName);
2032            commandForm.setWorkflowStepName(workflowStepName);
2033            commandForm.setWorkflowDestinationName(workflowDestinationName);
2034
2035            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2036            if(totalEntities == null) {
2037                data = Connections.emptyConnection();
2038            } else {
2039                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationStepConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
2040                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2041
2042                    var workflowDestinationSteps = entities.stream()
2043                            .map(WorkflowDestinationStepObject::new)
2044                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2045
2046                    data = new CountedObjects<>(objectLimiter, workflowDestinationSteps);
2047                }
2048            }
2049        } catch (NamingException ex) {
2050            throw new RuntimeException(ex);
2051        }
2052
2053        return data;
2054    }
2055
2056    @GraphQLField
2057    @GraphQLName("workflowDestinationPartyType")
2058    static WorkflowDestinationPartyTypeObject workflowDestinationPartyType(final DataFetchingEnvironment env,
2059            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2060            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2061            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
2062            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
2063        WorkflowDestinationPartyType workflowDestinationPartyType;
2064
2065        try {
2066            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationPartyTypeForm();
2067
2068            commandForm.setWorkflowName(workflowName);
2069            commandForm.setWorkflowStepName(workflowStepName);
2070            commandForm.setWorkflowDestinationName(workflowDestinationName);
2071            commandForm.setPartyTypeName(partyTypeName);
2072
2073            workflowDestinationPartyType = CDI.current().select(GetWorkflowDestinationPartyTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2074        } catch (NamingException ex) {
2075            throw new RuntimeException(ex);
2076        }
2077
2078        return workflowDestinationPartyType == null ? null : new WorkflowDestinationPartyTypeObject(workflowDestinationPartyType);
2079    }
2080
2081    @GraphQLField
2082    @GraphQLName("workflowDestinationPartyTypes")
2083    @GraphQLNonNull
2084    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2085    static CountingPaginatedData<WorkflowDestinationPartyTypeObject> workflowDestinationPartyTypes(final DataFetchingEnvironment env,
2086            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2087            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2088            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName) {
2089        CountingPaginatedData<WorkflowDestinationPartyTypeObject> data;
2090
2091        try {
2092            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationPartyTypesForm();
2093            var command = CDI.current().select(GetWorkflowDestinationPartyTypesCommand.class).get();
2094
2095            commandForm.setWorkflowName(workflowName);
2096            commandForm.setWorkflowStepName(workflowStepName);
2097            commandForm.setWorkflowDestinationName(workflowDestinationName);
2098
2099            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2100            if(totalEntities == null) {
2101                data = Connections.emptyConnection();
2102            } else {
2103                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationPartyTypeConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationPartyTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2104                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2105
2106                    var workflowDestinationPartyTypes = entities.stream()
2107                            .map(WorkflowDestinationPartyTypeObject::new)
2108                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2109
2110                    data = new CountedObjects<>(objectLimiter, workflowDestinationPartyTypes);
2111                }
2112            }
2113        } catch (NamingException ex) {
2114            throw new RuntimeException(ex);
2115        }
2116
2117        return data;
2118    }
2119
2120    @GraphQLField
2121    @GraphQLName("workflowDestinationSecurityRole")
2122    static WorkflowDestinationSecurityRoleObject workflowDestinationSecurityRole(final DataFetchingEnvironment env,
2123            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2124            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2125            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
2126            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName,
2127            @GraphQLName("securityRoleName") @GraphQLNonNull final String securityRoleName) {
2128        WorkflowDestinationSecurityRole workflowDestinationSecurityRole;
2129
2130        try {
2131            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationSecurityRoleForm();
2132
2133            commandForm.setWorkflowName(workflowName);
2134            commandForm.setWorkflowStepName(workflowStepName);
2135            commandForm.setWorkflowDestinationName(workflowDestinationName);
2136            commandForm.setPartyTypeName(partyTypeName);
2137            commandForm.setSecurityRoleName(securityRoleName);
2138
2139            workflowDestinationSecurityRole = CDI.current().select(GetWorkflowDestinationSecurityRoleCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2140        } catch (NamingException ex) {
2141            throw new RuntimeException(ex);
2142        }
2143
2144        return workflowDestinationSecurityRole == null ? null : new WorkflowDestinationSecurityRoleObject(workflowDestinationSecurityRole);
2145    }
2146
2147    @GraphQLField
2148    @GraphQLName("workflowDestinationSecurityRoles")
2149    @GraphQLNonNull
2150    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2151    static CountingPaginatedData<WorkflowDestinationSecurityRoleObject> workflowDestinationSecurityRoles(final DataFetchingEnvironment env,
2152            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2153            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2154            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
2155            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
2156        CountingPaginatedData<WorkflowDestinationSecurityRoleObject> data;
2157
2158        try {
2159            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationSecurityRolesForm();
2160            var command = CDI.current().select(GetWorkflowDestinationSecurityRolesCommand.class).get();
2161
2162            commandForm.setWorkflowName(workflowName);
2163            commandForm.setWorkflowStepName(workflowStepName);
2164            commandForm.setWorkflowDestinationName(workflowDestinationName);
2165            commandForm.setPartyTypeName(partyTypeName);
2166
2167            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2168            if(totalEntities == null) {
2169                data = Connections.emptyConnection();
2170            } else {
2171                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationSecurityRoleConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationSecurityRoleConstants.ENTITY_TYPE_NAME, totalEntities)) {
2172                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2173
2174                    var workflowDestinationSecurityRoles = entities.stream()
2175                            .map(WorkflowDestinationSecurityRoleObject::new)
2176                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2177
2178                    data = new CountedObjects<>(objectLimiter, workflowDestinationSecurityRoles);
2179                }
2180            }
2181        } catch (NamingException ex) {
2182            throw new RuntimeException(ex);
2183        }
2184
2185        return data;
2186    }
2187
2188    @GraphQLField
2189    @GraphQLName("workflowDestinationSelector")
2190    static WorkflowDestinationSelectorObject workflowDestinationSelector(final DataFetchingEnvironment env,
2191            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2192            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2193            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName,
2194            @GraphQLName("selectorName") @GraphQLNonNull final String selectorName) {
2195        WorkflowDestinationSelector workflowDestinationSelector;
2196
2197        try {
2198            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationSelectorForm();
2199
2200            commandForm.setWorkflowName(workflowName);
2201            commandForm.setWorkflowStepName(workflowStepName);
2202            commandForm.setWorkflowDestinationName(workflowDestinationName);
2203            commandForm.setSelectorName(selectorName);
2204
2205            workflowDestinationSelector = CDI.current().select(GetWorkflowDestinationSelectorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2206        } catch (NamingException ex) {
2207            throw new RuntimeException(ex);
2208        }
2209
2210        return workflowDestinationSelector == null ? null : new WorkflowDestinationSelectorObject(workflowDestinationSelector);
2211    }
2212
2213    @GraphQLField
2214    @GraphQLName("workflowDestinationSelectors")
2215    @GraphQLNonNull
2216    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2217    static CountingPaginatedData<WorkflowDestinationSelectorObject> workflowDestinationSelectors(final DataFetchingEnvironment env,
2218            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2219            @GraphQLName("workflowStepName") @GraphQLNonNull final String workflowStepName,
2220            @GraphQLName("workflowDestinationName") @GraphQLNonNull final String workflowDestinationName) {
2221        CountingPaginatedData<WorkflowDestinationSelectorObject> data;
2222
2223        try {
2224            var commandForm = WorkflowUtil.getHome().getGetWorkflowDestinationSelectorsForm();
2225            var command = CDI.current().select(GetWorkflowDestinationSelectorsCommand.class).get();
2226
2227            commandForm.setWorkflowName(workflowName);
2228            commandForm.setWorkflowStepName(workflowStepName);
2229            commandForm.setWorkflowDestinationName(workflowDestinationName);
2230
2231            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2232            if(totalEntities == null) {
2233                data = Connections.emptyConnection();
2234            } else {
2235                try(var objectLimiter = new ObjectLimiter(env, WorkflowDestinationSelectorConstants.COMPONENT_VENDOR_NAME, WorkflowDestinationSelectorConstants.ENTITY_TYPE_NAME, totalEntities)) {
2236                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2237
2238                    var workflowDestinationSelectors = entities.stream()
2239                            .map(WorkflowDestinationSelectorObject::new)
2240                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2241
2242                    data = new CountedObjects<>(objectLimiter, workflowDestinationSelectors);
2243                }
2244            }
2245        } catch (NamingException ex) {
2246            throw new RuntimeException(ex);
2247        }
2248
2249        return data;
2250    }
2251
2252    @GraphQLField
2253    @GraphQLName("workflowEntrance")
2254    static WorkflowEntranceObject workflowEntrance(final DataFetchingEnvironment env,
2255            @GraphQLName("workflowName") final String workflowName,
2256            @GraphQLName("workflowEntranceName") final String workflowEntranceName,
2257            @GraphQLName("id") @GraphQLID final String id) {
2258        WorkflowEntrance workflowEntrance;
2259
2260        try {
2261            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceForm();
2262
2263            commandForm.setWorkflowName(workflowName);
2264            commandForm.setWorkflowEntranceName(workflowEntranceName);
2265            commandForm.setUuid(id);
2266
2267            workflowEntrance = CDI.current().select(GetWorkflowEntranceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2268        } catch (NamingException ex) {
2269            throw new RuntimeException(ex);
2270        }
2271
2272        return workflowEntrance == null ? null : new WorkflowEntranceObject(workflowEntrance);
2273    }
2274
2275    @GraphQLField
2276    @GraphQLName("workflowEntrances")
2277    @GraphQLNonNull
2278    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2279    static CountingPaginatedData<WorkflowEntranceObject> workflowEntrances(final DataFetchingEnvironment env,
2280            @GraphQLName("workflowName") final String workflowName) {
2281        CountingPaginatedData<WorkflowEntranceObject> data;
2282
2283        try {
2284            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntrancesForm();
2285            var command = CDI.current().select(GetWorkflowEntrancesCommand.class).get();
2286
2287            commandForm.setWorkflowName(workflowName);
2288
2289            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2290            if(totalEntities == null) {
2291                data = Connections.emptyConnection();
2292            } else {
2293                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntranceConstants.COMPONENT_VENDOR_NAME, WorkflowEntranceConstants.ENTITY_TYPE_NAME, totalEntities)) {
2294                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2295
2296                    var workflowEntrances = entities.stream()
2297                            .map(WorkflowEntranceObject::new)
2298                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2299
2300                    data = new CountedObjects<>(objectLimiter, workflowEntrances);
2301                }
2302            }
2303        } catch (NamingException ex) {
2304            throw new RuntimeException(ex);
2305        }
2306
2307        return data;
2308    }
2309
2310    @GraphQLField
2311    @GraphQLName("workflowEntranceStep")
2312    static WorkflowEntranceStepObject workflowEntranceStep(final DataFetchingEnvironment env,
2313            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2314            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2315            @GraphQLName("entranceWorkflowName") @GraphQLNonNull final String entranceWorkflowName,
2316            @GraphQLName("entranceWorkflowStepName") @GraphQLNonNull final String entranceWorkflowStepName) {
2317        WorkflowEntranceStep workflowEntranceStep;
2318
2319        try {
2320            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceStepForm();
2321
2322            commandForm.setWorkflowName(workflowName);
2323            commandForm.setWorkflowEntranceName(workflowEntranceName);
2324            commandForm.setEntranceWorkflowName(entranceWorkflowName);
2325            commandForm.setEntranceWorkflowStepName(entranceWorkflowStepName);
2326
2327            workflowEntranceStep = CDI.current().select(GetWorkflowEntranceStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2328        } catch (NamingException ex) {
2329            throw new RuntimeException(ex);
2330        }
2331
2332        return workflowEntranceStep == null ? null : new WorkflowEntranceStepObject(workflowEntranceStep);
2333    }
2334
2335    @GraphQLField
2336    @GraphQLName("workflowEntranceSteps")
2337    @GraphQLNonNull
2338    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2339    static CountingPaginatedData<WorkflowEntranceStepObject> workflowEntranceSteps(final DataFetchingEnvironment env,
2340            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2341            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName) {
2342        CountingPaginatedData<WorkflowEntranceStepObject> data;
2343
2344        try {
2345            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceStepsForm();
2346            var command = CDI.current().select(GetWorkflowEntranceStepsCommand.class).get();
2347
2348            commandForm.setWorkflowName(workflowName);
2349            commandForm.setWorkflowEntranceName(workflowEntranceName);
2350
2351            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2352            if(totalEntities == null) {
2353                data = Connections.emptyConnection();
2354            } else {
2355                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntranceStepConstants.COMPONENT_VENDOR_NAME, WorkflowEntranceStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
2356                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2357
2358                    var workflowEntranceSteps = entities.stream()
2359                            .map(WorkflowEntranceStepObject::new)
2360                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2361
2362                    data = new CountedObjects<>(objectLimiter, workflowEntranceSteps);
2363                }
2364            }
2365        } catch (NamingException ex) {
2366            throw new RuntimeException(ex);
2367        }
2368
2369        return data;
2370    }
2371
2372    @GraphQLField
2373    @GraphQLName("workflowEntrancePartyType")
2374    static WorkflowEntrancePartyTypeObject workflowEntrancePartyType(final DataFetchingEnvironment env,
2375            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2376            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2377            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
2378        WorkflowEntrancePartyType workflowEntrancePartyType;
2379
2380        try {
2381            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntrancePartyTypeForm();
2382
2383            commandForm.setWorkflowName(workflowName);
2384            commandForm.setWorkflowEntranceName(workflowEntranceName);
2385            commandForm.setPartyTypeName(partyTypeName);
2386
2387            workflowEntrancePartyType = CDI.current().select(GetWorkflowEntrancePartyTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2388        } catch (NamingException ex) {
2389            throw new RuntimeException(ex);
2390        }
2391
2392        return workflowEntrancePartyType == null ? null : new WorkflowEntrancePartyTypeObject(workflowEntrancePartyType);
2393    }
2394
2395    @GraphQLField
2396    @GraphQLName("workflowEntrancePartyTypes")
2397    @GraphQLNonNull
2398    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2399    static CountingPaginatedData<WorkflowEntrancePartyTypeObject> workflowEntrancePartyTypes(final DataFetchingEnvironment env,
2400            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2401            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName) {
2402        CountingPaginatedData<WorkflowEntrancePartyTypeObject> data;
2403
2404        try {
2405            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntrancePartyTypesForm();
2406            var command = CDI.current().select(GetWorkflowEntrancePartyTypesCommand.class).get();
2407
2408            commandForm.setWorkflowName(workflowName);
2409            commandForm.setWorkflowEntranceName(workflowEntranceName);
2410
2411            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2412            if(totalEntities == null) {
2413                data = Connections.emptyConnection();
2414            } else {
2415                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntrancePartyTypeConstants.COMPONENT_VENDOR_NAME, WorkflowEntrancePartyTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2416                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2417
2418                    var workflowEntrancePartyTypes = entities.stream()
2419                            .map(WorkflowEntrancePartyTypeObject::new)
2420                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2421
2422                    data = new CountedObjects<>(objectLimiter, workflowEntrancePartyTypes);
2423                }
2424            }
2425        } catch (NamingException ex) {
2426            throw new RuntimeException(ex);
2427        }
2428
2429        return data;
2430    }
2431
2432    @GraphQLField
2433    @GraphQLName("workflowEntranceSecurityRole")
2434    static WorkflowEntranceSecurityRoleObject workflowEntranceSecurityRole(final DataFetchingEnvironment env,
2435            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2436            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2437            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName,
2438            @GraphQLName("securityRoleName") @GraphQLNonNull final String securityRoleName) {
2439        WorkflowEntranceSecurityRole workflowEntranceSecurityRole;
2440
2441        try {
2442            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceSecurityRoleForm();
2443
2444            commandForm.setWorkflowName(workflowName);
2445            commandForm.setWorkflowEntranceName(workflowEntranceName);
2446            commandForm.setPartyTypeName(partyTypeName);
2447            commandForm.setSecurityRoleName(securityRoleName);
2448
2449            workflowEntranceSecurityRole = CDI.current().select(GetWorkflowEntranceSecurityRoleCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2450        } catch (NamingException ex) {
2451            throw new RuntimeException(ex);
2452        }
2453
2454        return workflowEntranceSecurityRole == null ? null : new WorkflowEntranceSecurityRoleObject(workflowEntranceSecurityRole);
2455    }
2456
2457    @GraphQLField
2458    @GraphQLName("workflowEntranceSecurityRoles")
2459    @GraphQLNonNull
2460    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2461    static CountingPaginatedData<WorkflowEntranceSecurityRoleObject> workflowEntranceSecurityRoles(final DataFetchingEnvironment env,
2462            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2463            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2464            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
2465        CountingPaginatedData<WorkflowEntranceSecurityRoleObject> data;
2466
2467        try {
2468            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceSecurityRolesForm();
2469            var command = CDI.current().select(GetWorkflowEntranceSecurityRolesCommand.class).get();
2470
2471            commandForm.setWorkflowName(workflowName);
2472            commandForm.setWorkflowEntranceName(workflowEntranceName);
2473            commandForm.setPartyTypeName(partyTypeName);
2474
2475            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2476            if(totalEntities == null) {
2477                data = Connections.emptyConnection();
2478            } else {
2479                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntranceSecurityRoleConstants.COMPONENT_VENDOR_NAME, WorkflowEntranceSecurityRoleConstants.ENTITY_TYPE_NAME, totalEntities)) {
2480                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2481
2482                    var workflowEntranceSecurityRoles = entities.stream()
2483                            .map(WorkflowEntranceSecurityRoleObject::new)
2484                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2485
2486                    data = new CountedObjects<>(objectLimiter, workflowEntranceSecurityRoles);
2487                }
2488            }
2489        } catch (NamingException ex) {
2490            throw new RuntimeException(ex);
2491        }
2492
2493        return data;
2494    }
2495
2496    @GraphQLField
2497    @GraphQLName("workflowEntranceSelector")
2498    static WorkflowEntranceSelectorObject workflowEntranceSelector(final DataFetchingEnvironment env,
2499            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2500            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName,
2501            @GraphQLName("selectorName") @GraphQLNonNull final String selectorName) {
2502        WorkflowEntranceSelector workflowEntranceSelector;
2503
2504        try {
2505            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceSelectorForm();
2506
2507            commandForm.setWorkflowName(workflowName);
2508            commandForm.setWorkflowEntranceName(workflowEntranceName);
2509            commandForm.setSelectorName(selectorName);
2510
2511            workflowEntranceSelector = CDI.current().select(GetWorkflowEntranceSelectorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2512        } catch (NamingException ex) {
2513            throw new RuntimeException(ex);
2514        }
2515
2516        return workflowEntranceSelector == null ? null : new WorkflowEntranceSelectorObject(workflowEntranceSelector);
2517    }
2518
2519    @GraphQLField
2520    @GraphQLName("workflowEntranceSelectors")
2521    @GraphQLNonNull
2522    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2523    static CountingPaginatedData<WorkflowEntranceSelectorObject> workflowEntranceSelectors(final DataFetchingEnvironment env,
2524            @GraphQLName("workflowName") @GraphQLNonNull final String workflowName,
2525            @GraphQLName("workflowEntranceName") @GraphQLNonNull final String workflowEntranceName) {
2526        CountingPaginatedData<WorkflowEntranceSelectorObject> data;
2527
2528        try {
2529            var commandForm = WorkflowUtil.getHome().getGetWorkflowEntranceSelectorsForm();
2530            var command = CDI.current().select(GetWorkflowEntranceSelectorsCommand.class).get();
2531
2532            commandForm.setWorkflowName(workflowName);
2533            commandForm.setWorkflowEntranceName(workflowEntranceName);
2534
2535            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2536            if(totalEntities == null) {
2537                data = Connections.emptyConnection();
2538            } else {
2539                try(var objectLimiter = new ObjectLimiter(env, WorkflowEntranceSelectorConstants.COMPONENT_VENDOR_NAME, WorkflowEntranceSelectorConstants.ENTITY_TYPE_NAME, totalEntities)) {
2540                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2541
2542                    var workflowEntranceSelectors = entities.stream()
2543                            .map(WorkflowEntranceSelectorObject::new)
2544                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2545
2546                    data = new CountedObjects<>(objectLimiter, workflowEntranceSelectors);
2547                }
2548            }
2549        } catch (NamingException ex) {
2550            throw new RuntimeException(ex);
2551        }
2552
2553        return data;
2554    }
2555
2556    @GraphQLField
2557    @GraphQLName("workflowStepType")
2558    static WorkflowStepTypeObject workflowStepType(final DataFetchingEnvironment env,
2559            @GraphQLName("workflowStepTypeName") final String workflowStepTypeName,
2560            @GraphQLName("id") @GraphQLID final String id) {
2561        WorkflowStepType workflowStepType;
2562
2563        try {
2564            var commandForm = WorkflowUtil.getHome().getGetWorkflowStepTypeForm();
2565
2566            commandForm.setWorkflowStepTypeName(workflowStepTypeName);
2567            commandForm.setUuid(id);
2568
2569            workflowStepType = CDI.current().select(GetWorkflowStepTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2570        } catch (NamingException ex) {
2571            throw new RuntimeException(ex);
2572        }
2573
2574        return workflowStepType == null ? null : new WorkflowStepTypeObject(workflowStepType);
2575    }
2576
2577    @GraphQLField
2578    @GraphQLName("workflowStepTypes")
2579    @GraphQLNonNull
2580    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2581    static CountingPaginatedData<WorkflowStepTypeObject> workflowStepTypes(final DataFetchingEnvironment env) {
2582        CountingPaginatedData<WorkflowStepTypeObject> data;
2583
2584        try {
2585            var commandForm = WorkflowUtil.getHome().getGetWorkflowStepTypesForm();
2586            var command = CDI.current().select(GetWorkflowStepTypesCommand.class).get();
2587
2588            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2589            if(totalEntities == null) {
2590                data = Connections.emptyConnection();
2591            } else {
2592                try(var objectLimiter = new ObjectLimiter(env, WorkflowStepTypeConstants.COMPONENT_VENDOR_NAME, WorkflowStepTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2593                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2594
2595                    var workflowStepTypes = entities.stream()
2596                            .map(WorkflowStepTypeObject::new)
2597                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2598
2599                    data = new CountedObjects<>(objectLimiter, workflowStepTypes);
2600                }
2601            }
2602        } catch (NamingException ex) {
2603            throw new RuntimeException(ex);
2604        }
2605
2606        return data;
2607    }
2608
2609    @GraphQLField
2610    @GraphQLName("sequence")
2611    static SequenceObject sequence(final DataFetchingEnvironment env,
2612            @GraphQLName("sequenceTypeName") final String sequenceTypeName,
2613            @GraphQLName("sequenceName") final String sequenceName,
2614            @GraphQLName("id") @GraphQLID final String id) {
2615        Sequence sequence;
2616
2617        try {
2618            var commandForm = SequenceUtil.getHome().getGetSequenceForm();
2619
2620            commandForm.setSequenceTypeName(sequenceTypeName);
2621            commandForm.setSequenceName(sequenceName);
2622            commandForm.setUuid(id);
2623
2624            sequence = CDI.current().select(GetSequenceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2625        } catch (NamingException ex) {
2626            throw new RuntimeException(ex);
2627        }
2628
2629        return sequence == null ? null : new SequenceObject(sequence);
2630    }
2631
2632    @GraphQLField
2633    @GraphQLName("sequenceValue")
2634    static GetSequenceValueResultObject sequenceValue(final DataFetchingEnvironment env,
2635            @GraphQLName("sequenceTypeName") final String sequenceTypeName,
2636            @GraphQLName("sequenceName") final String sequenceName,
2637            @GraphQLName("id") @GraphQLID final String id) {
2638        GetSequenceValueResultObject result = null;
2639
2640        try {
2641            var commandForm = SequenceUtil.getHome().getGetSequenceValueForm();
2642
2643            commandForm.setSequenceTypeName(sequenceTypeName);
2644            commandForm.setSequenceName(sequenceName);
2645            commandForm.setUuid(id);
2646
2647            var commandResult = SequenceUtil.getHome().getSequenceValue(BaseGraphQl.getUserVisitPK(env), commandForm);
2648
2649            if(!commandResult.hasErrors()) {
2650                result = new GetSequenceValueResultObject((GetSequenceValueResult)commandResult.getExecutionResult().getResult());
2651            }
2652        } catch (NamingException ex) {
2653            throw new RuntimeException(ex);
2654        }
2655
2656        return result;
2657    }
2658
2659    @GraphQLField
2660    @GraphQLName("sequences")
2661    @GraphQLNonNull
2662    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2663    static CountingPaginatedData<SequenceObject> sequences(final DataFetchingEnvironment env,
2664            @GraphQLName("sequenceTypeName") @GraphQLNonNull final String sequenceTypeName) {
2665        CountingPaginatedData<SequenceObject> data;
2666
2667        try {
2668            var commandForm = SequenceUtil.getHome().getGetSequencesForm();
2669            var command = CDI.current().select(GetSequencesCommand.class).get();
2670
2671            commandForm.setSequenceTypeName(sequenceTypeName);
2672
2673            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2674            if(totalEntities == null) {
2675                data = Connections.emptyConnection();
2676            } else {
2677                try(var objectLimiter = new ObjectLimiter(env, SequenceConstants.COMPONENT_VENDOR_NAME, SequenceConstants.ENTITY_TYPE_NAME, totalEntities)) {
2678                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2679
2680                    var sequences = entities.stream()
2681                            .map(SequenceObject::new)
2682                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2683
2684                    data = new CountedObjects<>(objectLimiter, sequences);
2685                }
2686            }
2687        } catch (NamingException ex) {
2688            throw new RuntimeException(ex);
2689        }
2690
2691        return data;
2692    }
2693
2694    @GraphQLField
2695    @GraphQLName("sequenceType")
2696    static SequenceTypeObject sequenceType(final DataFetchingEnvironment env,
2697            @GraphQLName("sequenceTypeName") final String sequenceTypeName,
2698            @GraphQLName("id") @GraphQLID final String id) {
2699        SequenceType sequenceType;
2700
2701        try {
2702            var commandForm = SequenceUtil.getHome().getGetSequenceTypeForm();
2703
2704            commandForm.setSequenceTypeName(sequenceTypeName);
2705            commandForm.setUuid(id);
2706
2707            sequenceType = CDI.current().select(GetSequenceTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2708        } catch (NamingException ex) {
2709            throw new RuntimeException(ex);
2710        }
2711
2712        return sequenceType == null ? null : new SequenceTypeObject(sequenceType);
2713    }
2714
2715    @GraphQLField
2716    @GraphQLName("sequenceTypes")
2717    @GraphQLNonNull
2718    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2719    static CountingPaginatedData<SequenceTypeObject> sequenceTypes(final DataFetchingEnvironment env) {
2720        CountingPaginatedData<SequenceTypeObject> data;
2721
2722        try {
2723            var commandForm = SequenceUtil.getHome().getGetSequenceTypesForm();
2724            var command = CDI.current().select(GetSequenceTypesCommand.class).get();
2725
2726            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2727            if(totalEntities == null) {
2728                data = Connections.emptyConnection();
2729            } else {
2730                try(var objectLimiter = new ObjectLimiter(env, SequenceTypeConstants.COMPONENT_VENDOR_NAME, SequenceTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2731                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2732
2733                    var sequenceTypes = entities.stream()
2734                            .map(SequenceTypeObject::new)
2735                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2736
2737                    data = new CountedObjects<>(objectLimiter, sequenceTypes);
2738                }
2739            }
2740        } catch (NamingException ex) {
2741            throw new RuntimeException(ex);
2742        }
2743
2744        return data;
2745    }
2746
2747    @GraphQLField
2748    @GraphQLName("sequenceChecksumType")
2749    static SequenceChecksumTypeObject sequenceChecksumType(final DataFetchingEnvironment env,
2750            @GraphQLName("sequenceChecksumTypeName") @GraphQLNonNull final String sequenceChecksumTypeName) {
2751        SequenceChecksumType sequenceChecksumType;
2752
2753        try {
2754            var commandForm = SequenceUtil.getHome().getGetSequenceChecksumTypeForm();
2755
2756            commandForm.setSequenceChecksumTypeName(sequenceChecksumTypeName);
2757
2758            sequenceChecksumType = CDI.current().select(GetSequenceChecksumTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2759        } catch (NamingException ex) {
2760            throw new RuntimeException(ex);
2761        }
2762
2763        return sequenceChecksumType == null ? null : new SequenceChecksumTypeObject(sequenceChecksumType);
2764    }
2765
2766    @GraphQLField
2767    @GraphQLName("sequenceChecksumTypes")
2768    @GraphQLNonNull
2769    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2770    static CountingPaginatedData<SequenceChecksumTypeObject> sequenceChecksumTypes(final DataFetchingEnvironment env) {
2771        CountingPaginatedData<SequenceChecksumTypeObject> data;
2772
2773        try {
2774            var commandForm = SequenceUtil.getHome().getGetSequenceChecksumTypesForm();
2775            var command = CDI.current().select(GetSequenceChecksumTypesCommand.class).get();
2776
2777            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2778            if(totalEntities == null) {
2779                data = Connections.emptyConnection();
2780            } else {
2781                try(var objectLimiter = new ObjectLimiter(env, SequenceChecksumTypeConstants.COMPONENT_VENDOR_NAME, SequenceChecksumTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2782                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2783
2784                    var sequenceChecksumTypes = entities.stream()
2785                            .map(SequenceChecksumTypeObject::new)
2786                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2787
2788                    data = new CountedObjects<>(objectLimiter, sequenceChecksumTypes);
2789                }
2790            }
2791        } catch (NamingException ex) {
2792            throw new RuntimeException(ex);
2793        }
2794
2795        return data;
2796    }
2797
2798    @GraphQLField
2799    @GraphQLName("sequenceEncoderType")
2800    static SequenceEncoderTypeObject sequenceEncoderType(final DataFetchingEnvironment env,
2801            @GraphQLName("sequenceEncoderTypeName") @GraphQLNonNull final String sequenceEncoderTypeName) {
2802        SequenceEncoderType sequenceEncoderType;
2803
2804        try {
2805            var commandForm = SequenceUtil.getHome().getGetSequenceEncoderTypeForm();
2806
2807            commandForm.setSequenceEncoderTypeName(sequenceEncoderTypeName);
2808
2809            sequenceEncoderType = CDI.current().select(GetSequenceEncoderTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2810        } catch (NamingException ex) {
2811            throw new RuntimeException(ex);
2812        }
2813
2814        return sequenceEncoderType == null ? null : new SequenceEncoderTypeObject(sequenceEncoderType);
2815    }
2816
2817    @GraphQLField
2818    @GraphQLName("sequenceEncoderTypes")
2819    @GraphQLNonNull
2820    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2821    static CountingPaginatedData<SequenceEncoderTypeObject> sequenceEncoderTypes(final DataFetchingEnvironment env) {
2822        CountingPaginatedData<SequenceEncoderTypeObject> data;
2823
2824        try {
2825            var commandForm = SequenceUtil.getHome().getGetSequenceEncoderTypesForm();
2826            var command = CDI.current().select(GetSequenceEncoderTypesCommand.class).get();
2827
2828            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2829            if(totalEntities == null) {
2830                data = Connections.emptyConnection();
2831            } else {
2832                try(var objectLimiter = new ObjectLimiter(env, SequenceEncoderTypeConstants.COMPONENT_VENDOR_NAME, SequenceEncoderTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2833                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2834
2835                    var sequenceEncoderTypes = entities.stream()
2836                            .map(SequenceEncoderTypeObject::new)
2837                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2838
2839                    data = new CountedObjects<>(objectLimiter, sequenceEncoderTypes);
2840                }
2841            }
2842        } catch (NamingException ex) {
2843            throw new RuntimeException(ex);
2844        }
2845
2846        return data;
2847    }
2848
2849    @GraphQLField
2850    @GraphQLName("selectorKind")
2851    static SelectorKindObject selectorKind(final DataFetchingEnvironment env,
2852            @GraphQLName("selectorKindName") final String selectorKindName,
2853            @GraphQLName("id") @GraphQLID final String id) {
2854        SelectorKind selectorKind;
2855
2856        try {
2857            var commandForm = SelectorUtil.getHome().getGetSelectorKindForm();
2858
2859            commandForm.setSelectorKindName(selectorKindName);
2860            commandForm.setUuid(id);
2861
2862            selectorKind = CDI.current().select(GetSelectorKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2863        } catch (NamingException ex) {
2864            throw new RuntimeException(ex);
2865        }
2866
2867        return selectorKind == null ? null : new SelectorKindObject(selectorKind);
2868    }
2869
2870    @GraphQLField
2871    @GraphQLName("selectorKinds")
2872    @GraphQLNonNull
2873    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2874    static CountingPaginatedData<SelectorKindObject> selectorKinds(final DataFetchingEnvironment env) {
2875        CountingPaginatedData<SelectorKindObject> data;
2876
2877        try {
2878            var commandForm = SelectorUtil.getHome().getGetSelectorKindsForm();
2879            var command = CDI.current().select(GetSelectorKindsCommand.class).get();
2880
2881            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2882            if(totalEntities == null) {
2883                data = Connections.emptyConnection();
2884            } else {
2885                try(var objectLimiter = new ObjectLimiter(env, SelectorKindConstants.COMPONENT_VENDOR_NAME, SelectorKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
2886                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2887
2888                    var selectorKinds = entities.stream()
2889                            .map(SelectorKindObject::new)
2890                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2891
2892                    data = new CountedObjects<>(objectLimiter, selectorKinds);
2893                }
2894            }
2895        } catch (NamingException ex) {
2896            throw new RuntimeException(ex);
2897        }
2898
2899        return data;
2900    }
2901    
2902    @GraphQLField
2903    @GraphQLName("selectorType")
2904    static SelectorTypeObject selectorType(final DataFetchingEnvironment env,
2905            @GraphQLName("selectorKindName") final String selectorKindName,
2906            @GraphQLName("selectorTypeName") final String selectorTypeName,
2907            @GraphQLName("id") @GraphQLID final String id) {
2908        SelectorType selectorType;
2909
2910        try {
2911            var commandForm = SelectorUtil.getHome().getGetSelectorTypeForm();
2912
2913            commandForm.setSelectorKindName(selectorKindName);
2914            commandForm.setSelectorTypeName(selectorTypeName);
2915            commandForm.setUuid(id);
2916
2917            selectorType = CDI.current().select(GetSelectorTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2918        } catch (NamingException ex) {
2919            throw new RuntimeException(ex);
2920        }
2921
2922        return selectorType == null ? null : new SelectorTypeObject(selectorType);
2923    }
2924
2925    @GraphQLField
2926    @GraphQLName("selectorTypes")
2927    @GraphQLNonNull
2928    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
2929    static CountingPaginatedData<SelectorTypeObject> selectorTypes(final DataFetchingEnvironment env,
2930            @GraphQLName("selectorKindName") @GraphQLNonNull final String selectorKindName) {
2931        CountingPaginatedData<SelectorTypeObject> data;
2932
2933        try {
2934            var commandForm = SelectorUtil.getHome().getGetSelectorTypesForm();
2935            var command = CDI.current().select(GetSelectorTypesCommand.class).get();
2936
2937            commandForm.setSelectorKindName(selectorKindName);
2938
2939            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2940            if(totalEntities == null) {
2941                data = Connections.emptyConnection();
2942            } else {
2943                try(var objectLimiter = new ObjectLimiter(env, SelectorTypeConstants.COMPONENT_VENDOR_NAME, SelectorTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
2944                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
2945
2946                    var selectorTypes = entities.stream()
2947                            .map(SelectorTypeObject::new)
2948                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
2949
2950                    data = new CountedObjects<>(objectLimiter, selectorTypes);
2951                }
2952            }
2953        } catch (NamingException ex) {
2954            throw new RuntimeException(ex);
2955        }
2956
2957        return data;
2958    }
2959
2960    @GraphQLField
2961    @GraphQLName("selector")
2962    static SelectorObject selector(final DataFetchingEnvironment env,
2963            @GraphQLName("selectorKindName") final String selectorKindName,
2964            @GraphQLName("selectorTypeName") final String selectorTypeName,
2965            @GraphQLName("selectorName") final String selectorName,
2966            @GraphQLName("id") @GraphQLID final String id) {
2967        Selector selector;
2968
2969        try {
2970            var commandForm = SelectorUtil.getHome().getGetSelectorForm();
2971
2972            commandForm.setSelectorKindName(selectorKindName);
2973            commandForm.setSelectorTypeName(selectorTypeName);
2974            commandForm.setSelectorName(selectorName);
2975            commandForm.setUuid(id);
2976
2977            selector = CDI.current().select(GetSelectorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
2978        } catch (NamingException ex) {
2979            throw new RuntimeException(ex);
2980        }
2981
2982        return selector == null ? null : new SelectorObject(selector);
2983    }
2984
2985    @GraphQLField
2986    @GraphQLName("selectors")
2987    static Collection<SelectorObject> selectors(final DataFetchingEnvironment env,
2988            @GraphQLName("selectorKindName") @GraphQLNonNull final String selectorKindName,
2989            @GraphQLName("selectorTypeName") @GraphQLNonNull final String selectorTypeName) {
2990        Collection<Selector> selectors;
2991        Collection<SelectorObject> selectorObjects;
2992
2993        try {
2994            var commandForm = SelectorUtil.getHome().getGetSelectorsForm();
2995
2996            commandForm.setSelectorKindName(selectorKindName);
2997            commandForm.setSelectorTypeName(selectorTypeName);
2998
2999            selectors = CDI.current().select(GetSelectorsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3000        } catch (NamingException ex) {
3001            throw new RuntimeException(ex);
3002        }
3003
3004        if(selectors == null) {
3005            selectorObjects = emptyList();
3006        } else {
3007            selectorObjects = new ArrayList<>(selectors.size());
3008
3009            selectors.stream()
3010                    .map(SelectorObject::new)
3011                    .forEachOrdered(selectorObjects::add);
3012        }
3013
3014        return selectorObjects;
3015    }
3016
3017    @GraphQLField
3018    @GraphQLName("filterKind")
3019    static FilterKindObject filterKind(final DataFetchingEnvironment env,
3020            @GraphQLName("filterKindName") final String filterKindName,
3021            @GraphQLName("id") @GraphQLID final String id) {
3022        FilterKind filterKind;
3023
3024        try {
3025            var commandForm = FilterUtil.getHome().getGetFilterKindForm();
3026
3027            commandForm.setFilterKindName(filterKindName);
3028            commandForm.setUuid(id);
3029
3030            filterKind = CDI.current().select(GetFilterKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3031        } catch (NamingException ex) {
3032            throw new RuntimeException(ex);
3033        }
3034
3035        return filterKind == null ? null : new FilterKindObject(filterKind);
3036    }
3037
3038    @GraphQLField
3039    @GraphQLName("filterKinds")
3040    @GraphQLNonNull
3041    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3042    static CountingPaginatedData<FilterKindObject> filterKinds(final DataFetchingEnvironment env) {
3043        CountingPaginatedData<FilterKindObject> data;
3044
3045        try {
3046            var commandForm = FilterUtil.getHome().getGetFilterKindsForm();
3047            var command = CDI.current().select(GetFilterKindsCommand.class).get();
3048
3049            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3050            if(totalEntities == null) {
3051                data = Connections.emptyConnection();
3052            } else {
3053                try(var objectLimiter = new ObjectLimiter(env, FilterKindConstants.COMPONENT_VENDOR_NAME, FilterKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
3054                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3055
3056                    var filterKinds = entities.stream()
3057                            .map(FilterKindObject::new)
3058                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3059
3060                    data = new CountedObjects<>(objectLimiter, filterKinds);
3061                }
3062            }
3063        } catch (NamingException ex) {
3064            throw new RuntimeException(ex);
3065        }
3066
3067        return data;
3068    }
3069
3070    @GraphQLField
3071    @GraphQLName("filterType")
3072    static FilterTypeObject filterType(final DataFetchingEnvironment env,
3073            @GraphQLName("filterKindName") final String filterKindName,
3074            @GraphQLName("filterTypeName") final String filterTypeName,
3075            @GraphQLName("id") @GraphQLID final String id) {
3076        FilterType filterType;
3077
3078        try {
3079            var commandForm = FilterUtil.getHome().getGetFilterTypeForm();
3080
3081            commandForm.setFilterKindName(filterKindName);
3082            commandForm.setFilterTypeName(filterTypeName);
3083            commandForm.setUuid(id);
3084
3085            filterType = CDI.current().select(GetFilterTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3086        } catch (NamingException ex) {
3087            throw new RuntimeException(ex);
3088        }
3089
3090        return filterType == null ? null : new FilterTypeObject(filterType);
3091    }
3092
3093    @GraphQLField
3094    @GraphQLName("filterTypes")
3095    @GraphQLNonNull
3096    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3097    static CountingPaginatedData<FilterTypeObject> filterTypes(final DataFetchingEnvironment env,
3098            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName) {
3099        CountingPaginatedData<FilterTypeObject> data;
3100
3101        try {
3102            var commandForm = FilterUtil.getHome().getGetFilterTypesForm();
3103            var command = CDI.current().select(GetFilterTypesCommand.class).get();
3104
3105            commandForm.setFilterKindName(filterKindName);
3106
3107            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3108            if(totalEntities == null) {
3109                data = Connections.emptyConnection();
3110            } else {
3111                try(var objectLimiter = new ObjectLimiter(env, FilterTypeConstants.COMPONENT_VENDOR_NAME, FilterTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
3112                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3113
3114                    var filterTypes = entities.stream()
3115                            .map(FilterTypeObject::new)
3116                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3117
3118                    data = new CountedObjects<>(objectLimiter, filterTypes);
3119                }
3120            }
3121        } catch (NamingException ex) {
3122            throw new RuntimeException(ex);
3123        }
3124
3125        return data;
3126    }
3127
3128    @GraphQLField
3129    @GraphQLName("filter")
3130    static FilterObject filter(final DataFetchingEnvironment env,
3131            @GraphQLName("filterKindName") final String filterKindName,
3132            @GraphQLName("filterTypeName") final String filterTypeName,
3133            @GraphQLName("filterName") final String filterName,
3134            @GraphQLName("id") @GraphQLID final String id) {
3135        Filter filter;
3136
3137        try {
3138            var commandForm = FilterUtil.getHome().getGetFilterForm();
3139
3140            commandForm.setFilterKindName(filterKindName);
3141            commandForm.setFilterTypeName(filterTypeName);
3142            commandForm.setFilterName(filterName);
3143            commandForm.setUuid(id);
3144
3145            filter = CDI.current().select(GetFilterCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3146        } catch (NamingException ex) {
3147            throw new RuntimeException(ex);
3148        }
3149
3150        return filter == null ? null : new FilterObject(filter);
3151    }
3152
3153    @GraphQLField
3154    @GraphQLName("filters")
3155    @GraphQLNonNull
3156    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3157    static CountingPaginatedData<FilterObject> filters(final DataFetchingEnvironment env,
3158            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3159            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName) {
3160        CountingPaginatedData<FilterObject> data;
3161
3162        try {
3163            var commandForm = FilterUtil.getHome().getGetFiltersForm();
3164            var command = CDI.current().select(GetFiltersCommand.class).get();
3165
3166            commandForm.setFilterKindName(filterKindName);
3167            commandForm.setFilterTypeName(filterTypeName);
3168
3169            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3170            if(totalEntities == null) {
3171                data = Connections.emptyConnection();
3172            } else {
3173                try(var objectLimiter = new ObjectLimiter(env, FilterConstants.COMPONENT_VENDOR_NAME, FilterConstants.ENTITY_TYPE_NAME, totalEntities)) {
3174                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3175
3176                    var filters = entities.stream()
3177                            .map(FilterObject::new)
3178                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3179
3180                    data = new CountedObjects<>(objectLimiter, filters);
3181                }
3182            }
3183        } catch (NamingException ex) {
3184            throw new RuntimeException(ex);
3185        }
3186
3187        return data;
3188    }
3189
3190    @GraphQLField
3191    @GraphQLName("filterEntranceStep")
3192    static FilterEntranceStepObject filterEntranceStep(final DataFetchingEnvironment env,
3193            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3194            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3195            @GraphQLName("filterName") @GraphQLNonNull final String filterName,
3196            @GraphQLName("filterStepName") @GraphQLNonNull final String filterStepName) {
3197        FilterEntranceStep filterEntranceStep;
3198
3199        try {
3200            var commandForm = FilterUtil.getHome().getGetFilterEntranceStepForm();
3201
3202            commandForm.setFilterKindName(filterKindName);
3203            commandForm.setFilterTypeName(filterTypeName);
3204            commandForm.setFilterName(filterName);
3205            commandForm.setFilterStepName(filterStepName);
3206
3207            filterEntranceStep = CDI.current().select(GetFilterEntranceStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3208        } catch (NamingException ex) {
3209            throw new RuntimeException(ex);
3210        }
3211
3212        return filterEntranceStep == null ? null : new FilterEntranceStepObject(filterEntranceStep);
3213    }
3214
3215    @GraphQLField
3216    @GraphQLName("filterEntranceSteps")
3217    @GraphQLNonNull
3218    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3219    static CountingPaginatedData<FilterEntranceStepObject> filterEntranceSteps(final DataFetchingEnvironment env,
3220            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3221            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3222            @GraphQLName("filterName") @GraphQLNonNull final String filterName) {
3223        CountingPaginatedData<FilterEntranceStepObject> data;
3224
3225        try {
3226            var commandForm = FilterUtil.getHome().getGetFilterEntranceStepsForm();
3227            var command = CDI.current().select(GetFilterEntranceStepsCommand.class).get();
3228
3229            commandForm.setFilterKindName(filterKindName);
3230            commandForm.setFilterTypeName(filterTypeName);
3231            commandForm.setFilterName(filterName);
3232
3233            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3234            if(totalEntities == null) {
3235                data = Connections.emptyConnection();
3236            } else {
3237                try(var objectLimiter = new ObjectLimiter(env, FilterEntranceStepConstants.COMPONENT_VENDOR_NAME, FilterEntranceStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
3238                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3239
3240                    var filterEntranceSteps = entities.stream()
3241                            .map(FilterEntranceStepObject::new)
3242                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3243
3244                    data = new CountedObjects<>(objectLimiter, filterEntranceSteps);
3245                }
3246            }
3247        } catch (NamingException ex) {
3248            throw new RuntimeException(ex);
3249        }
3250
3251        return data;
3252    }
3253
3254    @GraphQLField
3255    @GraphQLName("filterStep")
3256    static FilterStepObject filterStep(final DataFetchingEnvironment env,
3257            @GraphQLName("filterKindName") final String filterKindName,
3258            @GraphQLName("filterTypeName") final String filterTypeName,
3259            @GraphQLName("filterName") final String filterName,
3260            @GraphQLName("filterStepName") final String filterStepName,
3261            @GraphQLName("id") @GraphQLID final String id) {
3262        FilterStep filterStep;
3263
3264        try {
3265            var commandForm = FilterUtil.getHome().getGetFilterStepForm();
3266
3267            commandForm.setFilterKindName(filterKindName);
3268            commandForm.setFilterTypeName(filterTypeName);
3269            commandForm.setFilterName(filterName);
3270            commandForm.setFilterStepName(filterStepName);
3271            commandForm.setUuid(id);
3272
3273            filterStep = CDI.current().select(GetFilterStepCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3274        } catch (NamingException ex) {
3275            throw new RuntimeException(ex);
3276        }
3277
3278        return filterStep == null ? null : new FilterStepObject(filterStep);
3279    }
3280
3281    @GraphQLField
3282    @GraphQLName("filterSteps")
3283    @GraphQLNonNull
3284    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3285    static CountingPaginatedData<FilterStepObject> filterSteps(final DataFetchingEnvironment env,
3286            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3287            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3288            @GraphQLName("filterName") @GraphQLNonNull final String filterName) {
3289        CountingPaginatedData<FilterStepObject> data;
3290
3291        try {
3292            var commandForm = FilterUtil.getHome().getGetFilterStepsForm();
3293            var command = CDI.current().select(GetFilterStepsCommand.class).get();
3294
3295            commandForm.setFilterKindName(filterKindName);
3296            commandForm.setFilterTypeName(filterTypeName);
3297            commandForm.setFilterName(filterName);
3298
3299            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3300            if(totalEntities == null) {
3301                data = Connections.emptyConnection();
3302            } else {
3303                try(var objectLimiter = new ObjectLimiter(env, FilterStepConstants.COMPONENT_VENDOR_NAME, FilterStepConstants.ENTITY_TYPE_NAME, totalEntities)) {
3304                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3305
3306                    var filterSteps = entities.stream()
3307                            .map(FilterStepObject::new)
3308                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3309
3310                    data = new CountedObjects<>(objectLimiter, filterSteps);
3311                }
3312            }
3313        } catch (NamingException ex) {
3314            throw new RuntimeException(ex);
3315        }
3316
3317        return data;
3318    }
3319
3320    @GraphQLField
3321    @GraphQLName("filterStepElement")
3322    static FilterStepElementObject filterStepElement(final DataFetchingEnvironment env,
3323            @GraphQLName("filterKindName") final String filterKindName,
3324            @GraphQLName("filterTypeName") final String filterTypeName,
3325            @GraphQLName("filterName") final String filterName,
3326            @GraphQLName("filterStepName") final String filterStepName,
3327            @GraphQLName("filterStepElementName") final String filterStepElementName,
3328            @GraphQLName("id") @GraphQLID final String id) {
3329        FilterStepElement filterStepElement;
3330
3331        try {
3332            var commandForm = FilterUtil.getHome().getGetFilterStepElementForm();
3333
3334            commandForm.setFilterKindName(filterKindName);
3335            commandForm.setFilterTypeName(filterTypeName);
3336            commandForm.setFilterName(filterName);
3337            commandForm.setFilterStepName(filterStepName);
3338            commandForm.setFilterStepElementName(filterStepElementName);
3339            commandForm.setUuid(id);
3340
3341            filterStepElement = CDI.current().select(GetFilterStepElementCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3342        } catch (NamingException ex) {
3343            throw new RuntimeException(ex);
3344        }
3345
3346        return filterStepElement == null ? null : new FilterStepElementObject(filterStepElement);
3347    }
3348
3349    @GraphQLField
3350    @GraphQLName("filterStepElements")
3351    @GraphQLNonNull
3352    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3353    static CountingPaginatedData<FilterStepElementObject> filterStepElements(final DataFetchingEnvironment env,
3354            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3355            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3356            @GraphQLName("filterName") @GraphQLNonNull final String filterName,
3357            @GraphQLName("filterStepName") @GraphQLNonNull final String filterStepName) {
3358        CountingPaginatedData<FilterStepElementObject> data;
3359
3360        try {
3361            var commandForm = FilterUtil.getHome().getGetFilterStepElementsForm();
3362            var command = CDI.current().select(GetFilterStepElementsCommand.class).get();
3363
3364            commandForm.setFilterKindName(filterKindName);
3365            commandForm.setFilterTypeName(filterTypeName);
3366            commandForm.setFilterName(filterName);
3367            commandForm.setFilterStepName(filterStepName);
3368
3369            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3370            if(totalEntities == null) {
3371                data = Connections.emptyConnection();
3372            } else {
3373                try(var objectLimiter = new ObjectLimiter(env, FilterStepElementConstants.COMPONENT_VENDOR_NAME, FilterStepElementConstants.ENTITY_TYPE_NAME, totalEntities)) {
3374                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3375
3376                    var filterStepElements = entities.stream()
3377                            .map(FilterStepElementObject::new)
3378                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3379
3380                    data = new CountedObjects<>(objectLimiter, filterStepElements);
3381                }
3382            }
3383        } catch (NamingException ex) {
3384            throw new RuntimeException(ex);
3385        }
3386
3387        return data;
3388    }
3389
3390    @GraphQLField
3391    @GraphQLName("filterStepDestination")
3392    static FilterStepDestinationObject filterStepDestination(final DataFetchingEnvironment env,
3393            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3394            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3395            @GraphQLName("filterName") @GraphQLNonNull final String filterName,
3396            @GraphQLName("fromFilterStepName") @GraphQLNonNull final String fromFilterStepName,
3397            @GraphQLName("toFilterStepName") @GraphQLNonNull final String toFilterStepName) {
3398        FilterStepDestination filterStepDestination;
3399
3400        try {
3401            var commandForm = FilterUtil.getHome().getGetFilterStepDestinationForm();
3402
3403            commandForm.setFilterKindName(filterKindName);
3404            commandForm.setFilterTypeName(filterTypeName);
3405            commandForm.setFilterName(filterName);
3406            commandForm.setFromFilterStepName(fromFilterStepName);
3407            commandForm.setToFilterStepName(toFilterStepName);
3408
3409            filterStepDestination = CDI.current().select(GetFilterStepDestinationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3410        } catch (NamingException ex) {
3411            throw new RuntimeException(ex);
3412        }
3413
3414        return filterStepDestination == null ? null : new FilterStepDestinationObject(filterStepDestination);
3415    }
3416
3417    @GraphQLField
3418    @GraphQLName("filterStepDestinations")
3419    @GraphQLNonNull
3420    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3421    static CountingPaginatedData<FilterStepDestinationObject> filterStepDestinations(final DataFetchingEnvironment env,
3422            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3423            @GraphQLName("filterTypeName") @GraphQLNonNull final String filterTypeName,
3424            @GraphQLName("filterName") @GraphQLNonNull final String filterName,
3425            @GraphQLName("fromFilterStepName") final String fromFilterStepName,
3426            @GraphQLName("toFilterStepName") final String toFilterStepName) {
3427        CountingPaginatedData<FilterStepDestinationObject> data;
3428
3429        try {
3430            var commandForm = FilterUtil.getHome().getGetFilterStepDestinationsForm();
3431            var command = CDI.current().select(GetFilterStepDestinationsCommand.class).get();
3432
3433            commandForm.setFilterKindName(filterKindName);
3434            commandForm.setFilterTypeName(filterTypeName);
3435            commandForm.setFilterName(filterName);
3436            commandForm.setFromFilterStepName(fromFilterStepName);
3437            commandForm.setToFilterStepName(toFilterStepName);
3438
3439            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3440            if(totalEntities == null) {
3441                data = Connections.emptyConnection();
3442            } else {
3443                try(var objectLimiter = new ObjectLimiter(env, FilterStepDestinationConstants.COMPONENT_VENDOR_NAME, FilterStepDestinationConstants.ENTITY_TYPE_NAME, totalEntities)) {
3444                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3445
3446                    var filterStepDestinations = entities.stream()
3447                            .map(FilterStepDestinationObject::new)
3448                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3449
3450                    data = new CountedObjects<>(objectLimiter, filterStepDestinations);
3451                }
3452            }
3453        } catch (NamingException ex) {
3454            throw new RuntimeException(ex);
3455        }
3456
3457        return data;
3458    }
3459
3460    @GraphQLField
3461    @GraphQLName("filterAdjustmentSource")
3462    static FilterAdjustmentSourceObject filterAdjustmentSource(final DataFetchingEnvironment env,
3463            @GraphQLName("filterAdjustmentSourceName") @GraphQLNonNull final String filterAdjustmentSourceName) {
3464        FilterAdjustmentSource filterAdjustmentSource;
3465
3466        try {
3467            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentSourceForm();
3468
3469            commandForm.setFilterAdjustmentSourceName(filterAdjustmentSourceName);
3470
3471            filterAdjustmentSource = CDI.current().select(GetFilterAdjustmentSourceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3472        } catch (NamingException ex) {
3473            throw new RuntimeException(ex);
3474        }
3475
3476        return filterAdjustmentSource == null ? null : new FilterAdjustmentSourceObject(filterAdjustmentSource);
3477    }
3478
3479    @GraphQLField
3480    @GraphQLName("filterAdjustmentSources")
3481    @GraphQLNonNull
3482    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3483    static CountingPaginatedData<FilterAdjustmentSourceObject> filterAdjustmentSources(final DataFetchingEnvironment env) {
3484        CountingPaginatedData<FilterAdjustmentSourceObject> data;
3485
3486        try {
3487            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentSourcesForm();
3488            var command = CDI.current().select(GetFilterAdjustmentSourcesCommand.class).get();
3489
3490            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3491            if(totalEntities == null) {
3492                data = Connections.emptyConnection();
3493            } else {
3494                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)) {
3495                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3496
3497                    var filterAdjustmentSources = entities.stream()
3498                            .map(FilterAdjustmentSourceObject::new)
3499                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3500
3501                    data = new CountedObjects<>(objectLimiter, filterAdjustmentSources);
3502                }
3503            }
3504        } catch (NamingException ex) {
3505            throw new RuntimeException(ex);
3506        }
3507
3508        return data;
3509    }
3510
3511    @GraphQLField
3512    @GraphQLName("filterAdjustmentType")
3513    static FilterAdjustmentTypeObject filterAdjustmentType(final DataFetchingEnvironment env,
3514            @GraphQLName("filterAdjustmentTypeName") @GraphQLNonNull final String filterAdjustmentTypeName) {
3515        FilterAdjustmentType filterAdjustmentType;
3516
3517        try {
3518            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentTypeForm();
3519
3520            commandForm.setFilterAdjustmentTypeName(filterAdjustmentTypeName);
3521
3522            filterAdjustmentType = CDI.current().select(GetFilterAdjustmentTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3523        } catch (NamingException ex) {
3524            throw new RuntimeException(ex);
3525        }
3526
3527        return filterAdjustmentType == null ? null : new FilterAdjustmentTypeObject(filterAdjustmentType);
3528    }
3529
3530    @GraphQLField
3531    @GraphQLName("filterAdjustmentTypes")
3532    @GraphQLNonNull
3533    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3534    static CountingPaginatedData<FilterAdjustmentTypeObject> filterAdjustmentTypes(final DataFetchingEnvironment env) {
3535        CountingPaginatedData<FilterAdjustmentTypeObject> data;
3536
3537        try {
3538            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentTypesForm();
3539            var command = CDI.current().select(GetFilterAdjustmentTypesCommand.class).get();
3540
3541            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3542            if(totalEntities == null) {
3543                data = Connections.emptyConnection();
3544            } else {
3545                try(var objectLimiter = new ObjectLimiter(env, FilterAdjustmentTypeConstants.COMPONENT_VENDOR_NAME, FilterAdjustmentTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
3546                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3547
3548                    var filterAdjustmentTypes = entities.stream()
3549                            .map(FilterAdjustmentTypeObject::new)
3550                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3551
3552                    data = new CountedObjects<>(objectLimiter, filterAdjustmentTypes);
3553                }
3554            }
3555        } catch (NamingException ex) {
3556            throw new RuntimeException(ex);
3557        }
3558
3559        return data;
3560    }
3561
3562    @GraphQLField
3563    @GraphQLName("filterAdjustment")
3564    static FilterAdjustmentObject filterAdjustment(final DataFetchingEnvironment env,
3565            @GraphQLName("filterKindName") final String filterKindName,
3566            @GraphQLName("filterAdjustmentName") final String filterAdjustmentName,
3567            @GraphQLName("id") @GraphQLID final String id) {
3568        FilterAdjustment filterAdjustment;
3569
3570        try {
3571            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentForm();
3572
3573            commandForm.setFilterKindName(filterKindName);
3574            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3575            commandForm.setUuid(id);
3576
3577            filterAdjustment = CDI.current().select(GetFilterAdjustmentCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3578        } catch (NamingException ex) {
3579            throw new RuntimeException(ex);
3580        }
3581
3582        return filterAdjustment == null ? null : new FilterAdjustmentObject(filterAdjustment);
3583    }
3584
3585    @GraphQLField
3586    @GraphQLName("filterAdjustments")
3587    static Collection<FilterAdjustmentObject> filterAdjustments(final DataFetchingEnvironment env,
3588            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName) {
3589        Collection<FilterAdjustment> filterAdjustments;
3590        Collection<FilterAdjustmentObject> filterAdjustmentObjects;
3591
3592        try {
3593            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentsForm();
3594
3595            commandForm.setFilterKindName(filterKindName);
3596
3597            filterAdjustments = CDI.current().select(GetFilterAdjustmentsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3598        } catch (NamingException ex) {
3599            throw new RuntimeException(ex);
3600        }
3601
3602        if(filterAdjustments == null) {
3603            filterAdjustmentObjects = emptyList();
3604        } else {
3605            filterAdjustmentObjects = new ArrayList<>(filterAdjustments.size());
3606
3607            filterAdjustments.stream()
3608                    .map(FilterAdjustmentObject::new)
3609                    .forEachOrdered(filterAdjustmentObjects::add);
3610        }
3611
3612        return filterAdjustmentObjects;
3613    }
3614
3615    @GraphQLField
3616    @GraphQLName("filterAdjustmentAmount")
3617    static FilterAdjustmentAmountObject filterAdjustmentAmount(final DataFetchingEnvironment env,
3618            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3619            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName,
3620            @GraphQLName("unitOfMeasureName") final String unitOfMeasureName,
3621            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName,
3622            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
3623            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
3624        FilterAdjustmentAmount filterAdjustmentAmount;
3625
3626        try {
3627            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentAmountForm();
3628
3629            commandForm.setFilterKindName(filterKindName);
3630            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3631            commandForm.setUnitOfMeasureName(unitOfMeasureName);
3632            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
3633            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
3634            commandForm.setCurrencyIsoName(currencyIsoName);
3635
3636            filterAdjustmentAmount = CDI.current().select(GetFilterAdjustmentAmountCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3637        } catch (NamingException ex) {
3638            throw new RuntimeException(ex);
3639        }
3640
3641        return filterAdjustmentAmount == null ? null : new FilterAdjustmentAmountObject(filterAdjustmentAmount);
3642    }
3643
3644    @GraphQLField
3645    @GraphQLName("filterAdjustmentAmounts")
3646    static Collection<FilterAdjustmentAmountObject> filterAdjustmentAmounts(final DataFetchingEnvironment env,
3647            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3648            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName) {
3649        Collection<FilterAdjustmentAmount> filterAdjustmentAmounts;
3650        Collection<FilterAdjustmentAmountObject> filterAdjustmentAmountObjects;
3651
3652        try {
3653            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentAmountsForm();
3654
3655            commandForm.setFilterKindName(filterKindName);
3656            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3657
3658            filterAdjustmentAmounts = CDI.current().select(GetFilterAdjustmentAmountsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3659        } catch (NamingException ex) {
3660            throw new RuntimeException(ex);
3661        }
3662
3663        if(filterAdjustmentAmounts == null) {
3664            filterAdjustmentAmountObjects = emptyList();
3665        } else {
3666            filterAdjustmentAmountObjects = new ArrayList<>(filterAdjustmentAmounts.size());
3667
3668            filterAdjustmentAmounts.stream()
3669                    .map(FilterAdjustmentAmountObject::new)
3670                    .forEachOrdered(filterAdjustmentAmountObjects::add);
3671        }
3672
3673        return filterAdjustmentAmountObjects;
3674    }
3675
3676    @GraphQLField
3677    @GraphQLName("filterAdjustmentFixedAmount")
3678    static FilterAdjustmentFixedAmountObject filterAdjustmentFixedAmount(final DataFetchingEnvironment env,
3679            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3680            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName,
3681            @GraphQLName("unitOfMeasureName") final String unitOfMeasureName,
3682            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName,
3683            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
3684            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
3685        FilterAdjustmentFixedAmount filterAdjustmentFixedAmount;
3686
3687        try {
3688            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentFixedAmountForm();
3689
3690            commandForm.setFilterKindName(filterKindName);
3691            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3692            commandForm.setUnitOfMeasureName(unitOfMeasureName);
3693            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
3694            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
3695            commandForm.setCurrencyIsoName(currencyIsoName);
3696
3697            filterAdjustmentFixedAmount = CDI.current().select(GetFilterAdjustmentFixedAmountCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3698        } catch (NamingException ex) {
3699            throw new RuntimeException(ex);
3700        }
3701
3702        return filterAdjustmentFixedAmount == null ? null : new FilterAdjustmentFixedAmountObject(filterAdjustmentFixedAmount);
3703    }
3704
3705    @GraphQLField
3706    @GraphQLName("filterAdjustmentFixedAmounts")
3707    static Collection<FilterAdjustmentFixedAmountObject> filterAdjustmentFixedAmounts(final DataFetchingEnvironment env,
3708            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3709            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName) {
3710        Collection<FilterAdjustmentFixedAmount> filterAdjustmentFixedAmounts;
3711        Collection<FilterAdjustmentFixedAmountObject> filterAdjustmentFixedAmountObjects;
3712
3713        try {
3714            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentFixedAmountsForm();
3715
3716            commandForm.setFilterKindName(filterKindName);
3717            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3718
3719            filterAdjustmentFixedAmounts = CDI.current().select(GetFilterAdjustmentFixedAmountsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3720        } catch (NamingException ex) {
3721            throw new RuntimeException(ex);
3722        }
3723
3724        if(filterAdjustmentFixedAmounts == null) {
3725            filterAdjustmentFixedAmountObjects = emptyList();
3726        } else {
3727            filterAdjustmentFixedAmountObjects = new ArrayList<>(filterAdjustmentFixedAmounts.size());
3728
3729            filterAdjustmentFixedAmounts.stream()
3730                    .map(FilterAdjustmentFixedAmountObject::new)
3731                    .forEachOrdered(filterAdjustmentFixedAmountObjects::add);
3732        }
3733
3734        return filterAdjustmentFixedAmountObjects;
3735    }
3736
3737    @GraphQLField
3738    @GraphQLName("filterAdjustmentPercent")
3739    static FilterAdjustmentPercentObject filterAdjustmentPercent(final DataFetchingEnvironment env,
3740            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3741            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName,
3742            @GraphQLName("unitOfMeasureName") final String unitOfMeasureName,
3743            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName,
3744            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
3745            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
3746        FilterAdjustmentPercent filterAdjustmentPercent;
3747
3748        try {
3749            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentPercentForm();
3750
3751            commandForm.setFilterKindName(filterKindName);
3752            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3753            commandForm.setUnitOfMeasureName(unitOfMeasureName);
3754            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
3755            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
3756            commandForm.setCurrencyIsoName(currencyIsoName);
3757
3758            filterAdjustmentPercent = CDI.current().select(GetFilterAdjustmentPercentCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3759        } catch (NamingException ex) {
3760            throw new RuntimeException(ex);
3761        }
3762
3763        return filterAdjustmentPercent == null ? null : new FilterAdjustmentPercentObject(filterAdjustmentPercent);
3764    }
3765
3766    @GraphQLField
3767    @GraphQLName("filterAdjustmentPercents")
3768    static Collection<FilterAdjustmentPercentObject> filterAdjustmentPercents(final DataFetchingEnvironment env,
3769            @GraphQLName("filterKindName") @GraphQLNonNull final String filterKindName,
3770            @GraphQLName("filterAdjustmentName") @GraphQLNonNull final String filterAdjustmentName) {
3771        Collection<FilterAdjustmentPercent> filterAdjustmentPercents;
3772        Collection<FilterAdjustmentPercentObject> filterAdjustmentPercentObjects;
3773
3774        try {
3775            var commandForm = FilterUtil.getHome().getGetFilterAdjustmentPercentsForm();
3776
3777            commandForm.setFilterKindName(filterKindName);
3778            commandForm.setFilterAdjustmentName(filterAdjustmentName);
3779
3780            filterAdjustmentPercents = CDI.current().select(GetFilterAdjustmentPercentsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3781        } catch (NamingException ex) {
3782            throw new RuntimeException(ex);
3783        }
3784
3785        if(filterAdjustmentPercents == null) {
3786            filterAdjustmentPercentObjects = emptyList();
3787        } else {
3788            filterAdjustmentPercentObjects = new ArrayList<>(filterAdjustmentPercents.size());
3789
3790            filterAdjustmentPercents.stream()
3791                    .map(FilterAdjustmentPercentObject::new)
3792                    .forEachOrdered(filterAdjustmentPercentObjects::add);
3793        }
3794
3795        return filterAdjustmentPercentObjects;
3796    }
3797
3798    @GraphQLField
3799    @GraphQLName("offerUse")
3800    static OfferUseObject offerUse(final DataFetchingEnvironment env,
3801            @GraphQLName("offerName") @GraphQLNonNull final String offerName,
3802            @GraphQLName("useName") @GraphQLNonNull final String useName) {
3803        OfferUse offerUse;
3804
3805        try {
3806            var commandForm = OfferUtil.getHome().getGetOfferUseForm();
3807
3808            commandForm.setOfferName(offerName);
3809            commandForm.setUseName(useName);
3810
3811            offerUse = CDI.current().select(GetOfferUseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3812        } catch (NamingException ex) {
3813            throw new RuntimeException(ex);
3814        }
3815
3816        return offerUse == null ? null : new OfferUseObject(offerUse);
3817    }
3818
3819    @GraphQLField
3820    @GraphQLName("offerUses")
3821    @GraphQLNonNull
3822    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3823    static CountingPaginatedData<OfferUseObject> offerUses(final DataFetchingEnvironment env,
3824            @GraphQLName("offerName") final String offerName,
3825            @GraphQLName("useName") final String useName) {
3826        CountingPaginatedData<OfferUseObject> data;
3827
3828        try {
3829            var commandForm = OfferUtil.getHome().getGetOfferUsesForm();
3830
3831            commandForm.setOfferName(offerName);
3832            commandForm.setUseName(useName);
3833
3834            var command = CDI.current().select(GetOfferUsesCommand.class).get();
3835
3836            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3837            if(totalEntities == null) {
3838                data = Connections.emptyConnection();
3839            } else {
3840                try(var objectLimiter = new ObjectLimiter(env, OfferConstants.COMPONENT_VENDOR_NAME, OfferConstants.ENTITY_TYPE_NAME, totalEntities)) {
3841                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3842
3843                    var offerUses = entities.stream()
3844                            .map(OfferUseObject::new)
3845                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3846
3847                    data = new CountedObjects<>(objectLimiter, offerUses);
3848                }
3849            }
3850        } catch (NamingException ex) {
3851            throw new RuntimeException(ex);
3852        }
3853
3854        return data;
3855    }
3856
3857    @GraphQLField
3858    @GraphQLName("offer")
3859    static OfferObject offer(final DataFetchingEnvironment env,
3860            @GraphQLName("offerName") final String offerName,
3861            @GraphQLName("id") @GraphQLID final String id) {
3862        Offer offer;
3863
3864        try {
3865            var commandForm = OfferUtil.getHome().getGetOfferForm();
3866
3867            commandForm.setOfferName(offerName);
3868            commandForm.setUuid(id);
3869
3870            offer = CDI.current().select(GetOfferCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3871        } catch (NamingException ex) {
3872            throw new RuntimeException(ex);
3873        }
3874
3875        return offer == null ? null : new OfferObject(offer);
3876    }
3877
3878    @GraphQLField
3879    @GraphQLName("offers")
3880    @GraphQLNonNull
3881    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3882    static CountingPaginatedData<OfferObject> offers(final DataFetchingEnvironment env) {
3883        CountingPaginatedData<OfferObject> data;
3884
3885        try {
3886            var commandForm = OfferUtil.getHome().getGetOffersForm();
3887            var command = CDI.current().select(GetOffersCommand.class).get();
3888
3889            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3890            if(totalEntities == null) {
3891                data = Connections.emptyConnection();
3892            } else {
3893                try(var objectLimiter = new ObjectLimiter(env, OfferConstants.COMPONENT_VENDOR_NAME, OfferConstants.ENTITY_TYPE_NAME, totalEntities)) {
3894                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3895
3896                    var offers = entities.stream()
3897                            .map(OfferObject::new)
3898                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3899
3900                    data = new CountedObjects<>(objectLimiter, offers);
3901                }
3902            }
3903        } catch (NamingException ex) {
3904            throw new RuntimeException(ex);
3905        }
3906
3907        return data;
3908    }
3909    
3910    @GraphQLField
3911    @GraphQLName("offerItem")
3912    static OfferItemObject offerItem(final DataFetchingEnvironment env,
3913            @GraphQLName("offerName") final String offerName,
3914            @GraphQLName("itemName") final String itemName,
3915            @GraphQLName("id") @GraphQLID final String id) {
3916        OfferItem offerItem;
3917
3918        try {
3919            var commandForm = OfferUtil.getHome().getGetOfferItemForm();
3920
3921            commandForm.setOfferName(offerName);
3922            commandForm.setItemName(itemName);
3923            commandForm.setUuid(id);
3924
3925            offerItem = CDI.current().select(GetOfferItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3926        } catch (NamingException ex) {
3927            throw new RuntimeException(ex);
3928        }
3929
3930        return offerItem == null ? null : new OfferItemObject(offerItem);
3931    }
3932
3933    @GraphQLField
3934    @GraphQLName("offerItems")
3935    @GraphQLNonNull
3936    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3937    static CountingPaginatedData<OfferItemObject> offerItems(final DataFetchingEnvironment env,
3938            @GraphQLName("offerName") @GraphQLNonNull final String offerName) {
3939        CountingPaginatedData<OfferItemObject> data;
3940
3941        try {
3942            var commandForm = OfferUtil.getHome().getGetOfferItemsForm();
3943            var command = CDI.current().select(GetOfferItemsCommand.class).get();
3944
3945            commandForm.setOfferName(offerName);
3946
3947            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3948            if(totalEntities == null) {
3949                data = Connections.emptyConnection();
3950            } else {
3951                try(var objectLimiter = new ObjectLimiter(env, OfferItemConstants.COMPONENT_VENDOR_NAME, OfferItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
3952                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
3953
3954                    var offerItemObjects = entities.stream()
3955                            .map(OfferItemObject::new)
3956                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
3957
3958                    data = new CountedObjects<>(objectLimiter, offerItemObjects);
3959                }
3960            }
3961        } catch (NamingException ex) {
3962            throw new RuntimeException(ex);
3963        }
3964
3965        return data;
3966    }
3967
3968    @GraphQLField
3969    @GraphQLName("offerItemPrice")
3970    static OfferItemPriceObject offerItemPrice(final DataFetchingEnvironment env,
3971            @GraphQLName("offerName") @GraphQLNonNull final String offerName,
3972            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
3973            @GraphQLName("inventoryConditionName") @GraphQLNonNull final String inventoryConditionName,
3974            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName,
3975            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
3976        OfferItemPrice offerItemPrice;
3977
3978        try {
3979            var commandForm = OfferUtil.getHome().getGetOfferItemPriceForm();
3980
3981            commandForm.setOfferName(offerName);
3982            commandForm.setItemName(itemName);
3983            commandForm.setInventoryConditionName(inventoryConditionName);
3984            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
3985            commandForm.setCurrencyIsoName(currencyIsoName);
3986
3987            offerItemPrice = CDI.current().select(GetOfferItemPriceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
3988        } catch (NamingException ex) {
3989            throw new RuntimeException(ex);
3990        }
3991
3992        return offerItemPrice == null ? null : new OfferItemPriceObject(offerItemPrice);
3993    }
3994
3995    @GraphQLField
3996    @GraphQLName("offerItemPrices")
3997    @GraphQLNonNull
3998    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
3999    static CountingPaginatedData<OfferItemPriceObject> offerItemPrices(final DataFetchingEnvironment env,
4000            @GraphQLName("offerName") @GraphQLNonNull final String offerName,
4001            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
4002        CountingPaginatedData<OfferItemPriceObject> data;
4003
4004        try {
4005            var commandForm = OfferUtil.getHome().getGetOfferItemPricesForm();
4006            var command = CDI.current().select(GetOfferItemPricesCommand.class).get();
4007
4008            commandForm.setOfferName(offerName);
4009            commandForm.setItemName(itemName);
4010
4011            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4012            if(totalEntities == null) {
4013                data = Connections.emptyConnection();
4014            } else {
4015                try(var objectLimiter = new ObjectLimiter(env, OfferItemPriceConstants.COMPONENT_VENDOR_NAME, OfferItemPriceConstants.ENTITY_TYPE_NAME, totalEntities)) {
4016                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4017
4018                    var offerItemPrices = entities.stream()
4019                            .map(OfferItemPriceObject::new)
4020                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4021
4022                    data = new CountedObjects<>(objectLimiter, offerItemPrices);
4023                }
4024            }
4025        } catch (NamingException ex) {
4026            throw new RuntimeException(ex);
4027        }
4028
4029        return data;
4030    }
4031
4032    @GraphQLField
4033    @GraphQLName("offerCustomerType")
4034    static OfferCustomerTypeObject offerCustomerType(final DataFetchingEnvironment env,
4035            @GraphQLName("offerName") @GraphQLNonNull final String offerName,
4036            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName) {
4037        OfferCustomerType offerCustomerType;
4038
4039        try {
4040            var commandForm = OfferUtil.getHome().getGetOfferCustomerTypeForm();
4041
4042            commandForm.setOfferName(offerName);
4043            commandForm.setCustomerTypeName(customerTypeName);
4044
4045            offerCustomerType = CDI.current().select(GetOfferCustomerTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4046        } catch (NamingException ex) {
4047            throw new RuntimeException(ex);
4048        }
4049
4050        return offerCustomerType == null ? null : new OfferCustomerTypeObject(offerCustomerType);
4051    }
4052
4053    @GraphQLField
4054    @GraphQLName("offerCustomerTypes")
4055    @GraphQLNonNull
4056    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4057    static CountingPaginatedData<OfferCustomerTypeObject> offerCustomerTypes(final DataFetchingEnvironment env,
4058            @GraphQLName("offerName") final String offerName,
4059            @GraphQLName("customerTypeName") final String customerTypeName) {
4060        CountingPaginatedData<OfferCustomerTypeObject> data;
4061
4062        try {
4063            var commandForm = OfferUtil.getHome().getGetOfferCustomerTypesForm();
4064            var command = CDI.current().select(GetOfferCustomerTypesCommand.class).get();
4065
4066            commandForm.setOfferName(offerName);
4067            commandForm.setCustomerTypeName(customerTypeName);
4068
4069            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4070            if(totalEntities == null) {
4071                data = Connections.emptyConnection();
4072            } else {
4073                try(var objectLimiter = new ObjectLimiter(env, OfferCustomerTypeConstants.COMPONENT_VENDOR_NAME, OfferCustomerTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4074                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4075
4076                    var offerCustomerTypeObjects = entities.stream()
4077                            .map(OfferCustomerTypeObject::new)
4078                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4079
4080                    data = new CountedObjects<>(objectLimiter, offerCustomerTypeObjects);
4081                }
4082            }
4083        } catch (NamingException ex) {
4084            throw new RuntimeException(ex);
4085        }
4086
4087        return data;
4088    }
4089
4090    @GraphQLField
4091    @GraphQLName("use")
4092    static UseObject use(final DataFetchingEnvironment env,
4093            @GraphQLName("useName") final String useName,
4094            @GraphQLName("id") @GraphQLID final String id) {
4095        Use use;
4096
4097        try {
4098            var commandForm = OfferUtil.getHome().getGetUseForm();
4099
4100            commandForm.setUseName(useName);
4101            commandForm.setUuid(id);
4102
4103            use = CDI.current().select(GetUseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4104        } catch (NamingException ex) {
4105            throw new RuntimeException(ex);
4106        }
4107
4108        return use == null ? null : new UseObject(use);
4109    }
4110
4111    @GraphQLField
4112    @GraphQLName("uses")
4113    @GraphQLNonNull
4114    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4115    static CountingPaginatedData<UseObject> uses(final DataFetchingEnvironment env) {
4116        CountingPaginatedData<UseObject> data;
4117
4118        try {
4119            var commandForm = OfferUtil.getHome().getGetUsesForm();
4120            var command = CDI.current().select(GetUsesCommand.class).get();
4121
4122            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4123            if(totalEntities == null) {
4124                data = Connections.emptyConnection();
4125            } else {
4126                try(var objectLimiter = new ObjectLimiter(env, UseConstants.COMPONENT_VENDOR_NAME, UseConstants.ENTITY_TYPE_NAME, totalEntities)) {
4127                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4128
4129                    var uses = entities.stream()
4130                            .map(UseObject::new)
4131                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4132
4133                    data = new CountedObjects<>(objectLimiter, uses);
4134                }
4135            }
4136        } catch (NamingException ex) {
4137            throw new RuntimeException(ex);
4138        }
4139
4140        return data;
4141    }
4142
4143    @GraphQLField
4144    @GraphQLName("offerNameElement")
4145    static OfferNameElementObject offerNameElement(final DataFetchingEnvironment env,
4146            @GraphQLName("offerNameElementName") final String offerNameElementName,
4147            @GraphQLName("id") @GraphQLID final String id) {
4148        OfferNameElement offerNameElement;
4149
4150        try {
4151            var commandForm = OfferUtil.getHome().getGetOfferNameElementForm();
4152
4153            commandForm.setOfferNameElementName(offerNameElementName);
4154            commandForm.setUuid(id);
4155
4156            offerNameElement = CDI.current().select(GetOfferNameElementCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4157        } catch (NamingException ex) {
4158            throw new RuntimeException(ex);
4159        }
4160
4161        return offerNameElement == null ? null : new OfferNameElementObject(offerNameElement);
4162    }
4163
4164    @GraphQLField
4165    @GraphQLName("offerNameElements")
4166    @GraphQLNonNull
4167    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4168    static CountingPaginatedData<OfferNameElementObject> offerNameElements(final DataFetchingEnvironment env) {
4169        CountingPaginatedData<OfferNameElementObject> data;
4170
4171        try {
4172            var commandForm = OfferUtil.getHome().getGetOfferNameElementsForm();
4173            var command = CDI.current().select(GetOfferNameElementsCommand.class).get();
4174
4175            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4176            if(totalEntities == null) {
4177                data = Connections.emptyConnection();
4178            } else {
4179                try(var objectLimiter = new ObjectLimiter(env, OfferNameElementConstants.COMPONENT_VENDOR_NAME, OfferNameElementConstants.ENTITY_TYPE_NAME, totalEntities)) {
4180                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4181
4182                    var offerNameElementObjects = entities.stream()
4183                            .map(OfferNameElementObject::new)
4184                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4185
4186                    data = new CountedObjects<>(objectLimiter, offerNameElementObjects);
4187                }
4188            }
4189        } catch (NamingException ex) {
4190            throw new RuntimeException(ex);
4191        }
4192
4193        return data;
4194    }
4195
4196    @GraphQLField
4197    @GraphQLName("useNameElement")
4198    static UseNameElementObject useNameElement(final DataFetchingEnvironment env,
4199            @GraphQLName("useNameElementName") final String useNameElementName,
4200            @GraphQLName("id") @GraphQLID final String id) {
4201        UseNameElement useNameElement;
4202
4203        try {
4204            var commandForm = OfferUtil.getHome().getGetUseNameElementForm();
4205
4206            commandForm.setUseNameElementName(useNameElementName);
4207            commandForm.setUuid(id);
4208
4209            useNameElement = CDI.current().select(GetUseNameElementCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4210        } catch (NamingException ex) {
4211            throw new RuntimeException(ex);
4212        }
4213
4214        return useNameElement == null ? null : new UseNameElementObject(useNameElement);
4215    }
4216
4217    @GraphQLField
4218    @GraphQLName("useNameElements")
4219    @GraphQLNonNull
4220    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4221    static CountingPaginatedData<UseNameElementObject> useNameElements(final DataFetchingEnvironment env) {
4222        CountingPaginatedData<UseNameElementObject> data;
4223
4224        try {
4225            var commandForm = OfferUtil.getHome().getGetUseNameElementsForm();
4226            var command = CDI.current().select(GetUseNameElementsCommand.class).get();
4227
4228            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4229            if(totalEntities == null) {
4230                data = Connections.emptyConnection();
4231            } else {
4232                try(var objectLimiter = new ObjectLimiter(env, UseNameElementConstants.COMPONENT_VENDOR_NAME, UseNameElementConstants.ENTITY_TYPE_NAME, totalEntities)) {
4233                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4234
4235                    var useNameElementObjects = entities.stream()
4236                            .map(UseNameElementObject::new)
4237                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4238
4239                    data = new CountedObjects<>(objectLimiter, useNameElementObjects);
4240                }
4241            }
4242        } catch (NamingException ex) {
4243            throw new RuntimeException(ex);
4244        }
4245
4246        return data;
4247    }
4248
4249    @GraphQLField
4250    @GraphQLName("useType")
4251    static UseTypeObject useType(final DataFetchingEnvironment env,
4252            @GraphQLName("useTypeName") final String useTypeName,
4253            @GraphQLName("id") @GraphQLID final String id) {
4254        UseType useType;
4255
4256        try {
4257            var commandForm = OfferUtil.getHome().getGetUseTypeForm();
4258
4259            commandForm.setUseTypeName(useTypeName);
4260            commandForm.setUuid(id);
4261
4262            useType = CDI.current().select(GetUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4263        } catch (NamingException ex) {
4264            throw new RuntimeException(ex);
4265        }
4266
4267        return useType == null ? null : new UseTypeObject(useType);
4268    }
4269
4270    @GraphQLField
4271    @GraphQLName("useTypes")
4272    @GraphQLNonNull
4273    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4274    static CountingPaginatedData<UseTypeObject> useTypes(final DataFetchingEnvironment env) {
4275        CountingPaginatedData<UseTypeObject> data;
4276
4277        try {
4278            var commandForm = OfferUtil.getHome().getGetUseTypesForm();
4279            var command = CDI.current().select(GetUseTypesCommand.class).get();
4280
4281            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4282            if(totalEntities == null) {
4283                data = Connections.emptyConnection();
4284            } else {
4285                try(var objectLimiter = new ObjectLimiter(env, UseTypeConstants.COMPONENT_VENDOR_NAME, UseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4286                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4287
4288                    var useTypes = entities.stream()
4289                            .map(UseTypeObject::new)
4290                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4291
4292                    data = new CountedObjects<>(objectLimiter, useTypes);
4293                }
4294            }
4295        } catch (NamingException ex) {
4296            throw new RuntimeException(ex);
4297        }
4298
4299        return data;
4300    }
4301
4302    @GraphQLField
4303    @GraphQLName("freeOnBoard")
4304    static FreeOnBoardObject freeOnBoard(final DataFetchingEnvironment env,
4305            @GraphQLName("freeOnBoardName") final String freeOnBoardName,
4306            @GraphQLName("id") @GraphQLID final String id) {
4307        FreeOnBoard freeOnBoard;
4308
4309        try {
4310            var commandForm = ShipmentUtil.getHome().getGetFreeOnBoardForm();
4311
4312            commandForm.setFreeOnBoardName(freeOnBoardName);
4313            commandForm.setUuid(id);
4314
4315            freeOnBoard = CDI.current().select(GetFreeOnBoardCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4316        } catch (NamingException ex) {
4317            throw new RuntimeException(ex);
4318        }
4319
4320        return freeOnBoard == null ? null : new FreeOnBoardObject(freeOnBoard);
4321    }
4322
4323    @GraphQLField
4324    @GraphQLName("freeOnBoards")
4325    @GraphQLNonNull
4326    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4327    static CountingPaginatedData<FreeOnBoardObject> freeOnBoards(final DataFetchingEnvironment env) {
4328        CountingPaginatedData<FreeOnBoardObject> data;
4329
4330        try {
4331            var commandForm = ShipmentUtil.getHome().getGetFreeOnBoardsForm();
4332            var command = CDI.current().select(GetFreeOnBoardsCommand.class).get();
4333
4334            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4335            if(totalEntities == null) {
4336                data = Connections.emptyConnection();
4337            } else {
4338                try(var objectLimiter = new ObjectLimiter(env, FreeOnBoardConstants.COMPONENT_VENDOR_NAME, FreeOnBoardConstants.ENTITY_TYPE_NAME, totalEntities)) {
4339                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4340
4341                    var freeOnBoards = entities.stream()
4342                            .map(FreeOnBoardObject::new)
4343                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4344
4345                    data = new CountedObjects<>(objectLimiter, freeOnBoards);
4346                }
4347            }
4348        } catch (NamingException ex) {
4349            throw new RuntimeException(ex);
4350        }
4351
4352        return data;
4353    }
4354
4355    @GraphQLField
4356    @GraphQLName("paymentProcessorTypeCodeType")
4357    static PaymentProcessorTypeCodeTypeObject paymentProcessorTypeCodeType(final DataFetchingEnvironment env,
4358            @GraphQLName("paymentProcessorTypeName") final String paymentProcessorTypeName,
4359            @GraphQLName("paymentProcessorTypeCodeTypeName") final String paymentProcessorTypeCodeTypeName,
4360            @GraphQLName("id") @GraphQLID final String id) {
4361        PaymentProcessorTypeCodeType paymentProcessorTypeCodeType;
4362
4363        try {
4364            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTypeCodeTypeForm();
4365
4366            commandForm.setPaymentProcessorTypeName(paymentProcessorTypeName);
4367            commandForm.setPaymentProcessorTypeCodeTypeName(paymentProcessorTypeCodeTypeName);
4368            commandForm.setUuid(id);
4369
4370            paymentProcessorTypeCodeType = CDI.current().select(GetPaymentProcessorTypeCodeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4371        } catch (NamingException ex) {
4372            throw new RuntimeException(ex);
4373        }
4374
4375        return paymentProcessorTypeCodeType == null ? null : new PaymentProcessorTypeCodeTypeObject(paymentProcessorTypeCodeType);
4376    }
4377
4378    @GraphQLField
4379    @GraphQLName("paymentProcessorTypeCode")
4380    static PaymentProcessorTypeCodeObject paymentProcessorTypeCode(final DataFetchingEnvironment env,
4381            @GraphQLName("paymentProcessorTypeName") final String paymentProcessorTypeName,
4382            @GraphQLName("paymentProcessorTypeCodeTypeName") final String paymentProcessorTypeCodeTypeName,
4383            @GraphQLName("paymentProcessorTypeCodeName") final String paymentProcessorTypeCodeName,
4384            @GraphQLName("id") @GraphQLID final String id) {
4385        PaymentProcessorTypeCode paymentProcessorTypeCode;
4386
4387        try {
4388            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTypeCodeForm();
4389
4390            commandForm.setPaymentProcessorTypeName(paymentProcessorTypeName);
4391            commandForm.setPaymentProcessorTypeCodeTypeName(paymentProcessorTypeCodeTypeName);
4392            commandForm.setPaymentProcessorTypeCodeName(paymentProcessorTypeCodeName);
4393            commandForm.setUuid(id);
4394
4395            paymentProcessorTypeCode = CDI.current().select(GetPaymentProcessorTypeCodeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4396        } catch (NamingException ex) {
4397            throw new RuntimeException(ex);
4398        }
4399
4400        return paymentProcessorTypeCode == null ? null : new PaymentProcessorTypeCodeObject(paymentProcessorTypeCode);
4401    }
4402
4403    @GraphQLField
4404    @GraphQLName("paymentProcessorTransaction")
4405    static PaymentProcessorTransactionObject paymentProcessorTransaction(final DataFetchingEnvironment env,
4406            @GraphQLName("paymentProcessorTransactionName") final String paymentProcessorTransactionName,
4407            @GraphQLName("id") @GraphQLID final String id) {
4408        PaymentProcessorTransaction paymentProcessorTransaction;
4409
4410        try {
4411            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTransactionForm();
4412
4413            commandForm.setPaymentProcessorTransactionName(paymentProcessorTransactionName);
4414            commandForm.setUuid(id);
4415
4416            paymentProcessorTransaction = CDI.current().select(GetPaymentProcessorTransactionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4417        } catch (NamingException ex) {
4418            throw new RuntimeException(ex);
4419        }
4420
4421        return paymentProcessorTransaction == null ? null : new PaymentProcessorTransactionObject(paymentProcessorTransaction);
4422    }
4423
4424    @GraphQLField
4425    @GraphQLName("paymentProcessorTransactions")
4426    @GraphQLNonNull
4427    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4428    static CountingPaginatedData<PaymentProcessorTransactionObject> paymentProcessorTransactions(final DataFetchingEnvironment env) {
4429        CountingPaginatedData<PaymentProcessorTransactionObject> data;
4430
4431        try {
4432            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTransactionsForm();
4433            var command = CDI.current().select(GetPaymentProcessorTransactionsCommand.class).get();
4434
4435            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4436            if(totalEntities == null) {
4437                data = Connections.emptyConnection();
4438            } else {
4439                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorTransactionConstants.COMPONENT_VENDOR_NAME, PaymentProcessorTransactionConstants.ENTITY_TYPE_NAME, totalEntities)) {
4440                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4441
4442                    var paymentProcessorTransactions = entities.stream()
4443                            .map(PaymentProcessorTransactionObject::new)
4444                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4445
4446                    data = new CountedObjects<>(objectLimiter, paymentProcessorTransactions);
4447                }
4448            }
4449        } catch (NamingException ex) {
4450            throw new RuntimeException(ex);
4451        }
4452
4453        return data;
4454    }
4455
4456    @GraphQLField
4457    @GraphQLName("paymentProcessor")
4458    static PaymentProcessorObject paymentProcessor(final DataFetchingEnvironment env,
4459            @GraphQLName("paymentProcessorName") final String paymentProcessorName,
4460            @GraphQLName("id") @GraphQLID final String id) {
4461        PaymentProcessor paymentProcessor;
4462
4463        try {
4464            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorForm();
4465
4466            commandForm.setPaymentProcessorName(paymentProcessorName);
4467            commandForm.setUuid(id);
4468
4469            paymentProcessor = CDI.current().select(GetPaymentProcessorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4470        } catch (NamingException ex) {
4471            throw new RuntimeException(ex);
4472        }
4473
4474        return paymentProcessor == null ? null : new PaymentProcessorObject(paymentProcessor);
4475    }
4476
4477    @GraphQLField
4478    @GraphQLName("paymentProcessors")
4479    @GraphQLNonNull
4480    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4481    static CountingPaginatedData<PaymentProcessorObject> paymentProcessors(final DataFetchingEnvironment env) {
4482        CountingPaginatedData<PaymentProcessorObject> data;
4483
4484        try {
4485            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorsForm();
4486            var command = CDI.current().select(GetPaymentProcessorsCommand.class).get();
4487
4488            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4489            if(totalEntities == null) {
4490                data = Connections.emptyConnection();
4491            } else {
4492                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorConstants.COMPONENT_VENDOR_NAME, PaymentProcessorConstants.ENTITY_TYPE_NAME, totalEntities)) {
4493                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4494
4495                    var paymentProcessors = entities.stream()
4496                            .map(PaymentProcessorObject::new)
4497                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4498
4499                    data = new CountedObjects<>(objectLimiter, paymentProcessors);
4500                }
4501            }
4502        } catch (NamingException ex) {
4503            throw new RuntimeException(ex);
4504        }
4505
4506        return data;
4507    }
4508
4509    @GraphQLField
4510    @GraphQLName("paymentProcessorType")
4511    static PaymentProcessorTypeObject paymentProcessorType(final DataFetchingEnvironment env,
4512            @GraphQLName("paymentProcessorTypeName") final String paymentProcessorTypeName,
4513            @GraphQLName("id") @GraphQLID final String id) {
4514        PaymentProcessorType paymentProcessorType;
4515
4516        try {
4517            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTypeForm();
4518
4519            commandForm.setPaymentProcessorTypeName(paymentProcessorTypeName);
4520            commandForm.setUuid(id);
4521
4522            paymentProcessorType = CDI.current().select(GetPaymentProcessorTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4523        } catch (NamingException ex) {
4524            throw new RuntimeException(ex);
4525        }
4526
4527        return paymentProcessorType == null ? null : new PaymentProcessorTypeObject(paymentProcessorType);
4528    }
4529
4530    @GraphQLField
4531    @GraphQLName("paymentProcessorTypes")
4532    @GraphQLNonNull
4533    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4534    static CountingPaginatedData<PaymentProcessorTypeObject> paymentProcessorTypes(final DataFetchingEnvironment env) {
4535        CountingPaginatedData<PaymentProcessorTypeObject> data;
4536
4537        try {
4538            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorTypesForm();
4539            var command = CDI.current().select(GetPaymentProcessorTypesCommand.class).get();
4540
4541            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4542            if(totalEntities == null) {
4543                data = Connections.emptyConnection();
4544            } else {
4545                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorTypeConstants.COMPONENT_VENDOR_NAME, PaymentProcessorTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4546                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4547
4548                    var paymentProcessorTypes = entities.stream()
4549                            .map(PaymentProcessorTypeObject::new)
4550                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4551
4552                    data = new CountedObjects<>(objectLimiter, paymentProcessorTypes);
4553                }
4554            }
4555        } catch (NamingException ex) {
4556            throw new RuntimeException(ex);
4557        }
4558
4559        return data;
4560    }
4561
4562    @GraphQLField
4563    @GraphQLName("paymentMethodType")
4564    static PaymentMethodTypeObject paymentMethodType(final DataFetchingEnvironment env,
4565            @GraphQLName("paymentMethodTypeName") final String paymentMethodTypeName,
4566            @GraphQLName("id") @GraphQLID final String id) {
4567        PaymentMethodType paymentMethodType;
4568
4569        try {
4570            var commandForm = PaymentUtil.getHome().getGetPaymentMethodTypeForm();
4571
4572            commandForm.setPaymentMethodTypeName(paymentMethodTypeName);
4573            commandForm.setUuid(id);
4574
4575            paymentMethodType = CDI.current().select(GetPaymentMethodTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4576        } catch (NamingException ex) {
4577            throw new RuntimeException(ex);
4578        }
4579
4580        return paymentMethodType == null ? null : new PaymentMethodTypeObject(paymentMethodType);
4581    }
4582
4583    @GraphQLField
4584    @GraphQLName("paymentMethodTypes")
4585    @GraphQLNonNull
4586    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4587    static CountingPaginatedData<PaymentMethodTypeObject> paymentMethodTypes(final DataFetchingEnvironment env) {
4588        CountingPaginatedData<PaymentMethodTypeObject> data;
4589
4590        try {
4591            var commandForm = PaymentUtil.getHome().getGetPaymentMethodTypesForm();
4592            var command = CDI.current().select(GetPaymentMethodTypesCommand.class).get();
4593
4594            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4595            if(totalEntities == null) {
4596                data = Connections.emptyConnection();
4597            } else {
4598                try(var objectLimiter = new ObjectLimiter(env, PaymentMethodTypeConstants.COMPONENT_VENDOR_NAME, PaymentMethodTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4599                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4600
4601                    var paymentMethodTypes = entities.stream()
4602                            .map(PaymentMethodTypeObject::new)
4603                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4604
4605                    data = new CountedObjects<>(objectLimiter, paymentMethodTypes);
4606                }
4607            }
4608        } catch (NamingException ex) {
4609            throw new RuntimeException(ex);
4610        }
4611
4612        return data;
4613    }
4614
4615    @GraphQLField
4616    @GraphQLName("paymentMethod")
4617    static PaymentMethodObject paymentMethod(final DataFetchingEnvironment env,
4618            @GraphQLName("paymentMethodName") final String paymentMethodName) {
4619        PaymentMethod paymentMethod;
4620
4621        try {
4622            var commandForm = PaymentUtil.getHome().getGetPaymentMethodForm();
4623
4624            commandForm.setPaymentMethodName(paymentMethodName);
4625
4626            paymentMethod = CDI.current().select(GetPaymentMethodCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4627        } catch (NamingException ex) {
4628            throw new RuntimeException(ex);
4629        }
4630
4631        return paymentMethod == null ? null : new PaymentMethodObject(paymentMethod);
4632    }
4633
4634    @GraphQLField
4635    @GraphQLName("paymentMethods")
4636    @GraphQLNonNull
4637    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4638    static CountingPaginatedData<PaymentMethodObject> paymentMethods(final DataFetchingEnvironment env) {
4639        CountingPaginatedData<PaymentMethodObject> data;
4640
4641        try {
4642            var commandForm = PaymentUtil.getHome().getGetPaymentMethodsForm();
4643            var command = CDI.current().select(GetPaymentMethodsCommand.class).get();
4644
4645            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4646            if(totalEntities == null) {
4647                data = Connections.emptyConnection();
4648            } else {
4649                try(var objectLimiter = new ObjectLimiter(env, PaymentMethodConstants.COMPONENT_VENDOR_NAME, PaymentMethodConstants.ENTITY_TYPE_NAME, totalEntities)) {
4650                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4651
4652                    var paymentMethods = entities.stream()
4653                            .map(PaymentMethodObject::new)
4654                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4655
4656                    data = new CountedObjects<>(objectLimiter, paymentMethods);
4657                }
4658            }
4659        } catch (NamingException ex) {
4660            throw new RuntimeException(ex);
4661        }
4662
4663        return data;
4664    }
4665
4666    @GraphQLField
4667    @GraphQLName("paymentProcessorResultCode")
4668    static PaymentProcessorResultCodeObject paymentProcessorResultCode(final DataFetchingEnvironment env,
4669            @GraphQLName("paymentProcessorResultCodeName") final String paymentProcessorResultCodeName,
4670            @GraphQLName("id") @GraphQLID final String id) {
4671        PaymentProcessorResultCode paymentProcessorResultCode;
4672
4673        try {
4674            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorResultCodeForm();
4675
4676            commandForm.setPaymentProcessorResultCodeName(paymentProcessorResultCodeName);
4677            commandForm.setUuid(id);
4678
4679            paymentProcessorResultCode = CDI.current().select(GetPaymentProcessorResultCodeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4680        } catch (NamingException ex) {
4681            throw new RuntimeException(ex);
4682        }
4683
4684        return paymentProcessorResultCode == null ? null : new PaymentProcessorResultCodeObject(paymentProcessorResultCode);
4685    }
4686
4687    @GraphQLField
4688    @GraphQLName("paymentProcessorResultCodes")
4689    @GraphQLNonNull
4690    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4691    static CountingPaginatedData<PaymentProcessorResultCodeObject> paymentProcessorResultCodes(final DataFetchingEnvironment env) {
4692        CountingPaginatedData<PaymentProcessorResultCodeObject> data;
4693
4694        try {
4695            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorResultCodesForm();
4696            var command = CDI.current().select(GetPaymentProcessorResultCodesCommand.class).get();
4697
4698            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4699            if(totalEntities == null) {
4700                data = Connections.emptyConnection();
4701            } else {
4702                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorResultCodeConstants.COMPONENT_VENDOR_NAME, PaymentProcessorResultCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4703                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4704                    var objects = entities.stream()
4705                            .map(PaymentProcessorResultCodeObject::new)
4706                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4707
4708                    data = new CountedObjects<>(objectLimiter, objects);
4709                }
4710            }
4711        } catch (NamingException ex) {
4712            throw new RuntimeException(ex);
4713        }
4714
4715        return data;
4716    }
4717
4718    @GraphQLField
4719    @GraphQLName("paymentProcessorActionType")
4720    static PaymentProcessorActionTypeObject paymentProcessorActionType(final DataFetchingEnvironment env,
4721            @GraphQLName("paymentProcessorActionTypeName") final String paymentProcessorActionTypeName,
4722            @GraphQLName("id") @GraphQLID final String id) {
4723        PaymentProcessorActionType paymentProcessorActionType;
4724
4725        try {
4726            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorActionTypeForm();
4727
4728            commandForm.setPaymentProcessorActionTypeName(paymentProcessorActionTypeName);
4729            commandForm.setUuid(id);
4730
4731            paymentProcessorActionType = CDI.current().select(GetPaymentProcessorActionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4732        } catch (NamingException ex) {
4733            throw new RuntimeException(ex);
4734        }
4735
4736        return paymentProcessorActionType == null ? null : new PaymentProcessorActionTypeObject(paymentProcessorActionType);
4737    }
4738
4739    @GraphQLField
4740    @GraphQLName("paymentProcessorActionTypes")
4741    @GraphQLNonNull
4742    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4743    static CountingPaginatedData<PaymentProcessorActionTypeObject> paymentProcessorActionTypes(final DataFetchingEnvironment env) {
4744        CountingPaginatedData<PaymentProcessorActionTypeObject> data;
4745
4746        try {
4747            var commandForm = PaymentUtil.getHome().getGetPaymentProcessorActionTypesForm();
4748            var command = CDI.current().select(GetPaymentProcessorActionTypesCommand.class).get();
4749
4750            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4751            if(totalEntities == null) {
4752                data = Connections.emptyConnection();
4753            } else {
4754                try(var objectLimiter = new ObjectLimiter(env, PaymentProcessorActionTypeConstants.COMPONENT_VENDOR_NAME, PaymentProcessorActionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4755                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4756                    var objects = entities.stream()
4757                            .map(PaymentProcessorActionTypeObject::new)
4758                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4759
4760                    data = new CountedObjects<>(objectLimiter, objects);
4761                }
4762            }
4763        } catch (NamingException ex) {
4764            throw new RuntimeException(ex);
4765        }
4766
4767        return data;
4768    }
4769
4770    @GraphQLField
4771    @GraphQLName("appearance")
4772    static AppearanceObject appearance(final DataFetchingEnvironment env,
4773            @GraphQLName("appearanceName") final String appearanceName,
4774            @GraphQLName("id") @GraphQLID final String id) {
4775        Appearance appearance;
4776
4777        try {
4778            var commandForm = CoreUtil.getHome().getGetAppearanceForm();
4779
4780            commandForm.setAppearanceName(appearanceName);
4781            commandForm.setUuid(id);
4782
4783            appearance = CDI.current().select(GetAppearanceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4784        } catch (NamingException ex) {
4785            throw new RuntimeException(ex);
4786        }
4787
4788        return appearance == null ? null : new AppearanceObject(appearance);
4789    }
4790
4791    @GraphQLField
4792    @GraphQLName("appearances")
4793    @GraphQLNonNull
4794    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4795    static CountingPaginatedData<AppearanceObject> appearances(final DataFetchingEnvironment env) {
4796        CountingPaginatedData<AppearanceObject> data;
4797
4798        try {
4799            var commandForm = CoreUtil.getHome().getGetAppearancesForm();
4800            var command = CDI.current().select(GetAppearancesCommand.class).get();
4801
4802            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4803            if(totalEntities == null) {
4804                data = Connections.emptyConnection();
4805            } else {
4806                try(var objectLimiter = new ObjectLimiter(env, AppearanceConstants.COMPONENT_VENDOR_NAME, AppearanceConstants.ENTITY_TYPE_NAME, totalEntities)) {
4807                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4808
4809                    var appearances = entities.stream()
4810                            .map(AppearanceObject::new)
4811                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4812
4813                    data = new CountedObjects<>(objectLimiter, appearances);
4814                }
4815            }
4816        } catch (NamingException ex) {
4817            throw new RuntimeException(ex);
4818        }
4819
4820        return data;
4821    }
4822
4823    @GraphQLField
4824    @GraphQLName("eventType")
4825    static EventTypeObject eventType(final DataFetchingEnvironment env,
4826            @GraphQLName("eventTypeName") final String eventTypeName,
4827            @GraphQLName("id") @GraphQLID final String id) {
4828        EventType eventType;
4829
4830        try {
4831            var commandForm = CoreUtil.getHome().getGetEventTypeForm();
4832
4833            commandForm.setEventTypeName(eventTypeName);
4834            commandForm.setUuid(id);
4835
4836            eventType = CDI.current().select(GetEventTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4837        } catch (NamingException ex) {
4838            throw new RuntimeException(ex);
4839        }
4840
4841        return eventType == null ? null : new EventTypeObject(eventType);
4842    }
4843
4844    @GraphQLField
4845    @GraphQLName("eventTypes")
4846    @GraphQLNonNull
4847    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4848    static CountingPaginatedData<EventTypeObject> eventTypes(final DataFetchingEnvironment env) {
4849        CountingPaginatedData<EventTypeObject> data;
4850
4851        try {
4852            var commandForm = CoreUtil.getHome().getGetEventTypesForm();
4853            var command = CDI.current().select(GetEventTypesCommand.class).get();
4854
4855            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4856            if(totalEntities == null) {
4857                data = Connections.emptyConnection();
4858            } else {
4859                try(var objectLimiter = new ObjectLimiter(env, EventTypeConstants.COMPONENT_VENDOR_NAME, EventTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4860                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4861
4862                    var eventTypes = entities.stream()
4863                            .map(EventTypeObject::new)
4864                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4865
4866                    data = new CountedObjects<>(objectLimiter, eventTypes);
4867                }
4868            }
4869        } catch (NamingException ex) {
4870            throw new RuntimeException(ex);
4871        }
4872
4873        return data;
4874    }
4875
4876    @GraphQLField
4877    @GraphQLName("entityAliasType")
4878    static EntityAliasTypeObject entityAliasType(final DataFetchingEnvironment env,
4879            @GraphQLName("componentVendorName") final String componentVendorName,
4880            @GraphQLName("entityTypeName") final String entityTypeName,
4881            @GraphQLName("entityAliasTypeName") final String entityAliasTypeName,
4882            @GraphQLName("id") @GraphQLID final String id) {
4883        EntityAliasType entityAliasType;
4884
4885        try {
4886            var commandForm = CoreUtil.getHome().getGetEntityAliasTypeForm();
4887
4888            commandForm.setComponentVendorName(componentVendorName);
4889            commandForm.setEntityTypeName(entityTypeName);
4890            commandForm.setEntityAliasTypeName(entityAliasTypeName);
4891            commandForm.setUuid(id);
4892
4893            entityAliasType = CDI.current().select(GetEntityAliasTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4894        } catch (NamingException ex) {
4895            throw new RuntimeException(ex);
4896        }
4897
4898        return entityAliasType == null ? null : new EntityAliasTypeObject(entityAliasType, null);
4899    }
4900
4901    @GraphQLField
4902    @GraphQLName("entityAliasTypes")
4903    @GraphQLNonNull
4904    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4905    static CountingPaginatedData<EntityAliasTypeObject> entityAliasTypes(final DataFetchingEnvironment env,
4906            @GraphQLName("componentVendorName") final String componentVendorName,
4907            @GraphQLName("entityTypeName") final String entityTypeName,
4908            @GraphQLName("id") @GraphQLID final String id) {
4909        CountingPaginatedData<EntityAliasTypeObject> data;
4910
4911        try {
4912            var commandForm = CoreUtil.getHome().getGetEntityAliasTypesForm();
4913            var command = CDI.current().select(GetEntityAliasTypesCommand.class).get();
4914
4915            commandForm.setComponentVendorName(componentVendorName);
4916            commandForm.setEntityTypeName(entityTypeName);
4917            commandForm.setUuid(id);
4918
4919            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4920            if(totalEntities == null) {
4921                data = Connections.emptyConnection();
4922            } else {
4923                try(var objectLimiter = new ObjectLimiter(env, EntityAliasTypeConstants.COMPONENT_VENDOR_NAME, EntityAliasTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
4924                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4925
4926                    var entityAliasTypes = entities.stream()
4927                            .map(entityAliasType -> new EntityAliasTypeObject(entityAliasType, null))
4928                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4929
4930                    data = new CountedObjects<>(objectLimiter, entityAliasTypes);
4931                }
4932            }
4933        } catch (NamingException ex) {
4934            throw new RuntimeException(ex);
4935        }
4936
4937        return data;
4938    }
4939
4940    @GraphQLField
4941    @GraphQLName("entityAlias")
4942    static EntityAliasObject entityAlias(final DataFetchingEnvironment env,
4943            @GraphQLName("componentVendorName") final String componentVendorName,
4944            @GraphQLName("entityTypeName") final String entityTypeName,
4945            @GraphQLName("entityAliasTypeName") final String entityAliasTypeName,
4946            @GraphQLName("id") @GraphQLID final String id,
4947            @GraphQLName("alias") @GraphQLNonNull final String alias) {
4948        EntityAlias entityAlias;
4949
4950        try {
4951            var commandForm = CoreUtil.getHome().getGetEntityAliasForm();
4952
4953            commandForm.setComponentVendorName(componentVendorName);
4954            commandForm.setEntityTypeName(entityTypeName);
4955            commandForm.setEntityAliasTypeName(entityAliasTypeName);
4956            commandForm.setUuid(id);
4957            commandForm.setAlias(alias);
4958
4959            entityAlias = CDI.current().select(GetEntityAliasCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
4960        } catch (NamingException ex) {
4961            throw new RuntimeException(ex);
4962        }
4963
4964        return entityAlias == null ? null : new EntityAliasObject(entityAlias);
4965    }
4966
4967    @GraphQLField
4968    @GraphQLName("entityAliases")
4969    @GraphQLNonNull
4970    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
4971    static CountingPaginatedData<EntityAliasObject> entityAliases(final DataFetchingEnvironment env,
4972            @GraphQLName("componentVendorName") final String componentVendorName,
4973            @GraphQLName("entityTypeName") final String entityTypeName,
4974            @GraphQLName("entityAliasTypeName") final String entityAliasTypeName,
4975            @GraphQLName("id") @GraphQLID final String id) {
4976        CountingPaginatedData<EntityAliasObject> data;
4977
4978        try {
4979            var commandForm = CoreUtil.getHome().getGetEntityAliasesForm();
4980            var command = CDI.current().select(GetEntityAliasesCommand.class).get();
4981
4982            commandForm.setComponentVendorName(componentVendorName);
4983            commandForm.setEntityTypeName(entityTypeName);
4984            commandForm.setEntityAliasTypeName(entityAliasTypeName);
4985            commandForm.setUuid(id);
4986
4987            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4988            if(totalEntities == null) {
4989                data = Connections.emptyConnection();
4990            } else {
4991                try(var objectLimiter = new ObjectLimiter(env, EntityAliasConstants.COMPONENT_VENDOR_NAME, EntityAliasConstants.ENTITY_TYPE_NAME, totalEntities)) {
4992                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
4993
4994                    var entityAliases = entities.stream()
4995                            .map(EntityAliasObject::new)
4996                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
4997
4998                    data = new CountedObjects<>(objectLimiter, entityAliases);
4999                }
5000            }
5001        } catch (NamingException ex) {
5002            throw new RuntimeException(ex);
5003        }
5004
5005        return data;
5006    }
5007
5008
5009    @GraphQLField
5010    @GraphQLName("entityAttributeGroup")
5011    static EntityAttributeGroupObject entityAttributeGroup(final DataFetchingEnvironment env,
5012            @GraphQLName("entityAttributeGroupName") final String entityAttributeGroupName,
5013            @GraphQLName("id") @GraphQLID final String id) {
5014        EntityAttributeGroup entityAttributeGroup;
5015
5016        try {
5017            var commandForm = CoreUtil.getHome().getGetEntityAttributeGroupForm();
5018
5019            commandForm.setEntityAttributeGroupName(entityAttributeGroupName);
5020            commandForm.setUuid(id);
5021
5022            entityAttributeGroup = CDI.current().select(GetEntityAttributeGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5023        } catch (NamingException ex) {
5024            throw new RuntimeException(ex);
5025        }
5026
5027        return entityAttributeGroup == null ? null : new EntityAttributeGroupObject(entityAttributeGroup, null);
5028    }
5029
5030    @GraphQLField
5031    @GraphQLName("entityAttributeGroups")
5032    @GraphQLNonNull
5033    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5034    static CountingPaginatedData<EntityAttributeGroupObject> entityAttributeGroups(final DataFetchingEnvironment env) {
5035        CountingPaginatedData<EntityAttributeGroupObject> data;
5036
5037        try {
5038            var commandForm = CoreUtil.getHome().getGetEntityAttributeGroupsForm();
5039            var command = CDI.current().select(GetEntityAttributeGroupsCommand.class).get();
5040
5041            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5042            if(totalEntities == null) {
5043                data = Connections.emptyConnection();
5044            } else {
5045                try(var objectLimiter = new ObjectLimiter(env, EntityAttributeGroupConstants.COMPONENT_VENDOR_NAME, EntityAttributeGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
5046                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5047
5048                    var entityAttributeGroups = entities.stream()
5049                            .map(entityAttributeGroup -> new EntityAttributeGroupObject(entityAttributeGroup, null))
5050                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5051
5052                    data = new CountedObjects<>(objectLimiter, entityAttributeGroups);
5053                }
5054            }
5055        } catch (NamingException ex) {
5056            throw new RuntimeException(ex);
5057        }
5058
5059        return data;
5060    }
5061
5062    @GraphQLField
5063    @GraphQLName("entityAttribute")
5064    static EntityAttributeObject entityAttribute(final DataFetchingEnvironment env,
5065            @GraphQLName("componentVendorName") final String componentVendorName,
5066            @GraphQLName("entityTypeName") final String entityTypeName,
5067            @GraphQLName("entityAttributeName") final String entityAttributeName,
5068            @GraphQLName("id") @GraphQLID final String id) {
5069        EntityAttribute entityAttribute;
5070
5071        try {
5072            var commandForm = CoreUtil.getHome().getGetEntityAttributeForm();
5073
5074            commandForm.setComponentVendorName(componentVendorName);
5075            commandForm.setEntityTypeName(entityTypeName);
5076            commandForm.setEntityAttributeName(entityAttributeName);
5077            commandForm.setUuid(id);
5078
5079            entityAttribute = CDI.current().select(GetEntityAttributeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5080        } catch (NamingException ex) {
5081            throw new RuntimeException(ex);
5082        }
5083
5084        return entityAttribute == null ? null : new EntityAttributeObject(entityAttribute, null);
5085    }
5086
5087    @GraphQLField
5088    @GraphQLName("entityAttributes")
5089    @GraphQLNonNull
5090    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5091    static CountingPaginatedData<EntityAttributeObject> entityAttributes(final DataFetchingEnvironment env,
5092            @GraphQLName("componentVendorName") final String componentVendorName,
5093            @GraphQLName("entityTypeName") final String entityTypeName,
5094            @GraphQLName("entityAttributeTypeNames") final String entityAttributeTypeNames,
5095            @GraphQLName("id") @GraphQLID final String id) {
5096        CountingPaginatedData<EntityAttributeObject> data;
5097
5098        try {
5099            var commandForm = CoreUtil.getHome().getGetEntityAttributesForm();
5100            var command = CDI.current().select(GetEntityAttributesCommand.class).get();
5101
5102            commandForm.setComponentVendorName(componentVendorName);
5103            commandForm.setEntityTypeName(entityTypeName);
5104            commandForm.setEntityAttributeTypeNames(entityAttributeTypeNames);
5105            commandForm.setUuid(id);
5106
5107            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5108            if(totalEntities == null) {
5109                data = Connections.emptyConnection();
5110            } else {
5111                try(var objectLimiter = new ObjectLimiter(env, EntityAttributeConstants.COMPONENT_VENDOR_NAME, EntityAttributeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5112                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5113
5114                    var entityAttributes = entities.stream()
5115                            .map(entityAttribute -> new EntityAttributeObject(entityAttribute, null))
5116                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5117
5118                    data = new CountedObjects<>(objectLimiter, entityAttributes);
5119                }
5120            }
5121        } catch (NamingException ex) {
5122            throw new RuntimeException(ex);
5123        }
5124
5125        return data;
5126    }
5127
5128    @GraphQLField
5129    @GraphQLName("entityAttributeEntityAttributeGroup")
5130    static EntityAttributeEntityAttributeGroupObject entityAttributeEntityAttributeGroup(final DataFetchingEnvironment env,
5131            @GraphQLName("componentVendorName") @GraphQLNonNull final String componentVendorName,
5132            @GraphQLName("entityTypeName") @GraphQLNonNull final String entityTypeName,
5133            @GraphQLName("entityAttributeName") @GraphQLNonNull final String entityAttributeName,
5134            @GraphQLName("entityAttributeGroupName") @GraphQLNonNull final String entityAttributeGroupName) {
5135        EntityAttributeEntityAttributeGroup entityAttributeEntityAttributeGroup;
5136
5137        try {
5138            var commandForm = CoreUtil.getHome().getGetEntityAttributeEntityAttributeGroupForm();
5139
5140            commandForm.setComponentVendorName(componentVendorName);
5141            commandForm.setEntityTypeName(entityTypeName);
5142            commandForm.setEntityAttributeName(entityAttributeName);
5143            commandForm.setEntityAttributeGroupName(entityAttributeGroupName);
5144
5145            entityAttributeEntityAttributeGroup = CDI.current().select(GetEntityAttributeEntityAttributeGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5146        } catch (NamingException ex) {
5147            throw new RuntimeException(ex);
5148        }
5149
5150        return entityAttributeEntityAttributeGroup == null ? null : new EntityAttributeEntityAttributeGroupObject(entityAttributeEntityAttributeGroup);
5151    }
5152
5153    @GraphQLField
5154    @GraphQLName("entityAttributeEntityAttributeGroups")
5155    @GraphQLNonNull
5156    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5157    static CountingPaginatedData<EntityAttributeEntityAttributeGroupObject> entityAttributeEntityAttributeGroups(final DataFetchingEnvironment env,
5158            @GraphQLName("componentVendorName") final String componentVendorName,
5159            @GraphQLName("entityTypeName") final String entityTypeName,
5160            @GraphQLName("entityAttributeName") final String entityAttributeName,
5161            @GraphQLName("entityAttributeGroupName") final String entityAttributeGroupName) {
5162        CountingPaginatedData<EntityAttributeEntityAttributeGroupObject> data;
5163
5164        try {
5165            var commandForm = CoreUtil.getHome().getGetEntityAttributeEntityAttributeGroupsForm();
5166            var command = CDI.current().select(GetEntityAttributeEntityAttributeGroupsCommand.class).get();
5167
5168            commandForm.setComponentVendorName(componentVendorName);
5169            commandForm.setEntityTypeName(entityTypeName);
5170            commandForm.setEntityAttributeName(entityAttributeName);
5171            commandForm.setEntityAttributeGroupName(entityAttributeGroupName);
5172
5173            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5174            if(totalEntities == null) {
5175                data = Connections.emptyConnection();
5176            } else {
5177                try(var objectLimiter = new ObjectLimiter(env, EntityAttributeEntityAttributeGroupConstants.COMPONENT_VENDOR_NAME, EntityAttributeEntityAttributeGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
5178                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5179
5180                    var entityAttributeEntityAttributeGroups = entities.stream()
5181                            .map(EntityAttributeEntityAttributeGroupObject::new)
5182                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5183
5184                    data = new CountedObjects<>(objectLimiter, entityAttributeEntityAttributeGroups);
5185                }
5186            }
5187        } catch (NamingException ex) {
5188            throw new RuntimeException(ex);
5189        }
5190
5191        return data;
5192    }
5193
5194    @GraphQLField
5195    @GraphQLName("entityInstance")
5196    static EntityInstanceObject entityInstance(final DataFetchingEnvironment env,
5197            @GraphQLName("id") @GraphQLID final String id,
5198            @GraphQLName("entityRef") final String entityRef) {
5199        EntityInstance entityInstance;
5200
5201        try {
5202            var commandForm = CoreUtil.getHome().getGetEntityInstanceForm();
5203
5204            commandForm.setUuid(id);
5205            commandForm.setEntityRef(entityRef);
5206
5207            entityInstance = CDI.current().select(GetEntityInstanceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5208        } catch (NamingException ex) {
5209            throw new RuntimeException(ex);
5210        }
5211
5212        return entityInstance == null ? null : new EntityInstanceObject(entityInstance);
5213    }
5214
5215    @GraphQLField
5216    @GraphQLName("entityInstances")
5217    @GraphQLNonNull
5218    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5219    static CountingPaginatedData<EntityInstanceObject> entityInstances(final DataFetchingEnvironment env,
5220            @GraphQLName("componentVendorName") @GraphQLNonNull final String componentVendorName,
5221            @GraphQLName("entityTypeName") @GraphQLNonNull final String entityTypeName) {
5222        CountingPaginatedData<EntityInstanceObject> data;
5223
5224        try {
5225            var commandForm = CoreUtil.getHome().getGetEntityInstancesForm();
5226            var command = CDI.current().select(GetEntityInstancesCommand.class).get();
5227
5228            commandForm.setComponentVendorName(componentVendorName);
5229            commandForm.setEntityTypeName(entityTypeName);
5230
5231            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5232            if(totalEntities == null) {
5233                data = Connections.emptyConnection();
5234            } else {
5235                try(var objectLimiter = new ObjectLimiter(env, EntityInstanceConstants.COMPONENT_VENDOR_NAME, EntityInstanceConstants.ENTITY_TYPE_NAME, totalEntities)) {
5236                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5237
5238                    var entityInstances = entities.stream()
5239                            .map(EntityInstanceObject::new)
5240                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5241
5242                    data = new CountedObjects<>(objectLimiter, entityInstances);
5243                }
5244            }
5245        } catch (NamingException ex) {
5246            throw new RuntimeException(ex);
5247        }
5248
5249        return data;
5250    }
5251
5252    @GraphQLField
5253    @GraphQLName("entityType")
5254    static EntityTypeObject entityType(final DataFetchingEnvironment env,
5255            @GraphQLName("componentVendorName") final String componentVendorName,
5256            @GraphQLName("entityTypeName") final String entityTypeName,
5257            @GraphQLName("id") @GraphQLID final String id) {
5258        EntityType entityType;
5259
5260        try {
5261            var commandForm = CoreUtil.getHome().getGetEntityTypeForm();
5262
5263            commandForm.setComponentVendorName(componentVendorName);
5264            commandForm.setEntityTypeName(entityTypeName);
5265            commandForm.setUuid(id);
5266
5267            entityType = CDI.current().select(GetEntityTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5268        } catch (NamingException ex) {
5269            throw new RuntimeException(ex);
5270        }
5271
5272        return entityType == null ? null : new EntityTypeObject(entityType);
5273    }
5274
5275    @GraphQLField
5276    @GraphQLName("entityTypes")
5277    @GraphQLNonNull
5278    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5279    static CountingPaginatedData<EntityTypeObject> entityTypes(final DataFetchingEnvironment env,
5280            @GraphQLName("componentVendorName") final String componentVendorName) {
5281        CountingPaginatedData<EntityTypeObject> data;
5282
5283        try {
5284            var commandForm = CoreUtil.getHome().getGetEntityTypesForm();
5285            var command = CDI.current().select(GetEntityTypesCommand.class).get();
5286
5287            commandForm.setComponentVendorName(componentVendorName);
5288
5289            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5290            if(totalEntities == null) {
5291                data = Connections.emptyConnection();
5292            } else {
5293                try(var objectLimiter = new ObjectLimiter(env, EntityTypeConstants.COMPONENT_VENDOR_NAME, EntityTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5294                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5295
5296                    var entityTypes = entities.stream()
5297                            .map(EntityTypeObject::new)
5298                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5299
5300                    data = new CountedObjects<>(objectLimiter, entityTypes);
5301                }
5302            }
5303        } catch (NamingException ex) {
5304            throw new RuntimeException(ex);
5305        }
5306
5307        return data;
5308    }
5309
5310    @GraphQLField
5311    @GraphQLName("componentVendor")
5312    static ComponentVendorObject componentVendor(final DataFetchingEnvironment env,
5313            @GraphQLName("componentVendorName") final String componentVendorName,
5314            @GraphQLName("id") @GraphQLID final String id) {
5315        ComponentVendor componentVendor;
5316
5317        try {
5318            var commandForm = CoreUtil.getHome().getGetComponentVendorForm();
5319
5320            commandForm.setComponentVendorName(componentVendorName);
5321            commandForm.setUuid(id);
5322
5323            componentVendor = CDI.current().select(GetComponentVendorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5324        } catch (NamingException ex) {
5325            throw new RuntimeException(ex);
5326        }
5327
5328        return componentVendor == null ? null : new ComponentVendorObject(componentVendor);
5329    }
5330
5331    @GraphQLField
5332    @GraphQLName("componentVendors")
5333    @GraphQLNonNull
5334    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5335    static CountingPaginatedData<ComponentVendorObject> componentVendors(final DataFetchingEnvironment env) {
5336        CountingPaginatedData<ComponentVendorObject> data;
5337
5338        try {
5339            var commandForm = CoreUtil.getHome().getGetComponentVendorsForm();
5340            var command = CDI.current().select(GetComponentVendorsCommand.class).get();
5341
5342            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5343            if(totalEntities == null) {
5344                data = Connections.emptyConnection();
5345            } else {
5346                try(var objectLimiter = new ObjectLimiter(env, ComponentVendorConstants.COMPONENT_VENDOR_NAME, ComponentVendorConstants.ENTITY_TYPE_NAME, totalEntities)) {
5347                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5348
5349                    var componentVendors = entities.stream()
5350                            .map(ComponentVendorObject::new)
5351                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5352
5353                    data = new CountedObjects<>(objectLimiter, componentVendors);
5354                }
5355            }
5356        } catch (NamingException ex) {
5357            throw new RuntimeException(ex);
5358        }
5359
5360        return data;
5361    }
5362
5363    @GraphQLField
5364    @GraphQLName("inventoryCondition")
5365    static InventoryConditionObject inventoryCondition(final DataFetchingEnvironment env,
5366            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
5367            @GraphQLName("id") @GraphQLID final String id) {
5368        InventoryCondition inventoryCondition;
5369
5370        try {
5371            var commandForm = InventoryUtil.getHome().getGetInventoryConditionForm();
5372
5373            commandForm.setInventoryConditionName(inventoryConditionName);
5374            commandForm.setUuid(id);
5375
5376            inventoryCondition = CDI.current().select(GetInventoryConditionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5377        } catch (NamingException ex) {
5378            throw new RuntimeException(ex);
5379        }
5380
5381        return inventoryCondition == null ? null : new InventoryConditionObject(inventoryCondition);
5382    }
5383
5384    @GraphQLField
5385    @GraphQLName("inventoryConditions")
5386    @GraphQLNonNull
5387    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5388    static CountingPaginatedData<InventoryConditionObject> inventoryConditions(final DataFetchingEnvironment env) {
5389        CountingPaginatedData<InventoryConditionObject> data;
5390
5391        try {
5392            var commandForm = InventoryUtil.getHome().getGetInventoryConditionsForm();
5393            var command = CDI.current().select(GetInventoryConditionsCommand.class).get();
5394
5395            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5396            if(totalEntities == null) {
5397                data = Connections.emptyConnection();
5398            } else {
5399                try(var objectLimiter = new ObjectLimiter(env, InventoryConditionConstants.COMPONENT_VENDOR_NAME, InventoryConditionConstants.ENTITY_TYPE_NAME, totalEntities)) {
5400                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5401
5402                    var inventoryConditions = entities.stream()
5403                            .map(InventoryConditionObject::new)
5404                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5405
5406                    data = new CountedObjects<>(objectLimiter, inventoryConditions);
5407                }
5408            }
5409        } catch (NamingException ex) {
5410            throw new RuntimeException(ex);
5411        }
5412
5413        return data;
5414    }
5415
5416    @GraphQLField
5417    @GraphQLName("allocationPriority")
5418    static AllocationPriorityObject allocationPriority(final DataFetchingEnvironment env,
5419            @GraphQLName("allocationPriorityName") final String allocationPriorityName,
5420            @GraphQLName("id") @GraphQLID final String id) {
5421        AllocationPriority allocationPriority;
5422
5423        try {
5424            var commandForm = InventoryUtil.getHome().getGetAllocationPriorityForm();
5425
5426            commandForm.setAllocationPriorityName(allocationPriorityName);
5427            commandForm.setUuid(id);
5428
5429            allocationPriority = CDI.current().select(GetAllocationPriorityCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5430        } catch (NamingException ex) {
5431            throw new RuntimeException(ex);
5432        }
5433
5434        return allocationPriority == null ? null : new AllocationPriorityObject(allocationPriority);
5435    }
5436
5437    @GraphQLField
5438    @GraphQLName("allocationPriorities")
5439    @GraphQLNonNull
5440    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5441    static CountingPaginatedData<AllocationPriorityObject> allocationPriorities(final DataFetchingEnvironment env) {
5442        CountingPaginatedData<AllocationPriorityObject> data;
5443
5444        try {
5445            var commandForm = InventoryUtil.getHome().getGetAllocationPrioritiesForm();
5446            var command = CDI.current().select(GetAllocationPrioritiesCommand.class).get();
5447
5448            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5449            if(totalEntities == null) {
5450                data = Connections.emptyConnection();
5451            } else {
5452                try(var objectLimiter = new ObjectLimiter(env, AllocationPriorityConstants.COMPONENT_VENDOR_NAME, AllocationPriorityConstants.ENTITY_TYPE_NAME, totalEntities)) {
5453                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5454
5455                    var allocationPriorities = entities.stream()
5456                            .map(AllocationPriorityObject::new)
5457                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5458
5459                    data = new CountedObjects<>(objectLimiter, allocationPriorities);
5460                }
5461            }
5462        } catch (NamingException ex) {
5463            throw new RuntimeException(ex);
5464        }
5465
5466        return data;
5467    }
5468
5469    @GraphQLField
5470    @GraphQLName("inventoryTransactionType")
5471    static InventoryTransactionTypeObject inventoryTransactionType(final DataFetchingEnvironment env,
5472            @GraphQLName("inventoryTransactionTypeName") final String inventoryTransactionTypeName,
5473            @GraphQLName("id") @GraphQLID final String id) {
5474        InventoryTransactionType inventoryTransactionType;
5475
5476        try {
5477            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionTypeForm();
5478
5479            commandForm.setInventoryTransactionTypeName(inventoryTransactionTypeName);
5480            commandForm.setUuid(id);
5481
5482            inventoryTransactionType = CDI.current().select(GetInventoryTransactionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5483        } catch (NamingException ex) {
5484            throw new RuntimeException(ex);
5485        }
5486
5487        return inventoryTransactionType == null ? null : new InventoryTransactionTypeObject(inventoryTransactionType);
5488    }
5489
5490    @GraphQLField
5491    @GraphQLName("inventoryAdjustmentType")
5492    static InventoryAdjustmentTypeObject inventoryAdjustmentType(final DataFetchingEnvironment env,
5493            @GraphQLName("inventoryAdjustmentTypeName") final String inventoryAdjustmentTypeName,
5494            @GraphQLName("id") @GraphQLID final String id) {
5495        InventoryAdjustmentType inventoryAdjustmentType;
5496
5497        try {
5498            var commandForm = InventoryUtil.getHome().getGetInventoryAdjustmentTypeForm();
5499
5500            commandForm.setInventoryAdjustmentTypeName(inventoryAdjustmentTypeName);
5501            commandForm.setUuid(id);
5502
5503            inventoryAdjustmentType = CDI.current().select(GetInventoryAdjustmentTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5504        } catch (NamingException ex) {
5505            throw new RuntimeException(ex);
5506        }
5507
5508        return inventoryAdjustmentType == null ? null : new InventoryAdjustmentTypeObject(inventoryAdjustmentType);
5509    }
5510
5511    @GraphQLField
5512    @GraphQLName("inventoryAdjustmentTypes")
5513    @GraphQLNonNull
5514    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5515    static CountingPaginatedData<InventoryAdjustmentTypeObject> inventoryAdjustmentTypes(final DataFetchingEnvironment env) {
5516        CountingPaginatedData<InventoryAdjustmentTypeObject> data;
5517
5518        try {
5519            var commandForm = InventoryUtil.getHome().getGetInventoryAdjustmentTypesForm();
5520            var command = CDI.current().select(GetInventoryAdjustmentTypesCommand.class).get();
5521
5522            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5523            if(totalEntities == null) {
5524                data = Connections.emptyConnection();
5525            } else {
5526                try(var objectLimiter = new ObjectLimiter(env, InventoryAdjustmentTypeConstants.COMPONENT_VENDOR_NAME, InventoryAdjustmentTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5527                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5528
5529                    var inventoryAdjustmentTypes = entities.stream()
5530                            .map(InventoryAdjustmentTypeObject::new)
5531                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5532
5533                    data = new CountedObjects<>(objectLimiter, inventoryAdjustmentTypes);
5534                }
5535            }
5536        } catch (NamingException ex) {
5537            throw new RuntimeException(ex);
5538        }
5539
5540        return data;
5541    }
5542
5543    @GraphQLField
5544    @GraphQLName("inventoryTransactionTypes")
5545    @GraphQLNonNull
5546    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5547    static CountingPaginatedData<InventoryTransactionTypeObject> inventoryTransactionTypes(final DataFetchingEnvironment env) {
5548        CountingPaginatedData<InventoryTransactionTypeObject> data;
5549
5550        try {
5551            var commandForm = InventoryUtil.getHome().getGetInventoryTransactionTypesForm();
5552            var command = CDI.current().select(GetInventoryTransactionTypesCommand.class).get();
5553
5554            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5555            if(totalEntities == null) {
5556                data = Connections.emptyConnection();
5557            } else {
5558                try(var objectLimiter = new ObjectLimiter(env, InventoryTransactionTypeConstants.COMPONENT_VENDOR_NAME, InventoryTransactionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5559                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5560
5561                    var inventoryTransactionTypes = entities.stream()
5562                            .map(InventoryTransactionTypeObject::new)
5563                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5564
5565                    data = new CountedObjects<>(objectLimiter, inventoryTransactionTypes);
5566                }
5567            }
5568        } catch (NamingException ex) {
5569            throw new RuntimeException(ex);
5570        }
5571
5572        return data;
5573    }
5574
5575    @GraphQLField
5576    @GraphQLName("lot")
5577    static LotObject lot(final DataFetchingEnvironment env,
5578            @GraphQLName("itemName") final String itemName,
5579            @GraphQLName("lotIdentifier") final String lotIdentifier,
5580            @GraphQLName("id") @GraphQLID final String id) {
5581        Lot lot;
5582
5583        try {
5584            var commandForm = InventoryUtil.getHome().getGetLotForm();
5585
5586            commandForm.setItemName(itemName);
5587            commandForm.setLotIdentifier(lotIdentifier);
5588            commandForm.setUuid(id);
5589
5590            lot = CDI.current().select(GetLotCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5591        } catch (NamingException ex) {
5592            throw new RuntimeException(ex);
5593        }
5594
5595        return lot == null ? null : new LotObject(lot);
5596    }
5597
5598    @GraphQLField
5599    @GraphQLName("lots")
5600    @GraphQLNonNull
5601    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5602    static CountingPaginatedData<LotObject> lots(final DataFetchingEnvironment env,
5603            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
5604        CountingPaginatedData<LotObject> data;
5605
5606        try {
5607            var commandForm = InventoryUtil.getHome().getGetLotsForm();
5608            var command = CDI.current().select(GetLotsCommand.class).get();
5609
5610            commandForm.setItemName(itemName);
5611
5612            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5613            if(totalEntities == null) {
5614                data = Connections.emptyConnection();
5615            } else {
5616                try(var objectLimiter = new ObjectLimiter(env, LotConstants.COMPONENT_VENDOR_NAME, LotConstants.ENTITY_TYPE_NAME, totalEntities)) {
5617                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5618
5619                    var lots = entities.stream()
5620                            .map(LotObject::new)
5621                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5622
5623                    data = new CountedObjects<>(objectLimiter, lots);
5624                }
5625            }
5626        } catch (NamingException ex) {
5627            throw new RuntimeException(ex);
5628        }
5629
5630        return data;
5631    }
5632
5633    @GraphQLField
5634    @GraphQLName("contentPageLayout")
5635    static ContentPageLayoutObject contentPageLayout(final DataFetchingEnvironment env,
5636            @GraphQLName("contentPageLayoutName") final String contentPageLayoutName,
5637            @GraphQLName("id") @GraphQLID final String id) {
5638        ContentPageLayout contentPageLayout;
5639
5640        try {
5641            var commandForm = ContentUtil.getHome().getGetContentPageLayoutForm();
5642
5643            commandForm.setContentPageLayoutName(contentPageLayoutName);
5644            commandForm.setUuid(id);
5645
5646            contentPageLayout = CDI.current().select(GetContentPageLayoutCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5647        } catch (NamingException ex) {
5648            throw new RuntimeException(ex);
5649        }
5650
5651        return contentPageLayout == null ? null : new ContentPageLayoutObject(contentPageLayout);
5652    }
5653
5654    @GraphQLField
5655    @GraphQLName("contentPageLayouts")
5656    @GraphQLNonNull
5657    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5658    static CountingPaginatedData<ContentPageLayoutObject> contentPageLayouts(final DataFetchingEnvironment env) {
5659        CountingPaginatedData<ContentPageLayoutObject> data;
5660
5661        try {
5662            var commandForm = ContentUtil.getHome().getGetContentPageLayoutsForm();
5663            var command = CDI.current().select(GetContentPageLayoutsCommand.class).get();
5664
5665            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5666            if(totalEntities == null) {
5667                data = Connections.emptyConnection();
5668            } else {
5669                try(var objectLimiter = new ObjectLimiter(env, ContentPageLayoutConstants.COMPONENT_VENDOR_NAME, ContentPageLayoutConstants.ENTITY_TYPE_NAME, totalEntities)) {
5670                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5671
5672                    var contentPageLayouts = entities.stream()
5673                            .map(ContentPageLayoutObject::new)
5674                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5675
5676                    data = new CountedObjects<>(objectLimiter, contentPageLayouts);
5677                }
5678            }
5679        } catch (NamingException ex) {
5680            throw new RuntimeException(ex);
5681        }
5682
5683        return data;
5684    }
5685
5686    @GraphQLField
5687    @GraphQLName("contentPageLayoutArea")
5688    static ContentPageLayoutAreaObject contentPageLayoutArea(final DataFetchingEnvironment env,
5689            @GraphQLName("contentCollectionName") @GraphQLNonNull final String contentCollectionName,
5690            @GraphQLName("contentSectionName") @GraphQLNonNull final String contentSectionName,
5691            @GraphQLName("contentPageName") @GraphQLNonNull final String contentPageName,
5692            @GraphQLName("sortOrder") @GraphQLNonNull final String sortOrder) {
5693        ContentPageLayoutArea contentPageLayoutArea;
5694
5695        try {
5696            var commandForm = ContentUtil.getHome().getGetContentPageLayoutAreaForm();
5697
5698            commandForm.setContentCollectionName(contentCollectionName);
5699            commandForm.setContentSectionName(contentSectionName);
5700            commandForm.setContentPageName(contentPageName);
5701            commandForm.setSortOrder(sortOrder);
5702
5703            contentPageLayoutArea = CDI.current().select(GetContentPageLayoutAreaCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5704        } catch (NamingException ex) {
5705            throw new RuntimeException(ex);
5706        }
5707
5708        return contentPageLayoutArea == null ? null : new ContentPageLayoutAreaObject(contentPageLayoutArea);
5709    }
5710
5711    @GraphQLField
5712    @GraphQLName("contentPageLayoutAreas")
5713    @GraphQLNonNull
5714    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5715    static CountingPaginatedData<ContentPageLayoutAreaObject> contentPageLayoutAreas(final DataFetchingEnvironment env,
5716            @GraphQLName("contentCollectionName") @GraphQLNonNull final String contentCollectionName,
5717            @GraphQLName("contentSectionName") @GraphQLNonNull final String contentSectionName,
5718            @GraphQLName("contentPageName") @GraphQLNonNull final String contentPageName) {
5719        CountingPaginatedData<ContentPageLayoutAreaObject> data;
5720
5721        try {
5722            var commandForm = ContentUtil.getHome().getGetContentPageLayoutAreasForm();
5723            var command = CDI.current().select(GetContentPageLayoutAreasCommand.class).get();
5724
5725
5726            commandForm.setContentCollectionName(contentCollectionName);
5727            commandForm.setContentSectionName(contentSectionName);
5728            commandForm.setContentPageName(contentPageName);
5729
5730            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5731            if(totalEntities == null) {
5732                data = Connections.emptyConnection();
5733            } else {
5734                try(var objectLimiter = new ObjectLimiter(env, ContentPageLayoutAreaConstants.COMPONENT_VENDOR_NAME, ContentPageLayoutAreaConstants.ENTITY_TYPE_NAME, totalEntities)) {
5735                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5736
5737                    var contentPageLayoutAreas = entities.stream()
5738                            .map(ContentPageLayoutAreaObject::new)
5739                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5740
5741                    data = new CountedObjects<>(objectLimiter, contentPageLayoutAreas);
5742                }
5743            }
5744        } catch (NamingException ex) {
5745            throw new RuntimeException(ex);
5746        }
5747
5748        return data;
5749    }
5750
5751    @GraphQLField
5752    @GraphQLName("contentPageAreaType")
5753    static ContentPageAreaTypeObject contentPageAreaType(final DataFetchingEnvironment env,
5754            @GraphQLName("contentPageAreaTypeName") final String contentPageAreaTypeName,
5755            @GraphQLName("id") @GraphQLID final String id) {
5756        ContentPageAreaType contentPageAreaType;
5757
5758        try {
5759            var commandForm = ContentUtil.getHome().getGetContentPageAreaTypeForm();
5760
5761            commandForm.setContentPageAreaTypeName(contentPageAreaTypeName);
5762            commandForm.setUuid(id);
5763
5764            contentPageAreaType = CDI.current().select(GetContentPageAreaTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5765        } catch (NamingException ex) {
5766            throw new RuntimeException(ex);
5767        }
5768
5769        return contentPageAreaType == null ? null : new ContentPageAreaTypeObject(contentPageAreaType);
5770    }
5771
5772    @GraphQLField
5773    @GraphQLName("contentPageAreaTypes")
5774    @GraphQLNonNull
5775    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5776    static CountingPaginatedData<ContentPageAreaTypeObject> contentPageAreaTypes(final DataFetchingEnvironment env) {
5777        CountingPaginatedData<ContentPageAreaTypeObject> data;
5778
5779        try {
5780            var commandForm = ContentUtil.getHome().getGetContentPageAreaTypesForm();
5781            var command = CDI.current().select(GetContentPageAreaTypesCommand.class).get();
5782
5783            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5784            if(totalEntities == null) {
5785                data = Connections.emptyConnection();
5786            } else {
5787                try(var objectLimiter = new ObjectLimiter(env, ContentPageAreaTypeConstants.COMPONENT_VENDOR_NAME, ContentPageAreaTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
5788                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5789
5790                    var contentPageAreaTypes = entities.stream()
5791                            .map(ContentPageAreaTypeObject::new)
5792                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5793
5794                    data = new CountedObjects<>(objectLimiter, contentPageAreaTypes);
5795                }
5796            }
5797        } catch (NamingException ex) {
5798            throw new RuntimeException(ex);
5799        }
5800
5801        return data;
5802    }
5803
5804    @GraphQLField
5805    @GraphQLName("contentWebAddress")
5806    static ContentWebAddressObject contentWebAddress(final DataFetchingEnvironment env,
5807            @GraphQLName("contentWebAddressName") @GraphQLNonNull final String contentWebAddressName) {
5808        ContentWebAddress contentWebAddress;
5809
5810        try {
5811            var commandForm = ContentUtil.getHome().getGetContentWebAddressForm();
5812
5813            commandForm.setContentWebAddressName(contentWebAddressName);
5814
5815            contentWebAddress = CDI.current().select(GetContentWebAddressCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5816        } catch (NamingException ex) {
5817            throw new RuntimeException(ex);
5818        }
5819
5820        return contentWebAddress == null ? null : new ContentWebAddressObject(contentWebAddress);
5821    }
5822
5823    @GraphQLField
5824    @GraphQLName("contentWebAddresses")
5825    @GraphQLNonNull
5826    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5827    static CountingPaginatedData<ContentWebAddressObject> contentWebAddresses(final DataFetchingEnvironment env) {
5828        CountingPaginatedData<ContentWebAddressObject> data;
5829
5830        try {
5831            var commandForm = ContentUtil.getHome().getGetContentWebAddressesForm();
5832            var command = CDI.current().select(GetContentWebAddressesCommand.class).get();
5833
5834            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5835            if(totalEntities == null) {
5836                data = Connections.emptyConnection();
5837            } else {
5838                try(var objectLimiter = new ObjectLimiter(env, ContentWebAddressConstants.COMPONENT_VENDOR_NAME, ContentWebAddressConstants.ENTITY_TYPE_NAME, totalEntities)) {
5839                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5840
5841                    var contentWebAddresses = entities.stream()
5842                            .map(ContentWebAddressObject::new)
5843                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5844
5845                    data = new CountedObjects<>(objectLimiter, contentWebAddresses);
5846                }
5847            }
5848        } catch (NamingException ex) {
5849            throw new RuntimeException(ex);
5850        }
5851
5852        return data;
5853    }
5854
5855    @GraphQLField
5856    @GraphQLName("contentCollection")
5857    static ContentCollectionObject contentCollection(final DataFetchingEnvironment env,
5858            @GraphQLName("contentCollectionName") final String contentCollectionName) {
5859        ContentCollection contentCollection;
5860
5861        try {
5862            var commandForm = ContentUtil.getHome().getGetContentCollectionForm();
5863
5864            commandForm.setContentCollectionName(contentCollectionName);
5865
5866            contentCollection = CDI.current().select(GetContentCollectionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5867        } catch (NamingException ex) {
5868            throw new RuntimeException(ex);
5869        }
5870
5871        return contentCollection == null ? null : new ContentCollectionObject(contentCollection);
5872    }
5873
5874    @GraphQLField
5875    @GraphQLName("contentCollections")
5876    @GraphQLNonNull
5877    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5878    static CountingPaginatedData<ContentCollectionObject> contentCollections(final DataFetchingEnvironment env) {
5879        CountingPaginatedData<ContentCollectionObject> data;
5880
5881        try {
5882            var commandForm = ContentUtil.getHome().getGetContentCollectionsForm();
5883            var command = CDI.current().select(GetContentCollectionsCommand.class).get();
5884
5885            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5886            if(totalEntities == null) {
5887                data = Connections.emptyConnection();
5888            } else {
5889                try(var objectLimiter = new ObjectLimiter(env, ContentCollectionConstants.COMPONENT_VENDOR_NAME, ContentCollectionConstants.ENTITY_TYPE_NAME, totalEntities)) {
5890                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5891
5892                    var contentCollections = entities.stream()
5893                            .map(ContentCollectionObject::new)
5894                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5895
5896                    data = new CountedObjects<>(objectLimiter, contentCollections);
5897                }
5898            }
5899        } catch (NamingException ex) {
5900            throw new RuntimeException(ex);
5901        }
5902
5903        return data;
5904    }
5905    
5906    @GraphQLField
5907    @GraphQLName("contentSection")
5908    static ContentSectionObject contentSection(final DataFetchingEnvironment env,
5909            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
5910            @GraphQLName("contentCollectionName") final String contentCollectionName,
5911            @GraphQLName("contentSectionName") final String contentSectionName,
5912            @GraphQLName("associateProgramName") final String associateProgramName,
5913            @GraphQLName("associateName") final String associateName,
5914            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
5915        ContentSection contentSection;
5916
5917        try {
5918            var commandForm = ContentUtil.getHome().getGetContentSectionForm();
5919
5920            commandForm.setContentWebAddressName(contentWebAddressName);
5921            commandForm.setContentCollectionName(contentCollectionName);
5922            commandForm.setContentSectionName(contentSectionName);
5923            commandForm.setAssociateProgramName(associateProgramName);
5924            commandForm.setAssociateName(associateName);
5925            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
5926
5927            contentSection = CDI.current().select(GetContentSectionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
5928        } catch (NamingException ex) {
5929            throw new RuntimeException(ex);
5930        }
5931
5932        return contentSection == null ? null : new ContentSectionObject(contentSection);
5933    }
5934
5935    @GraphQLField
5936    @GraphQLName("contentSections")
5937    @GraphQLNonNull
5938    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
5939    static CountingPaginatedData<ContentSectionObject> contentSections(final DataFetchingEnvironment env,
5940            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
5941            @GraphQLName("contentCollectionName") final String contentCollectionName,
5942            @GraphQLName("parentContentSectionName") final String parentContentSectionName,
5943            @GraphQLName("associateProgramName") final String associateProgramName,
5944            @GraphQLName("associateName") final String associateName,
5945            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
5946        CountingPaginatedData<ContentSectionObject> data;
5947
5948        try {
5949            var commandForm = ContentUtil.getHome().getGetContentSectionsForm();
5950            var command = CDI.current().select(GetContentSectionsCommand.class).get();
5951
5952            commandForm.setContentWebAddressName(contentWebAddressName);
5953            commandForm.setContentCollectionName(contentCollectionName);
5954            commandForm.setParentContentSectionName(parentContentSectionName);
5955            commandForm.setAssociateProgramName(associateProgramName);
5956            commandForm.setAssociateName(associateName);
5957            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
5958
5959            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5960            if(totalEntities == null) {
5961                data = Connections.emptyConnection();
5962            } else {
5963                try(var objectLimiter = new ObjectLimiter(env, ContentSectionConstants.COMPONENT_VENDOR_NAME, ContentSectionConstants.ENTITY_TYPE_NAME, totalEntities)) {
5964                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
5965
5966                    var contentSections = entities.stream()
5967                            .map(ContentSectionObject::new)
5968                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
5969
5970                    data = new CountedObjects<>(objectLimiter, contentSections);
5971                }
5972            }
5973        } catch (NamingException ex) {
5974            throw new RuntimeException(ex);
5975        }
5976
5977        return data;
5978    }
5979
5980    @GraphQLField
5981    @GraphQLName("contentPage")
5982    static ContentPageObject contentPage(final DataFetchingEnvironment env,
5983            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
5984            @GraphQLName("contentCollectionName") final String contentCollectionName,
5985            @GraphQLName("contentSectionName") final String contentSectionName,
5986            @GraphQLName("contentPageName") final String contentPageName,
5987            @GraphQLName("associateProgramName") final String associateProgramName,
5988            @GraphQLName("associateName") final String associateName,
5989            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
5990        ContentPage contentPage;
5991
5992        try {
5993            var commandForm = ContentUtil.getHome().getGetContentPageForm();
5994
5995            commandForm.setContentWebAddressName(contentWebAddressName);
5996            commandForm.setContentCollectionName(contentCollectionName);
5997            commandForm.setContentSectionName(contentSectionName);
5998            commandForm.setContentPageName(contentPageName);
5999            commandForm.setAssociateProgramName(associateProgramName);
6000            commandForm.setAssociateName(associateName);
6001            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6002
6003            contentPage = CDI.current().select(GetContentPageCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6004        } catch (NamingException ex) {
6005            throw new RuntimeException(ex);
6006        }
6007
6008        return contentPage == null ? null : new ContentPageObject(contentPage);
6009    }
6010
6011    @GraphQLField
6012    @GraphQLName("contentPages")
6013    @GraphQLNonNull
6014    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6015    static CountingPaginatedData<ContentPageObject> contentPages(final DataFetchingEnvironment env,
6016            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6017            @GraphQLName("contentCollectionName") final String contentCollectionName,
6018            @GraphQLName("contentSectionName") final String contentSectionName,
6019            @GraphQLName("associateProgramName") final String associateProgramName,
6020            @GraphQLName("associateName") final String associateName,
6021            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6022        CountingPaginatedData<ContentPageObject> data;
6023
6024        try {
6025            var commandForm = ContentUtil.getHome().getGetContentPagesForm();
6026            var command = CDI.current().select(GetContentPagesCommand.class).get();
6027
6028            commandForm.setContentWebAddressName(contentWebAddressName);
6029            commandForm.setContentCollectionName(contentCollectionName);
6030            commandForm.setContentSectionName(contentSectionName);
6031            commandForm.setAssociateProgramName(associateProgramName);
6032            commandForm.setAssociateName(associateName);
6033            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6034
6035            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6036            if(totalEntities == null) {
6037                data = Connections.emptyConnection();
6038            } else {
6039                try(var objectLimiter = new ObjectLimiter(env, ContentPageConstants.COMPONENT_VENDOR_NAME, ContentPageConstants.ENTITY_TYPE_NAME, totalEntities)) {
6040                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6041
6042                    var contentPages = entities.stream()
6043                            .map(ContentPageObject::new)
6044                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6045
6046                    data = new CountedObjects<>(objectLimiter, contentPages);
6047                }
6048            }
6049        } catch (NamingException ex) {
6050            throw new RuntimeException(ex);
6051        }
6052
6053        return data;
6054    }
6055
6056    @GraphQLField
6057    @GraphQLName("contentPageArea")
6058    static ContentPageAreaObject contentPageArea(final DataFetchingEnvironment env,
6059            @GraphQLName("contentCollectionName") @GraphQLNonNull final String contentCollectionName,
6060            @GraphQLName("contentSectionName") @GraphQLNonNull final String contentSectionName,
6061            @GraphQLName("contentPageName") @GraphQLNonNull final String contentPageName,
6062            @GraphQLName("sortOrder") @GraphQLNonNull final String sortOrder,
6063            @GraphQLName("languageIsoName") @GraphQLNonNull final String languageIsoName) {
6064        ContentPageArea contentPageArea;
6065
6066        try {
6067            var commandForm = ContentUtil.getHome().getGetContentPageAreaForm();
6068
6069            commandForm.setContentCollectionName(contentCollectionName);
6070            commandForm.setContentSectionName(contentSectionName);
6071            commandForm.setContentPageName(contentPageName);
6072            commandForm.setSortOrder(sortOrder);
6073            commandForm.setLanguageIsoName(languageIsoName);
6074
6075            contentPageArea = CDI.current().select(GetContentPageAreaCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6076        } catch (NamingException ex) {
6077            throw new RuntimeException(ex);
6078        }
6079
6080        return contentPageArea == null ? null : new ContentPageAreaObject(contentPageArea);
6081    }
6082
6083    @GraphQLField
6084    @GraphQLName("contentPageAreas")
6085    @GraphQLNonNull
6086    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6087    static CountingPaginatedData<ContentPageAreaObject> contentPageAreas(final DataFetchingEnvironment env,
6088            @GraphQLName("contentCollectionName") @GraphQLNonNull final String contentCollectionName,
6089            @GraphQLName("contentSectionName") @GraphQLNonNull final String contentSectionName,
6090            @GraphQLName("contentPageName") @GraphQLNonNull final String contentPageName) {
6091        CountingPaginatedData<ContentPageAreaObject> data;
6092
6093        try {
6094            var commandForm = ContentUtil.getHome().getGetContentPageAreasForm();
6095            var command = CDI.current().select(GetContentPageAreasCommand.class).get();
6096
6097
6098            commandForm.setContentCollectionName(contentCollectionName);
6099            commandForm.setContentSectionName(contentSectionName);
6100            commandForm.setContentPageName(contentPageName);
6101
6102            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6103            if(totalEntities == null) {
6104                data = Connections.emptyConnection();
6105            } else {
6106                try(var objectLimiter = new ObjectLimiter(env, ContentPageAreaConstants.COMPONENT_VENDOR_NAME, ContentPageAreaConstants.ENTITY_TYPE_NAME, totalEntities)) {
6107                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6108
6109                    var contentPageAreas = entities.stream()
6110                            .map(ContentPageAreaObject::new)
6111                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6112
6113                    data = new CountedObjects<>(objectLimiter, contentPageAreas);
6114                }
6115            }
6116        } catch (NamingException ex) {
6117            throw new RuntimeException(ex);
6118        }
6119
6120        return data;
6121    }
6122
6123
6124    @GraphQLField
6125    @GraphQLName("contentCatalog")
6126    static ContentCatalogObject contentCatalog(final DataFetchingEnvironment env,
6127            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6128            @GraphQLName("contentCollectionName") final String contentCollectionName,
6129            @GraphQLName("contentCatalogName") final String contentCatalogName,
6130            @GraphQLName("associateProgramName") final String associateProgramName,
6131            @GraphQLName("associateName") final String associateName,
6132            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6133        ContentCatalog contentCatalog;
6134
6135        try {
6136            var commandForm = ContentUtil.getHome().getGetContentCatalogForm();
6137
6138            commandForm.setContentWebAddressName(contentWebAddressName);
6139            commandForm.setContentCollectionName(contentCollectionName);
6140            commandForm.setContentCatalogName(contentCatalogName);
6141            commandForm.setAssociateProgramName(associateProgramName);
6142            commandForm.setAssociateName(associateName);
6143            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6144
6145            contentCatalog = CDI.current().select(GetContentCatalogCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6146        } catch (NamingException ex) {
6147            throw new RuntimeException(ex);
6148        }
6149
6150        return contentCatalog == null ? null : new ContentCatalogObject(contentCatalog);
6151    }
6152
6153    @GraphQLField
6154    @GraphQLName("contentCatalogs")
6155    @GraphQLNonNull
6156    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6157    static CountingPaginatedData<ContentCatalogObject> contentCatalogs(final DataFetchingEnvironment env,
6158            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6159            @GraphQLName("contentCollectionName") final String contentCollectionName,
6160            @GraphQLName("associateProgramName") final String associateProgramName,
6161            @GraphQLName("associateName") final String associateName,
6162            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6163        CountingPaginatedData<ContentCatalogObject> data;
6164
6165        try {
6166            var commandForm = ContentUtil.getHome().getGetContentCatalogsForm();
6167            var command = CDI.current().select(GetContentCatalogsCommand.class).get();
6168
6169            commandForm.setContentWebAddressName(contentWebAddressName);
6170            commandForm.setContentCollectionName(contentCollectionName);
6171            commandForm.setAssociateProgramName(associateProgramName);
6172            commandForm.setAssociateName(associateName);
6173            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6174
6175            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6176            if(totalEntities == null) {
6177                data = Connections.emptyConnection();
6178            } else {
6179                try(var objectLimiter = new ObjectLimiter(env, ContentCatalogConstants.COMPONENT_VENDOR_NAME, ContentCatalogConstants.ENTITY_TYPE_NAME, totalEntities)) {
6180                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6181
6182                    var contentCatalogs = entities.stream()
6183                            .map(ContentCatalogObject::new)
6184                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6185
6186                    data = new CountedObjects<>(objectLimiter, contentCatalogs);
6187                }
6188            }
6189        } catch (NamingException ex) {
6190            throw new RuntimeException(ex);
6191        }
6192
6193        return data;
6194    }
6195
6196    @GraphQLField
6197    @GraphQLName("contentCatalogItem")
6198    static ContentCatalogItemObject contentCatalogItem(final DataFetchingEnvironment env,
6199            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6200            @GraphQLName("contentCollectionName") final String contentCollectionName,
6201            @GraphQLName("contentCatalogName") final String contentCatalogName,
6202            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
6203            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
6204            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
6205            @GraphQLName("currencyIsoName") final String currencyIsoName,
6206            @GraphQLName("associateProgramName") final String associateProgramName,
6207            @GraphQLName("associateName") final String associateName,
6208            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6209        ContentCatalogItem contentCatalogItem;
6210
6211        try {
6212            var commandForm = ContentUtil.getHome().getGetContentCatalogItemForm();
6213
6214            commandForm.setContentWebAddressName(contentWebAddressName);
6215            commandForm.setContentCollectionName(contentCollectionName);
6216            commandForm.setContentCatalogName(contentCatalogName);
6217            commandForm.setItemName(itemName);
6218            commandForm.setInventoryConditionName(inventoryConditionName);
6219            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
6220            commandForm.setCurrencyIsoName(currencyIsoName);
6221            commandForm.setAssociateProgramName(associateProgramName);
6222            commandForm.setAssociateName(associateName);
6223            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6224
6225            contentCatalogItem = CDI.current().select(GetContentCatalogItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6226        } catch (NamingException ex) {
6227            throw new RuntimeException(ex);
6228        }
6229
6230        return contentCatalogItem == null ? null : new ContentCatalogItemObject(contentCatalogItem);
6231    }
6232
6233    @GraphQLField
6234    @GraphQLName("contentCatalogItems")
6235    @GraphQLNonNull
6236    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6237    static CountingPaginatedData<ContentCatalogItemObject> contentCatalogItems(final DataFetchingEnvironment env,
6238            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6239            @GraphQLName("contentCollectionName") final String contentCollectionName,
6240            @GraphQLName("contentCatalogName") final String contentCatalogName,
6241            @GraphQLName("associateProgramName") final String associateProgramName,
6242            @GraphQLName("associateName") final String associateName,
6243            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6244        CountingPaginatedData<ContentCatalogItemObject> data;
6245
6246        try {
6247            var commandForm = ContentUtil.getHome().getGetContentCatalogItemsForm();
6248            var command = CDI.current().select(GetContentCatalogItemsCommand.class).get();
6249
6250            commandForm.setContentWebAddressName(contentWebAddressName);
6251            commandForm.setContentCollectionName(contentCollectionName);
6252            commandForm.setContentCatalogName(contentCatalogName);
6253            commandForm.setAssociateProgramName(associateProgramName);
6254            commandForm.setAssociateName(associateName);
6255            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6256
6257            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6258            if(totalEntities == null) {
6259                data = Connections.emptyConnection();
6260            } else {
6261                try(var objectLimiter = new ObjectLimiter(env, ContentCatalogItemConstants.COMPONENT_VENDOR_NAME, ContentCatalogItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
6262                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6263
6264                    var contentCatalogItems = entities.stream()
6265                            .map(ContentCatalogItemObject::new)
6266                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6267
6268                    data = new CountedObjects<>(objectLimiter, contentCatalogItems);
6269                }
6270            }
6271        } catch (NamingException ex) {
6272            throw new RuntimeException(ex);
6273        }
6274
6275        return data;
6276    }
6277
6278    @GraphQLField
6279    @GraphQLName("contentCategory")
6280    static ContentCategoryObject contentCategory(final DataFetchingEnvironment env,
6281            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6282            @GraphQLName("contentCollectionName") final String contentCollectionName,
6283            @GraphQLName("contentCatalogName") final String contentCatalogName,
6284            @GraphQLName("contentCategoryName") final String contentCategoryName,
6285            @GraphQLName("associateProgramName") final String associateProgramName,
6286            @GraphQLName("associateName") final String associateName,
6287            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6288        ContentCategory contentCategory;
6289
6290        try {
6291            var commandForm = ContentUtil.getHome().getGetContentCategoryForm();
6292
6293            commandForm.setContentWebAddressName(contentWebAddressName);
6294            commandForm.setContentCollectionName(contentCollectionName);
6295            commandForm.setContentCatalogName(contentCatalogName);
6296            commandForm.setContentCategoryName(contentCategoryName);
6297            commandForm.setAssociateProgramName(associateProgramName);
6298            commandForm.setAssociateName(associateName);
6299            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6300
6301            contentCategory = CDI.current().select(GetContentCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6302        } catch (NamingException ex) {
6303            throw new RuntimeException(ex);
6304        }
6305
6306        return contentCategory == null ? null : new ContentCategoryObject(contentCategory);
6307    }
6308
6309    @GraphQLField
6310    @GraphQLName("contentCategories")
6311    @GraphQLNonNull
6312    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6313    static CountingPaginatedData<ContentCategoryObject> contentCategories(final DataFetchingEnvironment env,
6314            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6315            @GraphQLName("contentCollectionName") final String contentCollectionName,
6316            @GraphQLName("contentCatalogName") final String contentCatalogName,
6317            @GraphQLName("parentContentCategoryName") final String parentContentCategoryName,
6318            @GraphQLName("associateProgramName") final String associateProgramName,
6319            @GraphQLName("associateName") final String associateName,
6320            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6321        CountingPaginatedData<ContentCategoryObject> data;
6322
6323        try {
6324            var commandForm = ContentUtil.getHome().getGetContentCategoriesForm();
6325            var command = CDI.current().select(GetContentCategoriesCommand.class).get();
6326
6327            commandForm.setContentWebAddressName(contentWebAddressName);
6328            commandForm.setContentCollectionName(contentCollectionName);
6329            commandForm.setContentCatalogName(contentCatalogName);
6330            commandForm.setParentContentCategoryName(parentContentCategoryName);
6331            commandForm.setAssociateProgramName(associateProgramName);
6332            commandForm.setAssociateName(associateName);
6333            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6334
6335            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6336            if(totalEntities == null) {
6337                data = Connections.emptyConnection();
6338            } else {
6339                try(var objectLimiter = new ObjectLimiter(env, ContentCategoryConstants.COMPONENT_VENDOR_NAME, ContentCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
6340                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6341
6342                    var contentCategories = entities.stream()
6343                            .map(ContentCategoryObject::new)
6344                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6345
6346                    data = new CountedObjects<>(objectLimiter, contentCategories);
6347                }
6348            }
6349        } catch (NamingException ex) {
6350            throw new RuntimeException(ex);
6351        }
6352
6353        return data;
6354    }
6355
6356    @GraphQLField
6357    @GraphQLName("contentCategoryItem")
6358    static ContentCategoryItemObject contentCategoryItem(final DataFetchingEnvironment env,
6359            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6360            @GraphQLName("contentCollectionName") final String contentCollectionName,
6361            @GraphQLName("contentCatalogName") final String contentCatalogName,
6362            @GraphQLName("contentCategoryName") final String contentCategoryName,
6363            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
6364            @GraphQLName("inventoryConditionName") final String inventoryConditionName,
6365            @GraphQLName("unitOfMeasureTypeName") final String unitOfMeasureTypeName,
6366            @GraphQLName("currencyIsoName") final String currencyIsoName,
6367            @GraphQLName("associateProgramName") final String associateProgramName,
6368            @GraphQLName("associateName") final String associateName,
6369            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6370        ContentCategoryItem contentCategoryItem;
6371
6372        try {
6373            var commandForm = ContentUtil.getHome().getGetContentCategoryItemForm();
6374
6375            commandForm.setContentWebAddressName(contentWebAddressName);
6376            commandForm.setContentCollectionName(contentCollectionName);
6377            commandForm.setContentCatalogName(contentCatalogName);
6378            commandForm.setContentCategoryName(contentCategoryName);
6379            commandForm.setItemName(itemName);
6380            commandForm.setInventoryConditionName(inventoryConditionName);
6381            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
6382            commandForm.setCurrencyIsoName(currencyIsoName);
6383            commandForm.setAssociateProgramName(associateProgramName);
6384            commandForm.setAssociateName(associateName);
6385            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6386
6387            contentCategoryItem = CDI.current().select(GetContentCategoryItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6388        } catch (NamingException ex) {
6389            throw new RuntimeException(ex);
6390        }
6391
6392        return contentCategoryItem == null ? null : new ContentCategoryItemObject(contentCategoryItem);
6393    }
6394
6395    @GraphQLField
6396    @GraphQLName("contentCategoryItems")
6397    @GraphQLNonNull
6398    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6399    static CountingPaginatedData<ContentCategoryItemObject> contentCategoryItems(final DataFetchingEnvironment env,
6400            @GraphQLName("contentWebAddressName") final String contentWebAddressName,
6401            @GraphQLName("contentCollectionName") final String contentCollectionName,
6402            @GraphQLName("contentCatalogName") final String contentCatalogName,
6403            @GraphQLName("contentCategoryName") final String contentCategoryName,
6404            @GraphQLName("associateProgramName") final String associateProgramName,
6405            @GraphQLName("associateName") final String associateName,
6406            @GraphQLName("associatePartyContactMechanismName") final String associatePartyContactMechanismName) {
6407        CountingPaginatedData<ContentCategoryItemObject> data;
6408
6409        try {
6410            var commandForm = ContentUtil.getHome().getGetContentCategoryItemsForm();
6411            var command = CDI.current().select(GetContentCategoryItemsCommand.class).get();
6412
6413            commandForm.setContentWebAddressName(contentWebAddressName);
6414            commandForm.setContentCollectionName(contentCollectionName);
6415            commandForm.setContentCatalogName(contentCatalogName);
6416            commandForm.setContentCategoryName(contentCategoryName);
6417            commandForm.setAssociateProgramName(associateProgramName);
6418            commandForm.setAssociateName(associateName);
6419            commandForm.setAssociatePartyContactMechanismName(associatePartyContactMechanismName);
6420
6421            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6422            if(totalEntities == null) {
6423                data = Connections.emptyConnection();
6424            } else {
6425                try(var objectLimiter = new ObjectLimiter(env, ContentCategoryItemConstants.COMPONENT_VENDOR_NAME, ContentCategoryItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
6426                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6427
6428                    var contentCategoryItems = entities.stream()
6429                            .map(ContentCategoryItemObject::new)
6430                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6431
6432                    data = new CountedObjects<>(objectLimiter, contentCategoryItems);
6433                }
6434            }
6435        } catch (NamingException ex) {
6436            throw new RuntimeException(ex);
6437        }
6438
6439        return data;
6440    }
6441
6442    @GraphQLField
6443    @GraphQLName("mimeTypeFileExtension")
6444    static MimeTypeFileExtensionObject mimeTypeFileExtension(final DataFetchingEnvironment env,
6445            @GraphQLName("fileExtension") @GraphQLNonNull final String fileExtension) {
6446        MimeTypeFileExtension mimeTypeFileExtension;
6447
6448        try {
6449            var commandForm = CoreUtil.getHome().getGetMimeTypeFileExtensionForm();
6450
6451            commandForm.setFileExtension(fileExtension);
6452
6453            mimeTypeFileExtension = CDI.current().select(GetMimeTypeFileExtensionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6454        } catch (NamingException ex) {
6455            throw new RuntimeException(ex);
6456        }
6457
6458        return mimeTypeFileExtension == null ? null : new MimeTypeFileExtensionObject(mimeTypeFileExtension);
6459    }
6460
6461    @GraphQLField
6462    @GraphQLName("mimeTypeFileExtensions")
6463    @GraphQLNonNull
6464    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6465    static CountingPaginatedData<MimeTypeFileExtensionObject> mimeTypeFileExtensions(final DataFetchingEnvironment env) {
6466        CountingPaginatedData<MimeTypeFileExtensionObject> data;
6467
6468        try {
6469            var commandForm = CoreUtil.getHome().getGetMimeTypeFileExtensionsForm();
6470            var command = CDI.current().select(GetMimeTypeFileExtensionsCommand.class).get();
6471
6472            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6473            if(totalEntities == null) {
6474                data = Connections.emptyConnection();
6475            } else {
6476                try(var objectLimiter = new ObjectLimiter(env, MimeTypeFileExtensionConstants.COMPONENT_VENDOR_NAME, MimeTypeFileExtensionConstants.ENTITY_TYPE_NAME, totalEntities)) {
6477                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6478                    var mimeTypeFileExtensionObjects = entities.stream().map(MimeTypeFileExtensionObject::new).collect(Collectors.toList());
6479
6480                    data = new CountedObjects<>(objectLimiter, mimeTypeFileExtensionObjects);
6481                }
6482            }
6483        } catch (NamingException ex) {
6484            throw new RuntimeException(ex);
6485        }
6486
6487        return data;
6488    }
6489
6490    @GraphQLField
6491    @GraphQLName("mimeTypeUsageType")
6492    static MimeTypeUsageTypeObject mimeTypeUsageType(final DataFetchingEnvironment env,
6493            @GraphQLName("mimeTypeUsageTypeName") @GraphQLNonNull final String mimeTypeUsageTypeName) {
6494        MimeTypeUsageType mimeTypeUsageType;
6495
6496        try {
6497            var commandForm = CoreUtil.getHome().getGetMimeTypeUsageTypeForm();
6498
6499            commandForm.setMimeTypeUsageTypeName(mimeTypeUsageTypeName);
6500
6501            mimeTypeUsageType = CDI.current().select(GetMimeTypeUsageTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6502        } catch (NamingException ex) {
6503            throw new RuntimeException(ex);
6504        }
6505
6506        return mimeTypeUsageType == null ? null : new MimeTypeUsageTypeObject(mimeTypeUsageType);
6507    }
6508
6509    @GraphQLField
6510    @GraphQLName("mimeTypeUsageTypes")
6511    @GraphQLNonNull
6512    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6513    static CountingPaginatedData<MimeTypeUsageTypeObject> mimeTypeUsageTypes(final DataFetchingEnvironment env) {
6514        CountingPaginatedData<MimeTypeUsageTypeObject> data;
6515
6516        try {
6517            var commandForm = CoreUtil.getHome().getGetMimeTypeUsageTypesForm();
6518            var command = CDI.current().select(GetMimeTypeUsageTypesCommand.class).get();
6519
6520            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6521            if(totalEntities == null) {
6522                data = Connections.emptyConnection();
6523            } else {
6524                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)) {
6525                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6526
6527                    var mimeTypeUsageTypes = entities.stream()
6528                            .map(MimeTypeUsageTypeObject::new)
6529                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6530
6531                    data = new CountedObjects<>(objectLimiter, mimeTypeUsageTypes);
6532                }
6533            }
6534        } catch (NamingException ex) {
6535            throw new RuntimeException(ex);
6536        }
6537
6538        return data;
6539    }
6540
6541    @GraphQLField
6542    @GraphQLName("mimeType")
6543    static MimeTypeObject mimeType(final DataFetchingEnvironment env,
6544            @GraphQLName("mimeTypeName") @GraphQLNonNull final String mimeTypeName) {
6545        MimeType mimeType;
6546
6547        try {
6548            var commandForm = CoreUtil.getHome().getGetMimeTypeForm();
6549
6550            commandForm.setMimeTypeName(mimeTypeName);
6551
6552            mimeType = CDI.current().select(GetMimeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6553        } catch (NamingException ex) {
6554            throw new RuntimeException(ex);
6555        }
6556
6557        return mimeType == null ? null : new MimeTypeObject(mimeType);
6558    }
6559
6560    @GraphQLField
6561    @GraphQLName("mimeTypes")
6562    @GraphQLNonNull
6563    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6564    static CountingPaginatedData<MimeTypeObject> mimeTypes(final DataFetchingEnvironment env,
6565            @GraphQLName("mimeTypeUsageTypeName") final String mimeTypeUsageTypeName) {
6566        CountingPaginatedData<MimeTypeObject> data;
6567
6568        try {
6569            var commandForm = CoreUtil.getHome().getGetMimeTypesForm();
6570            var command = CDI.current().select(GetMimeTypesCommand.class).get();
6571
6572            commandForm.setMimeTypeUsageTypeName(mimeTypeUsageTypeName);
6573
6574            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6575            if(totalEntities == null) {
6576                data = Connections.emptyConnection();
6577            } else {
6578                try(var objectLimiter = new ObjectLimiter(env, MimeTypeConstants.COMPONENT_VENDOR_NAME, MimeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
6579                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6580
6581                    var mimeTypes = entities.stream()
6582                            .map(MimeTypeObject::new)
6583                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6584
6585                    data = new CountedObjects<>(objectLimiter, mimeTypes);
6586                }
6587            }
6588        } catch (NamingException ex) {
6589            throw new RuntimeException(ex);
6590        }
6591
6592        return data;
6593    }
6594
6595    @GraphQLField
6596    @GraphQLName("queueType")
6597    static QueueTypeObject queueType(final DataFetchingEnvironment env,
6598            @GraphQLName("queueTypeName") @GraphQLNonNull final String queueTypeName) {
6599        QueueType queueType;
6600
6601        try {
6602            var commandForm = QueueUtil.getHome().getGetQueueTypeForm();
6603
6604            commandForm.setQueueTypeName(queueTypeName);
6605
6606            queueType = CDI.current().select(GetQueueTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6607        } catch (NamingException ex) {
6608            throw new RuntimeException(ex);
6609        }
6610
6611        return queueType == null ? null : new QueueTypeObject(queueType);
6612    }
6613
6614    @GraphQLField
6615    @GraphQLName("queueTypes")
6616    @GraphQLNonNull
6617    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6618    static CountingPaginatedData<QueueTypeObject> queueTypes(final DataFetchingEnvironment env) {
6619        CountingPaginatedData<QueueTypeObject> data;
6620
6621        try {
6622            var commandForm = QueueUtil.getHome().getGetQueueTypesForm();
6623            var command = CDI.current().select(GetQueueTypesCommand.class).get();
6624
6625            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6626            if(totalEntities == null) {
6627                data = Connections.emptyConnection();
6628            } else {
6629                try(var objectLimiter = new ObjectLimiter(env, QueueTypeConstants.COMPONENT_VENDOR_NAME, QueueTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
6630                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6631
6632                    var queueTypes = entities.stream()
6633                            .map(QueueTypeObject::new)
6634                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6635
6636                    data = new CountedObjects<>(objectLimiter, queueTypes);
6637                }
6638            }
6639        } catch (NamingException ex) {
6640            throw new RuntimeException(ex);
6641        }
6642
6643        return data;
6644    }
6645
6646    @GraphQLField
6647    @GraphQLName("unitOfMeasureKindUse")
6648    static UnitOfMeasureKindUseObject unitOfMeasureKindUse(final DataFetchingEnvironment env,
6649            @GraphQLName("unitOfMeasureKindUseTypeName") @GraphQLNonNull final String unitOfMeasureKindUseTypeName,
6650            @GraphQLName("unitOfMeasureKindName") @GraphQLNonNull final String unitOfMeasureKindName) {
6651        UnitOfMeasureKindUse unitOfMeasureKindUse;
6652
6653        try {
6654            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindUseForm();
6655
6656            commandForm.setUnitOfMeasureKindUseTypeName(unitOfMeasureKindUseTypeName);
6657            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
6658
6659            unitOfMeasureKindUse = CDI.current().select(GetUnitOfMeasureKindUseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6660        } catch (NamingException ex) {
6661            throw new RuntimeException(ex);
6662        }
6663
6664        return unitOfMeasureKindUse == null ? null : new UnitOfMeasureKindUseObject(unitOfMeasureKindUse);
6665    }
6666
6667    @GraphQLField
6668    @GraphQLName("unitOfMeasureKindUses")
6669    @GraphQLNonNull
6670    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6671    static CountingPaginatedData<UnitOfMeasureKindUseObject> unitOfMeasureKindUses(final DataFetchingEnvironment env,
6672            @GraphQLName("unitOfMeasureKindUseTypeName") final String unitOfMeasureKindUseTypeName,
6673            @GraphQLName("unitOfMeasureKindName") final String unitOfMeasureKindName) {
6674        CountingPaginatedData<UnitOfMeasureKindUseObject> data;
6675
6676        try {
6677            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindUsesForm();
6678            var command = CDI.current().select(GetUnitOfMeasureKindUsesCommand.class).get();
6679
6680            commandForm.setUnitOfMeasureKindUseTypeName(unitOfMeasureKindUseTypeName);
6681            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
6682
6683            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6684            if(totalEntities == null) {
6685                data = Connections.emptyConnection();
6686            } else {
6687                try(var objectLimiter = new ObjectLimiter(env, UnitOfMeasureKindUseConstants.COMPONENT_VENDOR_NAME, UnitOfMeasureKindUseConstants.ENTITY_TYPE_NAME, totalEntities)) {
6688                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6689
6690                    var unitOfMeasureKindUses = entities.stream()
6691                            .map(UnitOfMeasureKindUseObject::new)
6692                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6693
6694                    data = new CountedObjects<>(objectLimiter, unitOfMeasureKindUses);
6695                }
6696            }
6697        } catch (NamingException ex) {
6698            throw new RuntimeException(ex);
6699        }
6700
6701        return data;
6702    }
6703
6704    @GraphQLField
6705    @GraphQLName("unitOfMeasureType")
6706    static UnitOfMeasureTypeObject unitOfMeasureType(final DataFetchingEnvironment env,
6707            @GraphQLName("unitOfMeasureKindName") @GraphQLNonNull final String unitOfMeasureKindName,
6708            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName) {
6709        UnitOfMeasureType unitOfMeasureType;
6710
6711        try {
6712            var commandForm = UomUtil.getHome().getGetUnitOfMeasureTypeForm();
6713
6714            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
6715            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
6716
6717            unitOfMeasureType = CDI.current().select(GetUnitOfMeasureTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6718        } catch (NamingException ex) {
6719            throw new RuntimeException(ex);
6720        }
6721
6722        return unitOfMeasureType == null ? null : new UnitOfMeasureTypeObject(unitOfMeasureType);
6723    }
6724
6725    @GraphQLField
6726    @GraphQLName("unitOfMeasureTypes")
6727    @GraphQLNonNull
6728    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6729    static CountingPaginatedData<UnitOfMeasureTypeObject> unitOfMeasureTypes(final DataFetchingEnvironment env,
6730            @GraphQLName("unitOfMeasureKindName") @GraphQLNonNull final String unitOfMeasureKindName) {
6731        CountingPaginatedData<UnitOfMeasureTypeObject> data;
6732
6733        try {
6734            var commandForm = UomUtil.getHome().getGetUnitOfMeasureTypesForm();
6735            var command = CDI.current().select(GetUnitOfMeasureTypesCommand.class).get();
6736
6737            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
6738
6739            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6740            if(totalEntities == null) {
6741                data = Connections.emptyConnection();
6742            } else {
6743                try(var objectLimiter = new ObjectLimiter(env, UnitOfMeasureTypeConstants.COMPONENT_VENDOR_NAME, UnitOfMeasureTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
6744                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6745
6746                    var unitOfMeasureTypes = entities.stream()
6747                            .map(UnitOfMeasureTypeObject::new)
6748                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6749
6750                    data = new CountedObjects<>(objectLimiter, unitOfMeasureTypes);
6751                }
6752            }
6753        } catch (NamingException ex) {
6754            throw new RuntimeException(ex);
6755        }
6756
6757        return data;
6758    }
6759
6760    @GraphQLField
6761    @GraphQLName("unitOfMeasureKind")
6762    static UnitOfMeasureKindObject unitOfMeasureKind(final DataFetchingEnvironment env,
6763            @GraphQLName("unitOfMeasureKindName") @GraphQLNonNull final String unitOfMeasureKindName) {
6764        UnitOfMeasureKind unitOfMeasureKind;
6765
6766        try {
6767            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindForm();
6768
6769            commandForm.setUnitOfMeasureKindName(unitOfMeasureKindName);
6770
6771            unitOfMeasureKind = CDI.current().select(GetUnitOfMeasureKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6772        } catch (NamingException ex) {
6773            throw new RuntimeException(ex);
6774        }
6775
6776        return unitOfMeasureKind == null ? null : new UnitOfMeasureKindObject(unitOfMeasureKind);
6777    }
6778
6779    @GraphQLField
6780    @GraphQLName("unitOfMeasureKinds")
6781    @GraphQLNonNull
6782    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6783    static CountingPaginatedData<UnitOfMeasureKindObject> unitOfMeasureKinds(final DataFetchingEnvironment env) {
6784        CountingPaginatedData<UnitOfMeasureKindObject> data;
6785
6786        try {
6787            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindsForm();
6788            var command = CDI.current().select(GetUnitOfMeasureKindsCommand.class).get();
6789
6790            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6791            if(totalEntities == null) {
6792                data = Connections.emptyConnection();
6793            } else {
6794                try(var objectLimiter = new ObjectLimiter(env, UnitOfMeasureKindConstants.COMPONENT_VENDOR_NAME, UnitOfMeasureKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
6795                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6796
6797                    var unitOfMeasureKinds = entities.stream()
6798                            .map(UnitOfMeasureKindObject::new)
6799                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6800
6801                    data = new CountedObjects<>(objectLimiter, unitOfMeasureKinds);
6802                }
6803            }
6804        } catch (NamingException ex) {
6805            throw new RuntimeException(ex);
6806        }
6807
6808        return data;
6809    }
6810
6811    @GraphQLField
6812    @GraphQLName("unitOfMeasureKindUseType")
6813    static UnitOfMeasureKindUseTypeObject unitOfMeasureKindUseType(final DataFetchingEnvironment env,
6814            @GraphQLName("unitOfMeasureKindUseTypeName") @GraphQLNonNull final String unitOfMeasureKindUseTypeName) {
6815        UnitOfMeasureKindUseType unitOfMeasureKindUseType;
6816
6817        try {
6818            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindUseTypeForm();
6819
6820            commandForm.setUnitOfMeasureKindUseTypeName(unitOfMeasureKindUseTypeName);
6821
6822            unitOfMeasureKindUseType = CDI.current().select(GetUnitOfMeasureKindUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6823        } catch (NamingException ex) {
6824            throw new RuntimeException(ex);
6825        }
6826
6827        return unitOfMeasureKindUseType == null ? null : new UnitOfMeasureKindUseTypeObject(unitOfMeasureKindUseType);
6828    }
6829
6830    @GraphQLField
6831    @GraphQLName("unitOfMeasureKindUseTypes")
6832    @GraphQLNonNull
6833    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6834    static CountingPaginatedData<UnitOfMeasureKindUseTypeObject> unitOfMeasureKindUseTypes(final DataFetchingEnvironment env) {
6835        CountingPaginatedData<UnitOfMeasureKindUseTypeObject> data;
6836
6837        try {
6838            var commandForm = UomUtil.getHome().getGetUnitOfMeasureKindUseTypesForm();
6839            var command = CDI.current().select(GetUnitOfMeasureKindUseTypesCommand.class).get();
6840
6841            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6842            if(totalEntities == null) {
6843                data = Connections.emptyConnection();
6844            } else {
6845                try(var objectLimiter = new ObjectLimiter(env, UnitOfMeasureKindUseTypeConstants.COMPONENT_VENDOR_NAME, UnitOfMeasureKindUseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
6846                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6847
6848                    var objects = entities.stream()
6849                            .map(UnitOfMeasureKindUseTypeObject::new)
6850                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6851
6852                    data = new CountedObjects<>(objectLimiter, objects);
6853                }
6854            }
6855        } catch (NamingException ex) {
6856            throw new RuntimeException(ex);
6857        }
6858
6859        return data;
6860    }
6861
6862    @GraphQLField
6863    @GraphQLName("entityAttributeType")
6864    static EntityAttributeTypeObject entityAttributeType(final DataFetchingEnvironment env,
6865            @GraphQLName("entityAttributeTypeName") @GraphQLNonNull final String entityAttributeTypeName) {
6866        EntityAttributeType entityAttributeType;
6867
6868        try {
6869            var commandForm = CoreUtil.getHome().getGetEntityAttributeTypeForm();
6870
6871            commandForm.setEntityAttributeTypeName(entityAttributeTypeName);
6872
6873            entityAttributeType = CDI.current().select(GetEntityAttributeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
6874        } catch (NamingException ex) {
6875            throw new RuntimeException(ex);
6876        }
6877
6878        return entityAttributeType == null ? null : new EntityAttributeTypeObject(entityAttributeType);
6879    }
6880
6881    @GraphQLField
6882    @GraphQLName("entityAttributeTypes")
6883    @GraphQLNonNull
6884    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
6885    static CountingPaginatedData<EntityAttributeTypeObject> entityAttributeTypes(final DataFetchingEnvironment env) {
6886        CountingPaginatedData<EntityAttributeTypeObject> data;
6887
6888        try {
6889            var commandForm = CoreUtil.getHome().getGetEntityAttributeTypesForm();
6890            var command = CDI.current().select(GetEntityAttributeTypesCommand.class).get();
6891
6892            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6893            if(totalEntities == null) {
6894                data = Connections.emptyConnection();
6895            } else {
6896                try(var objectLimiter = new ObjectLimiter(env, EntityAttributeTypeConstants.COMPONENT_VENDOR_NAME, EntityAttributeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
6897                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
6898
6899                    var entityAttributeTypes = entities.stream()
6900                            .map(EntityAttributeTypeObject::new)
6901                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
6902
6903                    data = new CountedObjects<>(objectLimiter, entityAttributeTypes);
6904                }
6905            }
6906        } catch (NamingException ex) {
6907            throw new RuntimeException(ex);
6908        }
6909
6910        return data;
6911    }
6912
6913    @GraphQLField
6914    @GraphQLName("componentVendorResults")
6915    static ComponentVendorResultsObject componentVendorResults(final DataFetchingEnvironment env,
6916            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
6917        ComponentVendorResultsObject componentVendorResultsObject = null;
6918
6919        try {
6920            var commandForm = SearchUtil.getHome().getGetComponentVendorResultsForm();
6921
6922            commandForm.setSearchTypeName(searchTypeName);
6923
6924            if(CDI.current().select(GetComponentVendorResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
6925                componentVendorResultsObject = new ComponentVendorResultsObject(commandForm);
6926            }
6927        } catch (NamingException ex) {
6928            throw new RuntimeException(ex);
6929        }
6930
6931        return componentVendorResultsObject;
6932    }
6933
6934    @GraphQLField
6935    @GraphQLName("entityTypeResults")
6936    static EntityTypeResultsObject entityTypeResults(final DataFetchingEnvironment env,
6937            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
6938        EntityTypeResultsObject entityTypeResultsObject = null;
6939
6940        try {
6941            var commandForm = SearchUtil.getHome().getGetEntityTypeResultsForm();
6942
6943            commandForm.setSearchTypeName(searchTypeName);
6944
6945            if(CDI.current().select(GetEntityTypeResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
6946                entityTypeResultsObject = new EntityTypeResultsObject(commandForm);
6947            }
6948        } catch (NamingException ex) {
6949            throw new RuntimeException(ex);
6950        }
6951
6952        return entityTypeResultsObject;
6953    }
6954
6955    @GraphQLField
6956    @GraphQLName("entityAliasTypeResults")
6957    static EntityAliasTypeResultsObject entityAliasTypeResults(final DataFetchingEnvironment env,
6958            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
6959        EntityAliasTypeResultsObject entityAliasTypeResultsObject = null;
6960
6961        try {
6962            var commandForm = SearchUtil.getHome().getGetEntityAliasTypeResultsForm();
6963
6964            commandForm.setSearchTypeName(searchTypeName);
6965
6966            if(CDI.current().select(GetEntityAliasTypeResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
6967                entityAliasTypeResultsObject = new EntityAliasTypeResultsObject(commandForm);
6968            }
6969        } catch (NamingException ex) {
6970            throw new RuntimeException(ex);
6971        }
6972
6973        return entityAliasTypeResultsObject;
6974    }
6975
6976    @GraphQLField
6977    @GraphQLName("entityAttributeGroupResults")
6978    static EntityAttributeGroupResultsObject entityAttributeGroupResults(final DataFetchingEnvironment env,
6979            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
6980        EntityAttributeGroupResultsObject entityAttributeGroupResultsObject = null;
6981
6982        try {
6983            var commandForm = SearchUtil.getHome().getGetEntityAttributeGroupResultsForm();
6984
6985            commandForm.setSearchTypeName(searchTypeName);
6986
6987            if(CDI.current().select(GetEntityAttributeGroupResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
6988                entityAttributeGroupResultsObject = new EntityAttributeGroupResultsObject(commandForm);
6989            }
6990        } catch (NamingException ex) {
6991            throw new RuntimeException(ex);
6992        }
6993
6994        return entityAttributeGroupResultsObject;
6995    }
6996
6997    @GraphQLField
6998    @GraphQLName("entityAttributeResults")
6999    static EntityAttributeResultsObject entityAttributeResults(final DataFetchingEnvironment env,
7000            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7001        EntityAttributeResultsObject entityAttributeResultsObject = null;
7002
7003        try {
7004            var commandForm = SearchUtil.getHome().getGetEntityAttributeResultsForm();
7005
7006            commandForm.setSearchTypeName(searchTypeName);
7007
7008            if(CDI.current().select(GetEntityAttributeResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7009                entityAttributeResultsObject = new EntityAttributeResultsObject(commandForm);
7010            }
7011        } catch (NamingException ex) {
7012            throw new RuntimeException(ex);
7013        }
7014
7015        return entityAttributeResultsObject;
7016    }
7017
7018    @GraphQLField
7019    @GraphQLName("entityListItemResults")
7020    static EntityListItemResultsObject entityListItemResults(final DataFetchingEnvironment env,
7021            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7022        EntityListItemResultsObject entityListItemResultsObject = null;
7023
7024        try {
7025            var commandForm = SearchUtil.getHome().getGetEntityListItemResultsForm();
7026
7027            commandForm.setSearchTypeName(searchTypeName);
7028
7029            if(CDI.current().select(GetEntityListItemResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7030                entityListItemResultsObject = new EntityListItemResultsObject(commandForm);
7031            }
7032        } catch (NamingException ex) {
7033            throw new RuntimeException(ex);
7034        }
7035
7036        return entityListItemResultsObject;
7037    }
7038
7039    @GraphQLField
7040    @GraphQLName("customerResults")
7041    static CustomerResultsObject customerResults(final DataFetchingEnvironment env,
7042            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7043        CustomerResultsObject customerResultsObject = null;
7044
7045        try {
7046            var commandForm = SearchUtil.getHome().getGetCustomerResultsForm();
7047
7048            commandForm.setSearchTypeName(searchTypeName);
7049
7050            if(CDI.current().select(GetCustomerResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7051                customerResultsObject = new CustomerResultsObject(commandForm);
7052            }
7053        } catch (NamingException ex) {
7054            throw new RuntimeException(ex);
7055        }
7056
7057        return customerResultsObject;
7058    }
7059
7060    @GraphQLField
7061    @GraphQLName("employeeResults")
7062    static EmployeeResultsObject employeeResults(final DataFetchingEnvironment env,
7063            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7064        EmployeeResultsObject employeeResultsObject = null;
7065
7066        try {
7067            var commandForm = SearchUtil.getHome().getGetEmployeeResultsForm();
7068
7069            commandForm.setSearchTypeName(searchTypeName);
7070
7071            if(CDI.current().select(GetEmployeeResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7072                employeeResultsObject = new EmployeeResultsObject(commandForm);
7073            }
7074        } catch (NamingException ex) {
7075            throw new RuntimeException(ex);
7076        }
7077
7078        return employeeResultsObject;
7079    }
7080
7081    @GraphQLField
7082    @GraphQLName("itemResults")
7083    static ItemResultsObject itemResults(final DataFetchingEnvironment env,
7084            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7085        ItemResultsObject itemResultsObject = null;
7086
7087        try {
7088            var commandForm = SearchUtil.getHome().getGetItemResultsForm();
7089
7090            commandForm.setSearchTypeName(searchTypeName);
7091
7092            if(CDI.current().select(GetItemResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7093                itemResultsObject = new ItemResultsObject(commandForm);
7094            }
7095        } catch (NamingException ex) {
7096            throw new RuntimeException(ex);
7097        }
7098
7099        return itemResultsObject;
7100    }
7101
7102    @GraphQLField
7103    @GraphQLName("checkItemSpelling")
7104    static CheckItemSpellingObject checkItemSpelling(final DataFetchingEnvironment env,
7105            @GraphQLName("languageIsoName") final String languageIsoName,
7106            @GraphQLName("searchDefaultOperatorName") final String searchDefaultOperatorName,
7107            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName,
7108            @GraphQLName("q") final String q) {
7109        var checkItemSpellingObject = new CheckItemSpellingObject();
7110
7111        try {
7112            var commandForm = SearchUtil.getHome().getCheckItemSpellingForm();
7113
7114            commandForm.setLanguageIsoName(languageIsoName);
7115            commandForm.setSearchDefaultOperatorName(searchDefaultOperatorName);
7116            commandForm.setSearchTypeName(searchTypeName);
7117            commandForm.setQ(q);
7118
7119            var commandResult = SearchUtil.getHome().checkItemSpelling(getUserVisitPK(env), commandForm);
7120            checkItemSpellingObject.setCommandResult(commandResult);
7121            checkItemSpellingObject.setResult(commandResult.hasErrors() ? null : (CheckItemSpellingResult)commandResult.getExecutionResult().getResult());
7122        } catch (NamingException ex) {
7123            throw new RuntimeException(ex);
7124        }
7125
7126        return checkItemSpellingObject;
7127    }
7128
7129    @GraphQLField
7130    @GraphQLName("vendorResults")
7131    static VendorResultsObject vendorResults(final DataFetchingEnvironment env,
7132            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7133        VendorResultsObject vendorResultsObject = null;
7134
7135        try {
7136            var commandForm = SearchUtil.getHome().getGetVendorResultsForm();
7137
7138            commandForm.setSearchTypeName(searchTypeName);
7139
7140            if(CDI.current().select(GetVendorResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7141                vendorResultsObject = new VendorResultsObject(commandForm);
7142            }
7143        } catch (NamingException ex) {
7144            throw new RuntimeException(ex);
7145        }
7146
7147        return vendorResultsObject;
7148    }
7149
7150    @GraphQLField
7151    @GraphQLName("shippingMethodResults")
7152    static ShippingMethodResultsObject shippingMethodResults(final DataFetchingEnvironment env,
7153            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7154        ShippingMethodResultsObject shippingMethodResultsObject = null;
7155
7156        try {
7157            var commandForm = SearchUtil.getHome().getGetShippingMethodResultsForm();
7158
7159            commandForm.setSearchTypeName(searchTypeName);
7160
7161            if(CDI.current().select(GetShippingMethodResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7162                shippingMethodResultsObject = new ShippingMethodResultsObject(commandForm);
7163            }
7164        } catch (NamingException ex) {
7165            throw new RuntimeException(ex);
7166        }
7167
7168        return shippingMethodResultsObject;
7169    }
7170
7171    @GraphQLField
7172    @GraphQLName("warehouseResults")
7173    static WarehouseResultsObject warehouseResults(final DataFetchingEnvironment env,
7174            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7175        WarehouseResultsObject warehouseResultsObject = null;
7176
7177        try {
7178            var commandForm = SearchUtil.getHome().getGetWarehouseResultsForm();
7179
7180            commandForm.setSearchTypeName(searchTypeName);
7181
7182            if(CDI.current().select(GetWarehouseResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7183                warehouseResultsObject = new WarehouseResultsObject(commandForm);
7184            }
7185        } catch (NamingException ex) {
7186            throw new RuntimeException(ex);
7187        }
7188
7189        return warehouseResultsObject;
7190    }
7191
7192    @GraphQLField
7193    @GraphQLName("contentCatalogResults")
7194    static ContentCatalogResultsObject contentCatalogResults(final DataFetchingEnvironment env,
7195            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7196        ContentCatalogResultsObject contentCatalogResultsObject = null;
7197
7198        try {
7199            var commandForm = SearchUtil.getHome().getGetContentCatalogResultsForm();
7200
7201            commandForm.setSearchTypeName(searchTypeName);
7202
7203            if(CDI.current().select(GetContentCatalogResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7204                contentCatalogResultsObject = new ContentCatalogResultsObject(commandForm);
7205            }
7206        } catch (NamingException ex) {
7207            throw new RuntimeException(ex);
7208        }
7209
7210        return contentCatalogResultsObject;
7211    }
7212
7213    @GraphQLField
7214    @GraphQLName("contentCatalogItemResults")
7215    static ContentCatalogItemResultsObject contentCatalogItemResults(final DataFetchingEnvironment env,
7216            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7217        ContentCatalogItemResultsObject contentCatalogItemResultsObject = null;
7218
7219        try {
7220            var commandForm = SearchUtil.getHome().getGetContentCatalogItemResultsForm();
7221
7222            commandForm.setSearchTypeName(searchTypeName);
7223
7224            if(CDI.current().select(GetContentCatalogItemResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7225                contentCatalogItemResultsObject = new ContentCatalogItemResultsObject(commandForm);
7226            }
7227        } catch (NamingException ex) {
7228            throw new RuntimeException(ex);
7229        }
7230
7231        return contentCatalogItemResultsObject;
7232    }
7233
7234    @GraphQLField
7235    @GraphQLName("contentCategoryResults")
7236    static ContentCategoryResultsObject contentCategoryResults(final DataFetchingEnvironment env,
7237            @GraphQLName("searchTypeName") @GraphQLNonNull final String searchTypeName) {
7238        ContentCategoryResultsObject contentCategoryResultsObject = null;
7239
7240        try {
7241            var commandForm = SearchUtil.getHome().getGetContentCategoryResultsForm();
7242
7243            commandForm.setSearchTypeName(searchTypeName);
7244
7245            if(CDI.current().select(GetContentCategoryResultsCommand.class).get().canQueryByGraphQl(getUserVisitPK(env), commandForm)) {
7246                contentCategoryResultsObject = new ContentCategoryResultsObject(commandForm);
7247            }
7248        } catch (NamingException ex) {
7249            throw new RuntimeException(ex);
7250        }
7251
7252        return contentCategoryResultsObject;
7253    }
7254
7255    @GraphQLField
7256    @GraphQLName("color")
7257    static ColorObject color(final DataFetchingEnvironment env,
7258            @GraphQLName("colorName") final String colorName,
7259            @GraphQLName("id") @GraphQLID final String id) {
7260        Color color;
7261
7262        try {
7263            var commandForm = CoreUtil.getHome().getGetColorForm();
7264
7265            commandForm.setColorName(colorName);
7266            commandForm.setUuid(id);
7267
7268            color = CDI.current().select(GetColorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7269        } catch (NamingException ex) {
7270            throw new RuntimeException(ex);
7271        }
7272
7273        return color == null ? null : new ColorObject(color);
7274    }
7275
7276    @GraphQLField
7277    @GraphQLName("colors")
7278    @GraphQLNonNull
7279    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7280    static CountingPaginatedData<ColorObject> colors(final DataFetchingEnvironment env) {
7281        CountingPaginatedData<ColorObject> data;
7282
7283        try {
7284            var commandForm = CoreUtil.getHome().getGetColorsForm();
7285            var command = CDI.current().select(GetColorsCommand.class).get();
7286
7287            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7288            if(totalEntities == null) {
7289                data = Connections.emptyConnection();
7290            } else {
7291                try(var objectLimiter = new ObjectLimiter(env, ColorConstants.COMPONENT_VENDOR_NAME, ColorConstants.ENTITY_TYPE_NAME, totalEntities)) {
7292                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7293
7294                    var colors = entities.stream()
7295                            .map(ColorObject::new)
7296                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7297
7298                    data = new CountedObjects<>(objectLimiter, colors);
7299                }
7300            }
7301        } catch (NamingException ex) {
7302            throw new RuntimeException(ex);
7303        }
7304
7305        return data;
7306    }
7307
7308    @GraphQLField
7309    @GraphQLName("fontStyle")
7310    static FontStyleObject fontStyle(final DataFetchingEnvironment env,
7311            @GraphQLName("fontStyleName") final String fontStyleName,
7312            @GraphQLName("id") @GraphQLID final String id) {
7313        FontStyle fontStyle;
7314
7315        try {
7316            var commandForm = CoreUtil.getHome().getGetFontStyleForm();
7317
7318            commandForm.setFontStyleName(fontStyleName);
7319            commandForm.setUuid(id);
7320
7321            fontStyle = CDI.current().select(GetFontStyleCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7322        } catch (NamingException ex) {
7323            throw new RuntimeException(ex);
7324        }
7325
7326        return fontStyle == null ? null : new FontStyleObject(fontStyle);
7327    }
7328
7329    @GraphQLField
7330    @GraphQLName("fontStyles")
7331    @GraphQLNonNull
7332    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7333    static CountingPaginatedData<FontStyleObject> fontStyles(final DataFetchingEnvironment env) {
7334        CountingPaginatedData<FontStyleObject> data;
7335
7336        try {
7337            var commandForm = CoreUtil.getHome().getGetFontStylesForm();
7338            var command = CDI.current().select(GetFontStylesCommand.class).get();
7339
7340            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7341            if(totalEntities == null) {
7342                data = Connections.emptyConnection();
7343            } else {
7344                try(var objectLimiter = new ObjectLimiter(env, FontStyleConstants.COMPONENT_VENDOR_NAME, FontStyleConstants.ENTITY_TYPE_NAME, totalEntities)) {
7345                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7346
7347                    var fontStyles = entities.stream()
7348                            .map(FontStyleObject::new)
7349                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7350
7351                    data = new CountedObjects<>(objectLimiter, fontStyles);
7352                }
7353            }
7354        } catch (NamingException ex) {
7355            throw new RuntimeException(ex);
7356        }
7357
7358        return data;
7359    }
7360
7361    @GraphQLField
7362    @GraphQLName("fontWeight")
7363    static FontWeightObject fontWeight(final DataFetchingEnvironment env,
7364            @GraphQLName("fontWeightName") final String fontWeightName,
7365            @GraphQLName("id") @GraphQLID final String id) {
7366        FontWeight fontWeight;
7367
7368        try {
7369            var commandForm = CoreUtil.getHome().getGetFontWeightForm();
7370
7371            commandForm.setFontWeightName(fontWeightName);
7372            commandForm.setUuid(id);
7373
7374            fontWeight = CDI.current().select(GetFontWeightCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7375        } catch (NamingException ex) {
7376            throw new RuntimeException(ex);
7377        }
7378
7379        return fontWeight == null ? null : new FontWeightObject(fontWeight);
7380    }
7381
7382    @GraphQLField
7383    @GraphQLName("fontWeights")
7384    @GraphQLNonNull
7385    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7386    static CountingPaginatedData<FontWeightObject> fontWeights(final DataFetchingEnvironment env) {
7387        CountingPaginatedData<FontWeightObject> data;
7388
7389        try {
7390            var commandForm = CoreUtil.getHome().getGetFontWeightsForm();
7391            var command = CDI.current().select(GetFontWeightsCommand.class).get();
7392
7393            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7394            if(totalEntities == null) {
7395                data = Connections.emptyConnection();
7396            } else {
7397                try(var objectLimiter = new ObjectLimiter(env, FontWeightConstants.COMPONENT_VENDOR_NAME, FontWeightConstants.ENTITY_TYPE_NAME, totalEntities)) {
7398                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7399
7400                    var fontWeights = entities.stream()
7401                            .map(FontWeightObject::new)
7402                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7403
7404                    data = new CountedObjects<>(objectLimiter, fontWeights);
7405                }
7406            }
7407        } catch (NamingException ex) {
7408            throw new RuntimeException(ex);
7409        }
7410
7411        return data;
7412    }
7413
7414    @GraphQLField
7415    @GraphQLName("textDecoration")
7416    static TextDecorationObject textDecoration(final DataFetchingEnvironment env,
7417            @GraphQLName("textDecorationName") final String textDecorationName,
7418            @GraphQLName("id") @GraphQLID final String id) {
7419        TextDecoration textDecoration;
7420
7421        try {
7422            var commandForm = CoreUtil.getHome().getGetTextDecorationForm();
7423
7424            commandForm.setTextDecorationName(textDecorationName);
7425            commandForm.setUuid(id);
7426
7427            textDecoration = CDI.current().select(GetTextDecorationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7428        } catch (NamingException ex) {
7429            throw new RuntimeException(ex);
7430        }
7431
7432        return textDecoration == null ? null : new TextDecorationObject(textDecoration);
7433    }
7434
7435    @GraphQLField
7436    @GraphQLName("textDecorations")
7437    @GraphQLNonNull
7438    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7439    static CountingPaginatedData<TextDecorationObject> textDecorations(final DataFetchingEnvironment env) {
7440        CountingPaginatedData<TextDecorationObject> data;
7441
7442        try {
7443            var commandForm = CoreUtil.getHome().getGetTextDecorationsForm();
7444            var command = CDI.current().select(GetTextDecorationsCommand.class).get();
7445
7446            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7447            if(totalEntities == null) {
7448                data = Connections.emptyConnection();
7449            } else {
7450                try(var objectLimiter = new ObjectLimiter(env, TextDecorationConstants.COMPONENT_VENDOR_NAME, TextDecorationConstants.ENTITY_TYPE_NAME, totalEntities)) {
7451                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7452
7453                    var textDecorations = entities.stream()
7454                            .map(TextDecorationObject::new)
7455                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7456
7457                    data = new CountedObjects<>(objectLimiter, textDecorations);
7458                }
7459            }
7460        } catch (NamingException ex) {
7461            throw new RuntimeException(ex);
7462        }
7463
7464        return data;
7465    }
7466
7467    @GraphQLField
7468    @GraphQLName("textTransformation")
7469    static TextTransformationObject textTransformation(final DataFetchingEnvironment env,
7470            @GraphQLName("textTransformationName") final String textTransformationName,
7471            @GraphQLName("id") @GraphQLID final String id) {
7472        TextTransformation textTransformation;
7473
7474        try {
7475            var commandForm = CoreUtil.getHome().getGetTextTransformationForm();
7476
7477            commandForm.setTextTransformationName(textTransformationName);
7478            commandForm.setUuid(id);
7479
7480            textTransformation = CDI.current().select(GetTextTransformationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7481        } catch (NamingException ex) {
7482            throw new RuntimeException(ex);
7483        }
7484
7485        return textTransformation == null ? null : new TextTransformationObject(textTransformation);
7486    }
7487
7488    @GraphQLField
7489    @GraphQLName("textTransformations")
7490    @GraphQLNonNull
7491    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7492    static CountingPaginatedData<TextTransformationObject> textTransformations(final DataFetchingEnvironment env) {
7493        CountingPaginatedData<TextTransformationObject> data;
7494
7495        try {
7496            var commandForm = CoreUtil.getHome().getGetTextTransformationsForm();
7497            var command = CDI.current().select(GetTextTransformationsCommand.class).get();
7498
7499            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7500            if(totalEntities == null) {
7501                data = Connections.emptyConnection();
7502            } else {
7503                try(var objectLimiter = new ObjectLimiter(env, TextTransformationConstants.COMPONENT_VENDOR_NAME, TextTransformationConstants.ENTITY_TYPE_NAME, totalEntities)) {
7504                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7505
7506                    var textTransformations = entities.stream()
7507                            .map(TextTransformationObject::new)
7508                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7509
7510                    data = new CountedObjects<>(objectLimiter, textTransformations);
7511                }
7512            }
7513        } catch (NamingException ex) {
7514            throw new RuntimeException(ex);
7515        }
7516
7517        return data;
7518    }
7519
7520    @GraphQLField
7521    @GraphQLName("userLogin")
7522    static UserLoginObject userLogin(final DataFetchingEnvironment env,
7523            @GraphQLName("username") final String username,
7524            @GraphQLName("id") @GraphQLID final String id) {
7525        UserLogin userLogin;
7526
7527        try {
7528            var commandForm = UserUtil.getHome().getGetUserLoginForm();
7529
7530            commandForm.setUsername(username);
7531            commandForm.setUuid(id);
7532
7533            var getUserLoginCommand = CDI.current().select(GetUserLoginCommand.class).get();
7534            userLogin = getUserLoginCommand.getEntityForGraphQl(getUserVisitPK(env), commandForm);
7535        } catch (NamingException ex) {
7536            throw new RuntimeException(ex);
7537        }
7538
7539        return userLogin == null ? null : new UserLoginObject(userLogin);
7540    }
7541
7542    @GraphQLField
7543    @GraphQLName("recoveryQuestion")
7544    static RecoveryQuestionObject recoveryQuestion(final DataFetchingEnvironment env,
7545            @GraphQLName("recoveryQuestionName") final String recoveryQuestionName,
7546            @GraphQLName("id") @GraphQLID final String id,
7547            @GraphQLName("username") final String username) {
7548        RecoveryQuestion recoveryQuestion;
7549
7550        try {
7551            var commandForm = UserUtil.getHome().getGetRecoveryQuestionForm();
7552
7553            commandForm.setRecoveryQuestionName(recoveryQuestionName);
7554            commandForm.setUuid(id);
7555            commandForm.setUsername(username);
7556
7557            recoveryQuestion = CDI.current().select(GetRecoveryQuestionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7558        } catch (NamingException ex) {
7559            throw new RuntimeException(ex);
7560        }
7561
7562        return recoveryQuestion == null ? null : new RecoveryQuestionObject(recoveryQuestion);
7563    }
7564
7565    @GraphQLField
7566    @GraphQLName("recoveryQuestions")
7567    @GraphQLNonNull
7568    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7569    static CountingPaginatedData<RecoveryQuestionObject> recoveryQuestions(final DataFetchingEnvironment env) {
7570        CountingPaginatedData<RecoveryQuestionObject> data;
7571
7572        try {
7573            var commandForm = UserUtil.getHome().getGetRecoveryQuestionsForm();
7574            var command = CDI.current().select(GetRecoveryQuestionsCommand.class).get();
7575
7576            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7577            if(totalEntities == null) {
7578                data = Connections.emptyConnection();
7579            } else {
7580                try(var objectLimiter = new ObjectLimiter(env, RecoveryQuestionConstants.COMPONENT_VENDOR_NAME, RecoveryQuestionConstants.ENTITY_TYPE_NAME, totalEntities)) {
7581                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7582
7583                    var recoveryQuestions = entities.stream()
7584                            .map(RecoveryQuestionObject::new)
7585                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7586
7587                    data = new CountedObjects<>(objectLimiter, recoveryQuestions);
7588                }
7589            }
7590        } catch (NamingException ex) {
7591            throw new RuntimeException(ex);
7592        }
7593
7594        return data;
7595    }
7596
7597    @GraphQLField
7598    @GraphQLName("userSession")
7599    static UserSessionObject userSession(final DataFetchingEnvironment env) {
7600        var userSession = BaseGraphQl.getUserSession(env);
7601
7602        return userSession == null ? null : new UserSessionObject(userSession);
7603    }
7604
7605    @GraphQLField
7606    @GraphQLName("userVisitGroup")
7607    static UserVisitGroupObject userVisitGroup(final DataFetchingEnvironment env,
7608            @GraphQLName("userVisitGroupName") final String userVisitGroupName,
7609            @GraphQLName("id") @GraphQLID final String id) {
7610        UserVisitGroup userVisitGroup;
7611
7612        try {
7613            var commandForm = UserUtil.getHome().getGetUserVisitGroupForm();
7614
7615            commandForm.setUserVisitGroupName(userVisitGroupName);
7616            commandForm.setUuid(id);
7617
7618            userVisitGroup = CDI.current().select(GetUserVisitGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7619        } catch (NamingException ex) {
7620            throw new RuntimeException(ex);
7621        }
7622
7623        return userVisitGroup == null ? null : new UserVisitGroupObject(userVisitGroup);
7624    }
7625
7626    @GraphQLField
7627    @GraphQLName("userVisitGroups")
7628    @GraphQLNonNull
7629    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7630    static CountingPaginatedData<UserVisitGroupObject> userVisitGroups(final DataFetchingEnvironment env) {
7631        CountingPaginatedData<UserVisitGroupObject> data;
7632
7633        try {
7634            var commandForm = UserUtil.getHome().getGetUserVisitGroupsForm();
7635            var command = CDI.current().select(GetUserVisitGroupsCommand.class).get();
7636
7637            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7638            if(totalEntities == null) {
7639                data = Connections.emptyConnection();
7640            } else {
7641                try(var objectLimiter = new ObjectLimiter(env, UserVisitGroupConstants.COMPONENT_VENDOR_NAME, UserVisitGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
7642                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7643
7644                    var userVisitGroups = entities.stream()
7645                            .map(UserVisitGroupObject::new)
7646                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7647
7648                    data = new CountedObjects<>(objectLimiter, userVisitGroups);
7649                }
7650            }
7651        } catch (NamingException ex) {
7652            throw new RuntimeException(ex);
7653        }
7654
7655        return data;
7656    }
7657
7658    @GraphQLField
7659    @GraphQLName("userVisit")
7660    static UserVisitObject userVisit(final DataFetchingEnvironment env) {
7661        var userVisit = BaseGraphQl.getUserVisit(env);
7662
7663        return userVisit == null ? null : new UserVisitObject(userVisit);
7664    }
7665
7666    @GraphQLField
7667    @GraphQLName("symbolPosition")
7668    static SymbolPositionObject symbolPosition(final DataFetchingEnvironment env,
7669            @GraphQLName("symbolPositionName") final String symbolPositionName,
7670            @GraphQLName("id") @GraphQLID final String id) {
7671        SymbolPosition symbolPosition;
7672
7673        try {
7674            var commandForm = AccountingUtil.getHome().getGetSymbolPositionForm();
7675
7676            commandForm.setSymbolPositionName(symbolPositionName);
7677            commandForm.setUuid(id);
7678
7679            symbolPosition = CDI.current().select(GetSymbolPositionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7680        } catch (NamingException ex) {
7681            throw new RuntimeException(ex);
7682        }
7683
7684        return symbolPosition == null ? null : new SymbolPositionObject(symbolPosition);
7685    }
7686
7687    @GraphQLField
7688    @GraphQLName("symbolPositions")
7689    @GraphQLNonNull
7690    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7691    static CountingPaginatedData<SymbolPositionObject> symbolPositions(final DataFetchingEnvironment env) {
7692        CountingPaginatedData<SymbolPositionObject> data;
7693
7694        try {
7695            var commandForm = AccountingUtil.getHome().getGetSymbolPositionsForm();
7696            var command = CDI.current().select(GetSymbolPositionsCommand.class).get();
7697
7698            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7699            if(totalEntities == null) {
7700                data = Connections.emptyConnection();
7701            } else {
7702                try(var objectLimiter = new ObjectLimiter(env, SymbolPositionConstants.COMPONENT_VENDOR_NAME, SymbolPositionConstants.ENTITY_TYPE_NAME, totalEntities)) {
7703                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7704
7705                    var symbolPositions = entities.stream()
7706                            .map(SymbolPositionObject::new)
7707                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7708
7709                    data = new CountedObjects<>(objectLimiter, symbolPositions);
7710                }
7711            }
7712        } catch (NamingException ex) {
7713            throw new RuntimeException(ex);
7714        }
7715
7716        return data;
7717    }
7718
7719    @GraphQLField
7720    @GraphQLName("currency")
7721    static CurrencyObject currency(final DataFetchingEnvironment env,
7722            @GraphQLName("currencyIsoName") final String currencyIsoName,
7723            @GraphQLName("id") @GraphQLID final String id) {
7724        Currency currency;
7725
7726        try {
7727            var commandForm = AccountingUtil.getHome().getGetCurrencyForm();
7728
7729            commandForm.setCurrencyIsoName(currencyIsoName);
7730            commandForm.setUuid(id);
7731
7732            currency = CDI.current().select(GetCurrencyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7733        } catch (NamingException ex) {
7734            throw new RuntimeException(ex);
7735        }
7736
7737        return currency == null ? null : new CurrencyObject(currency);
7738    }
7739
7740    @GraphQLField
7741    @GraphQLName("currencies")
7742    @GraphQLNonNull
7743    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7744    static CountingPaginatedData<CurrencyObject> currencies(final DataFetchingEnvironment env) {
7745        CountingPaginatedData<CurrencyObject> data;
7746
7747        try {
7748            var commandForm = AccountingUtil.getHome().getGetCurrenciesForm();
7749            var command = CDI.current().select(GetCurrenciesCommand.class).get();
7750
7751            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7752            if(totalEntities == null) {
7753                data = Connections.emptyConnection();
7754            } else {
7755                try(var objectLimiter = new ObjectLimiter(env, CurrencyConstants.COMPONENT_VENDOR_NAME, CurrencyConstants.ENTITY_TYPE_NAME, totalEntities)) {
7756                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7757
7758                    var currencies = entities.stream()
7759                            .map(CurrencyObject::new)
7760                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7761
7762                    data = new CountedObjects<>(objectLimiter, currencies);
7763                }
7764            }
7765        } catch (NamingException ex) {
7766            throw new RuntimeException(ex);
7767        }
7768
7769        return data;
7770    }
7771
7772    @GraphQLField
7773    @GraphQLName("language")
7774    static LanguageObject language(final DataFetchingEnvironment env,
7775            @GraphQLName("languageIsoName") final String languageIsoName,
7776            @GraphQLName("id") @GraphQLID final String id) {
7777        Language language;
7778
7779        try {
7780            var commandForm = PartyUtil.getHome().getGetLanguageForm();
7781
7782            commandForm.setLanguageIsoName(languageIsoName);
7783            commandForm.setUuid(id);
7784
7785            language = CDI.current().select(GetLanguageCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7786        } catch (NamingException ex) {
7787            throw new RuntimeException(ex);
7788        }
7789
7790        return language == null ? null : new LanguageObject(language);
7791    }
7792
7793    @GraphQLField
7794    @GraphQLName("languages")
7795    @GraphQLNonNull
7796    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7797    static CountingPaginatedData<LanguageObject> languages(final DataFetchingEnvironment env) {
7798        CountingPaginatedData<LanguageObject> data;
7799
7800        try {
7801            var commandForm = PartyUtil.getHome().getGetLanguagesForm();
7802            var command = CDI.current().select(GetLanguagesCommand.class).get();
7803
7804            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7805            if(totalEntities == null) {
7806                data = Connections.emptyConnection();
7807            } else {
7808                try(var objectLimiter = new ObjectLimiter(env, LanguageConstants.COMPONENT_VENDOR_NAME, LanguageConstants.ENTITY_TYPE_NAME, totalEntities)) {
7809                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7810
7811                    var languages = entities.stream()
7812                            .map(LanguageObject::new)
7813                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7814
7815                    data = new CountedObjects<>(objectLimiter, languages);
7816                }
7817            }
7818        } catch (NamingException ex) {
7819            throw new RuntimeException(ex);
7820        }
7821
7822        return data;
7823    }
7824
7825    @GraphQLField
7826    @GraphQLName("dateTimeFormat")
7827    static DateTimeFormatObject dateTimeFormat(final DataFetchingEnvironment env,
7828            @GraphQLName("dateTimeFormatName") final String dateTimeFormatName,
7829            @GraphQLName("id") @GraphQLID final String id) {
7830        DateTimeFormat dateTimeFormat;
7831
7832        try {
7833            var commandForm = PartyUtil.getHome().getGetDateTimeFormatForm();
7834
7835            commandForm.setDateTimeFormatName(dateTimeFormatName);
7836            commandForm.setUuid(id);
7837
7838            dateTimeFormat = CDI.current().select(GetDateTimeFormatCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7839        } catch (NamingException ex) {
7840            throw new RuntimeException(ex);
7841        }
7842
7843        return dateTimeFormat == null ? null : new DateTimeFormatObject(dateTimeFormat);
7844    }
7845
7846    @GraphQLField
7847    @GraphQLName("dateTimeFormats")
7848    @GraphQLNonNull
7849    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7850    static CountingPaginatedData<DateTimeFormatObject> dateTimeFormats(final DataFetchingEnvironment env) {
7851        CountingPaginatedData<DateTimeFormatObject> data;
7852
7853        try {
7854            var commandForm = PartyUtil.getHome().getGetDateTimeFormatsForm();
7855            var command = CDI.current().select(GetDateTimeFormatsCommand.class).get();
7856
7857            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7858            if(totalEntities == null) {
7859                data = Connections.emptyConnection();
7860            } else {
7861                try(var objectLimiter = new ObjectLimiter(env, DateTimeFormatConstants.COMPONENT_VENDOR_NAME, DateTimeFormatConstants.ENTITY_TYPE_NAME, totalEntities)) {
7862                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7863
7864                    var dateTimeFormats = entities.stream()
7865                            .map(DateTimeFormatObject::new)
7866                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7867
7868                    data = new CountedObjects<>(objectLimiter, dateTimeFormats);
7869                }
7870            }
7871        } catch (NamingException ex) {
7872            throw new RuntimeException(ex);
7873        }
7874
7875        return data;
7876    }
7877
7878    @GraphQLField
7879    @GraphQLName("timeZone")
7880    static TimeZoneObject timeZone(final DataFetchingEnvironment env,
7881            @GraphQLName("javaTimeZoneName") final String javaTimeZoneName,
7882            @GraphQLName("id") @GraphQLID final String id) {
7883        TimeZone timeZone;
7884
7885        try {
7886            var commandForm = PartyUtil.getHome().getGetTimeZoneForm();
7887
7888            commandForm.setJavaTimeZoneName(javaTimeZoneName);
7889            commandForm.setUuid(id);
7890
7891            timeZone = CDI.current().select(GetTimeZoneCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7892        } catch (NamingException ex) {
7893            throw new RuntimeException(ex);
7894        }
7895
7896        return timeZone == null ? null : new TimeZoneObject(timeZone);
7897    }
7898
7899    @GraphQLField
7900    @GraphQLName("timeZones")
7901    @GraphQLNonNull
7902    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7903    static CountingPaginatedData<TimeZoneObject> timeZones(final DataFetchingEnvironment env) {
7904        CountingPaginatedData<TimeZoneObject> data;
7905
7906        try {
7907            var commandForm = PartyUtil.getHome().getGetTimeZonesForm();
7908            var command = CDI.current().select(GetTimeZonesCommand.class).get();
7909
7910            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7911            if(totalEntities == null) {
7912                data = Connections.emptyConnection();
7913            } else {
7914                try(var objectLimiter = new ObjectLimiter(env, TimeZoneConstants.COMPONENT_VENDOR_NAME, TimeZoneConstants.ENTITY_TYPE_NAME, totalEntities)) {
7915                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7916
7917                    var timeZones = entities.stream()
7918                            .map(TimeZoneObject::new)
7919                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7920
7921                    data = new CountedObjects<>(objectLimiter, timeZones);
7922                }
7923            }
7924        } catch (NamingException ex) {
7925            throw new RuntimeException(ex);
7926        }
7927
7928        return data;
7929    }
7930
7931    @GraphQLField
7932    @GraphQLName("customerType")
7933    static CustomerTypeObject customerType(final DataFetchingEnvironment env,
7934            @GraphQLName("customerTypeName") final String customerTypeName,
7935            @GraphQLName("id") @GraphQLID final String id) {
7936        CustomerType customerType;
7937
7938        try {
7939            var commandForm = CustomerUtil.getHome().getGetCustomerTypeForm();
7940
7941            commandForm.setCustomerTypeName(customerTypeName);
7942            commandForm.setUuid(id);
7943
7944            customerType = CDI.current().select(GetCustomerTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7945        } catch (NamingException ex) {
7946            throw new RuntimeException(ex);
7947        }
7948
7949        return customerType == null ? null : new CustomerTypeObject(customerType);
7950    }
7951
7952    @GraphQLField
7953    @GraphQLName("customerTypes")
7954    @GraphQLNonNull
7955    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
7956    static CountingPaginatedData<CustomerTypeObject> customerTypes(final DataFetchingEnvironment env) {
7957        CountingPaginatedData<CustomerTypeObject> data;
7958
7959        try {
7960            var commandForm = CustomerUtil.getHome().getGetCustomerTypesForm();
7961            var command = CDI.current().select(GetCustomerTypesCommand.class).get();
7962
7963            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7964            if(totalEntities == null) {
7965                data = Connections.emptyConnection();
7966            } else {
7967                try(var objectLimiter = new ObjectLimiter(env, CustomerTypeConstants.COMPONENT_VENDOR_NAME, CustomerTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
7968                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
7969
7970                    var customerTypes = entities.stream()
7971                            .map(CustomerTypeObject::new)
7972                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
7973
7974                    data = new CountedObjects<>(objectLimiter, customerTypes);
7975                }
7976            }
7977        } catch (NamingException ex) {
7978            throw new RuntimeException(ex);
7979        }
7980
7981        return data;
7982    }
7983
7984    @GraphQLField
7985    @GraphQLName("customerTypePaymentMethod")
7986    static CustomerTypePaymentMethodObject customerTypePaymentMethod(final DataFetchingEnvironment env,
7987            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName,
7988            @GraphQLName("paymentMethodName") @GraphQLNonNull final String paymentMethodName) {
7989        CustomerTypePaymentMethod customerTypePaymentMethod;
7990
7991        try {
7992            var commandForm = CustomerUtil.getHome().getGetCustomerTypePaymentMethodForm();
7993
7994            commandForm.setCustomerTypeName(customerTypeName);
7995            commandForm.setPaymentMethodName(paymentMethodName);
7996
7997
7998            customerTypePaymentMethod = CDI.current().select(GetCustomerTypePaymentMethodCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
7999        } catch (NamingException ex) {
8000            throw new RuntimeException(ex);
8001        }
8002
8003        return customerTypePaymentMethod == null ? null : new CustomerTypePaymentMethodObject(customerTypePaymentMethod);
8004    }
8005
8006    @GraphQLField
8007    @GraphQLName("customerTypePaymentMethods")
8008    @GraphQLNonNull
8009    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8010    static CountingPaginatedData<CustomerTypePaymentMethodObject> customerTypePaymentMethods(final DataFetchingEnvironment env,
8011            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName) {
8012        CountingPaginatedData<CustomerTypePaymentMethodObject> data;
8013
8014        try {
8015            var commandForm = CustomerUtil.getHome().getGetCustomerTypePaymentMethodsForm();
8016            var command = CDI.current().select(GetCustomerTypePaymentMethodsCommand.class).get();
8017
8018            commandForm.setCustomerTypeName(customerTypeName);
8019
8020            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8021            if(totalEntities == null) {
8022                data = Connections.emptyConnection();
8023            } else {
8024                try(var objectLimiter = new ObjectLimiter(env, CustomerTypePaymentMethodConstants.COMPONENT_VENDOR_NAME, CustomerTypePaymentMethodConstants.ENTITY_TYPE_NAME, totalEntities)) {
8025                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8026
8027                    var customerTypePaymentMethods = entities.stream()
8028                            .map(CustomerTypePaymentMethodObject::new)
8029                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8030
8031                    data = new CountedObjects<>(objectLimiter, customerTypePaymentMethods);
8032                }
8033            }
8034        } catch (NamingException ex) {
8035            throw new RuntimeException(ex);
8036        }
8037
8038        return data;
8039    }
8040
8041    @GraphQLField
8042    @GraphQLName("customerTypeShippingMethod")
8043    static CustomerTypeShippingMethodObject customerTypeShippingMethod(final DataFetchingEnvironment env,
8044            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName,
8045            @GraphQLName("shippingMethodName") @GraphQLNonNull final String shippingMethodName) {
8046        CustomerTypeShippingMethod customerTypeShippingMethod;
8047
8048        try {
8049            var commandForm = CustomerUtil.getHome().getGetCustomerTypeShippingMethodForm();
8050
8051            commandForm.setCustomerTypeName(customerTypeName);
8052            commandForm.setShippingMethodName(shippingMethodName);
8053
8054
8055            customerTypeShippingMethod = CDI.current().select(GetCustomerTypeShippingMethodCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8056        } catch (NamingException ex) {
8057            throw new RuntimeException(ex);
8058        }
8059
8060        return customerTypeShippingMethod == null ? null : new CustomerTypeShippingMethodObject(customerTypeShippingMethod);
8061    }
8062
8063    @GraphQLField
8064    @GraphQLName("customerTypeShippingMethods")
8065    @GraphQLNonNull
8066    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8067    static CountingPaginatedData<CustomerTypeShippingMethodObject> customerTypeShippingMethods(final DataFetchingEnvironment env,
8068            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName) {
8069        CountingPaginatedData<CustomerTypeShippingMethodObject> data;
8070
8071        try {
8072            var commandForm = CustomerUtil.getHome().getGetCustomerTypeShippingMethodsForm();
8073            var command = CDI.current().select(GetCustomerTypeShippingMethodsCommand.class).get();
8074
8075            commandForm.setCustomerTypeName(customerTypeName);
8076
8077            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8078            if(totalEntities == null) {
8079                data = Connections.emptyConnection();
8080            } else {
8081                try(var objectLimiter = new ObjectLimiter(env, CustomerTypeShippingMethodConstants.COMPONENT_VENDOR_NAME, CustomerTypeShippingMethodConstants.ENTITY_TYPE_NAME, totalEntities)) {
8082                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8083
8084                    var customerTypeShippingMethods = entities.stream()
8085                            .map(CustomerTypeShippingMethodObject::new)
8086                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8087
8088                    data = new CountedObjects<>(objectLimiter, customerTypeShippingMethods);
8089                }
8090            }
8091        } catch (NamingException ex) {
8092            throw new RuntimeException(ex);
8093        }
8094
8095        return data;
8096    }
8097
8098    @GraphQLField
8099    @GraphQLName("customer")
8100    static CustomerObject customer(final DataFetchingEnvironment env,
8101            @GraphQLName("customerName") final String customerName,
8102            @GraphQLName("partyName") final String partyName,
8103            @GraphQLName("id") @GraphQLID final String id) {
8104        Customer customer;
8105
8106        try {
8107            var commandForm = CustomerUtil.getHome().getGetCustomerForm();
8108
8109            commandForm.setCustomerName(customerName);
8110            commandForm.setPartyName(partyName);
8111            commandForm.setUuid(id);
8112
8113            customer = CDI.current().select(GetCustomerCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8114        } catch (NamingException ex) {
8115            throw new RuntimeException(ex);
8116        }
8117
8118        return customer == null ? null : new CustomerObject(customer);
8119    }
8120
8121    @GraphQLField
8122    @GraphQLName("customers")
8123    @GraphQLNonNull
8124    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8125    static CountingPaginatedData<CustomerObject> customers(final DataFetchingEnvironment env) {
8126        CountingPaginatedData<CustomerObject> data;
8127
8128        try {
8129            var commandForm = CustomerUtil.getHome().getGetCustomersForm();
8130            var command = CDI.current().select(GetCustomersCommand.class).get();
8131
8132            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8133            if(totalEntities == null) {
8134                data = Connections.emptyConnection();
8135            } else {
8136                try(var objectLimiter = new ObjectLimiter(env, CustomerConstants.COMPONENT_VENDOR_NAME, CustomerConstants.ENTITY_TYPE_NAME, totalEntities)) {
8137                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8138
8139                    var customers = entities.stream()
8140                            .map(CustomerObject::new)
8141                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8142
8143                    data = new CountedObjects<>(objectLimiter, customers);
8144                }
8145            }
8146        } catch (NamingException ex) {
8147            throw new RuntimeException(ex);
8148        }
8149
8150        return data;
8151    }
8152
8153    @GraphQLField
8154    @GraphQLName("employee")
8155    static EmployeeObject employee(final DataFetchingEnvironment env,
8156            @GraphQLName("employeeName") final String employeeName,
8157            @GraphQLName("partyName") final String partyName,
8158            @GraphQLName("id") @GraphQLID final String id) {
8159        PartyEmployee partyEmployee;
8160
8161        try {
8162            var commandForm = EmployeeUtil.getHome().getGetEmployeeForm();
8163
8164            commandForm.setEmployeeName(employeeName);
8165            commandForm.setPartyName(partyName);
8166            commandForm.setUuid(id);
8167
8168            partyEmployee = CDI.current().select(GetEmployeeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8169        } catch (NamingException ex) {
8170            throw new RuntimeException(ex);
8171        }
8172
8173        return partyEmployee == null ? null : new EmployeeObject(partyEmployee);
8174    }
8175
8176    @GraphQLField
8177    @GraphQLName("employees")
8178    @GraphQLNonNull
8179    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8180    static CountingPaginatedData<EmployeeObject> employees(final DataFetchingEnvironment env) {
8181        CountingPaginatedData<EmployeeObject> data;
8182
8183        try {
8184            var commandForm = EmployeeUtil.getHome().getGetEmployeesForm();
8185            var command = CDI.current().select(GetEmployeesCommand.class).get();
8186
8187            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8188            if(totalEntities == null) {
8189                data = Connections.emptyConnection();
8190            } else {
8191                try(var objectLimiter = new ObjectLimiter(env, PartyEmployeeConstants.COMPONENT_VENDOR_NAME, PartyEmployeeConstants.ENTITY_TYPE_NAME, totalEntities)) {
8192                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8193
8194                    var employees = entities.stream()
8195                            .map(EmployeeObject::new)
8196                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8197
8198                    data = new CountedObjects<>(objectLimiter, employees);
8199                }
8200            }
8201        } catch (NamingException ex) {
8202            throw new RuntimeException(ex);
8203        }
8204
8205        return data;
8206    }
8207
8208    @GraphQLField
8209    @GraphQLName("vendorType")
8210    static VendorTypeObject vendorType(final DataFetchingEnvironment env,
8211            @GraphQLName("vendorTypeName") final String vendorTypeName,
8212            @GraphQLName("id") @GraphQLID final String id) {
8213        VendorType vendorType;
8214
8215        try {
8216            var commandForm = VendorUtil.getHome().getGetVendorTypeForm();
8217
8218            commandForm.setVendorTypeName(vendorTypeName);
8219            commandForm.setUuid(id);
8220
8221            vendorType = CDI.current().select(GetVendorTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8222        } catch (NamingException ex) {
8223            throw new RuntimeException(ex);
8224        }
8225
8226        return vendorType == null ? null : new VendorTypeObject(vendorType);
8227    }
8228
8229    @GraphQLField
8230    @GraphQLName("vendorTypes")
8231    @GraphQLNonNull
8232    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8233    static CountingPaginatedData<VendorTypeObject> vendorTypes(final DataFetchingEnvironment env) {
8234        CountingPaginatedData<VendorTypeObject> data;
8235
8236        try {
8237            var commandForm = VendorUtil.getHome().getGetVendorTypesForm();
8238            var command = CDI.current().select(GetVendorTypesCommand.class).get();
8239
8240            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8241            if(totalEntities == null) {
8242                data = Connections.emptyConnection();
8243            } else {
8244                try(var objectLimiter = new ObjectLimiter(env, VendorTypeConstants.COMPONENT_VENDOR_NAME, VendorTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
8245                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8246
8247                    var vendorTypes = entities.stream()
8248                            .map(VendorTypeObject::new)
8249                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8250
8251                    data = new CountedObjects<>(objectLimiter, vendorTypes);
8252                }
8253            }
8254        } catch (NamingException ex) {
8255            throw new RuntimeException(ex);
8256        }
8257
8258        return data;
8259    }
8260
8261    @GraphQLField
8262    @GraphQLName("vendor")
8263    static VendorObject vendor(final DataFetchingEnvironment env,
8264            @GraphQLName("vendorName") final String vendorName,
8265            @GraphQLName("partyName") final String partyName,
8266            @GraphQLName("id") @GraphQLID final String id) {
8267        Vendor vendor;
8268
8269        try {
8270            var commandForm = VendorUtil.getHome().getGetVendorForm();
8271
8272            commandForm.setVendorName(vendorName);
8273            commandForm.setPartyName(partyName);
8274            commandForm.setUuid(id);
8275
8276            vendor = CDI.current().select(GetVendorCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8277        } catch (NamingException ex) {
8278            throw new RuntimeException(ex);
8279        }
8280
8281        return vendor == null ? null : new VendorObject(vendor);
8282    }
8283
8284    @GraphQLField
8285    @GraphQLName("vendors")
8286    @GraphQLNonNull
8287    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8288    static CountingPaginatedData<VendorObject> vendors(final DataFetchingEnvironment env) {
8289        CountingPaginatedData<VendorObject> data;
8290
8291        try {
8292            var commandForm = VendorUtil.getHome().getGetVendorsForm();
8293            var command = CDI.current().select(GetVendorsCommand.class).get();
8294
8295            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8296            if(totalEntities == null) {
8297                data = Connections.emptyConnection();
8298            } else {
8299                try(var objectLimiter = new ObjectLimiter(env, VendorConstants.COMPONENT_VENDOR_NAME, VendorConstants.ENTITY_TYPE_NAME, totalEntities)) {
8300                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8301
8302                    var vendors = entities.stream()
8303                            .map(VendorObject::new)
8304                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8305
8306                    data = new CountedObjects<>(objectLimiter, vendors);
8307                }
8308            }
8309        } catch (NamingException ex) {
8310            throw new RuntimeException(ex);
8311        }
8312
8313        return data;
8314    }
8315
8316    @GraphQLField
8317    @GraphQLName("vendorItem")
8318    static VendorItemObject vendorItem(final DataFetchingEnvironment env,
8319            @GraphQLName("vendorName") final String vendorName,
8320            @GraphQLName("partyName") final String partyName,
8321            @GraphQLName("vendorItemName") final String vendorItemName,
8322            @GraphQLName("id") @GraphQLID final String id) {
8323        VendorItem vendorItem;
8324
8325        try {
8326            var commandForm = VendorUtil.getHome().getGetVendorItemForm();
8327
8328            commandForm.setVendorName(vendorName);
8329            commandForm.setPartyName(partyName);
8330            commandForm.setVendorItemName(vendorItemName);
8331            commandForm.setUuid(id);
8332
8333            vendorItem = CDI.current().select(GetVendorItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8334        } catch (NamingException ex) {
8335            throw new RuntimeException(ex);
8336        }
8337
8338        return vendorItem == null ? null : new VendorItemObject(vendorItem);
8339    }
8340
8341    @GraphQLField
8342    @GraphQLName("vendorItems")
8343    @GraphQLNonNull
8344    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8345    static CountingPaginatedData<VendorItemObject> vendorItems(final DataFetchingEnvironment env,
8346            @GraphQLName("vendorName") final String vendorName,
8347            @GraphQLName("itemName") final String itemName) {
8348        CountingPaginatedData<VendorItemObject> data;
8349
8350        try {
8351            var commandForm = VendorUtil.getHome().getGetVendorItemsForm();
8352            var command = CDI.current().select(GetVendorItemsCommand.class).get();
8353
8354            commandForm.setVendorName(vendorName);
8355            commandForm.setItemName(itemName);
8356
8357            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8358            if(totalEntities == null) {
8359                data = Connections.emptyConnection();
8360            } else {
8361                try(var objectLimiter = new ObjectLimiter(env, VendorItemConstants.COMPONENT_VENDOR_NAME, VendorItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
8362                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8363
8364                    var vendorItems = entities.stream()
8365                            .map(VendorItemObject::new)
8366                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8367
8368                    data = new CountedObjects<>(objectLimiter, vendorItems);
8369                }
8370            }
8371        } catch (NamingException ex) {
8372            throw new RuntimeException(ex);
8373        }
8374
8375        return data;
8376    }
8377
8378    @GraphQLField
8379    @GraphQLName("vendorItemCost")
8380    static VendorItemCostObject vendorItemCost(final DataFetchingEnvironment env,
8381            @GraphQLName("vendorName") final String vendorName,
8382            @GraphQLName("partyName") final String partyName,
8383            @GraphQLName("vendorItemName") @GraphQLNonNull final String vendorItemName,
8384            @GraphQLName("inventoryConditionName") @GraphQLNonNull final String inventoryConditionName,
8385            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName) {
8386        VendorItemCost vendorItemCost;
8387
8388        try {
8389            var commandForm = VendorUtil.getHome().getGetVendorItemCostForm();
8390
8391            commandForm.setVendorName(vendorName);
8392            commandForm.setPartyName(partyName);
8393            commandForm.setVendorItemName(vendorItemName);
8394            commandForm.setInventoryConditionName(inventoryConditionName);
8395            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
8396
8397            vendorItemCost = CDI.current().select(GetVendorItemCostCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8398        } catch (NamingException ex) {
8399            throw new RuntimeException(ex);
8400        }
8401
8402        return vendorItemCost == null ? null : new VendorItemCostObject(vendorItemCost);
8403    }
8404
8405    @GraphQLField
8406    @GraphQLName("vendorItemCosts")
8407    @GraphQLNonNull
8408    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8409    static CountingPaginatedData<VendorItemCostObject> vendorItemCosts(final DataFetchingEnvironment env,
8410            @GraphQLName("vendorName") @GraphQLNonNull final String vendorName,
8411            @GraphQLName("vendorItemName") @GraphQLNonNull final String vendorItemName) {
8412        CountingPaginatedData<VendorItemCostObject> data;
8413
8414        try {
8415            var commandForm = VendorUtil.getHome().getGetVendorItemCostsForm();
8416
8417            commandForm.setVendorName(vendorName);
8418            commandForm.setVendorItemName(vendorItemName);
8419
8420            var command = CDI.current().select(GetVendorItemCostsCommand.class).get();
8421
8422            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8423            if(totalEntities == null) {
8424                data = Connections.emptyConnection();
8425            } else {
8426                try(var objectLimiter = new ObjectLimiter(env, VendorItemCostConstants.COMPONENT_VENDOR_NAME, VendorItemCostConstants.ENTITY_TYPE_NAME, totalEntities)) {
8427                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8428
8429                    var vendorItemCosts = entities.stream()
8430                            .map(VendorItemCostObject::new)
8431                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8432
8433                    data = new CountedObjects<>(objectLimiter, vendorItemCosts);
8434                }
8435            }
8436        } catch (NamingException ex) {
8437            throw new RuntimeException(ex);
8438        }
8439
8440        return data;
8441    }
8442
8443    @GraphQLField
8444    @GraphQLName("roleType")
8445    static RoleTypeObject roleType(final DataFetchingEnvironment env,
8446            @GraphQLName("roleTypeName") final String roleTypeName,
8447            @GraphQLName("id") @GraphQLID final String id) {
8448        RoleType roleType;
8449
8450        try {
8451            var commandForm = PartyUtil.getHome().getGetRoleTypeForm();
8452
8453            commandForm.setRoleTypeName(roleTypeName);
8454            commandForm.setUuid(id);
8455
8456            roleType = CDI.current().select(GetRoleTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8457        } catch (NamingException ex) {
8458            throw new RuntimeException(ex);
8459        }
8460
8461        return roleType == null ? null : new RoleTypeObject(roleType);
8462    }
8463
8464    @GraphQLField
8465    @GraphQLName("roleTypes")
8466    @GraphQLNonNull
8467    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8468    static CountingPaginatedData<RoleTypeObject> roleTypes(final DataFetchingEnvironment env) {
8469        CountingPaginatedData<RoleTypeObject> data;
8470
8471        try {
8472            var commandForm = PartyUtil.getHome().getGetRoleTypesForm();
8473            var command = CDI.current().select(GetRoleTypesCommand.class).get();
8474
8475            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8476            if(totalEntities == null) {
8477                data = Connections.emptyConnection();
8478            } else {
8479                try(var objectLimiter = new ObjectLimiter(env, RoleTypeConstants.COMPONENT_VENDOR_NAME, RoleTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
8480                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8481
8482                    var roleTypes = entities.stream()
8483                            .map(RoleTypeObject::new)
8484                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8485
8486                    data = new CountedObjects<>(objectLimiter, roleTypes);
8487                }
8488            }
8489        } catch (NamingException ex) {
8490            throw new RuntimeException(ex);
8491        }
8492
8493        return data;
8494    }
8495
8496    @GraphQLField
8497    @GraphQLName("partyType")
8498    static PartyTypeObject partyType(final DataFetchingEnvironment env,
8499            @GraphQLName("partyTypeName") final String partyTypeName,
8500            @GraphQLName("id") @GraphQLID final String id) {
8501        PartyType partyType;
8502
8503        try {
8504            var commandForm = PartyUtil.getHome().getGetPartyTypeForm();
8505
8506            commandForm.setPartyTypeName(partyTypeName);
8507            commandForm.setUuid(id);
8508
8509            partyType = CDI.current().select(GetPartyTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8510        } catch (NamingException ex) {
8511            throw new RuntimeException(ex);
8512        }
8513
8514        return partyType == null ? null : new PartyTypeObject(partyType);
8515    }
8516
8517    @GraphQLField
8518    @GraphQLName("partyTypes")
8519    @GraphQLNonNull
8520    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8521    static CountingPaginatedData<PartyTypeObject> partyTypes(final DataFetchingEnvironment env) {
8522        CountingPaginatedData<PartyTypeObject> data;
8523
8524        try {
8525            var commandForm = PartyUtil.getHome().getGetPartyTypesForm();
8526            var command = CDI.current().select(GetPartyTypesCommand.class).get();
8527
8528            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8529            if(totalEntities == null) {
8530                data = Connections.emptyConnection();
8531            } else {
8532                try(var objectLimiter = new ObjectLimiter(env, PartyTypeConstants.COMPONENT_VENDOR_NAME, PartyTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
8533                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8534
8535                    var partyTypes = entities.stream()
8536                            .map(PartyTypeObject::new)
8537                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8538
8539                    data = new CountedObjects<>(objectLimiter, partyTypes);
8540                }
8541            }
8542        } catch (NamingException ex) {
8543            throw new RuntimeException(ex);
8544        }
8545
8546        return data;
8547    }
8548
8549    @GraphQLField
8550    @GraphQLName("partyAliasType")
8551    static PartyAliasTypeObject partyAliasType(final DataFetchingEnvironment env,
8552            @GraphQLName("partyTypeName") final String partyTypeName,
8553            @GraphQLName("partyAliasTypeName") final String partyAliasTypeName,
8554            @GraphQLName("id") @GraphQLID final String id) {
8555        PartyAliasType partyAliasType;
8556
8557        try {
8558            var commandForm = PartyUtil.getHome().getGetPartyAliasTypeForm();
8559
8560            commandForm.setPartyTypeName(partyTypeName);
8561            commandForm.setPartyAliasTypeName(partyAliasTypeName);
8562            commandForm.setUuid(id);
8563
8564            partyAliasType = CDI.current().select(GetPartyAliasTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8565        } catch (NamingException ex) {
8566            throw new RuntimeException(ex);
8567        }
8568
8569        return partyAliasType == null ? null : new PartyAliasTypeObject(partyAliasType);
8570    }
8571
8572    @GraphQLField
8573    @GraphQLName("partyAliasTypes")
8574    @GraphQLNonNull
8575    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8576    static CountingPaginatedData<PartyAliasTypeObject> partyAliasTypes(final DataFetchingEnvironment env,
8577            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName) {
8578        CountingPaginatedData<PartyAliasTypeObject> data;
8579
8580        try {
8581            var commandForm = PartyUtil.getHome().getGetPartyAliasTypesForm();
8582            var command = CDI.current().select(GetPartyAliasTypesCommand.class).get();
8583
8584            commandForm.setPartyTypeName(partyTypeName);
8585
8586            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8587            if(totalEntities == null) {
8588                data = Connections.emptyConnection();
8589            } else {
8590                try(var objectLimiter = new ObjectLimiter(env, PartyAliasTypeConstants.COMPONENT_VENDOR_NAME, PartyAliasTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
8591                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8592
8593                    var partyAliasTypes = entities.stream()
8594                            .map(PartyAliasTypeObject::new)
8595                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8596
8597                    data = new CountedObjects<>(objectLimiter, partyAliasTypes);
8598                }
8599            }
8600        } catch (NamingException ex) {
8601            throw new RuntimeException(ex);
8602        }
8603
8604        return data;
8605    }
8606
8607    @GraphQLField
8608    @GraphQLName("partyAlias")
8609    static PartyAliasObject partyAlias(final DataFetchingEnvironment env,
8610            @GraphQLName("partyName") final String partyName,
8611            @GraphQLName("partyTypeName") final String partyTypeName,
8612            @GraphQLName("partyAliasTypeName") final String partyAliasTypeName,
8613            @GraphQLName("alias") final String alias) {
8614        PartyAlias partyAlias;
8615
8616        try {
8617            var commandForm = PartyUtil.getHome().getGetPartyAliasForm();
8618
8619            commandForm.setPartyName(partyName);
8620            commandForm.setPartyTypeName(partyTypeName);
8621            commandForm.setPartyAliasTypeName(partyAliasTypeName);
8622            commandForm.setAlias(alias);
8623
8624            partyAlias = CDI.current().select(GetPartyAliasCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8625        } catch (NamingException ex) {
8626            throw new RuntimeException(ex);
8627        }
8628
8629        return partyAlias == null ? null : new PartyAliasObject(partyAlias);
8630    }
8631
8632    @GraphQLField
8633    @GraphQLName("partyAliases")
8634    static Collection<PartyAliasObject> partyAliases(final DataFetchingEnvironment env,
8635            @GraphQLName("partyName") final String partyName,
8636            @GraphQLName("partyTypeName") final String partyTypeName,
8637            @GraphQLName("partyAliasTypeName") final String partyAliasTypeName) {
8638        Collection<PartyAlias> partyAliases;
8639        Collection<PartyAliasObject> partyAliasObjects;
8640
8641        try {
8642            var commandForm = PartyUtil.getHome().getGetPartyAliasesForm();
8643
8644            commandForm.setPartyName(partyName);
8645            commandForm.setPartyTypeName(partyTypeName);
8646            commandForm.setPartyAliasTypeName(partyAliasTypeName);
8647
8648            partyAliases = CDI.current().select(GetPartyAliasesCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8649        } catch (NamingException ex) {
8650            throw new RuntimeException(ex);
8651        }
8652
8653        if(partyAliases == null) {
8654            partyAliasObjects = emptyList();
8655        } else {
8656            partyAliasObjects = new ArrayList<>(partyAliases.size());
8657
8658            partyAliases.stream()
8659                    .map(PartyAliasObject::new)
8660                    .forEachOrdered(partyAliasObjects::add);
8661        }
8662
8663        return partyAliasObjects;
8664    }
8665
8666    @GraphQLField
8667    @GraphQLName("party")
8668    static PartyObject party(final DataFetchingEnvironment env,
8669            @GraphQLName("partyName") final String partyName,
8670            @GraphQLName("id") @GraphQLID final String id) {
8671        Party party;
8672
8673        try {
8674            var commandForm = PartyUtil.getHome().getGetPartyForm();
8675
8676            commandForm.setPartyName(partyName);
8677            commandForm.setUuid(id);
8678
8679            party = CDI.current().select(GetPartyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8680        } catch (NamingException ex) {
8681            throw new RuntimeException(ex);
8682        }
8683
8684        return party == null ? null : new PartyObject(party);
8685    }
8686
8687    @GraphQLField
8688    @GraphQLName("parties")
8689    @GraphQLNonNull
8690    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8691    static CountingPaginatedData<PartyObject> parties(final DataFetchingEnvironment env) {
8692        CountingPaginatedData<PartyObject> data;
8693
8694        try {
8695            var commandForm = PartyUtil.getHome().getGetPartiesForm();
8696            var command = CDI.current().select(GetPartiesCommand.class).get();
8697
8698            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8699            if(totalEntities == null) {
8700                data = Connections.emptyConnection();
8701            } else {
8702                try(var objectLimiter = new ObjectLimiter(env, PartyConstants.COMPONENT_VENDOR_NAME, PartyConstants.ENTITY_TYPE_NAME, totalEntities)) {
8703                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8704
8705                    var parties = entities.stream()
8706                            .map(PartyObject::new)
8707                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8708
8709                    data = new CountedObjects<>(objectLimiter, parties);
8710                }
8711            }
8712        } catch (NamingException ex) {
8713            throw new RuntimeException(ex);
8714        }
8715
8716        return data;
8717    }
8718
8719    @GraphQLField
8720    @GraphQLName("company")
8721    static CompanyObject company(final DataFetchingEnvironment env,
8722            @GraphQLName("companyName") final String companyName,
8723            @GraphQLName("partyName") final String partyName,
8724            @GraphQLName("id") @GraphQLID final String id) {
8725        PartyCompany company;
8726
8727        try {
8728            var commandForm = PartyUtil.getHome().getGetCompanyForm();
8729
8730            commandForm.setCompanyName(companyName);
8731            commandForm.setPartyName(partyName);
8732            commandForm.setUuid(id);
8733
8734            company = CDI.current().select(GetCompanyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8735        } catch (NamingException ex) {
8736            throw new RuntimeException(ex);
8737        }
8738
8739        return company == null ? null : new CompanyObject(company);
8740    }
8741
8742    @GraphQLField
8743    @GraphQLName("companies")
8744    @GraphQLNonNull
8745    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8746    static CountingPaginatedData<CompanyObject> companies(final DataFetchingEnvironment env) {
8747        CountingPaginatedData<CompanyObject> data;
8748
8749        try {
8750            var commandForm = PartyUtil.getHome().getGetCompaniesForm();
8751            var command = CDI.current().select(GetCompaniesCommand.class).get();
8752
8753            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8754            if(totalEntities == null) {
8755                data = Connections.emptyConnection();
8756            } else {
8757                try(var objectLimiter = new ObjectLimiter(env, PartyCompanyConstants.COMPONENT_VENDOR_NAME, PartyCompanyConstants.ENTITY_TYPE_NAME, totalEntities)) {
8758                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8759
8760                    var companies = entities.stream()
8761                            .map(CompanyObject::new)
8762                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8763
8764                    data = new CountedObjects<>(objectLimiter, companies);
8765                }
8766            }
8767        } catch (NamingException ex) {
8768            throw new RuntimeException(ex);
8769        }
8770
8771        return data;
8772    }
8773
8774    @GraphQLField
8775    @GraphQLName("division")
8776    static DivisionObject division(final DataFetchingEnvironment env,
8777            @GraphQLName("companyName") final String companyName,
8778            @GraphQLName("divisionName") final String divisionName,
8779            @GraphQLName("partyName") final String partyName,
8780            @GraphQLName("id") @GraphQLID final String id) {
8781        PartyDivision division;
8782
8783        try {
8784            var commandForm = PartyUtil.getHome().getGetDivisionForm();
8785
8786            commandForm.setCompanyName(companyName);
8787            commandForm.setDivisionName(divisionName);
8788            commandForm.setPartyName(partyName);
8789            commandForm.setUuid(id);
8790
8791            division = CDI.current().select(GetDivisionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8792        } catch (NamingException ex) {
8793            throw new RuntimeException(ex);
8794        }
8795
8796        return division == null ? null : new DivisionObject(division);
8797    }
8798
8799    @GraphQLField
8800    @GraphQLName("divisions")
8801    @GraphQLNonNull
8802    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8803    static CountingPaginatedData<DivisionObject> divisions(final DataFetchingEnvironment env,
8804            @GraphQLName("companyName") @GraphQLNonNull final String companyName) {
8805        CountingPaginatedData<DivisionObject> data;
8806
8807        try {
8808            var commandForm = PartyUtil.getHome().getGetDivisionsForm();
8809            var command = CDI.current().select(GetDivisionsCommand.class).get();
8810
8811            commandForm.setCompanyName(companyName);
8812
8813            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8814            if(totalEntities == null) {
8815                data = Connections.emptyConnection();
8816            } else {
8817                try(var objectLimiter = new ObjectLimiter(env, PartyDivisionConstants.COMPONENT_VENDOR_NAME, PartyDivisionConstants.ENTITY_TYPE_NAME, totalEntities)) {
8818                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8819
8820                    var divisions = entities.stream()
8821                            .map(DivisionObject::new)
8822                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8823
8824                    data = new CountedObjects<>(objectLimiter, divisions);
8825                }
8826            }
8827        } catch (NamingException ex) {
8828            throw new RuntimeException(ex);
8829        }
8830
8831        return data;
8832    }
8833
8834    @GraphQLField
8835    @GraphQLName("department")
8836    static DepartmentObject department(final DataFetchingEnvironment env,
8837            @GraphQLName("companyName") final String companyName,
8838            @GraphQLName("divisionName") final String divisionName,
8839            @GraphQLName("departmentName") final String departmentName,
8840            @GraphQLName("partyName") final String partyName,
8841            @GraphQLName("id") @GraphQLID final String id) {
8842        PartyDepartment department;
8843
8844        try {
8845            var commandForm = PartyUtil.getHome().getGetDepartmentForm();
8846
8847            commandForm.setCompanyName(companyName);
8848            commandForm.setDivisionName(divisionName);
8849            commandForm.setDepartmentName(departmentName);
8850            commandForm.setPartyName(partyName);
8851            commandForm.setUuid(id);
8852
8853            department = CDI.current().select(GetDepartmentCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8854        } catch (NamingException ex) {
8855            throw new RuntimeException(ex);
8856        }
8857
8858        return department == null ? null : new DepartmentObject(department);
8859    }
8860
8861    @GraphQLField
8862    @GraphQLName("departments")
8863    @GraphQLNonNull
8864    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8865    static CountingPaginatedData<DepartmentObject> departments(final DataFetchingEnvironment env,
8866            @GraphQLName("companyName") @GraphQLNonNull final String companyName,
8867            @GraphQLName("divisionName") final String divisionName) {
8868        CountingPaginatedData<DepartmentObject> data;
8869
8870        try {
8871            var commandForm = PartyUtil.getHome().getGetDepartmentsForm();
8872            var command = CDI.current().select(GetDepartmentsCommand.class).get();
8873
8874            commandForm.setCompanyName(companyName);
8875            commandForm.setDivisionName(divisionName);
8876
8877            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8878            if(totalEntities == null) {
8879                data = Connections.emptyConnection();
8880            } else {
8881                try(var objectLimiter = new ObjectLimiter(env, PartyDepartmentConstants.COMPONENT_VENDOR_NAME, PartyDepartmentConstants.ENTITY_TYPE_NAME, totalEntities)) {
8882                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8883
8884                    var departments = entities.stream()
8885                            .map(DepartmentObject::new)
8886                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8887
8888                    data = new CountedObjects<>(objectLimiter, departments);
8889                }
8890            }
8891        } catch (NamingException ex) {
8892            throw new RuntimeException(ex);
8893        }
8894
8895        return data;
8896    }
8897
8898    @GraphQLField
8899    @GraphQLName("warehouseType")
8900    static WarehouseTypeObject warehouseType(final DataFetchingEnvironment env,
8901            @GraphQLName("warehouseTypeName") final String warehouseTypeName,
8902            @GraphQLName("id") @GraphQLID final String id) {
8903        WarehouseType warehouseType;
8904
8905        try {
8906            var commandForm = WarehouseUtil.getHome().getGetWarehouseTypeForm();
8907
8908            commandForm.setWarehouseTypeName(warehouseTypeName);
8909            commandForm.setUuid(id);
8910
8911            warehouseType = CDI.current().select(GetWarehouseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8912        } catch (NamingException ex) {
8913            throw new RuntimeException(ex);
8914        }
8915
8916        return warehouseType == null ? null : new WarehouseTypeObject(warehouseType);
8917    }
8918
8919    @GraphQLField
8920    @GraphQLName("warehouseTypes")
8921    @GraphQLNonNull
8922    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8923    static CountingPaginatedData<WarehouseTypeObject> warehouseTypes(final DataFetchingEnvironment env) {
8924        CountingPaginatedData<WarehouseTypeObject> data;
8925
8926        try {
8927            var commandForm = WarehouseUtil.getHome().getGetWarehouseTypesForm();
8928            var command = CDI.current().select(GetWarehouseTypesCommand.class).get();
8929
8930            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8931            if(totalEntities == null) {
8932                data = Connections.emptyConnection();
8933            } else {
8934                try(var objectLimiter = new ObjectLimiter(env, WarehouseTypeConstants.COMPONENT_VENDOR_NAME, WarehouseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
8935                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8936
8937                    var warehouseTypes = entities.stream()
8938                            .map(WarehouseTypeObject::new)
8939                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8940
8941                    data = new CountedObjects<>(objectLimiter, warehouseTypes);
8942                }
8943            }
8944        } catch (NamingException ex) {
8945            throw new RuntimeException(ex);
8946        }
8947
8948        return data;
8949    }
8950
8951    @GraphQLField
8952    @GraphQLName("warehouse")
8953    static WarehouseObject warehouse(final DataFetchingEnvironment env,
8954            @GraphQLName("warehouseName") final String warehouseName,
8955            @GraphQLName("partyName") final String partyName,
8956            @GraphQLName("id") @GraphQLID final String id) {
8957        Warehouse warehouse;
8958
8959        try {
8960            var commandForm = WarehouseUtil.getHome().getGetWarehouseForm();
8961
8962            commandForm.setWarehouseName(warehouseName);
8963            commandForm.setPartyName(partyName);
8964            commandForm.setUuid(id);
8965
8966            warehouse = CDI.current().select(GetWarehouseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
8967        } catch (NamingException ex) {
8968            throw new RuntimeException(ex);
8969        }
8970
8971        return warehouse == null ? null : new WarehouseObject(warehouse);
8972    }
8973
8974    @GraphQLField
8975    @GraphQLName("warehouses")
8976    @GraphQLNonNull
8977    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
8978    static CountingPaginatedData<WarehouseObject> warehouses(final DataFetchingEnvironment env) {
8979        CountingPaginatedData<WarehouseObject> data;
8980
8981        try {
8982            var commandForm = WarehouseUtil.getHome().getGetWarehousesForm();
8983            var command = CDI.current().select(GetWarehousesCommand.class).get();
8984
8985            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8986            if(totalEntities == null) {
8987                data = Connections.emptyConnection();
8988            } else {
8989                try(var objectLimiter = new ObjectLimiter(env, WarehouseConstants.COMPONENT_VENDOR_NAME, WarehouseConstants.ENTITY_TYPE_NAME, totalEntities)) {
8990                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
8991
8992                    var warehouses = entities.stream()
8993                            .map(WarehouseObject::new)
8994                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
8995
8996                    data = new CountedObjects<>(objectLimiter, warehouses);
8997                }
8998            }
8999        } catch (NamingException ex) {
9000            throw new RuntimeException(ex);
9001        }
9002
9003        return data;
9004    }
9005
9006    @GraphQLField
9007    @GraphQLName("locationUseType")
9008    static LocationUseTypeObject locationUseType(final DataFetchingEnvironment env,
9009            @GraphQLName("locationUseTypeName") final String locationUseTypeName,
9010            @GraphQLName("id") @GraphQLID final String id) {
9011        LocationUseType locationUseType;
9012
9013        try {
9014            var commandForm = WarehouseUtil.getHome().getGetLocationUseTypeForm();
9015
9016            commandForm.setLocationUseTypeName(locationUseTypeName);
9017            commandForm.setUuid(id);
9018
9019            locationUseType = CDI.current().select(GetLocationUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9020        } catch (NamingException ex) {
9021            throw new RuntimeException(ex);
9022        }
9023
9024        return locationUseType == null ? null : new LocationUseTypeObject(locationUseType);
9025    }
9026
9027    @GraphQLField
9028    @GraphQLName("locationUseTypes")
9029    @GraphQLNonNull
9030    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9031    static CountingPaginatedData<LocationUseTypeObject> locationUseTypes(final DataFetchingEnvironment env) {
9032        CountingPaginatedData<LocationUseTypeObject> data;
9033
9034        try {
9035            var commandForm = WarehouseUtil.getHome().getGetLocationUseTypesForm();
9036            var command = CDI.current().select(GetLocationUseTypesCommand.class).get();
9037
9038            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9039            if(totalEntities == null) {
9040                data = Connections.emptyConnection();
9041            } else {
9042                try(var objectLimiter = new ObjectLimiter(env, LocationUseTypeConstants.COMPONENT_VENDOR_NAME, LocationUseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9043                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9044
9045                    var locationUseTypes = entities.stream()
9046                            .map(LocationUseTypeObject::new)
9047                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9048
9049                    data = new CountedObjects<>(objectLimiter, locationUseTypes);
9050                }
9051            }
9052        } catch (NamingException ex) {
9053            throw new RuntimeException(ex);
9054        }
9055
9056        return data;
9057    }
9058
9059    @GraphQLField
9060    @GraphQLName("inventoryLocationGroup")
9061    static InventoryLocationGroupObject inventoryLocationGroup(final DataFetchingEnvironment env,
9062            @GraphQLName("warehouseName") final String warehouseName,
9063            @GraphQLName("inventoryLocationGroupName") final String inventoryLocationGroupName) {
9064        InventoryLocationGroup inventoryLocationGroup;
9065
9066        try {
9067            var commandForm = InventoryUtil.getHome().getGetInventoryLocationGroupForm();
9068
9069            commandForm.setWarehouseName(warehouseName);
9070            commandForm.setInventoryLocationGroupName(inventoryLocationGroupName);
9071
9072            inventoryLocationGroup = CDI.current().select(GetInventoryLocationGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9073        } catch (NamingException ex) {
9074            throw new RuntimeException(ex);
9075        }
9076
9077        return inventoryLocationGroup == null ? null : new InventoryLocationGroupObject(inventoryLocationGroup);
9078    }
9079
9080    @GraphQLField
9081    @GraphQLName("inventoryLocationGroups")
9082    @GraphQLNonNull
9083    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9084    static CountingPaginatedData<InventoryLocationGroupObject> inventoryLocationGroups(final DataFetchingEnvironment env,
9085            @GraphQLName("warehouseName") final String warehouseName) {
9086        CountingPaginatedData<InventoryLocationGroupObject> data;
9087
9088        try {
9089            var commandForm = InventoryUtil.getHome().getGetInventoryLocationGroupsForm();
9090            var command = CDI.current().select(GetInventoryLocationGroupsCommand.class).get();
9091
9092            commandForm.setWarehouseName(warehouseName);
9093
9094            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9095            if(totalEntities == null) {
9096                data = Connections.emptyConnection();
9097            } else {
9098                try(var objectLimiter = new ObjectLimiter(env, InventoryLocationGroupConstants.COMPONENT_VENDOR_NAME, InventoryLocationGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
9099                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9100
9101                    var inventoryLocationGroups = entities.stream()
9102                            .map(InventoryLocationGroupObject::new)
9103                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9104
9105                    data = new CountedObjects<>(objectLimiter, inventoryLocationGroups);
9106                }
9107            }
9108        } catch (NamingException ex) {
9109            throw new RuntimeException(ex);
9110        }
9111
9112        return data;
9113    }
9114
9115    @GraphQLField
9116    @GraphQLName("locationType")
9117    static LocationTypeObject locationType(final DataFetchingEnvironment env,
9118            @GraphQLName("warehouseName") final String warehouseName,
9119            @GraphQLName("locationTypeName") final String locationTypeName) {
9120        LocationType locationType;
9121
9122        try {
9123            var commandForm = WarehouseUtil.getHome().getGetLocationTypeForm();
9124
9125            commandForm.setWarehouseName(warehouseName);
9126            commandForm.setLocationTypeName(locationTypeName);
9127
9128            locationType = CDI.current().select(GetLocationTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9129        } catch (NamingException ex) {
9130            throw new RuntimeException(ex);
9131        }
9132
9133        return locationType == null ? null : new LocationTypeObject(locationType);
9134    }
9135
9136    @GraphQLField
9137    @GraphQLName("locationTypes")
9138    @GraphQLNonNull
9139    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9140    static CountingPaginatedData<LocationTypeObject> locationTypes(final DataFetchingEnvironment env,
9141            @GraphQLName("warehouseName") final String warehouseName) {
9142        CountingPaginatedData<LocationTypeObject> data;
9143
9144        try {
9145            var commandForm = WarehouseUtil.getHome().getGetLocationTypesForm();
9146            var command = CDI.current().select(GetLocationTypesCommand.class).get();
9147
9148            commandForm.setWarehouseName(warehouseName);
9149
9150            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9151            if(totalEntities == null) {
9152                data = Connections.emptyConnection();
9153            } else {
9154                try(var objectLimiter = new ObjectLimiter(env, LocationTypeConstants.COMPONENT_VENDOR_NAME, LocationTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9155                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9156
9157                    var locationTypes = entities.stream()
9158                            .map(LocationTypeObject::new)
9159                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9160
9161                    data = new CountedObjects<>(objectLimiter, locationTypes);
9162                }
9163            }
9164        } catch (NamingException ex) {
9165            throw new RuntimeException(ex);
9166        }
9167
9168        return data;
9169    }
9170
9171    @GraphQLField
9172    @GraphQLName("locationNameElement")
9173    static LocationNameElementObject locationNameElement(final DataFetchingEnvironment env,
9174            @GraphQLName("warehouseName") final String warehouseName,
9175            @GraphQLName("locationTypeName") final String locationTypeName,
9176            @GraphQLName("locationNameElementName") final String locationNameElementName) {
9177        LocationNameElement locationNameElement;
9178
9179        try {
9180            var commandForm = WarehouseUtil.getHome().getGetLocationNameElementForm();
9181
9182            commandForm.setWarehouseName(warehouseName);
9183            commandForm.setLocationTypeName(locationTypeName);
9184            commandForm.setLocationNameElementName(locationNameElementName);
9185
9186            locationNameElement = CDI.current().select(GetLocationNameElementCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9187        } catch (NamingException ex) {
9188            throw new RuntimeException(ex);
9189        }
9190
9191        return locationNameElement == null ? null : new LocationNameElementObject(locationNameElement);
9192    }
9193
9194    @GraphQLField
9195    @GraphQLName("locationNameElements")
9196    @GraphQLNonNull
9197    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9198    static CountingPaginatedData<LocationNameElementObject> locationNameElements(final DataFetchingEnvironment env,
9199            @GraphQLName("warehouseName") final String warehouseName,
9200            @GraphQLName("locationTypeName") final String locationTypeName) {
9201        CountingPaginatedData<LocationNameElementObject> data;
9202
9203        try {
9204            var commandForm = WarehouseUtil.getHome().getGetLocationNameElementsForm();
9205            var command = CDI.current().select(GetLocationNameElementsCommand.class).get();
9206
9207            commandForm.setWarehouseName(warehouseName);
9208            commandForm.setLocationTypeName(locationTypeName);
9209
9210            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9211            if(totalEntities == null) {
9212                data = Connections.emptyConnection();
9213            } else {
9214                try(var objectLimiter = new ObjectLimiter(env, LocationNameElementConstants.COMPONENT_VENDOR_NAME, LocationNameElementConstants.ENTITY_TYPE_NAME, totalEntities)) {
9215                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9216
9217                    var locationNameElements = entities.stream()
9218                            .map(LocationNameElementObject::new)
9219                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9220
9221                    data = new CountedObjects<>(objectLimiter, locationNameElements);
9222                }
9223            }
9224        } catch (NamingException ex) {
9225            throw new RuntimeException(ex);
9226        }
9227
9228        return data;
9229    }
9230
9231    @GraphQLField
9232    @GraphQLName("location")
9233    static LocationObject location(final DataFetchingEnvironment env,
9234            @GraphQLName("warehouseName") final String warehouseName,
9235            @GraphQLName("locationName") final String locationName) {
9236        Location location;
9237
9238        try {
9239            var commandForm = WarehouseUtil.getHome().getGetLocationForm();
9240
9241            commandForm.setWarehouseName(warehouseName);
9242            commandForm.setLocationName(locationName);
9243
9244            location = CDI.current().select(GetLocationCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9245        } catch (NamingException ex) {
9246            throw new RuntimeException(ex);
9247        }
9248
9249        return location == null ? null : new LocationObject(location);
9250    }
9251
9252    @GraphQLField
9253    @GraphQLName("locations")
9254    @GraphQLNonNull
9255    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9256    static CountingPaginatedData<LocationObject> locations(final DataFetchingEnvironment env,
9257            @GraphQLName("warehouseName") final String warehouseName) {
9258        CountingPaginatedData<LocationObject> data;
9259
9260        try {
9261            var commandForm = WarehouseUtil.getHome().getGetLocationsForm();
9262            var command = CDI.current().select(GetLocationsCommand.class).get();
9263
9264            commandForm.setWarehouseName(warehouseName);
9265
9266            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9267            if(totalEntities == null) {
9268                data = Connections.emptyConnection();
9269            } else {
9270                try(var objectLimiter = new ObjectLimiter(env, LocationConstants.COMPONENT_VENDOR_NAME, LocationConstants.ENTITY_TYPE_NAME, totalEntities)) {
9271                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9272
9273                    var locations = entities.stream()
9274                            .map(LocationObject::new)
9275                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9276
9277                    data = new CountedObjects<>(objectLimiter, locations);
9278                }
9279            }
9280        } catch (NamingException ex) {
9281            throw new RuntimeException(ex);
9282        }
9283
9284        return data;
9285    }
9286
9287    @GraphQLField
9288    @GraphQLName("cancellationKind")
9289    static CancellationKindObject cancellationKind(final DataFetchingEnvironment env,
9290            @GraphQLName("cancellationKindName") final String cancellationKindName,
9291            @GraphQLName("id") @GraphQLID final String id) {
9292        CancellationKind cancellationKind;
9293
9294        try {
9295            var commandForm = CancellationPolicyUtil.getHome().getGetCancellationKindForm();
9296
9297            commandForm.setCancellationKindName(cancellationKindName);
9298            commandForm.setUuid(id);
9299
9300            cancellationKind = CDI.current().select(GetCancellationKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9301        } catch (NamingException ex) {
9302            throw new RuntimeException(ex);
9303        }
9304
9305        return cancellationKind == null ? null : new CancellationKindObject(cancellationKind);
9306    }
9307
9308    @GraphQLField
9309    @GraphQLName("cancellationKinds")
9310    @GraphQLNonNull
9311    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9312    static CountingPaginatedData<CancellationKindObject> cancellationKinds(final DataFetchingEnvironment env) {
9313        CountingPaginatedData<CancellationKindObject> data;
9314
9315        try {
9316            var commandForm = CancellationPolicyUtil.getHome().getGetCancellationKindsForm();
9317            var command = CDI.current().select(GetCancellationKindsCommand.class).get();
9318
9319            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9320            if(totalEntities == null) {
9321                data = Connections.emptyConnection();
9322            } else {
9323                try(var objectLimiter = new ObjectLimiter(env, CancellationKindConstants.COMPONENT_VENDOR_NAME, CancellationKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
9324                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9325
9326                    var cancellationKinds = entities.stream()
9327                            .map(CancellationKindObject::new)
9328                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9329
9330                    data = new CountedObjects<>(objectLimiter, cancellationKinds);
9331                }
9332            }
9333        } catch (NamingException ex) {
9334            throw new RuntimeException(ex);
9335        }
9336
9337        return data;
9338    }
9339
9340    @GraphQLField
9341    @GraphQLName("cancellationPolicy")
9342    static CancellationPolicyObject cancellationPolicy(final DataFetchingEnvironment env,
9343            @GraphQLName("cancellationKindName") final String cancellationKindName,
9344            @GraphQLName("cancellationPolicyName") final String cancellationPolicyName,
9345            @GraphQLName("id") @GraphQLID final String id) {
9346        CancellationPolicy cancellationPolicy;
9347
9348        try {
9349            var commandForm = CancellationPolicyUtil.getHome().getGetCancellationPolicyForm();
9350
9351            commandForm.setCancellationKindName(cancellationKindName);
9352            commandForm.setCancellationPolicyName(cancellationPolicyName);
9353            commandForm.setUuid(id);
9354
9355            cancellationPolicy = CDI.current().select(GetCancellationPolicyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9356        } catch (NamingException ex) {
9357            throw new RuntimeException(ex);
9358        }
9359
9360        return cancellationPolicy == null ? null : new CancellationPolicyObject(cancellationPolicy);
9361    }
9362
9363    @GraphQLField
9364    @GraphQLName("cancellationPolicies")
9365    @GraphQLNonNull
9366    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9367    static CountingPaginatedData<CancellationPolicyObject> cancellationPolicies(final DataFetchingEnvironment env,
9368            @GraphQLName("cancellationKindName") final String cancellationKindName) {
9369        CountingPaginatedData<CancellationPolicyObject> data;
9370
9371        try {
9372            var commandForm = CancellationPolicyUtil.getHome().getGetCancellationPoliciesForm();
9373            var command = CDI.current().select(GetCancellationPoliciesCommand.class).get();
9374
9375            commandForm.setCancellationKindName(cancellationKindName);
9376
9377            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9378            if(totalEntities == null) {
9379                data = Connections.emptyConnection();
9380            } else {
9381                try(var objectLimiter = new ObjectLimiter(env, CancellationPolicyConstants.COMPONENT_VENDOR_NAME, CancellationPolicyConstants.ENTITY_TYPE_NAME, totalEntities)) {
9382                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9383
9384                    var cancellationPolicies = entities.stream()
9385                            .map(CancellationPolicyObject::new)
9386                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9387
9388                    data = new CountedObjects<>(objectLimiter, cancellationPolicies);
9389                }
9390            }
9391        } catch (NamingException ex) {
9392            throw new RuntimeException(ex);
9393        }
9394
9395        return data;
9396    }
9397
9398    @GraphQLField
9399    @GraphQLName("returnKind")
9400    static ReturnKindObject returnKind(final DataFetchingEnvironment env,
9401            @GraphQLName("returnKindName") final String returnKindName,
9402            @GraphQLName("id") @GraphQLID final String id) {
9403        ReturnKind returnKind;
9404
9405        try {
9406            var commandForm = ReturnPolicyUtil.getHome().getGetReturnKindForm();
9407
9408            commandForm.setReturnKindName(returnKindName);
9409            commandForm.setUuid(id);
9410
9411            returnKind = CDI.current().select(GetReturnKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9412        } catch (NamingException ex) {
9413            throw new RuntimeException(ex);
9414        }
9415
9416        return returnKind == null ? null : new ReturnKindObject(returnKind);
9417    }
9418
9419    @GraphQLField
9420    @GraphQLName("returnKinds")
9421    @GraphQLNonNull
9422    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9423    static CountingPaginatedData<ReturnKindObject> returnKinds(final DataFetchingEnvironment env) {
9424        CountingPaginatedData<ReturnKindObject> data;
9425
9426        try {
9427            var commandForm = ReturnPolicyUtil.getHome().getGetReturnKindsForm();
9428            var command = CDI.current().select(GetReturnKindsCommand.class).get();
9429
9430            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9431            if(totalEntities == null) {
9432                data = Connections.emptyConnection();
9433            } else {
9434                try(var objectLimiter = new ObjectLimiter(env, ReturnKindConstants.COMPONENT_VENDOR_NAME, ReturnKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
9435                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9436
9437                    var returnKinds = entities.stream()
9438                            .map(ReturnKindObject::new)
9439                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9440
9441                    data = new CountedObjects<>(objectLimiter, returnKinds);
9442                }
9443            }
9444        } catch (NamingException ex) {
9445            throw new RuntimeException(ex);
9446        }
9447
9448        return data;
9449    }
9450
9451    @GraphQLField
9452    @GraphQLName("returnPolicy")
9453    static ReturnPolicyObject returnPolicy(final DataFetchingEnvironment env,
9454            @GraphQLName("returnKindName") final String returnKindName,
9455            @GraphQLName("returnPolicyName") final String returnPolicyName,
9456            @GraphQLName("id") @GraphQLID final String id) {
9457        ReturnPolicy returnPolicy;
9458
9459        try {
9460            var commandForm = ReturnPolicyUtil.getHome().getGetReturnPolicyForm();
9461
9462            commandForm.setReturnKindName(returnKindName);
9463            commandForm.setReturnPolicyName(returnPolicyName);
9464            commandForm.setUuid(id);
9465
9466            returnPolicy = CDI.current().select(GetReturnPolicyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9467        } catch (NamingException ex) {
9468            throw new RuntimeException(ex);
9469        }
9470
9471        return returnPolicy == null ? null : new ReturnPolicyObject(returnPolicy);
9472    }
9473
9474    @GraphQLField
9475    @GraphQLName("returnPolicies")
9476    @GraphQLNonNull
9477    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9478    static CountingPaginatedData<ReturnPolicyObject> returnPolicies(final DataFetchingEnvironment env,
9479            @GraphQLName("returnKindName") final String returnKindName) {
9480        CountingPaginatedData<ReturnPolicyObject> data;
9481
9482        try {
9483            var commandForm = ReturnPolicyUtil.getHome().getGetReturnPoliciesForm();
9484            var command = CDI.current().select(GetReturnPoliciesCommand.class).get();
9485
9486            commandForm.setReturnKindName(returnKindName);
9487
9488            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9489            if(totalEntities == null) {
9490                data = Connections.emptyConnection();
9491            } else {
9492                try(var objectLimiter = new ObjectLimiter(env, ReturnPolicyConstants.COMPONENT_VENDOR_NAME, ReturnPolicyConstants.ENTITY_TYPE_NAME, totalEntities)) {
9493                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9494
9495                    var returnPolicies = entities.stream()
9496                            .map(ReturnPolicyObject::new)
9497                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9498
9499                    data = new CountedObjects<>(objectLimiter, returnPolicies);
9500                }
9501            }
9502        } catch(NamingException ex) {
9503            throw new RuntimeException(ex);
9504        }
9505
9506        return data;
9507    }
9508
9509    @GraphQLField
9510    @GraphQLName("item")
9511    static ItemObject item(final DataFetchingEnvironment env,
9512            @GraphQLName("itemName") final String itemName,
9513            @GraphQLName("itemNameOrAlias") final String itemNameOrAlias,
9514            @GraphQLName("id") @GraphQLID final String id) {
9515        Item item;
9516
9517        try {
9518            var commandForm = ItemUtil.getHome().getGetItemForm();
9519
9520            commandForm.setItemName(itemName);
9521            commandForm.setItemNameOrAlias(itemNameOrAlias);
9522            commandForm.setUuid(id);
9523
9524            item = CDI.current().select(GetItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9525        } catch (NamingException ex) {
9526            throw new RuntimeException(ex);
9527        }
9528
9529        return item == null ? null : new ItemObject(item);
9530    }
9531
9532    @GraphQLField
9533    @GraphQLName("items")
9534    @GraphQLNonNull
9535    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9536    static CountingPaginatedData<ItemObject> items(final DataFetchingEnvironment env) {
9537        CountingPaginatedData<ItemObject> data;
9538
9539        try {
9540            var commandForm = ItemUtil.getHome().getGetItemsForm();
9541            var command = CDI.current().select(GetItemsCommand.class).get();
9542
9543            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9544            if(totalEntities == null) {
9545                data = Connections.emptyConnection();
9546            } else {
9547                try(var objectLimiter = new ObjectLimiter(env, ItemConstants.COMPONENT_VENDOR_NAME, ItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
9548                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9549
9550                    var items = entities.stream()
9551                            .map(ItemObject::new)
9552                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9553
9554                    data = new CountedObjects<>(objectLimiter, items);
9555                }
9556            }
9557        } catch (NamingException ex) {
9558            throw new RuntimeException(ex);
9559        }
9560
9561        return data;
9562    }
9563
9564    @GraphQLField
9565    @GraphQLName("itemUnitOfMeasureType")
9566    static ItemUnitOfMeasureTypeObject itemUnitOfMeasureType(final DataFetchingEnvironment env,
9567            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
9568            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName) {
9569        ItemUnitOfMeasureType itemUnitOfMeasureType;
9570
9571        try {
9572            var commandForm = ItemUtil.getHome().getGetItemUnitOfMeasureTypeForm();
9573
9574            commandForm.setItemName(itemName);
9575            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
9576
9577            itemUnitOfMeasureType = CDI.current().select(GetItemUnitOfMeasureTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9578        } catch (NamingException ex) {
9579            throw new RuntimeException(ex);
9580        }
9581
9582        return itemUnitOfMeasureType == null ? null : new ItemUnitOfMeasureTypeObject(itemUnitOfMeasureType);
9583    }
9584
9585    @GraphQLField
9586    @GraphQLName("itemUnitOfMeasureTypes")
9587    @GraphQLNonNull
9588    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9589    static CountingPaginatedData<ItemUnitOfMeasureTypeObject> itemUnitOfMeasureTypes(final DataFetchingEnvironment env,
9590            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
9591        CountingPaginatedData<ItemUnitOfMeasureTypeObject> data;
9592
9593        try {
9594            var commandForm = ItemUtil.getHome().getGetItemUnitOfMeasureTypesForm();
9595            var command = CDI.current().select(GetItemUnitOfMeasureTypesCommand.class).get();
9596
9597            commandForm.setItemName(itemName);
9598
9599            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9600            if(totalEntities == null) {
9601                data = Connections.emptyConnection();
9602            } else {
9603                try(var objectLimiter = new ObjectLimiter(env, ItemUnitOfMeasureTypeConstants.COMPONENT_VENDOR_NAME, ItemUnitOfMeasureTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9604                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9605
9606                    var itemUnitOfMeasureTypeObjects = entities.stream()
9607                            .map(ItemUnitOfMeasureTypeObject::new)
9608                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9609
9610                    data = new CountedObjects<>(objectLimiter, itemUnitOfMeasureTypeObjects);
9611                }
9612            }
9613        } catch (NamingException ex) {
9614            throw new RuntimeException(ex);
9615        }
9616
9617        return data;
9618    }
9619
9620
9621    @GraphQLField
9622    @GraphQLName("itemDescription")
9623    static ItemDescriptionObject itemDescription(final DataFetchingEnvironment env,
9624            @GraphQLName("itemDescriptionTypeName") final String itemDescriptionTypeName,
9625            @GraphQLName("itemName") final String itemName,
9626            @GraphQLName("languageIsoName") final String languageIsoName,
9627            @GraphQLName("id") @GraphQLID final String id,
9628            @GraphQLName("referrer") final String referrer) {
9629        ItemDescription itemDescription;
9630
9631        try {
9632            var commandForm = ItemUtil.getHome().getGetItemDescriptionForm();
9633
9634            commandForm.setItemDescriptionTypeName(itemDescriptionTypeName);
9635            commandForm.setItemName(itemName);
9636            commandForm.setLanguageIsoName(languageIsoName);
9637            commandForm.setUuid(id);
9638            commandForm.setReferrer(referrer);
9639
9640            itemDescription = CDI.current().select(GetItemDescriptionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9641        } catch (NamingException ex) {
9642            throw new RuntimeException(ex);
9643        }
9644
9645        return itemDescription == null ? null : new ItemDescriptionObject(itemDescription);
9646    }
9647
9648    @GraphQLField
9649    @GraphQLName("itemDescriptions")
9650    @GraphQLNonNull
9651    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9652    static CountingPaginatedData<ItemDescriptionObject> itemDescriptions(final DataFetchingEnvironment env,
9653            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
9654            @GraphQLName("itemDescriptionTypeUseTypeName") final String itemDescriptionTypeUseTypeName,
9655            @GraphQLName("languageIsoName") final String languageIsoName) {
9656        CountingPaginatedData<ItemDescriptionObject> data;
9657
9658        try {
9659            var commandForm = ItemUtil.getHome().getGetItemDescriptionsForm();
9660            var command = CDI.current().select(GetItemDescriptionsCommand.class).get();
9661
9662            commandForm.setItemName(itemName);
9663            commandForm.setItemDescriptionTypeUseTypeName(itemDescriptionTypeUseTypeName);
9664            commandForm.setLanguageIsoName(languageIsoName);
9665
9666            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9667            if(totalEntities == null) {
9668                data = Connections.emptyConnection();
9669            } else {
9670                try(var objectLimiter = new ObjectLimiter(env, ItemDescriptionConstants.COMPONENT_VENDOR_NAME, ItemDescriptionConstants.ENTITY_TYPE_NAME, totalEntities)) {
9671                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9672                    var limitOffset = objectLimiter.getLimitOffset();
9673                    var limitCount = objectLimiter.getLimitCount();
9674
9675                    Collection<ItemDescription> limitedEntities;
9676                    if(itemDescriptionTypeUseTypeName != null) {
9677                        // A Limit must be manually applied.
9678                        limitedEntities = entities.stream()
9679                                .skip(limitOffset)
9680                                .limit(limitCount)
9681                                .toList();
9682                    } else {
9683                        // A Limit was applied in the SQL Query.
9684                        limitedEntities = entities;
9685                    }
9686
9687                    var itemDescriptions = limitedEntities.stream()
9688                            .skip(limitOffset)
9689                            .limit(limitCount)
9690                            .map(ItemDescriptionObject::new)
9691                            .collect(Collectors.toCollection(() -> new ArrayList<>(limitedEntities.size())));
9692
9693                    data = new CountedObjects<>(objectLimiter, itemDescriptions);
9694                }
9695            }
9696        } catch (NamingException ex) {
9697            throw new RuntimeException(ex);
9698        }
9699
9700        return data;
9701    }
9702
9703    @GraphQLField
9704    @GraphQLName("itemType")
9705    static ItemTypeObject itemType(final DataFetchingEnvironment env,
9706            @GraphQLName("itemTypeName") final String itemTypeName,
9707            @GraphQLName("id") @GraphQLID final String id) {
9708        ItemType itemType;
9709
9710        try {
9711            var commandForm = ItemUtil.getHome().getGetItemTypeForm();
9712
9713            commandForm.setItemTypeName(itemTypeName);
9714            commandForm.setUuid(id);
9715
9716            itemType = CDI.current().select(GetItemTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9717        } catch (NamingException ex) {
9718            throw new RuntimeException(ex);
9719        }
9720
9721        return itemType == null ? null : new ItemTypeObject(itemType);
9722    }
9723
9724    @GraphQLField
9725    @GraphQLName("itemTypes")
9726    @GraphQLNonNull
9727    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9728    static CountingPaginatedData<ItemTypeObject> itemTypes(final DataFetchingEnvironment env) {
9729        CountingPaginatedData<ItemTypeObject> data;
9730
9731        try {
9732            var commandForm = ItemUtil.getHome().getGetItemTypesForm();
9733            var command = CDI.current().select(GetItemTypesCommand.class).get();
9734
9735            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9736            if(totalEntities == null) {
9737                data = Connections.emptyConnection();
9738            } else {
9739                try(var objectLimiter = new ObjectLimiter(env, ItemTypeConstants.COMPONENT_VENDOR_NAME, ItemTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9740                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9741
9742                    var itemTypes = entities.stream()
9743                            .map(ItemTypeObject::new)
9744                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9745
9746                    data = new CountedObjects<>(objectLimiter, itemTypes);
9747                }
9748            }
9749        } catch (NamingException ex) {
9750            throw new RuntimeException(ex);
9751        }
9752
9753        return data;
9754    }
9755
9756    @GraphQLField
9757    @GraphQLName("itemUseType")
9758    static ItemUseTypeObject itemUseType(final DataFetchingEnvironment env,
9759            @GraphQLName("itemUseTypeName") final String itemUseTypeName,
9760            @GraphQLName("id") @GraphQLID final String id) {
9761        ItemUseType itemUseType;
9762
9763        try {
9764            var commandForm = ItemUtil.getHome().getGetItemUseTypeForm();
9765
9766            commandForm.setItemUseTypeName(itemUseTypeName);
9767            commandForm.setUuid(id);
9768
9769            itemUseType = CDI.current().select(GetItemUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9770        } catch (NamingException ex) {
9771            throw new RuntimeException(ex);
9772        }
9773
9774        return itemUseType == null ? null : new ItemUseTypeObject(itemUseType);
9775    }
9776
9777    @GraphQLField
9778    @GraphQLName("itemUseTypes")
9779    @GraphQLNonNull
9780    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9781    static CountingPaginatedData<ItemUseTypeObject> itemUseTypes(final DataFetchingEnvironment env) {
9782        CountingPaginatedData<ItemUseTypeObject> data;
9783
9784        try {
9785            var commandForm = ItemUtil.getHome().getGetItemUseTypesForm();
9786            var command = CDI.current().select(GetItemUseTypesCommand.class).get();
9787
9788            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9789            if(totalEntities == null) {
9790                data = Connections.emptyConnection();
9791            } else {
9792                try(var objectLimiter = new ObjectLimiter(env, ItemUseTypeConstants.COMPONENT_VENDOR_NAME, ItemUseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9793                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9794
9795                    var itemUseTypes = entities.stream()
9796                            .map(ItemUseTypeObject::new)
9797                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9798
9799                    data = new CountedObjects<>(objectLimiter, itemUseTypes);
9800                }
9801            }
9802        } catch (NamingException ex) {
9803            throw new RuntimeException(ex);
9804        }
9805
9806        return data;
9807    }
9808
9809    @GraphQLField
9810    @GraphQLName("itemPriceType")
9811    static ItemPriceTypeObject itemPriceType(final DataFetchingEnvironment env,
9812            @GraphQLName("itemPriceTypeName") final String itemPriceTypeName,
9813            @GraphQLName("id") @GraphQLID final String id) {
9814        ItemPriceType itemPriceType;
9815
9816        try {
9817            var commandForm = ItemUtil.getHome().getGetItemPriceTypeForm();
9818
9819            commandForm.setItemPriceTypeName(itemPriceTypeName);
9820            commandForm.setUuid(id);
9821
9822            itemPriceType = CDI.current().select(GetItemPriceTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9823        } catch (NamingException ex) {
9824            throw new RuntimeException(ex);
9825        }
9826
9827        return itemPriceType == null ? null : new ItemPriceTypeObject(itemPriceType);
9828    }
9829
9830    @GraphQLField
9831    @GraphQLName("itemPriceTypes")
9832    @GraphQLNonNull
9833    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9834    static CountingPaginatedData<ItemPriceTypeObject> itemPriceTypes(final DataFetchingEnvironment env) {
9835        CountingPaginatedData<ItemPriceTypeObject> data;
9836
9837        try {
9838            var commandForm = ItemUtil.getHome().getGetItemPriceTypesForm();
9839            var command = CDI.current().select(GetItemPriceTypesCommand.class).get();
9840
9841            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9842            if(totalEntities == null) {
9843                data = Connections.emptyConnection();
9844            } else {
9845                try(var objectLimiter = new ObjectLimiter(env, ItemPriceTypeConstants.COMPONENT_VENDOR_NAME, ItemPriceTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9846                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9847
9848                    var itemPriceTypes = entities.stream()
9849                            .map(ItemPriceTypeObject::new)
9850                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9851
9852                    data = new CountedObjects<>(objectLimiter, itemPriceTypes);
9853                }
9854            }
9855        } catch (NamingException ex) {
9856            throw new RuntimeException(ex);
9857        }
9858
9859        return data;
9860    }
9861
9862    @GraphQLField
9863    @GraphQLName("itemDeliveryType")
9864    static ItemDeliveryTypeObject itemDeliveryType(final DataFetchingEnvironment env,
9865            @GraphQLName("itemDeliveryTypeName") final String itemDeliveryTypeName,
9866            @GraphQLName("id") @GraphQLID final String id) {
9867        ItemDeliveryType itemDeliveryType;
9868
9869        try {
9870            var commandForm = ItemUtil.getHome().getGetItemDeliveryTypeForm();
9871
9872            commandForm.setItemDeliveryTypeName(itemDeliveryTypeName);
9873            commandForm.setUuid(id);
9874
9875            itemDeliveryType = CDI.current().select(GetItemDeliveryTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9876        } catch (NamingException ex) {
9877            throw new RuntimeException(ex);
9878        }
9879
9880        return itemDeliveryType == null ? null : new ItemDeliveryTypeObject(itemDeliveryType);
9881    }
9882
9883    @GraphQLField
9884    @GraphQLName("itemDeliveryTypes")
9885    @GraphQLNonNull
9886    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9887    static CountingPaginatedData<ItemDeliveryTypeObject> itemDeliveryTypes(final DataFetchingEnvironment env) {
9888        CountingPaginatedData<ItemDeliveryTypeObject> data;
9889
9890        try {
9891            var commandForm = ItemUtil.getHome().getGetItemDeliveryTypesForm();
9892            var command = CDI.current().select(GetItemDeliveryTypesCommand.class).get();
9893
9894            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9895            if(totalEntities == null) {
9896                data = Connections.emptyConnection();
9897            } else {
9898                try(var objectLimiter = new ObjectLimiter(env, ItemDeliveryTypeConstants.COMPONENT_VENDOR_NAME, ItemDeliveryTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9899                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9900
9901                    var itemDeliveryTypes = entities.stream()
9902                            .map(ItemDeliveryTypeObject::new)
9903                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9904
9905                    data = new CountedObjects<>(objectLimiter, itemDeliveryTypes);
9906                }
9907            }
9908        } catch (NamingException ex) {
9909            throw new RuntimeException(ex);
9910        }
9911
9912        return data;
9913    }
9914
9915    @GraphQLField
9916    @GraphQLName("itemInventoryType")
9917    static ItemInventoryTypeObject itemInventoryType(final DataFetchingEnvironment env,
9918            @GraphQLName("itemInventoryTypeName") final String itemInventoryTypeName,
9919            @GraphQLName("id") @GraphQLID final String id) {
9920        ItemInventoryType itemInventoryType;
9921
9922        try {
9923            var commandForm = ItemUtil.getHome().getGetItemInventoryTypeForm();
9924
9925            commandForm.setItemInventoryTypeName(itemInventoryTypeName);
9926            commandForm.setUuid(id);
9927
9928            itemInventoryType = CDI.current().select(GetItemInventoryTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9929        } catch (NamingException ex) {
9930            throw new RuntimeException(ex);
9931        }
9932
9933        return itemInventoryType == null ? null : new ItemInventoryTypeObject(itemInventoryType);
9934    }
9935
9936    @GraphQLField
9937    @GraphQLName("itemInventoryTypes")
9938    @GraphQLNonNull
9939    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9940    static CountingPaginatedData<ItemInventoryTypeObject> itemInventoryTypes(final DataFetchingEnvironment env) {
9941        CountingPaginatedData<ItemInventoryTypeObject> data;
9942
9943        try {
9944            var commandForm = ItemUtil.getHome().getGetItemInventoryTypesForm();
9945            var command = CDI.current().select(GetItemInventoryTypesCommand.class).get();
9946
9947            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9948            if(totalEntities == null) {
9949                data = Connections.emptyConnection();
9950            } else {
9951                try(var objectLimiter = new ObjectLimiter(env, ItemInventoryTypeConstants.COMPONENT_VENDOR_NAME, ItemInventoryTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
9952                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
9953
9954                    var itemInventoryTypes = entities.stream()
9955                            .map(ItemInventoryTypeObject::new)
9956                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
9957
9958                    data = new CountedObjects<>(objectLimiter, itemInventoryTypes);
9959                }
9960            }
9961        } catch (NamingException ex) {
9962            throw new RuntimeException(ex);
9963        }
9964
9965        return data;
9966    }
9967
9968    @GraphQLField
9969    @GraphQLName("itemPrice")
9970    static ItemPriceObject itemPrice(final DataFetchingEnvironment env,
9971            @GraphQLName("itemName") @GraphQLNonNull final String itemName,
9972            @GraphQLName("inventoryConditionName") @GraphQLNonNull final String inventoryConditionName,
9973            @GraphQLName("unitOfMeasureTypeName") @GraphQLNonNull final String unitOfMeasureTypeName,
9974            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
9975        ItemPrice itemPrice;
9976
9977        try {
9978            var commandForm = ItemUtil.getHome().getGetItemPriceForm();
9979
9980            commandForm.setItemName(itemName);
9981            commandForm.setInventoryConditionName(inventoryConditionName);
9982            commandForm.setUnitOfMeasureTypeName(unitOfMeasureTypeName);
9983            commandForm.setCurrencyIsoName(currencyIsoName);
9984
9985            itemPrice = CDI.current().select(GetItemPriceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
9986        } catch (NamingException ex) {
9987            throw new RuntimeException(ex);
9988        }
9989
9990        return itemPrice == null ? null : new ItemPriceObject(itemPrice);
9991    }
9992
9993    @GraphQLField
9994    @GraphQLName("itemPrices")
9995    @GraphQLNonNull
9996    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
9997    static CountingPaginatedData<ItemPriceObject> itemPrices(final DataFetchingEnvironment env,
9998            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
9999        CountingPaginatedData<ItemPriceObject> data;
10000
10001        try {
10002            var commandForm = ItemUtil.getHome().getGetItemPricesForm();
10003            var command = CDI.current().select(GetItemPricesCommand.class).get();
10004
10005            commandForm.setItemName(itemName);
10006
10007            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10008            if(totalEntities == null) {
10009                data = Connections.emptyConnection();
10010            } else {
10011                try(var objectLimiter = new ObjectLimiter(env, ItemPriceConstants.COMPONENT_VENDOR_NAME, ItemPriceConstants.ENTITY_TYPE_NAME, totalEntities)) {
10012                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10013
10014                    var itemPriceObjects = entities.stream()
10015                            .map(ItemPriceObject::new)
10016                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10017
10018                    data = new CountedObjects<>(objectLimiter, itemPriceObjects);
10019                }
10020            }
10021        } catch (NamingException ex) {
10022            throw new RuntimeException(ex);
10023        }
10024
10025        return data;
10026    }
10027
10028    @GraphQLField
10029    @GraphQLName("itemAliasChecksumType")
10030    static ItemAliasChecksumTypeObject itemAliasChecksumType(final DataFetchingEnvironment env,
10031            @GraphQLName("itemAliasChecksumTypeName") final String itemAliasChecksumTypeName,
10032            @GraphQLName("id") @GraphQLID final String id) {
10033        ItemAliasChecksumType itemAliasChecksumType;
10034
10035        try {
10036            var commandForm = ItemUtil.getHome().getGetItemAliasChecksumTypeForm();
10037
10038            commandForm.setItemAliasChecksumTypeName(itemAliasChecksumTypeName);
10039            commandForm.setUuid(id);
10040
10041            itemAliasChecksumType = CDI.current().select(GetItemAliasChecksumTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10042        } catch (NamingException ex) {
10043            throw new RuntimeException(ex);
10044        }
10045
10046        return itemAliasChecksumType == null ? null : new ItemAliasChecksumTypeObject(itemAliasChecksumType);
10047    }
10048
10049    @GraphQLField
10050    @GraphQLName("itemAliasChecksumTypes")
10051    @GraphQLNonNull
10052    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10053    static CountingPaginatedData<ItemAliasChecksumTypeObject> itemAliasChecksumTypes(final DataFetchingEnvironment env) {
10054        CountingPaginatedData<ItemAliasChecksumTypeObject> data;
10055
10056        try {
10057            var commandForm = ItemUtil.getHome().getGetItemAliasChecksumTypesForm();
10058            var command = CDI.current().select(GetItemAliasChecksumTypesCommand.class).get();
10059
10060            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10061            if(totalEntities == null) {
10062                data = Connections.emptyConnection();
10063            } else {
10064                try(var objectLimiter = new ObjectLimiter(env, ItemAliasChecksumTypeConstants.COMPONENT_VENDOR_NAME, ItemAliasChecksumTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10065                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10066
10067                    var itemAliasChecksumTypes = entities.stream()
10068                            .map(ItemAliasChecksumTypeObject::new)
10069                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10070
10071                    data = new CountedObjects<>(objectLimiter, itemAliasChecksumTypes);
10072                }
10073            }
10074        } catch (NamingException ex) {
10075            throw new RuntimeException(ex);
10076        }
10077
10078        return data;
10079    }
10080
10081    @GraphQLField
10082    @GraphQLName("itemAlias")
10083    static ItemAliasObject itemAlias(final DataFetchingEnvironment env,
10084            @GraphQLName("alias") @GraphQLNonNull final String alias) {
10085        ItemAlias itemAlias;
10086
10087        try {
10088            var commandForm = ItemUtil.getHome().getGetItemAliasForm();
10089
10090            commandForm.setAlias(alias);
10091
10092            itemAlias = CDI.current().select(GetItemAliasCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10093        } catch (NamingException ex) {
10094            throw new RuntimeException(ex);
10095        }
10096
10097        return itemAlias == null ? null : new ItemAliasObject(itemAlias);
10098    }
10099
10100    @GraphQLField
10101    @GraphQLName("itemAliases")
10102    @GraphQLNonNull
10103    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10104    static CountingPaginatedData<ItemAliasObject> itemAliases(final DataFetchingEnvironment env,
10105            @GraphQLName("itemName") @GraphQLNonNull final String itemName) {
10106        CountingPaginatedData<ItemAliasObject> data;
10107
10108        try {
10109            var commandForm = ItemUtil.getHome().getGetItemAliasesForm();
10110            var command = CDI.current().select(GetItemAliasesCommand.class).get();
10111
10112            commandForm.setItemName(itemName);
10113
10114            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10115            if(totalEntities == null) {
10116                data = Connections.emptyConnection();
10117            } else {
10118                try(var objectLimiter = new ObjectLimiter(env, ItemAliasConstants.COMPONENT_VENDOR_NAME, ItemAliasConstants.ENTITY_TYPE_NAME, totalEntities)) {
10119                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10120
10121                    var itemAliasObjects = entities.stream()
10122                            .map(ItemAliasObject::new)
10123                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10124
10125                    data = new CountedObjects<>(objectLimiter, itemAliasObjects);
10126                }
10127            }
10128        } catch (NamingException ex) {
10129            throw new RuntimeException(ex);
10130        }
10131
10132        return data;
10133    }
10134
10135    @GraphQLField
10136    @GraphQLName("itemCategory")
10137    static ItemCategoryObject itemCategory(final DataFetchingEnvironment env,
10138            @GraphQLName("itemCategoryName") final String itemCategoryName,
10139            @GraphQLName("id") @GraphQLID final String id) {
10140        ItemCategory itemCategory;
10141
10142        try {
10143            var commandForm = ItemUtil.getHome().getGetItemCategoryForm();
10144
10145            commandForm.setItemCategoryName(itemCategoryName);
10146            commandForm.setUuid(id);
10147
10148            itemCategory = CDI.current().select(GetItemCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10149        } catch (NamingException ex) {
10150            throw new RuntimeException(ex);
10151        }
10152
10153        return itemCategory == null ? null : new ItemCategoryObject(itemCategory);
10154    }
10155
10156    @GraphQLField
10157    @GraphQLName("itemCategories")
10158    @GraphQLNonNull
10159    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10160    static CountingPaginatedData<ItemCategoryObject> itemCategories(final DataFetchingEnvironment env,
10161            @GraphQLName("parentItemCategoryName") final String parentItemCategoryName) {
10162        CountingPaginatedData<ItemCategoryObject> data;
10163
10164        try {
10165            var commandForm = ItemUtil.getHome().getGetItemCategoriesForm();
10166            var command = CDI.current().select(GetItemCategoriesCommand.class).get();
10167
10168            commandForm.setParentItemCategoryName(parentItemCategoryName);
10169
10170            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10171            if(totalEntities == null) {
10172                data = Connections.emptyConnection();
10173            } else {
10174                try(var objectLimiter = new ObjectLimiter(env, ItemCategoryConstants.COMPONENT_VENDOR_NAME, ItemCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
10175                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10176
10177                    var itemCategories = entities.stream()
10178                            .map(ItemCategoryObject::new)
10179                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10180
10181                    data = new CountedObjects<>(objectLimiter, itemCategories);
10182                }
10183            }
10184        } catch (NamingException ex) {
10185            throw new RuntimeException(ex);
10186        }
10187
10188        return data;
10189    }
10190
10191    @GraphQLField
10192    @GraphQLName("itemAccountingCategory")
10193    static ItemAccountingCategoryObject itemAccountingCategory(final DataFetchingEnvironment env,
10194            @GraphQLName("itemAccountingCategoryName") final String itemAccountingCategoryName,
10195            @GraphQLName("id") @GraphQLID final String id) {
10196        ItemAccountingCategory itemAccountingCategory;
10197
10198        try {
10199            var commandForm = AccountingUtil.getHome().getGetItemAccountingCategoryForm();
10200
10201            commandForm.setItemAccountingCategoryName(itemAccountingCategoryName);
10202            commandForm.setUuid(id);
10203
10204            itemAccountingCategory = CDI.current().select(GetItemAccountingCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10205        } catch (NamingException ex) {
10206            throw new RuntimeException(ex);
10207        }
10208
10209        return itemAccountingCategory == null ? null : new ItemAccountingCategoryObject(itemAccountingCategory);
10210    }
10211
10212    @GraphQLField
10213    @GraphQLName("itemAccountingCategories")
10214    @GraphQLNonNull
10215    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10216    static CountingPaginatedData<ItemAccountingCategoryObject> itemAccountingCategories(final DataFetchingEnvironment env) {
10217        CountingPaginatedData<ItemAccountingCategoryObject> data;
10218
10219        try {
10220            var commandForm = AccountingUtil.getHome().getGetItemAccountingCategoriesForm();
10221            var command = CDI.current().select(GetItemAccountingCategoriesCommand.class).get();
10222
10223            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10224            if(totalEntities == null) {
10225                data = Connections.emptyConnection();
10226            } else {
10227                try(var objectLimiter = new ObjectLimiter(env, ItemAccountingCategoryConstants.COMPONENT_VENDOR_NAME, ItemAccountingCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
10228                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10229
10230                    var itemAccountingCategories = entities.stream()
10231                            .map(ItemAccountingCategoryObject::new)
10232                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10233
10234                    data = new CountedObjects<>(objectLimiter, itemAccountingCategories);
10235                }
10236            }
10237        } catch (NamingException ex) {
10238            throw new RuntimeException(ex);
10239        }
10240
10241        return data;
10242    }
10243
10244    @GraphQLField
10245    @GraphQLName("glAccount")
10246    static GlAccountObject glAccount(final DataFetchingEnvironment env,
10247            @GraphQLName("glAccountName") final String glAccountName,
10248            @GraphQLName("id") @GraphQLID final String id) {
10249        GlAccount glAccount;
10250
10251        try {
10252            var commandForm = AccountingUtil.getHome().getGetGlAccountForm();
10253
10254            commandForm.setGlAccountName(glAccountName);
10255            commandForm.setUuid(id);
10256
10257            glAccount = CDI.current().select(GetGlAccountCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10258        } catch (NamingException ex) {
10259            throw new RuntimeException(ex);
10260        }
10261
10262        return glAccount == null ? null : new GlAccountObject(glAccount);
10263    }
10264
10265    @GraphQLField
10266    @GraphQLName("glAccounts")
10267    @GraphQLNonNull
10268    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10269    static CountingPaginatedData<GlAccountObject> glAccounts(final DataFetchingEnvironment env,
10270            @GraphQLName("glAccountCategoryName") final String glAccountCategoryName) {
10271        CountingPaginatedData<GlAccountObject> data;
10272
10273        try {
10274            var commandForm = AccountingUtil.getHome().getGetGlAccountsForm();
10275            var command = CDI.current().select(GetGlAccountsCommand.class).get();
10276
10277            commandForm.setGlAccountCategoryName(glAccountCategoryName);
10278
10279            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10280            if(totalEntities == null) {
10281                data = Connections.emptyConnection();
10282            } else {
10283                try(var objectLimiter = new ObjectLimiter(env, GlAccountConstants.COMPONENT_VENDOR_NAME, GlAccountConstants.ENTITY_TYPE_NAME, totalEntities)) {
10284                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10285
10286                    var glAccounts = entities.stream()
10287                            .map(GlAccountObject::new)
10288                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10289
10290                    data = new CountedObjects<>(objectLimiter, glAccounts);
10291                }
10292            }
10293        } catch (NamingException ex) {
10294            throw new RuntimeException(ex);
10295        }
10296
10297        return data;
10298    }
10299
10300    @GraphQLField
10301    @GraphQLName("glAccountType")
10302    static GlAccountTypeObject glAccountType(final DataFetchingEnvironment env,
10303            @GraphQLName("glAccountTypeName") final String glAccountTypeName,
10304            @GraphQLName("id") @GraphQLID final String id) {
10305        GlAccountType glAccountType;
10306
10307        try {
10308            var commandForm = AccountingUtil.getHome().getGetGlAccountTypeForm();
10309
10310            commandForm.setGlAccountTypeName(glAccountTypeName);
10311            commandForm.setUuid(id);
10312
10313            glAccountType = CDI.current().select(GetGlAccountTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10314        } catch (NamingException ex) {
10315            throw new RuntimeException(ex);
10316        }
10317
10318        return glAccountType == null ? null : new GlAccountTypeObject(glAccountType);
10319    }
10320
10321    @GraphQLField
10322    @GraphQLName("glAccountTypes")
10323    @GraphQLNonNull
10324    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10325    static CountingPaginatedData<GlAccountTypeObject> glAccountTypes(final DataFetchingEnvironment env) {
10326        CountingPaginatedData<GlAccountTypeObject> data;
10327
10328        try {
10329            var commandForm = AccountingUtil.getHome().getGetGlAccountTypesForm();
10330            var command = CDI.current().select(GetGlAccountTypesCommand.class).get();
10331
10332            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10333            if(totalEntities == null) {
10334                data = Connections.emptyConnection();
10335            } else {
10336                try(var objectLimiter = new ObjectLimiter(env, GlAccountTypeConstants.COMPONENT_VENDOR_NAME, GlAccountTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10337                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10338
10339                    var glAccountTypes = entities.stream()
10340                            .map(GlAccountTypeObject::new)
10341                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10342
10343                    data = new CountedObjects<>(objectLimiter, glAccountTypes);
10344                }
10345            }
10346        } catch (NamingException ex) {
10347            throw new RuntimeException(ex);
10348        }
10349
10350        return data;
10351    }
10352
10353    @GraphQLField
10354    @GraphQLName("glAccountClass")
10355    static GlAccountClassObject glAccountClass(final DataFetchingEnvironment env,
10356            @GraphQLName("glAccountClassName") final String glAccountClassName,
10357            @GraphQLName("id") @GraphQLID final String id) {
10358        GlAccountClass glAccountClass;
10359
10360        try {
10361            var commandForm = AccountingUtil.getHome().getGetGlAccountClassForm();
10362
10363            commandForm.setGlAccountClassName(glAccountClassName);
10364            commandForm.setUuid(id);
10365
10366            glAccountClass = CDI.current().select(GetGlAccountClassCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10367        } catch (NamingException ex) {
10368            throw new RuntimeException(ex);
10369        }
10370
10371        return glAccountClass == null ? null : new GlAccountClassObject(glAccountClass);
10372    }
10373
10374    @GraphQLField
10375    @GraphQLName("glAccountClasses")
10376    @GraphQLNonNull
10377    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10378    static CountingPaginatedData<GlAccountClassObject> glAccountClasses(final DataFetchingEnvironment env) {
10379        CountingPaginatedData<GlAccountClassObject> data;
10380
10381        try {
10382            var commandForm = AccountingUtil.getHome().getGetGlAccountClassesForm();
10383            var command = CDI.current().select(GetGlAccountClassesCommand.class).get();
10384
10385            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10386            if(totalEntities == null) {
10387                data = Connections.emptyConnection();
10388            } else {
10389                try(var objectLimiter = new ObjectLimiter(env, GlAccountClassConstants.COMPONENT_VENDOR_NAME, GlAccountClassConstants.ENTITY_TYPE_NAME, totalEntities)) {
10390                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10391
10392                    var glAccountClasses = entities.stream()
10393                            .map(GlAccountClassObject::new)
10394                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10395
10396                    data = new CountedObjects<>(objectLimiter, glAccountClasses);
10397                }
10398            }
10399        } catch (NamingException ex) {
10400            throw new RuntimeException(ex);
10401        }
10402
10403        return data;
10404    }
10405
10406    @GraphQLField
10407    @GraphQLName("glAccountCategory")
10408    static GlAccountCategoryObject glAccountCategory(final DataFetchingEnvironment env,
10409            @GraphQLName("glAccountCategoryName") final String glAccountCategoryName,
10410            @GraphQLName("id") @GraphQLID final String id) {
10411        GlAccountCategory glAccountCategory;
10412
10413        try {
10414            var commandForm = AccountingUtil.getHome().getGetGlAccountCategoryForm();
10415
10416            commandForm.setGlAccountCategoryName(glAccountCategoryName);
10417            commandForm.setUuid(id);
10418
10419            glAccountCategory = CDI.current().select(GetGlAccountCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10420        } catch (NamingException ex) {
10421            throw new RuntimeException(ex);
10422        }
10423
10424        return glAccountCategory == null ? null : new GlAccountCategoryObject(glAccountCategory);
10425    }
10426
10427    @GraphQLField
10428    @GraphQLName("glAccountCategories")
10429    @GraphQLNonNull
10430    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10431    static CountingPaginatedData<GlAccountCategoryObject> glAccountCategories(final DataFetchingEnvironment env) {
10432        CountingPaginatedData<GlAccountCategoryObject> data;
10433
10434        try {
10435            var commandForm = AccountingUtil.getHome().getGetGlAccountCategoriesForm();
10436            var command = CDI.current().select(GetGlAccountCategoriesCommand.class).get();
10437
10438            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10439            if(totalEntities == null) {
10440                data = Connections.emptyConnection();
10441            } else {
10442                try(var objectLimiter = new ObjectLimiter(env, GlAccountCategoryConstants.COMPONENT_VENDOR_NAME, GlAccountCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
10443                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10444
10445                    var glAccountCategories = entities.stream()
10446                            .map(GlAccountCategoryObject::new)
10447                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10448
10449                    data = new CountedObjects<>(objectLimiter, glAccountCategories);
10450                }
10451            }
10452        } catch (NamingException ex) {
10453            throw new RuntimeException(ex);
10454        }
10455
10456        return data;
10457    }
10458
10459    @GraphQLField
10460    @GraphQLName("glResourceType")
10461    static GlResourceTypeObject glResourceType(final DataFetchingEnvironment env,
10462            @GraphQLName("glResourceTypeName") final String glResourceTypeName,
10463            @GraphQLName("id") @GraphQLID final String id) {
10464        GlResourceType glResourceType;
10465
10466        try {
10467            var commandForm = AccountingUtil.getHome().getGetGlResourceTypeForm();
10468
10469            commandForm.setGlResourceTypeName(glResourceTypeName);
10470            commandForm.setUuid(id);
10471
10472            glResourceType = CDI.current().select(GetGlResourceTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10473        } catch (NamingException ex) {
10474            throw new RuntimeException(ex);
10475        }
10476
10477        return glResourceType == null ? null : new GlResourceTypeObject(glResourceType);
10478    }
10479
10480    @GraphQLField
10481    @GraphQLName("glResourceTypes")
10482    @GraphQLNonNull
10483    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10484    static CountingPaginatedData<GlResourceTypeObject> glResourceTypes(final DataFetchingEnvironment env) {
10485        CountingPaginatedData<GlResourceTypeObject> data;
10486
10487        try {
10488            var commandForm = AccountingUtil.getHome().getGetGlResourceTypesForm();
10489            var command = CDI.current().select(GetGlResourceTypesCommand.class).get();
10490
10491            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10492            if(totalEntities == null) {
10493                data = Connections.emptyConnection();
10494            } else {
10495                try(var objectLimiter = new ObjectLimiter(env, GlResourceTypeConstants.COMPONENT_VENDOR_NAME, GlResourceTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10496                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10497
10498                    var glResourceTypes = entities.stream()
10499                            .map(GlResourceTypeObject::new)
10500                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10501
10502                    data = new CountedObjects<>(objectLimiter, glResourceTypes);
10503                }
10504            }
10505        } catch (NamingException ex) {
10506            throw new RuntimeException(ex);
10507        }
10508
10509        return data;
10510    }
10511
10512    @GraphQLField
10513    @GraphQLName("itemPurchasingCategory")
10514    static ItemPurchasingCategoryObject itemPurchasingCategory(final DataFetchingEnvironment env,
10515            @GraphQLName("itemPurchasingCategoryName") final String itemPurchasingCategoryName,
10516            @GraphQLName("id") @GraphQLID final String id) {
10517        ItemPurchasingCategory itemPurchasingCategory;
10518
10519        try {
10520            var commandForm = VendorUtil.getHome().getGetItemPurchasingCategoryForm();
10521
10522            commandForm.setItemPurchasingCategoryName(itemPurchasingCategoryName);
10523            commandForm.setUuid(id);
10524
10525            itemPurchasingCategory = CDI.current().select(GetItemPurchasingCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10526        } catch (NamingException ex) {
10527            throw new RuntimeException(ex);
10528        }
10529
10530        return itemPurchasingCategory == null ? null : new ItemPurchasingCategoryObject(itemPurchasingCategory);
10531    }
10532
10533    @GraphQLField
10534    @GraphQLName("itemPurchasingCategories")
10535    @GraphQLNonNull
10536    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10537    static CountingPaginatedData<ItemPurchasingCategoryObject> itemPurchasingCategories(final DataFetchingEnvironment env) {
10538        CountingPaginatedData<ItemPurchasingCategoryObject> data;
10539
10540        try {
10541            var commandForm = VendorUtil.getHome().getGetItemPurchasingCategoriesForm();
10542            var command = CDI.current().select(GetItemPurchasingCategoriesCommand.class).get();
10543
10544            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10545            if(totalEntities == null) {
10546                data = Connections.emptyConnection();
10547            } else {
10548                try(var objectLimiter = new ObjectLimiter(env, ItemPurchasingCategoryConstants.COMPONENT_VENDOR_NAME, ItemPurchasingCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
10549                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10550
10551                    var itemPurchasingCategories = entities.stream()
10552                            .map(ItemPurchasingCategoryObject::new)
10553                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10554
10555                    data = new CountedObjects<>(objectLimiter, itemPurchasingCategories);
10556                }
10557            }
10558        } catch (NamingException ex) {
10559            throw new RuntimeException(ex);
10560        }
10561
10562        return data;
10563    }
10564
10565    @GraphQLField
10566    @GraphQLName("itemDescriptionType")
10567    static ItemDescriptionTypeObject itemDescriptionType(final DataFetchingEnvironment env,
10568            @GraphQLName("itemDescriptionTypeName") final String itemDescriptionTypeName,
10569            @GraphQLName("id") @GraphQLID final String id) {
10570        ItemDescriptionType itemDescriptionType;
10571
10572        try {
10573            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeForm();
10574
10575            commandForm.setItemDescriptionTypeName(itemDescriptionTypeName);
10576            commandForm.setUuid(id);
10577
10578            itemDescriptionType = CDI.current().select(GetItemDescriptionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10579        } catch (NamingException ex) {
10580            throw new RuntimeException(ex);
10581        }
10582
10583        return itemDescriptionType == null ? null : new ItemDescriptionTypeObject(itemDescriptionType);
10584    }
10585
10586    @GraphQLField
10587    @GraphQLName("itemDescriptionTypes")
10588    @GraphQLNonNull
10589    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10590    static CountingPaginatedData<ItemDescriptionTypeObject> itemDescriptionTypes(final DataFetchingEnvironment env,
10591            @GraphQLName("parentItemDescriptionTypeName") final String parentItemDescriptionTypeName) {
10592        CountingPaginatedData<ItemDescriptionTypeObject> data;
10593
10594        try {
10595            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypesForm();
10596            var command = CDI.current().select(GetItemDescriptionTypesCommand.class).get();
10597
10598            commandForm.setParentItemDescriptionTypeName(parentItemDescriptionTypeName);
10599
10600            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10601            if(totalEntities == null) {
10602                data = Connections.emptyConnection();
10603            } else {
10604                try(var objectLimiter = new ObjectLimiter(env, ItemDescriptionTypeConstants.COMPONENT_VENDOR_NAME, ItemDescriptionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10605                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10606
10607                    var itemDescriptionTypes = entities.stream()
10608                            .map(ItemDescriptionTypeObject::new)
10609                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10610
10611                    data = new CountedObjects<>(objectLimiter, itemDescriptionTypes);
10612                }
10613            }
10614        } catch (NamingException ex) {
10615            throw new RuntimeException(ex);
10616        }
10617
10618        return data;
10619    }
10620
10621    @GraphQLField
10622    @GraphQLName("itemImageType")
10623    static ItemImageTypeObject itemImageType(final DataFetchingEnvironment env,
10624            @GraphQLName("itemImageTypeName") final String itemImageTypeName,
10625            @GraphQLName("id") @GraphQLID final String id) {
10626        ItemImageType itemImageType;
10627
10628        try {
10629            var commandForm = ItemUtil.getHome().getGetItemImageTypeForm();
10630
10631            commandForm.setItemImageTypeName(itemImageTypeName);
10632            commandForm.setUuid(id);
10633
10634            itemImageType = CDI.current().select(GetItemImageTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10635        } catch (NamingException ex) {
10636            throw new RuntimeException(ex);
10637        }
10638
10639        return itemImageType == null ? null : new ItemImageTypeObject(itemImageType);
10640    }
10641
10642    @GraphQLField
10643    @GraphQLName("itemImageTypes")
10644    @GraphQLNonNull
10645    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10646    static CountingPaginatedData<ItemImageTypeObject> itemImageTypes(final DataFetchingEnvironment env) {
10647        CountingPaginatedData<ItemImageTypeObject> data;
10648
10649        try {
10650            var commandForm = ItemUtil.getHome().getGetItemImageTypesForm();
10651            var command = CDI.current().select(GetItemImageTypesCommand.class).get();
10652
10653            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10654            if(totalEntities == null) {
10655                data = Connections.emptyConnection();
10656            } else {
10657                try(var objectLimiter = new ObjectLimiter(env, ItemImageTypeConstants.COMPONENT_VENDOR_NAME, ItemImageTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10658                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10659
10660                    var itemImageTypes = entities.stream()
10661                            .map(ItemImageTypeObject::new)
10662                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10663
10664                    data = new CountedObjects<>(objectLimiter, itemImageTypes);
10665                }
10666            }
10667        } catch (NamingException ex) {
10668            throw new RuntimeException(ex);
10669        }
10670
10671        return data;
10672    }
10673
10674    @GraphQLField
10675    @GraphQLName("itemDescriptionTypeUseType")
10676    static ItemDescriptionTypeUseTypeObject itemDescriptionTypeUseType(final DataFetchingEnvironment env,
10677            @GraphQLName("itemDescriptionTypeUseTypeName") final String itemDescriptionTypeUseTypeName,
10678            @GraphQLName("id") @GraphQLID final String id) {
10679        ItemDescriptionTypeUseType itemDescriptionTypeUseType;
10680
10681        try {
10682            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeUseTypeForm();
10683
10684            commandForm.setItemDescriptionTypeUseTypeName(itemDescriptionTypeUseTypeName);
10685            commandForm.setUuid(id);
10686
10687            itemDescriptionTypeUseType = CDI.current().select(GetItemDescriptionTypeUseTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10688        } catch (NamingException ex) {
10689            throw new RuntimeException(ex);
10690        }
10691
10692        return itemDescriptionTypeUseType == null ? null : new ItemDescriptionTypeUseTypeObject(itemDescriptionTypeUseType);
10693    }
10694
10695    @GraphQLField
10696    @GraphQLName("itemDescriptionTypeUseTypes")
10697    @GraphQLNonNull
10698    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10699    static CountingPaginatedData<ItemDescriptionTypeUseTypeObject> itemDescriptionTypeUseTypes(final DataFetchingEnvironment env) {
10700        CountingPaginatedData<ItemDescriptionTypeUseTypeObject> data;
10701
10702        try {
10703            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeUseTypesForm();
10704            var command = CDI.current().select(GetItemDescriptionTypeUseTypesCommand.class).get();
10705
10706            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10707            if(totalEntities == null) {
10708                data = Connections.emptyConnection();
10709            } else {
10710                try(var objectLimiter = new ObjectLimiter(env, ItemDescriptionTypeUseTypeConstants.COMPONENT_VENDOR_NAME, ItemDescriptionTypeUseTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10711                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10712
10713                    var itemDescriptionTypeUseTypes = entities.stream()
10714                            .map(ItemDescriptionTypeUseTypeObject::new)
10715                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10716
10717                    data = new CountedObjects<>(objectLimiter, itemDescriptionTypeUseTypes);
10718                }
10719            }
10720        } catch (NamingException ex) {
10721            throw new RuntimeException(ex);
10722        }
10723
10724        return data;
10725    }
10726
10727    @GraphQLField
10728    @GraphQLName("itemDescriptionTypeUse")
10729    static ItemDescriptionTypeUseObject itemDescriptionTypeUse(final DataFetchingEnvironment env,
10730            @GraphQLName("itemDescriptionTypeUseTypeName") @GraphQLNonNull final String itemDescriptionTypeUseTypeName,
10731            @GraphQLName("itemDescriptionTypeName") @GraphQLNonNull final String itemDescriptionTypeName) {
10732        ItemDescriptionTypeUse itemDescriptionTypeUse;
10733
10734        try {
10735            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeUseForm();
10736
10737            commandForm.setItemDescriptionTypeUseTypeName(itemDescriptionTypeUseTypeName);
10738            commandForm.setItemDescriptionTypeName(itemDescriptionTypeName);
10739
10740            itemDescriptionTypeUse = CDI.current().select(GetItemDescriptionTypeUseCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10741        } catch (NamingException ex) {
10742            throw new RuntimeException(ex);
10743        }
10744
10745        return itemDescriptionTypeUse == null ? null : new ItemDescriptionTypeUseObject(itemDescriptionTypeUse);
10746    }
10747
10748    @GraphQLField
10749    @GraphQLName("itemDescriptionTypeUses")
10750    @GraphQLNonNull
10751    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10752    static CountingPaginatedData<ItemDescriptionTypeUseObject> itemDescriptionTypeUses(final DataFetchingEnvironment env,
10753            @GraphQLName("itemDescriptionTypeUseTypeName") final String itemDescriptionTypeUseTypeName,
10754            @GraphQLName("itemDescriptionTypeName") final String itemDescriptionTypeName) {
10755        CountingPaginatedData<ItemDescriptionTypeUseObject> data;
10756
10757        try {
10758            var commandForm = ItemUtil.getHome().getGetItemDescriptionTypeUsesForm();
10759            var command = CDI.current().select(GetItemDescriptionTypeUsesCommand.class).get();
10760
10761            commandForm.setItemDescriptionTypeUseTypeName(itemDescriptionTypeUseTypeName);
10762            commandForm.setItemDescriptionTypeName(itemDescriptionTypeName);
10763
10764            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10765            if(totalEntities == null) {
10766                data = Connections.emptyConnection();
10767            } else {
10768                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)) {
10769                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10770
10771                    var objects = entities.stream()
10772                            .map(ItemDescriptionTypeUseObject::new)
10773                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10774
10775                    data = new CountedObjects<>(objectLimiter, objects);
10776                }
10777            }
10778        } catch (NamingException ex) {
10779            throw new RuntimeException(ex);
10780        }
10781
10782        return data;
10783    }
10784
10785    @GraphQLField
10786    @GraphQLName("itemAliasType")
10787    static ItemAliasTypeObject itemAliasType(final DataFetchingEnvironment env,
10788            @GraphQLName("itemAliasTypeName") final String itemAliasTypeName,
10789            @GraphQLName("id") @GraphQLID final String id) {
10790        ItemAliasType itemAliasType;
10791
10792        try {
10793            var commandForm = ItemUtil.getHome().getGetItemAliasTypeForm();
10794
10795            commandForm.setItemAliasTypeName(itemAliasTypeName);
10796            commandForm.setUuid(id);
10797
10798            itemAliasType = CDI.current().select(GetItemAliasTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10799        } catch (NamingException ex) {
10800            throw new RuntimeException(ex);
10801        }
10802
10803        return itemAliasType == null ? null : new ItemAliasTypeObject(itemAliasType);
10804    }
10805
10806    @GraphQLField
10807    @GraphQLName("itemAliasTypes")
10808    @GraphQLNonNull
10809    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10810    static CountingPaginatedData<ItemAliasTypeObject> itemAliasTypes(final DataFetchingEnvironment env) {
10811        CountingPaginatedData<ItemAliasTypeObject> data;
10812
10813        try {
10814            var commandForm = ItemUtil.getHome().getGetItemAliasTypesForm();
10815            var command = CDI.current().select(GetItemAliasTypesCommand.class).get();
10816
10817            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10818            if(totalEntities == null) {
10819                data = Connections.emptyConnection();
10820            } else {
10821                try(var objectLimiter = new ObjectLimiter(env, ItemAliasTypeConstants.COMPONENT_VENDOR_NAME, ItemAliasTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10822                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10823
10824                    var itemAliasTypes = entities.stream()
10825                            .map(ItemAliasTypeObject::new)
10826                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10827
10828                    data = new CountedObjects<>(objectLimiter, itemAliasTypes);
10829                }
10830            }
10831        } catch (NamingException ex) {
10832            throw new RuntimeException(ex);
10833        }
10834
10835        return data;
10836    }
10837
10838    @GraphQLField
10839    @GraphQLName("itemWeightType")
10840    static ItemWeightTypeObject itemWeightType(final DataFetchingEnvironment env,
10841            @GraphQLName("itemWeightTypeName") final String itemWeightTypeName,
10842            @GraphQLName("id") @GraphQLID final String id) {
10843        ItemWeightType itemWeightType;
10844
10845        try {
10846            var commandForm = ItemUtil.getHome().getGetItemWeightTypeForm();
10847
10848            commandForm.setItemWeightTypeName(itemWeightTypeName);
10849            commandForm.setUuid(id);
10850
10851            itemWeightType = CDI.current().select(GetItemWeightTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10852        } catch (NamingException ex) {
10853            throw new RuntimeException(ex);
10854        }
10855
10856        return itemWeightType == null ? null : new ItemWeightTypeObject(itemWeightType);
10857    }
10858
10859    @GraphQLField
10860    @GraphQLName("itemWeightTypes")
10861    @GraphQLNonNull
10862    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10863    static CountingPaginatedData<ItemWeightTypeObject> itemWeightTypes(final DataFetchingEnvironment env) {
10864        CountingPaginatedData<ItemWeightTypeObject> data;
10865
10866        try {
10867            var commandForm = ItemUtil.getHome().getGetItemWeightTypesForm();
10868            var command = CDI.current().select(GetItemWeightTypesCommand.class).get();
10869
10870            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10871            if(totalEntities == null) {
10872                data = Connections.emptyConnection();
10873            } else {
10874                try(var objectLimiter = new ObjectLimiter(env, ItemWeightTypeConstants.COMPONENT_VENDOR_NAME, ItemWeightTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10875                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10876
10877                    var itemWeightTypes = entities.stream()
10878                            .map(ItemWeightTypeObject::new)
10879                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10880
10881                    data = new CountedObjects<>(objectLimiter, itemWeightTypes);
10882                }
10883            }
10884        } catch (NamingException ex) {
10885            throw new RuntimeException(ex);
10886        }
10887
10888        return data;
10889    }
10890
10891    @GraphQLField
10892    @GraphQLName("itemVolumeType")
10893    static ItemVolumeTypeObject itemVolumeType(final DataFetchingEnvironment env,
10894            @GraphQLName("itemVolumeTypeName") final String itemVolumeTypeName,
10895            @GraphQLName("id") @GraphQLID final String id) {
10896        ItemVolumeType itemVolumeType;
10897
10898        try {
10899            var commandForm = ItemUtil.getHome().getGetItemVolumeTypeForm();
10900
10901            commandForm.setItemVolumeTypeName(itemVolumeTypeName);
10902            commandForm.setUuid(id);
10903
10904            itemVolumeType = CDI.current().select(GetItemVolumeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10905        } catch (NamingException ex) {
10906            throw new RuntimeException(ex);
10907        }
10908
10909        return itemVolumeType == null ? null : new ItemVolumeTypeObject(itemVolumeType);
10910    }
10911
10912    @GraphQLField
10913    @GraphQLName("itemVolumeTypes")
10914    @GraphQLNonNull
10915    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10916    static CountingPaginatedData<ItemVolumeTypeObject> itemVolumeTypes(final DataFetchingEnvironment env) {
10917        CountingPaginatedData<ItemVolumeTypeObject> data;
10918
10919        try {
10920            var commandForm = ItemUtil.getHome().getGetItemVolumeTypesForm();
10921            var command = CDI.current().select(GetItemVolumeTypesCommand.class).get();
10922
10923            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10924            if(totalEntities == null) {
10925                data = Connections.emptyConnection();
10926            } else {
10927                try(var objectLimiter = new ObjectLimiter(env, ItemVolumeTypeConstants.COMPONENT_VENDOR_NAME, ItemVolumeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10928                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10929
10930                    var itemVolumeTypes = entities.stream()
10931                            .map(ItemVolumeTypeObject::new)
10932                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10933
10934                    data = new CountedObjects<>(objectLimiter, itemVolumeTypes);
10935                }
10936            }
10937        } catch (NamingException ex) {
10938            throw new RuntimeException(ex);
10939        }
10940
10941        return data;
10942    }
10943
10944    @GraphQLField
10945    @GraphQLName("relatedItemType")
10946    static RelatedItemTypeObject relatedItemType(final DataFetchingEnvironment env,
10947            @GraphQLName("relatedItemTypeName") final String relatedItemTypeName,
10948            @GraphQLName("id") @GraphQLID final String id) {
10949        RelatedItemType relatedItemType;
10950
10951        try {
10952            var commandForm = ItemUtil.getHome().getGetRelatedItemTypeForm();
10953
10954            commandForm.setRelatedItemTypeName(relatedItemTypeName);
10955            commandForm.setUuid(id);
10956
10957            relatedItemType = CDI.current().select(GetRelatedItemTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
10958        } catch (NamingException ex) {
10959            throw new RuntimeException(ex);
10960        }
10961
10962        return relatedItemType == null ? null : new RelatedItemTypeObject(relatedItemType, null);
10963    }
10964
10965    @GraphQLField
10966    @GraphQLName("relatedItemTypes")
10967    @GraphQLNonNull
10968    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
10969    static CountingPaginatedData<RelatedItemTypeObject> relatedItemTypes(final DataFetchingEnvironment env) {
10970        CountingPaginatedData<RelatedItemTypeObject> data;
10971
10972        try {
10973            var commandForm = ItemUtil.getHome().getGetRelatedItemTypesForm();
10974            var command = CDI.current().select(GetRelatedItemTypesCommand.class).get();
10975
10976            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10977            if(totalEntities == null) {
10978                data = Connections.emptyConnection();
10979            } else {
10980                try(var objectLimiter = new ObjectLimiter(env, RelatedItemTypeConstants.COMPONENT_VENDOR_NAME, RelatedItemTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
10981                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
10982
10983                    var relatedItemTypes = entities.stream()
10984                            .map((RelatedItemType relatedItemType) -> new RelatedItemTypeObject(relatedItemType, null))
10985                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
10986
10987                    data = new CountedObjects<>(objectLimiter, relatedItemTypes);
10988                }
10989            }
10990        } catch (NamingException ex) {
10991            throw new RuntimeException(ex);
10992        }
10993
10994        return data;
10995    }
10996
10997    @GraphQLField
10998    @GraphQLName("relatedItem")
10999    static RelatedItemObject relatedItem(final DataFetchingEnvironment env,
11000            @GraphQLName("relatedItemTypeName") @GraphQLNonNull final String relatedItemTypeName,
11001            @GraphQLName("fromItemName") @GraphQLNonNull final String fromItemName,
11002            @GraphQLName("toItemName") @GraphQLNonNull final String toItemName) {
11003        RelatedItem relatedItem;
11004
11005        try {
11006            var commandForm = ItemUtil.getHome().getGetRelatedItemForm();
11007
11008            commandForm.setRelatedItemTypeName(relatedItemTypeName);
11009            commandForm.setFromItemName(fromItemName);
11010            commandForm.setToItemName(toItemName);
11011
11012            relatedItem = CDI.current().select(GetRelatedItemCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11013        } catch (NamingException ex) {
11014            throw new RuntimeException(ex);
11015        }
11016
11017        return relatedItem == null ? null : new RelatedItemObject(relatedItem);
11018    }
11019
11020    @GraphQLField
11021    @GraphQLName("relatedItems")
11022    @GraphQLNonNull
11023    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11024    static CountingPaginatedData<RelatedItemObject> relatedItems(final DataFetchingEnvironment env,
11025            @GraphQLName("relatedItemTypeName") final String relatedItemTypeName,
11026            @GraphQLName("fromItemName") final String fromItemName,
11027            @GraphQLName("toItemName") final String toItemName) {
11028        CountingPaginatedData<RelatedItemObject> data;
11029
11030        try {
11031            var commandForm = ItemUtil.getHome().getGetRelatedItemsForm();
11032            var command = CDI.current().select(GetRelatedItemsCommand.class).get();
11033
11034            commandForm.setRelatedItemTypeName(relatedItemTypeName);
11035            commandForm.setFromItemName(fromItemName);
11036            commandForm.setToItemName(toItemName);
11037
11038            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11039            if(totalEntities == null) {
11040                data = Connections.emptyConnection();
11041            } else {
11042                try(var objectLimiter = new ObjectLimiter(env, RelatedItemConstants.COMPONENT_VENDOR_NAME, RelatedItemConstants.ENTITY_TYPE_NAME, totalEntities)) {
11043                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11044
11045                    var relatedItemObjects = entities.stream()
11046                            .map(RelatedItemObject::new)
11047                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11048
11049                    data = new CountedObjects<>(objectLimiter, relatedItemObjects);
11050                }
11051            }
11052        } catch (NamingException ex) {
11053            throw new RuntimeException(ex);
11054        }
11055
11056        return data;
11057    }
11058
11059    @GraphQLField
11060    @GraphQLName("orderType")
11061    static OrderTypeObject orderType(final DataFetchingEnvironment env,
11062            @GraphQLName("orderTypeName") final String orderTypeName,
11063            @GraphQLName("id") @GraphQLID final String id) {
11064        OrderType orderType;
11065
11066        try {
11067            var commandForm = OrderUtil.getHome().getGetOrderTypeForm();
11068
11069            commandForm.setOrderTypeName(orderTypeName);
11070            commandForm.setUuid(id);
11071
11072            orderType = CDI.current().select(GetOrderTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11073        } catch (NamingException ex) {
11074            throw new RuntimeException(ex);
11075        }
11076
11077        return orderType == null ? null : new OrderTypeObject(orderType);
11078    }
11079
11080    @GraphQLField
11081    @GraphQLName("orderTypes")
11082    @GraphQLNonNull
11083    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11084    static CountingPaginatedData<OrderTypeObject> orderTypes(final DataFetchingEnvironment env) {
11085        CountingPaginatedData<OrderTypeObject> data;
11086
11087        try {
11088            var commandForm = OrderUtil.getHome().getGetOrderTypesForm();
11089            var command = CDI.current().select(GetOrderTypesCommand.class).get();
11090
11091            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11092            if(totalEntities == null) {
11093                data = Connections.emptyConnection();
11094            } else {
11095                try(var objectLimiter = new ObjectLimiter(env, OrderTypeConstants.COMPONENT_VENDOR_NAME, OrderTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11096                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11097
11098                    var orderTypes = entities.stream()
11099                            .map(OrderTypeObject::new)
11100                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11101
11102                    data = new CountedObjects<>(objectLimiter, orderTypes);
11103                }
11104            }
11105        } catch (NamingException ex) {
11106            throw new RuntimeException(ex);
11107        }
11108
11109        return data;
11110    }
11111
11112    @GraphQLField
11113    @GraphQLName("orderPriority")
11114    static OrderPriorityObject orderPriority(final DataFetchingEnvironment env,
11115            @GraphQLName("orderTypeName") final String orderTypeName,
11116            @GraphQLName("orderPriorityName") final String orderPriorityName,
11117            @GraphQLName("id") @GraphQLID final String id) {
11118        OrderPriority orderPriority;
11119
11120        try {
11121            var commandForm = OrderUtil.getHome().getGetOrderPriorityForm();
11122
11123            commandForm.setOrderTypeName(orderTypeName);
11124            commandForm.setOrderPriorityName(orderPriorityName);
11125            commandForm.setUuid(id);
11126
11127            orderPriority = CDI.current().select(GetOrderPriorityCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11128        } catch (NamingException ex) {
11129            throw new RuntimeException(ex);
11130        }
11131
11132        return orderPriority == null ? null : new OrderPriorityObject(orderPriority);
11133    }
11134
11135    @GraphQLField
11136    @GraphQLName("orderPriorities")
11137    @GraphQLNonNull
11138    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11139    static CountingPaginatedData<OrderPriorityObject> orderPriorities(final DataFetchingEnvironment env,
11140            @GraphQLName("orderTypeName") final String orderTypeName) {
11141        CountingPaginatedData<OrderPriorityObject> data;
11142
11143        try {
11144            var commandForm = OrderUtil.getHome().getGetOrderPrioritiesForm();
11145            var command = CDI.current().select(GetOrderPrioritiesCommand.class).get();
11146
11147            commandForm.setOrderTypeName(orderTypeName);
11148
11149            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11150            if(totalEntities == null) {
11151                data = Connections.emptyConnection();
11152            } else {
11153                try(var objectLimiter = new ObjectLimiter(env, OrderPriorityConstants.COMPONENT_VENDOR_NAME, OrderPriorityConstants.ENTITY_TYPE_NAME, totalEntities)) {
11154                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11155
11156                    var orderPriorities = entities.stream()
11157                            .map(OrderPriorityObject::new)
11158                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11159
11160                    data = new CountedObjects<>(objectLimiter, orderPriorities);
11161                }
11162            }
11163        } catch (NamingException ex) {
11164            throw new RuntimeException(ex);
11165        }
11166
11167        return data;
11168    }
11169
11170    @GraphQLField
11171    @GraphQLName("orderTimeType")
11172    static OrderTimeTypeObject orderTimeType(final DataFetchingEnvironment env,
11173            @GraphQLName("orderTypeName") final String orderTypeName,
11174            @GraphQLName("orderTimeTypeName") final String orderTimeTypeName,
11175            @GraphQLName("id") @GraphQLID final String id) {
11176        OrderTimeType orderTimeType;
11177
11178        try {
11179            var commandForm = OrderUtil.getHome().getGetOrderTimeTypeForm();
11180
11181            commandForm.setOrderTypeName(orderTypeName);
11182            commandForm.setOrderTimeTypeName(orderTimeTypeName);
11183            commandForm.setUuid(id);
11184
11185            orderTimeType = CDI.current().select(GetOrderTimeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11186        } catch (NamingException ex) {
11187            throw new RuntimeException(ex);
11188        }
11189
11190        return orderTimeType == null ? null : new OrderTimeTypeObject(orderTimeType);
11191    }
11192
11193    @GraphQLField
11194    @GraphQLName("orderTimeTypes")
11195    @GraphQLNonNull
11196    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11197    static CountingPaginatedData<OrderTimeTypeObject> orderTimeTypes(final DataFetchingEnvironment env,
11198            @GraphQLName("orderTypeName") final String orderTypeName) {
11199        CountingPaginatedData<OrderTimeTypeObject> data;
11200
11201        try {
11202            var commandForm = OrderUtil.getHome().getGetOrderTimeTypesForm();
11203            var command = CDI.current().select(GetOrderTimeTypesCommand.class).get();
11204
11205            commandForm.setOrderTypeName(orderTypeName);
11206
11207            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11208            if(totalEntities == null) {
11209                data = Connections.emptyConnection();
11210            } else {
11211                try(var objectLimiter = new ObjectLimiter(env, OrderTimeTypeConstants.COMPONENT_VENDOR_NAME, OrderTimeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11212                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11213
11214                    var orderTimeTypes = entities.stream()
11215                            .map(OrderTimeTypeObject::new)
11216                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11217
11218                    data = new CountedObjects<>(objectLimiter, orderTimeTypes);
11219                }
11220            }
11221        } catch (NamingException ex) {
11222            throw new RuntimeException(ex);
11223        }
11224
11225        return data;
11226    }
11227
11228    @GraphQLField
11229    @GraphQLName("wishlistType")
11230    static WishlistTypeObject wishlistType(final DataFetchingEnvironment env,
11231            @GraphQLName("wishlistTypeName") final String wishlistTypeName,
11232            @GraphQLName("id") @GraphQLID final String id) {
11233        WishlistType wishlistType;
11234
11235        try {
11236            var commandForm = WishlistUtil.getHome().getGetWishlistTypeForm();
11237
11238            commandForm.setWishlistTypeName(wishlistTypeName);
11239            commandForm.setUuid(id);
11240
11241            wishlistType = CDI.current().select(GetWishlistTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11242        } catch (NamingException ex) {
11243            throw new RuntimeException(ex);
11244        }
11245
11246        return wishlistType == null ? null : new WishlistTypeObject(wishlistType);
11247    }
11248
11249    @GraphQLField
11250    @GraphQLName("wishlistTypes")
11251    @GraphQLNonNull
11252    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11253    static CountingPaginatedData<WishlistTypeObject> wishlistTypes(final DataFetchingEnvironment env) {
11254        CountingPaginatedData<WishlistTypeObject> data;
11255
11256        try {
11257            var commandForm = WishlistUtil.getHome().getGetWishlistTypesForm();
11258            var command = CDI.current().select(GetWishlistTypesCommand.class).get();
11259
11260            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11261            if(totalEntities == null) {
11262                data = Connections.emptyConnection();
11263            } else {
11264                try(var objectLimiter = new ObjectLimiter(env, WishlistTypeConstants.COMPONENT_VENDOR_NAME, WishlistTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11265                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11266
11267                    var wishlistTypes = entities.stream()
11268                            .map(WishlistTypeObject::new)
11269                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11270
11271                    data = new CountedObjects<>(objectLimiter, wishlistTypes);
11272                }
11273            }
11274        } catch (NamingException ex) {
11275            throw new RuntimeException(ex);
11276        }
11277
11278        return data;
11279    }
11280
11281    @GraphQLField
11282    @GraphQLName("wishlistPriority")
11283    static WishlistPriorityObject wishlistPriority(final DataFetchingEnvironment env,
11284            @GraphQLName("wishlistTypeName") final String wishlistTypeName,
11285            @GraphQLName("wishlistPriorityName") final String wishlistPriorityName,
11286            @GraphQLName("id") @GraphQLID final String id) {
11287        WishlistPriority wishlistPriority;
11288
11289        try {
11290            var commandForm = WishlistUtil.getHome().getGetWishlistPriorityForm();
11291
11292            commandForm.setWishlistTypeName(wishlistTypeName);
11293            commandForm.setWishlistPriorityName(wishlistPriorityName);
11294            commandForm.setUuid(id);
11295
11296            wishlistPriority = CDI.current().select(GetWishlistPriorityCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11297        } catch (NamingException ex) {
11298            throw new RuntimeException(ex);
11299        }
11300
11301        return wishlistPriority == null ? null : new WishlistPriorityObject(wishlistPriority);
11302    }
11303
11304    @GraphQLField
11305    @GraphQLName("wishlistPriorities")
11306    @GraphQLNonNull
11307    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11308    static CountingPaginatedData<WishlistPriorityObject> wishlistPriorities(final DataFetchingEnvironment env,
11309            @GraphQLName("wishlistTypeName") @GraphQLNonNull final String wishlistTypeName) {
11310        CountingPaginatedData<WishlistPriorityObject> data;
11311
11312        try {
11313            var commandForm = WishlistUtil.getHome().getGetWishlistPrioritiesForm();
11314            var command = CDI.current().select(GetWishlistPrioritiesCommand.class).get();
11315
11316            commandForm.setWishlistTypeName(wishlistTypeName);
11317
11318            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11319            if(totalEntities == null) {
11320                data = Connections.emptyConnection();
11321            } else {
11322                try(var objectLimiter = new ObjectLimiter(env, WishlistPriorityConstants.COMPONENT_VENDOR_NAME, WishlistPriorityConstants.ENTITY_TYPE_NAME, totalEntities)) {
11323                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11324
11325                    var wishlistPriorities = entities.stream()
11326                            .map(WishlistPriorityObject::new)
11327                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11328
11329                    data = new CountedObjects<>(objectLimiter, wishlistPriorities);
11330                }
11331            }
11332        } catch (NamingException ex) {
11333            throw new RuntimeException(ex);
11334        }
11335
11336        return data;
11337    }
11338
11339    @GraphQLField
11340    @GraphQLName("termType")
11341    static TermTypeObject termType(final DataFetchingEnvironment env,
11342            @GraphQLName("termTypeName") final String termTypeName,
11343            @GraphQLName("id") @GraphQLID final String id) {
11344        TermType termType;
11345
11346        try {
11347            var commandForm = TermUtil.getHome().getGetTermTypeForm();
11348
11349            commandForm.setTermTypeName(termTypeName);
11350            commandForm.setUuid(id);
11351
11352            termType = CDI.current().select(GetTermTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11353        } catch (NamingException ex) {
11354            throw new RuntimeException(ex);
11355        }
11356
11357        return termType == null ? null : new TermTypeObject(termType);
11358    }
11359
11360    @GraphQLField
11361    @GraphQLName("termTypes")
11362    @GraphQLNonNull
11363    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11364    static CountingPaginatedData<TermTypeObject> termTypes(final DataFetchingEnvironment env) {
11365        CountingPaginatedData<TermTypeObject> data;
11366
11367        try {
11368            var commandForm = TermUtil.getHome().getGetTermTypesForm();
11369            var command = CDI.current().select(GetTermTypesCommand.class).get();
11370
11371            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11372            if(totalEntities == null) {
11373                data = Connections.emptyConnection();
11374            } else {
11375                try(var objectLimiter = new ObjectLimiter(env, TermTypeConstants.COMPONENT_VENDOR_NAME, TermTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11376                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11377
11378                    var termTypes = entities.stream()
11379                            .map(TermTypeObject::new)
11380                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11381
11382                    data = new CountedObjects<>(objectLimiter, termTypes);
11383                }
11384            }
11385        } catch (NamingException ex) {
11386            throw new RuntimeException(ex);
11387        }
11388
11389        return data;
11390    }
11391
11392    @GraphQLField
11393    @GraphQLName("term")
11394    static TermObject term(final DataFetchingEnvironment env,
11395            @GraphQLName("termName") final String termName,
11396            @GraphQLName("id") @GraphQLID final String id) {
11397        Term term;
11398
11399        try {
11400            var commandForm = TermUtil.getHome().getGetTermForm();
11401
11402            commandForm.setTermName(termName);
11403            commandForm.setUuid(id);
11404
11405            term = CDI.current().select(GetTermCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11406        } catch (NamingException ex) {
11407            throw new RuntimeException(ex);
11408        }
11409
11410        return term == null ? null : new TermObject(term);
11411    }
11412
11413    @GraphQLField
11414    @GraphQLName("terms")
11415    @GraphQLNonNull
11416    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11417    static CountingPaginatedData<TermObject> terms(final DataFetchingEnvironment env) {
11418        CountingPaginatedData<TermObject> data;
11419
11420        try {
11421            var commandForm = TermUtil.getHome().getGetTermsForm();
11422            var command = CDI.current().select(GetTermsCommand.class).get();
11423
11424            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11425            if(totalEntities == null) {
11426                data = Connections.emptyConnection();
11427            } else {
11428                try(var objectLimiter = new ObjectLimiter(env, TermConstants.COMPONENT_VENDOR_NAME, TermConstants.ENTITY_TYPE_NAME, totalEntities)) {
11429                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11430
11431                    var terms = entities.stream()
11432                            .map(TermObject::new)
11433                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11434
11435                    data = new CountedObjects<>(objectLimiter, terms);
11436                }
11437            }
11438        } catch (NamingException ex) {
11439            throw new RuntimeException(ex);
11440        }
11441
11442        return data;
11443    }
11444
11445    @GraphQLField
11446    @GraphQLName("securityRoleGroup")
11447    static SecurityRoleGroupObject securityRoleGroup(final DataFetchingEnvironment env,
11448            @GraphQLName("securityRoleGroupName") final String securityRoleGroupName,
11449            @GraphQLName("id") @GraphQLID final String id) {
11450        SecurityRoleGroup securityRoleGroup;
11451
11452        try {
11453            var commandForm = SecurityUtil.getHome().getGetSecurityRoleGroupForm();
11454
11455            commandForm.setSecurityRoleGroupName(securityRoleGroupName);
11456            commandForm.setUuid(id);
11457
11458            securityRoleGroup = CDI.current().select(GetSecurityRoleGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11459        } catch (NamingException ex) {
11460            throw new RuntimeException(ex);
11461        }
11462
11463        return securityRoleGroup == null ? null : new SecurityRoleGroupObject(securityRoleGroup);
11464    }
11465
11466    @GraphQLField
11467    @GraphQLName("securityRoleGroups")
11468    @GraphQLNonNull
11469    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11470    static CountingPaginatedData<SecurityRoleGroupObject> securityRoleGroups(final DataFetchingEnvironment env,
11471            @GraphQLName("parentSecurityRoleGroupName") final String parentSecurityRoleGroupName) {
11472        CountingPaginatedData<SecurityRoleGroupObject> data;
11473
11474        try {
11475            var commandForm = SecurityUtil.getHome().getGetSecurityRoleGroupsForm();
11476            var command = CDI.current().select(GetSecurityRoleGroupsCommand.class).get();
11477
11478            commandForm.setParentSecurityRoleGroupName(parentSecurityRoleGroupName);
11479
11480            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11481            if(totalEntities == null) {
11482                data = Connections.emptyConnection();
11483            } else {
11484                try(var objectLimiter = new ObjectLimiter(env, SecurityRoleGroupConstants.COMPONENT_VENDOR_NAME, SecurityRoleGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
11485                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11486
11487                    var securityRoleGroups = entities.stream()
11488                            .map(SecurityRoleGroupObject::new)
11489                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11490
11491                    data = new CountedObjects<>(objectLimiter, securityRoleGroups);
11492                }
11493            }
11494        } catch (NamingException ex) {
11495            throw new RuntimeException(ex);
11496        }
11497
11498        return data;
11499    }
11500
11501    @GraphQLField
11502    @GraphQLName("securityRole")
11503    static SecurityRoleObject securityRole(final DataFetchingEnvironment env,
11504            @GraphQLName("securityRoleGroupName") final String securityRoleGroupName,
11505            @GraphQLName("securityRoleName") final String securityRoleName,
11506            @GraphQLName("id") @GraphQLID final String id) {
11507        SecurityRole securityRole;
11508
11509        try {
11510            var commandForm = SecurityUtil.getHome().getGetSecurityRoleForm();
11511
11512            commandForm.setSecurityRoleGroupName(securityRoleGroupName);
11513            commandForm.setSecurityRoleName(securityRoleName);
11514            commandForm.setUuid(id);
11515
11516            securityRole = CDI.current().select(GetSecurityRoleCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11517        } catch (NamingException ex) {
11518            throw new RuntimeException(ex);
11519        }
11520
11521        return securityRole == null ? null : new SecurityRoleObject(securityRole);
11522    }
11523
11524    @GraphQLField
11525    @GraphQLName("securityRoles")
11526    @GraphQLNonNull
11527    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11528    static CountingPaginatedData<SecurityRoleObject> securityRoles(final DataFetchingEnvironment env,
11529            @GraphQLName("securityRoleGroupName") @GraphQLNonNull final String securityRoleGroupName) {
11530        CountingPaginatedData<SecurityRoleObject> data;
11531
11532        try {
11533            var commandForm = SecurityUtil.getHome().getGetSecurityRolesForm();
11534            var command = CDI.current().select(GetSecurityRolesCommand.class).get();
11535
11536            commandForm.setSecurityRoleGroupName(securityRoleGroupName);
11537
11538            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11539            if(totalEntities == null) {
11540                data = Connections.emptyConnection();
11541            } else {
11542                try(var objectLimiter = new ObjectLimiter(env, SecurityRoleConstants.COMPONENT_VENDOR_NAME, SecurityRoleConstants.ENTITY_TYPE_NAME, totalEntities)) {
11543                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11544
11545                    var securityRoles = entities.stream()
11546                            .map(SecurityRoleObject::new)
11547                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11548
11549                    data = new CountedObjects<>(objectLimiter, securityRoles);
11550                }
11551            }
11552        } catch (NamingException ex) {
11553            throw new RuntimeException(ex);
11554        }
11555
11556        return data;
11557    }
11558
11559    @GraphQLField
11560    @GraphQLName("personalTitles")
11561    @GraphQLNonNull
11562    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11563    static CountingPaginatedData<PersonalTitleObject> personalTitles(final DataFetchingEnvironment env) {
11564        CountingPaginatedData<PersonalTitleObject> data;
11565
11566        try {
11567            var commandForm = PartyUtil.getHome().getGetPersonalTitlesForm();
11568            var command = CDI.current().select(GetPersonalTitlesCommand.class).get();
11569
11570            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11571            if(totalEntities == null) {
11572                data = Connections.emptyConnection();
11573            } else {
11574                try(var objectLimiter = new ObjectLimiter(env, PersonalTitleConstants.COMPONENT_VENDOR_NAME, PersonalTitleConstants.ENTITY_TYPE_NAME, totalEntities)) {
11575                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11576
11577                    var personalTitles = entities.stream()
11578                            .map(PersonalTitleObject::new)
11579                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11580
11581                    data = new CountedObjects<>(objectLimiter, personalTitles);
11582                }
11583            }
11584        } catch (NamingException ex) {
11585            throw new RuntimeException(ex);
11586        }
11587
11588        return data;
11589    }
11590
11591    @GraphQLField
11592    @GraphQLName("nameSuffixes")
11593    @GraphQLNonNull
11594    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11595    static CountingPaginatedData<NameSuffixObject> nameSuffixes(final DataFetchingEnvironment env) {
11596        CountingPaginatedData<NameSuffixObject> data;
11597
11598        try {
11599            var commandForm = PartyUtil.getHome().getGetNameSuffixesForm();
11600            var command = CDI.current().select(GetNameSuffixesCommand.class).get();
11601
11602            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11603            if(totalEntities == null) {
11604                data = Connections.emptyConnection();
11605            } else {
11606                try(var objectLimiter = new ObjectLimiter(env, NameSuffixConstants.COMPONENT_VENDOR_NAME, NameSuffixConstants.ENTITY_TYPE_NAME, totalEntities)) {
11607                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11608
11609                    var nameSuffixes = entities.stream()
11610                            .map(NameSuffixObject::new)
11611                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11612
11613                    data = new CountedObjects<>(objectLimiter, nameSuffixes);
11614                }
11615            }
11616        } catch (NamingException ex) {
11617            throw new RuntimeException(ex);
11618        }
11619
11620        return data;
11621    }
11622
11623    @GraphQLField
11624    @GraphQLName("tagScope")
11625    static TagScopeObject tagScope(final DataFetchingEnvironment env,
11626            @GraphQLName("tagScopeName") final String tagScopeName,
11627            @GraphQLName("id") @GraphQLID final String id) {
11628        TagScope tagScope;
11629
11630        try {
11631            var commandForm = TagUtil.getHome().getGetTagScopeForm();
11632
11633            commandForm.setTagScopeName(tagScopeName);
11634            commandForm.setUuid(id);
11635
11636            tagScope = CDI.current().select(GetTagScopeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11637        } catch (NamingException ex) {
11638            throw new RuntimeException(ex);
11639        }
11640
11641        return tagScope == null ? null : new TagScopeObject(tagScope, null);
11642    }
11643
11644    @GraphQLField
11645    @GraphQLName("tagScopes")
11646    @GraphQLNonNull
11647    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11648    static CountingPaginatedData<TagScopeObject> tagScopes(final DataFetchingEnvironment env) {
11649        CountingPaginatedData<TagScopeObject> data;
11650
11651        try {
11652            var commandForm = TagUtil.getHome().getGetTagScopesForm();
11653            var command = CDI.current().select(GetTagScopesCommand.class).get();
11654
11655            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11656            if(totalEntities == null) {
11657                data = Connections.emptyConnection();
11658            } else {
11659                try(var objectLimiter = new ObjectLimiter(env, TagScopeConstants.COMPONENT_VENDOR_NAME, TagScopeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11660                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11661
11662                    var tagScopes = entities.stream()
11663                            .map(TagScopeObject::new)
11664                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11665
11666                    data = new CountedObjects<>(objectLimiter, tagScopes);
11667                }
11668            }
11669        } catch (NamingException ex) {
11670            throw new RuntimeException(ex);
11671        }
11672
11673        return data;
11674    }
11675
11676    @GraphQLField
11677    @GraphQLName("tagScopeEntityType")
11678    static TagScopeEntityTypeObject tagScopeEntityType(final DataFetchingEnvironment env,
11679            @GraphQLName("tagScopeName") @GraphQLNonNull final String tagScopeName,
11680            @GraphQLName("componentVendorName") @GraphQLNonNull final String componentVendorName,
11681            @GraphQLName("entityTypeName") @GraphQLNonNull final String entityTypeName) {
11682        TagScopeEntityType tagScopeEntityType;
11683
11684        try {
11685            var commandForm = TagUtil.getHome().getGetTagScopeEntityTypeForm();
11686
11687            commandForm.setTagScopeName(tagScopeName);
11688            commandForm.setComponentVendorName(componentVendorName);
11689            commandForm.setEntityTypeName(entityTypeName);
11690
11691            tagScopeEntityType = CDI.current().select(GetTagScopeEntityTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11692        } catch (NamingException ex) {
11693            throw new RuntimeException(ex);
11694        }
11695
11696        return tagScopeEntityType == null ? null : new TagScopeEntityTypeObject(tagScopeEntityType);
11697    }
11698
11699    @GraphQLField
11700    @GraphQLName("tagScopeEntityTypes")
11701    @GraphQLNonNull
11702    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11703    static CountingPaginatedData<TagScopeEntityTypeObject> tagScopeEntityTypes(final DataFetchingEnvironment env,
11704            @GraphQLName("tagScopeName") final String tagScopeName,
11705            @GraphQLName("componentVendorName") final String componentVendorName,
11706            @GraphQLName("entityTypeName") final String entityTypeName) {
11707        try {
11708            var commandForm = TagUtil.getHome().getGetTagScopeEntityTypesForm();
11709            var command = CDI.current().select(GetTagScopeEntityTypesCommand.class).get();
11710
11711            commandForm.setTagScopeName(tagScopeName);
11712            commandForm.setComponentVendorName(componentVendorName);
11713            commandForm.setEntityTypeName(entityTypeName);
11714
11715            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11716            if(totalEntities == null) {
11717                return Connections.emptyConnection();
11718            } else {
11719                try(var objectLimiter = new ObjectLimiter(env, TagScopeEntityTypeConstants.COMPONENT_VENDOR_NAME, TagScopeEntityTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11720                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11721
11722                    return new CountedObjects<>(objectLimiter, entities.stream().map(TagScopeEntityTypeObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size()))));
11723                }
11724            }
11725        } catch (NamingException ex) {
11726            throw new RuntimeException(ex);
11727        }
11728    }
11729
11730    @GraphQLField
11731    @GraphQLName("tag")
11732    static TagObject tag(final DataFetchingEnvironment env,
11733            @GraphQLName("tagScopeName") final String tagScopeName,
11734            @GraphQLName("tagName") final String tagName,
11735            @GraphQLName("id") @GraphQLID final String id) {
11736        Tag tag;
11737
11738        try {
11739            var commandForm = TagUtil.getHome().getGetTagForm();
11740
11741            commandForm.setTagScopeName(tagScopeName);
11742            commandForm.setTagName(tagName);
11743            commandForm.setUuid(id);
11744
11745            tag = CDI.current().select(GetTagCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11746        } catch (NamingException ex) {
11747            throw new RuntimeException(ex);
11748        }
11749
11750        return tag == null ? null : new TagObject(tag);
11751    }
11752
11753    @GraphQLField
11754    @GraphQLName("tags")
11755    @GraphQLNonNull
11756    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11757    static CountingPaginatedData<TagObject> tags(final DataFetchingEnvironment env,
11758            @GraphQLName("tagScopeName") @GraphQLNonNull final String tagScopeName) {
11759        CountingPaginatedData<TagObject> data;
11760
11761        try {
11762            var commandForm = TagUtil.getHome().getGetTagsForm();
11763            var command = CDI.current().select(GetTagsCommand.class).get();
11764
11765            commandForm.setTagScopeName(tagScopeName);
11766
11767            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11768            if(totalEntities == null) {
11769                data = Connections.emptyConnection();
11770            } else {
11771                try(var objectLimiter = new ObjectLimiter(env, TagConstants.COMPONENT_VENDOR_NAME, TagConstants.ENTITY_TYPE_NAME, totalEntities)) {
11772                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11773
11774                    var tagObjects = entities.stream()
11775                            .map(TagObject::new)
11776                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11777
11778                    data = new CountedObjects<>(objectLimiter, tagObjects);
11779                }
11780            }
11781        } catch (NamingException ex) {
11782            throw new RuntimeException(ex);
11783        }
11784
11785        return data;
11786    }
11787
11788    @GraphQLField
11789    @GraphQLName("entityTag")
11790    static EntityTagObject entityTag(final DataFetchingEnvironment env,
11791            @GraphQLName("id") @GraphQLNonNull final String id,
11792            @GraphQLName("tagScopeName") @GraphQLNonNull final String tagScopeName,
11793            @GraphQLName("tagName") @GraphQLNonNull final String tagName) {
11794        EntityTag entityTag;
11795
11796        try {
11797            var commandForm = TagUtil.getHome().getGetEntityTagForm();
11798
11799            commandForm.setUuid(id);
11800            commandForm.setTagScopeName(tagScopeName);
11801            commandForm.setTagName(tagName);
11802
11803            entityTag = CDI.current().select(GetEntityTagCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11804        } catch (NamingException ex) {
11805            throw new RuntimeException(ex);
11806        }
11807
11808        return entityTag == null ? null : new EntityTagObject(entityTag);
11809    }
11810
11811    @GraphQLField
11812    @GraphQLName("entityTags")
11813    @GraphQLNonNull
11814    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11815    static CountingPaginatedData<EntityTagObject> entityTags(final DataFetchingEnvironment env,
11816            @GraphQLName("id") final String id,
11817            @GraphQLName("tagScopeName") final String tagScopeName,
11818            @GraphQLName("tagName") final String tagName) {
11819        CountingPaginatedData<EntityTagObject> data;
11820
11821        try {
11822            var commandForm = TagUtil.getHome().getGetEntityTagsForm();
11823            var command = CDI.current().select(GetEntityTagsCommand.class).get();
11824
11825            commandForm.setUuid(id);
11826            commandForm.setTagScopeName(tagScopeName);
11827            commandForm.setTagName(tagName);
11828
11829            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11830            if(totalEntities == null) {
11831                data = Connections.emptyConnection();
11832            } else {
11833                try(var objectLimiter = new ObjectLimiter(env, EntityTagConstants.COMPONENT_VENDOR_NAME, EntityTagConstants.ENTITY_TYPE_NAME, totalEntities)) {
11834                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11835
11836                    var entityTags = entities.stream()
11837                            .map(EntityTagObject::new)
11838                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11839
11840                    data = new CountedObjects<>(objectLimiter, entityTags);
11841                }
11842            }
11843        } catch (NamingException ex) {
11844            throw new RuntimeException(ex);
11845        }
11846
11847        return data;
11848    }
11849
11850    @GraphQLField
11851    @GraphQLName("geoCodeType")
11852    static GeoCodeTypeObject geoCodeType(final DataFetchingEnvironment env,
11853            @GraphQLName("geoCodeTypeName") final String geoCodeTypeName,
11854            @GraphQLName("id") @GraphQLID final String id) {
11855        GeoCodeType geoCodeType;
11856
11857        try {
11858            var commandForm = GeoUtil.getHome().getGetGeoCodeTypeForm();
11859
11860            commandForm.setGeoCodeTypeName(geoCodeTypeName);
11861            commandForm.setUuid(id);
11862
11863            geoCodeType = CDI.current().select(GetGeoCodeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11864        } catch (NamingException ex) {
11865            throw new RuntimeException(ex);
11866        }
11867
11868        return geoCodeType == null ? null : new GeoCodeTypeObject(geoCodeType);
11869    }
11870
11871    @GraphQLField
11872    @GraphQLName("geoCodeTypes")
11873    @GraphQLNonNull
11874    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11875    static CountingPaginatedData<GeoCodeTypeObject> geoCodeTypes(final DataFetchingEnvironment env) {
11876        CountingPaginatedData<GeoCodeTypeObject> data;
11877
11878        try {
11879            var commandForm = GeoUtil.getHome().getGetGeoCodeTypesForm();
11880            var command = CDI.current().select(GetGeoCodeTypesCommand.class).get();
11881
11882            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11883            if(totalEntities == null) {
11884                data = Connections.emptyConnection();
11885            } else {
11886                try(var objectLimiter = new ObjectLimiter(env, GeoCodeTypeConstants.COMPONENT_VENDOR_NAME, GeoCodeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11887                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11888
11889                    var geoCodeTypes = entities.stream()
11890                            .map(GeoCodeTypeObject::new)
11891                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11892
11893                    data = new CountedObjects<>(objectLimiter, geoCodeTypes);
11894                }
11895            }
11896        } catch (NamingException ex) {
11897            throw new RuntimeException(ex);
11898        }
11899
11900        return data;
11901    }
11902
11903    @GraphQLField
11904    @GraphQLName("geoCodeAliasType")
11905    static GeoCodeAliasTypeObject geoCodeAliasType(final DataFetchingEnvironment env,
11906            @GraphQLName("geoCodeTypeName") @GraphQLNonNull final String geoCodeTypeName,
11907            @GraphQLName("geoCodeAliasTypeName") @GraphQLNonNull final String geoCodeAliasTypeName) {
11908        GeoCodeAliasType geoCodeAliasType;
11909
11910        try {
11911            var commandForm = GeoUtil.getHome().getGetGeoCodeAliasTypeForm();
11912
11913            commandForm.setGeoCodeTypeName(geoCodeTypeName);
11914            commandForm.setGeoCodeAliasTypeName(geoCodeAliasTypeName);
11915
11916            geoCodeAliasType = CDI.current().select(GetGeoCodeAliasTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11917        } catch (NamingException ex) {
11918            throw new RuntimeException(ex);
11919        }
11920
11921        return geoCodeAliasType == null ? null : new GeoCodeAliasTypeObject(geoCodeAliasType);
11922    }
11923
11924    @GraphQLField
11925    @GraphQLName("geoCodeAliasTypes")
11926    @GraphQLNonNull
11927    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11928    static CountingPaginatedData<GeoCodeAliasTypeObject> geoCodeAliasTypes(final DataFetchingEnvironment env,
11929            @GraphQLName("geoCodeTypeName") @GraphQLNonNull final String geoCodeTypeName) {
11930        CountingPaginatedData<GeoCodeAliasTypeObject> data;
11931
11932        try {
11933            var commandForm = GeoUtil.getHome().getGetGeoCodeAliasTypesForm();
11934            var command = CDI.current().select(GetGeoCodeAliasTypesCommand.class).get();
11935
11936            commandForm.setGeoCodeTypeName(geoCodeTypeName);
11937
11938            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11939            if(totalEntities == null) {
11940                data = Connections.emptyConnection();
11941            } else {
11942                try(var objectLimiter = new ObjectLimiter(env, GeoCodeAliasTypeConstants.COMPONENT_VENDOR_NAME, GeoCodeAliasTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11943                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11944
11945                    var geoCodeAliasTypes = entities.stream()
11946                            .map(GeoCodeAliasTypeObject::new)
11947                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
11948
11949                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
11950                }
11951            }
11952        } catch (NamingException ex) {
11953            throw new RuntimeException(ex);
11954        }
11955
11956        return data;
11957    }
11958
11959    @GraphQLField
11960    @GraphQLName("geoCodeScope")
11961    static GeoCodeScopeObject geoCodeScope(final DataFetchingEnvironment env,
11962            @GraphQLName("geoCodeScopeName") final String geoCodeScopeName,
11963            @GraphQLName("id") @GraphQLID final String id) {
11964        GeoCodeScope geoCodeScope;
11965
11966        try {
11967            var commandForm = GeoUtil.getHome().getGetGeoCodeScopeForm();
11968
11969            commandForm.setGeoCodeScopeName(geoCodeScopeName);
11970            commandForm.setUuid(id);
11971
11972            geoCodeScope = CDI.current().select(GetGeoCodeScopeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
11973        } catch (NamingException ex) {
11974            throw new RuntimeException(ex);
11975        }
11976
11977        return geoCodeScope == null ? null : new GeoCodeScopeObject(geoCodeScope);
11978    }
11979
11980    @GraphQLField
11981    @GraphQLName("geoCodeScopes")
11982    @GraphQLNonNull
11983    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
11984    static CountingPaginatedData<GeoCodeScopeObject> geoCodeScopes(final DataFetchingEnvironment env) {
11985        CountingPaginatedData<GeoCodeScopeObject> data;
11986
11987        try {
11988            var commandForm = GeoUtil.getHome().getGetGeoCodeScopesForm();
11989            var command = CDI.current().select(GetGeoCodeScopesCommand.class).get();
11990
11991            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11992            if(totalEntities == null) {
11993                data = Connections.emptyConnection();
11994            } else {
11995                try(var objectLimiter = new ObjectLimiter(env, GeoCodeScopeConstants.COMPONENT_VENDOR_NAME, GeoCodeScopeConstants.ENTITY_TYPE_NAME, totalEntities)) {
11996                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
11997
11998                    var geoCodeScopes = entities.stream()
11999                            .map(GeoCodeScopeObject::new)
12000                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12001
12002                    data = new CountedObjects<>(objectLimiter, geoCodeScopes);
12003                }
12004            }
12005        } catch (NamingException ex) {
12006            throw new RuntimeException(ex);
12007        }
12008
12009        return data;
12010    }
12011
12012    @GraphQLField
12013    @GraphQLName("geoCode")
12014    static GeoCodeObject geoCode(final DataFetchingEnvironment env,
12015            @GraphQLName("geoCodeName") final String geoCodeName,
12016            @GraphQLName("id") @GraphQLID final String id) {
12017        GeoCode geoCode;
12018
12019        try {
12020            var commandForm = GeoUtil.getHome().getGetGeoCodeForm();
12021
12022            commandForm.setGeoCodeName(geoCodeName);
12023            commandForm.setUuid(id);
12024
12025            geoCode = CDI.current().select(GetGeoCodeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12026        } catch (NamingException ex) {
12027            throw new RuntimeException(ex);
12028        }
12029
12030        return geoCode == null ? null : new GeoCodeObject(geoCode);
12031    }
12032
12033    @GraphQLField
12034    @GraphQLName("geoCodeAlias")
12035    static GeoCodeAliasObject geoCodeAlias(final DataFetchingEnvironment env,
12036            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
12037            @GraphQLName("geoCodeAliasTypeName") @GraphQLNonNull final String geoCodeAliasTypeName) {
12038        GeoCodeAlias geoCodeAlias;
12039
12040        try {
12041            var commandForm = GeoUtil.getHome().getGetGeoCodeAliasForm();
12042
12043            commandForm.setGeoCodeName(geoCodeName);
12044            commandForm.setGeoCodeAliasTypeName(geoCodeAliasTypeName);
12045
12046            geoCodeAlias = CDI.current().select(GetGeoCodeAliasCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12047        } catch (NamingException ex) {
12048            throw new RuntimeException(ex);
12049        }
12050
12051        return geoCodeAlias == null ? null : new GeoCodeAliasObject(geoCodeAlias);
12052    }
12053
12054    @GraphQLField
12055    @GraphQLName("geoCodeAliases")
12056    @GraphQLNonNull
12057    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12058    static CountingPaginatedData<GeoCodeAliasObject> geoCodeAliases(final DataFetchingEnvironment env,
12059            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName) {
12060        CountingPaginatedData<GeoCodeAliasObject> data;
12061
12062        try {
12063            var commandForm = GeoUtil.getHome().getGetGeoCodeAliasesForm();
12064            var command = CDI.current().select(GetGeoCodeAliasesCommand.class).get();
12065
12066            commandForm.setGeoCodeName(geoCodeName);
12067
12068            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12069            if(totalEntities == null) {
12070                data = Connections.emptyConnection();
12071            } else {
12072                try(var objectLimiter = new ObjectLimiter(env, GeoCodeAliasConstants.COMPONENT_VENDOR_NAME, GeoCodeAliasConstants.ENTITY_TYPE_NAME, totalEntities)) {
12073                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12074
12075                    var geoCodeAliass = entities.stream()
12076                            .map(GeoCodeAliasObject::new)
12077                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12078
12079                    data = new CountedObjects<>(objectLimiter, geoCodeAliass);
12080                }
12081            }
12082        } catch (NamingException ex) {
12083            throw new RuntimeException(ex);
12084        }
12085
12086        return data;
12087    }
12088
12089    @GraphQLField
12090    @GraphQLName("geoCodeLanguage")
12091    static GeoCodeLanguageObject geoCodeLanguage(final DataFetchingEnvironment env,
12092            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
12093            @GraphQLName("languageIsoName") @GraphQLNonNull final String languageIsoName) {
12094        GeoCodeLanguage geoCodeLanguage;
12095
12096        try {
12097            var commandForm = GeoUtil.getHome().getGetGeoCodeLanguageForm();
12098
12099            commandForm.setGeoCodeName(geoCodeName);
12100            commandForm.setLanguageIsoName(languageIsoName);
12101
12102            geoCodeLanguage = CDI.current().select(GetGeoCodeLanguageCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12103        } catch (NamingException ex) {
12104            throw new RuntimeException(ex);
12105        }
12106
12107        return geoCodeLanguage == null ? null : new GeoCodeLanguageObject(geoCodeLanguage);
12108    }
12109
12110    @GraphQLField
12111    @GraphQLName("geoCodeLanguages")
12112    @GraphQLNonNull
12113    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12114    static CountingPaginatedData<GeoCodeLanguageObject> geoCodeLanguages(final DataFetchingEnvironment env,
12115            @GraphQLName("geoCodeName") final String geoCodeName,
12116            @GraphQLName("languageIsoName") final String languageIsoName) {
12117        CountingPaginatedData<GeoCodeLanguageObject> data;
12118
12119        try {
12120            var commandForm = GeoUtil.getHome().getGetGeoCodeLanguagesForm();
12121            var command = CDI.current().select(GetGeoCodeLanguagesCommand.class).get();
12122
12123            commandForm.setGeoCodeName(geoCodeName);
12124            commandForm.setLanguageIsoName(languageIsoName);
12125
12126            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12127            if(totalEntities == null) {
12128                data = Connections.emptyConnection();
12129            } else {
12130                try(var objectLimiter = new ObjectLimiter(env, GeoCodeLanguageConstants.COMPONENT_VENDOR_NAME, GeoCodeLanguageConstants.ENTITY_TYPE_NAME, totalEntities)) {
12131                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12132
12133                    var transactionTypes = entities.stream()
12134                            .map(GeoCodeLanguageObject::new)
12135                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12136
12137                    data = new CountedObjects<>(objectLimiter, transactionTypes);
12138                }
12139            }
12140        } catch (NamingException ex) {
12141            throw new RuntimeException(ex);
12142        }
12143
12144        return data;
12145    }
12146
12147    @GraphQLField
12148    @GraphQLName("geoCodeCurrency")
12149    static GeoCodeCurrencyObject geoCodeCurrency(final DataFetchingEnvironment env,
12150            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
12151            @GraphQLName("currencyIsoName") @GraphQLNonNull final String currencyIsoName) {
12152        GeoCodeCurrency geoCodeCurrency;
12153
12154        try {
12155            var commandForm = GeoUtil.getHome().getGetGeoCodeCurrencyForm();
12156
12157            commandForm.setGeoCodeName(geoCodeName);
12158            commandForm.setCurrencyIsoName(currencyIsoName);
12159
12160            geoCodeCurrency = CDI.current().select(GetGeoCodeCurrencyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12161        } catch (NamingException ex) {
12162            throw new RuntimeException(ex);
12163        }
12164
12165        return geoCodeCurrency == null ? null : new GeoCodeCurrencyObject(geoCodeCurrency);
12166    }
12167
12168    @GraphQLField
12169    @GraphQLName("geoCodeCurrencies")
12170    @GraphQLNonNull
12171    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12172    static CountingPaginatedData<GeoCodeCurrencyObject> geoCodeCurrencies(final DataFetchingEnvironment env,
12173            @GraphQLName("geoCodeName") final String geoCodeName,
12174            @GraphQLName("currencyIsoName") final String currencyIsoName) {
12175        CountingPaginatedData<GeoCodeCurrencyObject> data;
12176
12177        try {
12178            var commandForm = GeoUtil.getHome().getGetGeoCodeCurrenciesForm();
12179            var command = CDI.current().select(GetGeoCodeCurrenciesCommand.class).get();
12180
12181            commandForm.setGeoCodeName(geoCodeName);
12182            commandForm.setCurrencyIsoName(currencyIsoName);
12183
12184            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12185            if(totalEntities == null) {
12186                data = Connections.emptyConnection();
12187            } else {
12188                try(var objectLimiter = new ObjectLimiter(env, GeoCodeCurrencyConstants.COMPONENT_VENDOR_NAME, GeoCodeCurrencyConstants.ENTITY_TYPE_NAME, totalEntities)) {
12189                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12190
12191                    var transactionTypes = entities.stream()
12192                            .map(GeoCodeCurrencyObject::new)
12193                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12194
12195                    data = new CountedObjects<>(objectLimiter, transactionTypes);
12196                }
12197            }
12198        } catch (NamingException ex) {
12199            throw new RuntimeException(ex);
12200        }
12201
12202        return data;
12203    }
12204
12205    @GraphQLField
12206    @GraphQLName("geoCodeTimeZone")
12207    static GeoCodeTimeZoneObject geoCodeTimeZone(final DataFetchingEnvironment env,
12208            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
12209            @GraphQLName("javaTimeZoneName") @GraphQLNonNull final String javaTimeZoneName) {
12210        GeoCodeTimeZone geoCodeTimeZone;
12211
12212        try {
12213            var commandForm = GeoUtil.getHome().getGetGeoCodeTimeZoneForm();
12214
12215            commandForm.setGeoCodeName(geoCodeName);
12216            commandForm.setJavaTimeZoneName(javaTimeZoneName);
12217
12218            geoCodeTimeZone = CDI.current().select(GetGeoCodeTimeZoneCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12219        } catch (NamingException ex) {
12220            throw new RuntimeException(ex);
12221        }
12222
12223        return geoCodeTimeZone == null ? null : new GeoCodeTimeZoneObject(geoCodeTimeZone);
12224    }
12225
12226    @GraphQLField
12227    @GraphQLName("geoCodeTimeZones")
12228    @GraphQLNonNull
12229    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12230    static CountingPaginatedData<GeoCodeTimeZoneObject> geoCodeTimeZones(final DataFetchingEnvironment env,
12231            @GraphQLName("geoCodeName") final String geoCodeName,
12232            @GraphQLName("javaTimeZoneName") final String javaTimeZoneName) {
12233        CountingPaginatedData<GeoCodeTimeZoneObject> data;
12234
12235        try {
12236            var commandForm = GeoUtil.getHome().getGetGeoCodeTimeZonesForm();
12237            var command = CDI.current().select(GetGeoCodeTimeZonesCommand.class).get();
12238
12239            commandForm.setGeoCodeName(geoCodeName);
12240            commandForm.setJavaTimeZoneName(javaTimeZoneName);
12241
12242            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12243            if(totalEntities == null) {
12244                data = Connections.emptyConnection();
12245            } else {
12246                try(var objectLimiter = new ObjectLimiter(env, GeoCodeTimeZoneConstants.COMPONENT_VENDOR_NAME, GeoCodeTimeZoneConstants.ENTITY_TYPE_NAME, totalEntities)) {
12247                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12248
12249                    var transactionTypes = entities.stream()
12250                            .map(GeoCodeTimeZoneObject::new)
12251                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12252
12253                    data = new CountedObjects<>(objectLimiter, transactionTypes);
12254                }
12255            }
12256        } catch (NamingException ex) {
12257            throw new RuntimeException(ex);
12258        }
12259
12260        return data;
12261    }
12262
12263    @GraphQLField
12264    @GraphQLName("geoCodeDateTimeFormat")
12265    static GeoCodeDateTimeFormatObject geoCodeDateTimeFormat(final DataFetchingEnvironment env,
12266            @GraphQLName("geoCodeName") @GraphQLNonNull final String geoCodeName,
12267            @GraphQLName("dateTimeFormatName") @GraphQLNonNull final String dateTimeFormatName) {
12268        GeoCodeDateTimeFormat geoCodeDateTimeFormat;
12269
12270        try {
12271            var commandForm = GeoUtil.getHome().getGetGeoCodeDateTimeFormatForm();
12272
12273            commandForm.setGeoCodeName(geoCodeName);
12274            commandForm.setDateTimeFormatName(dateTimeFormatName);
12275
12276            geoCodeDateTimeFormat = CDI.current().select(GetGeoCodeDateTimeFormatCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12277        } catch (NamingException ex) {
12278            throw new RuntimeException(ex);
12279        }
12280
12281        return geoCodeDateTimeFormat == null ? null : new GeoCodeDateTimeFormatObject(geoCodeDateTimeFormat);
12282    }
12283
12284    @GraphQLField
12285    @GraphQLName("geoCodeDateTimeFormats")
12286    @GraphQLNonNull
12287    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12288    static CountingPaginatedData<GeoCodeDateTimeFormatObject> geoCodeDateTimeFormats(final DataFetchingEnvironment env,
12289            @GraphQLName("geoCodeName") final String geoCodeName,
12290            @GraphQLName("dateTimeFormatName") final String dateTimeFormatName) {
12291        CountingPaginatedData<GeoCodeDateTimeFormatObject> data;
12292
12293        try {
12294            var commandForm = GeoUtil.getHome().getGetGeoCodeDateTimeFormatsForm();
12295            var command = CDI.current().select(GetGeoCodeDateTimeFormatsCommand.class).get();
12296
12297            commandForm.setGeoCodeName(geoCodeName);
12298            commandForm.setDateTimeFormatName(dateTimeFormatName);
12299
12300            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12301            if(totalEntities == null) {
12302                data = Connections.emptyConnection();
12303            } else {
12304                try(var objectLimiter = new ObjectLimiter(env, GeoCodeDateTimeFormatConstants.COMPONENT_VENDOR_NAME, GeoCodeDateTimeFormatConstants.ENTITY_TYPE_NAME, totalEntities)) {
12305                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12306
12307                    var transactionTypes = entities.stream()
12308                            .map(GeoCodeDateTimeFormatObject::new)
12309                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12310
12311                    data = new CountedObjects<>(objectLimiter, transactionTypes);
12312                }
12313            }
12314        } catch (NamingException ex) {
12315            throw new RuntimeException(ex);
12316        }
12317
12318        return data;
12319    }
12320
12321    @GraphQLField
12322    @GraphQLName("country")
12323    static GeoCodeObject country(final DataFetchingEnvironment env,
12324            @GraphQLName("geoCodeName") final String geoCodeName,
12325            @GraphQLName("countryName") final String countryName,
12326            @GraphQLName("iso3Number") final String iso3Number,
12327            @GraphQLName("iso3Letter") final String iso3Letter,
12328            @GraphQLName("iso2Letter") final String iso2Letter,
12329            @GraphQLName("alias") final String alias) {
12330        GeoCode geoCode;
12331
12332        try {
12333            var commandForm = GeoUtil.getHome().getGetCountryForm();
12334
12335            commandForm.setGeoCodeName(geoCodeName);
12336            commandForm.setCountryName(countryName);
12337            commandForm.setIso3Number(iso3Number);
12338            commandForm.setIso3Letter(iso3Letter);
12339            commandForm.setIso2Letter(iso2Letter);
12340            commandForm.setAlias(alias);
12341
12342            geoCode = CDI.current().select(GetCountryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12343        } catch (NamingException ex) {
12344            throw new RuntimeException(ex);
12345        }
12346
12347        return geoCode == null ? null : new GeoCodeObject(geoCode);
12348    }
12349
12350    @GraphQLField
12351    @GraphQLName("countries")
12352    @GraphQLNonNull
12353    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12354    static CountingPaginatedData<GeoCodeObject> countries(final DataFetchingEnvironment env) {
12355        CountingPaginatedData<GeoCodeObject> data;
12356
12357        try {
12358            var commandForm = GeoUtil.getHome().getGetCountriesForm();
12359            var command = CDI.current().select(GetCountriesCommand.class).get();
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, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12366                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12367
12368                    var geoCodeAliasTypes = entities.stream()
12369                            .map(GeoCodeObject::new)
12370                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12371
12372                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
12373                }
12374            }
12375        } catch (NamingException ex) {
12376            throw new RuntimeException(ex);
12377        }
12378
12379        return data;
12380    }
12381
12382    @GraphQLField
12383    @GraphQLName("zipCode")
12384    static GeoCodeObject zipCode(final DataFetchingEnvironment env,
12385            @GraphQLName("countryGeoCodeName") @GraphQLNonNull final String countryGeoCodeName,
12386            @GraphQLName("zipCodeName") @GraphQLNonNull final String zipCodeName) {
12387        GeoCode geoCode;
12388
12389        try {
12390            var commandForm = GeoUtil.getHome().getGetZipCodeForm();
12391
12392            commandForm.setCountryGeoCodeName(countryGeoCodeName);
12393            commandForm.setZipCodeName(zipCodeName);
12394
12395            geoCode = CDI.current().select(GetZipCodeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12396        } catch (NamingException ex) {
12397            throw new RuntimeException(ex);
12398        }
12399
12400        return geoCode == null ? null : new GeoCodeObject(geoCode);
12401    }
12402
12403    @GraphQLField
12404    @GraphQLName("zipCodes")
12405    @GraphQLNonNull
12406    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12407    static CountingPaginatedData<GeoCodeObject> zipCodes(final DataFetchingEnvironment env,
12408            @GraphQLName("countryName") @GraphQLNonNull final String countryName) {
12409        CountingPaginatedData<GeoCodeObject> data;
12410
12411        try {
12412            var commandForm = GeoUtil.getHome().getGetZipCodesForm();
12413            var command = CDI.current().select(GetZipCodesCommand.class).get();
12414
12415            commandForm.setCountryName(countryName);
12416
12417            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12418            if(totalEntities == null) {
12419                data = Connections.emptyConnection();
12420            } else {
12421                try(var objectLimiter = new ObjectLimiter(env, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12422                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12423
12424                    var geoCodeAliasTypes = entities.stream()
12425                            .map(GeoCodeObject::new)
12426                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12427
12428                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
12429                }
12430            }
12431        } catch (NamingException ex) {
12432            throw new RuntimeException(ex);
12433        }
12434
12435        return data;
12436    }
12437
12438    @GraphQLField
12439    @GraphQLName("state")
12440    static GeoCodeObject state(final DataFetchingEnvironment env,
12441            @GraphQLName("countryGeoCodeName") @GraphQLNonNull final String countryGeoCodeName,
12442            @GraphQLName("stateName") final String stateName,
12443            @GraphQLName("postal2Letter") final String postal2Letter) {
12444        GeoCode geoCode;
12445
12446        try {
12447            var commandForm = GeoUtil.getHome().getGetStateForm();
12448
12449            commandForm.setCountryGeoCodeName(countryGeoCodeName);
12450            commandForm.setStateName(stateName);
12451            commandForm.setPostal2Letter(postal2Letter);
12452
12453            geoCode = CDI.current().select(GetStateCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12454        } catch (NamingException ex) {
12455            throw new RuntimeException(ex);
12456        }
12457
12458        return geoCode == null ? null : new GeoCodeObject(geoCode);
12459    }
12460
12461    @GraphQLField
12462    @GraphQLName("states")
12463    @GraphQLNonNull
12464    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12465    static CountingPaginatedData<GeoCodeObject> states(final DataFetchingEnvironment env,
12466            @GraphQLName("countryName") @GraphQLNonNull final String countryName) {
12467        CountingPaginatedData<GeoCodeObject> data;
12468
12469        try {
12470            var commandForm = GeoUtil.getHome().getGetStatesForm();
12471            var command = CDI.current().select(GetStatesCommand.class).get();
12472
12473            commandForm.setCountryName(countryName);
12474
12475            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12476            if(totalEntities == null) {
12477                data = Connections.emptyConnection();
12478            } else {
12479                try(var objectLimiter = new ObjectLimiter(env, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12480                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12481
12482                    var geoCodeAliasTypes = entities.stream()
12483                            .map(GeoCodeObject::new)
12484                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12485
12486                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
12487                }
12488            }
12489        } catch (NamingException ex) {
12490            throw new RuntimeException(ex);
12491        }
12492
12493        return data;
12494    }
12495
12496    @GraphQLField
12497    @GraphQLName("county")
12498    static GeoCodeObject county(final DataFetchingEnvironment env,
12499            @GraphQLName("stateGeoCodeName") @GraphQLNonNull final String stateGeoCodeName,
12500            @GraphQLName("countyName") final String countyName,
12501            @GraphQLName("countyNumber") final String countyNumber) {
12502        GeoCode geoCode;
12503
12504        try {
12505            var commandForm = GeoUtil.getHome().getGetCountyForm();
12506
12507            commandForm.setStateGeoCodeName(stateGeoCodeName);
12508            commandForm.setCountyName(countyName);
12509            commandForm.setCountyNumber(countyNumber);
12510
12511            geoCode = CDI.current().select(GetCountyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12512        } catch (NamingException ex) {
12513            throw new RuntimeException(ex);
12514        }
12515
12516        return geoCode == null ? null : new GeoCodeObject(geoCode);
12517    }
12518
12519    @GraphQLField
12520    @GraphQLName("counties")
12521    @GraphQLNonNull
12522    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12523    static CountingPaginatedData<GeoCodeObject> counties(final DataFetchingEnvironment env,
12524            @GraphQLName("countryName") @GraphQLNonNull final String countryName,
12525            @GraphQLName("stateName") @GraphQLNonNull final String stateName) {
12526        CountingPaginatedData<GeoCodeObject> data;
12527
12528        try {
12529            var commandForm = GeoUtil.getHome().getGetCountiesForm();
12530            var command = CDI.current().select(GetCountiesCommand.class).get();
12531
12532            commandForm.setCountryName(countryName);
12533            commandForm.setStateName(stateName);
12534
12535            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12536            if(totalEntities == null) {
12537                data = Connections.emptyConnection();
12538            } else {
12539                try(var objectLimiter = new ObjectLimiter(env, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12540                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12541
12542                    var geoCodeAliasTypes = entities.stream()
12543                            .map(GeoCodeObject::new)
12544                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12545
12546                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
12547                }
12548            }
12549        } catch (NamingException ex) {
12550            throw new RuntimeException(ex);
12551        }
12552
12553        return data;
12554    }
12555
12556    @GraphQLField
12557    @GraphQLName("city")
12558    static GeoCodeObject city(final DataFetchingEnvironment env,
12559            @GraphQLName("stateGeoCodeName") @GraphQLNonNull final String stateGeoCodeName,
12560            @GraphQLName("cityName") @GraphQLNonNull final String cityName) {
12561        GeoCode geoCode;
12562
12563        try {
12564            var commandForm = GeoUtil.getHome().getGetCityForm();
12565
12566            commandForm.setStateGeoCodeName(stateGeoCodeName);
12567            commandForm.setCityName(cityName);
12568
12569            geoCode = CDI.current().select(GetCityCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12570        } catch (NamingException ex) {
12571            throw new RuntimeException(ex);
12572        }
12573
12574        return geoCode == null ? null : new GeoCodeObject(geoCode);
12575    }
12576
12577    @GraphQLField
12578    @GraphQLName("cities")
12579    @GraphQLNonNull
12580    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12581    static CountingPaginatedData<GeoCodeObject> cities(final DataFetchingEnvironment env,
12582            @GraphQLName("countryName") @GraphQLNonNull final String countryName,
12583            @GraphQLName("stateName") @GraphQLNonNull final String stateName) {
12584        CountingPaginatedData<GeoCodeObject> data;
12585
12586        try {
12587            var commandForm = GeoUtil.getHome().getGetCitiesForm();
12588            var command = CDI.current().select(GetCitiesCommand.class).get();
12589
12590            commandForm.setCountryName(countryName);
12591            commandForm.setStateName(stateName);
12592
12593            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12594            if(totalEntities == null) {
12595                data = Connections.emptyConnection();
12596            } else {
12597                try(var objectLimiter = new ObjectLimiter(env, GeoCodeConstants.COMPONENT_VENDOR_NAME, GeoCodeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12598                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12599
12600                    var geoCodeAliasTypes = entities.stream()
12601                            .map(GeoCodeObject::new)
12602                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12603
12604                    data = new CountedObjects<>(objectLimiter, geoCodeAliasTypes);
12605                }
12606            }
12607        } catch (NamingException ex) {
12608            throw new RuntimeException(ex);
12609        }
12610
12611        return data;
12612    }
12613
12614    @GraphQLField
12615    @GraphQLName("shippingMethod")
12616    static ShippingMethodObject shippingMethod(final DataFetchingEnvironment env,
12617            @GraphQLName("shippingMethodName") final String shippingMethodName,
12618            @GraphQLName("id") @GraphQLID final String id) {
12619        ShippingMethod shippingMethod;
12620
12621        try {
12622            var commandForm = ShippingUtil.getHome().getGetShippingMethodForm();
12623
12624            commandForm.setShippingMethodName(shippingMethodName);
12625            commandForm.setUuid(id);
12626
12627            shippingMethod = CDI.current().select(GetShippingMethodCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12628        } catch (NamingException ex) {
12629            throw new RuntimeException(ex);
12630        }
12631
12632        return shippingMethod == null ? null : new ShippingMethodObject(shippingMethod);
12633    }
12634
12635    @GraphQLField
12636    @GraphQLName("shippingMethods")
12637    @GraphQLNonNull
12638    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12639    static CountingPaginatedData<ShippingMethodObject> shippingMethods(final DataFetchingEnvironment env) {
12640        CountingPaginatedData<ShippingMethodObject> data;
12641
12642        try {
12643            var shippingControl = Session.getModelController(ShippingControl.class);
12644            var totalCount = shippingControl.countShippingMethods();
12645
12646            try(var objectLimiter = new ObjectLimiter(env, ShippingMethodConstants.COMPONENT_VENDOR_NAME, ShippingMethodConstants.ENTITY_TYPE_NAME, totalCount)) {
12647                var commandForm = ShippingUtil.getHome().getGetShippingMethodsForm();
12648                var entities = CDI.current().select(GetShippingMethodsCommand.class).get().getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12649
12650                if(entities == null) {
12651                    data = Connections.emptyConnection();
12652                } else {
12653                    var shippingMethods = entities.stream().map(ShippingMethodObject::new).collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12654
12655                    data = new CountedObjects<>(objectLimiter, shippingMethods);
12656                }
12657            }
12658        } catch (NamingException ex) {
12659            throw new RuntimeException(ex);
12660        }
12661
12662        return data;
12663    }
12664
12665    @GraphQLField
12666    @GraphQLName("transactionTimeType")
12667    static TransactionTimeTypeObject transactionTimeType(final DataFetchingEnvironment env,
12668            @GraphQLName("transactionTimeTypeName") final String transactionTimeTypeName,
12669            @GraphQLName("id") @GraphQLID final String id) {
12670        TransactionTimeType transactionTimeType;
12671
12672        try {
12673            var commandForm = AccountingUtil.getHome().getGetTransactionTimeTypeForm();
12674
12675            commandForm.setTransactionTimeTypeName(transactionTimeTypeName);
12676            commandForm.setUuid(id);
12677
12678            transactionTimeType = CDI.current().select(GetTransactionTimeTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12679        } catch (NamingException ex) {
12680            throw new RuntimeException(ex);
12681        }
12682
12683        return transactionTimeType == null ? null : new TransactionTimeTypeObject(transactionTimeType);
12684    }
12685
12686    @GraphQLField
12687    @GraphQLName("transactionTimeTypes")
12688    @GraphQLNonNull
12689    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12690    static CountingPaginatedData<TransactionTimeTypeObject> transactionTimeTypes(final DataFetchingEnvironment env) {
12691        CountingPaginatedData<TransactionTimeTypeObject> data;
12692
12693        try {
12694            var commandForm = AccountingUtil.getHome().getGetTransactionTimeTypesForm();
12695            var command = CDI.current().select(GetTransactionTimeTypesCommand.class).get();
12696
12697            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12698            if(totalEntities == null) {
12699                data = Connections.emptyConnection();
12700            } else {
12701                try(var objectLimiter = new ObjectLimiter(env, TransactionTimeTypeConstants.COMPONENT_VENDOR_NAME, TransactionTimeTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12702                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12703
12704                    var transactionTimeTypes = entities.stream()
12705                            .map(TransactionTimeTypeObject::new)
12706                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12707
12708                    data = new CountedObjects<>(objectLimiter, transactionTimeTypes);
12709                }
12710            }
12711        } catch (NamingException ex) {
12712            throw new RuntimeException(ex);
12713        }
12714
12715        return data;
12716    }
12717
12718    @GraphQLField
12719    @GraphQLName("transactionType")
12720    static TransactionTypeObject transactionType(final DataFetchingEnvironment env,
12721            @GraphQLName("transactionTypeName") final String transactionTypeName,
12722            @GraphQLName("id") @GraphQLID final String id) {
12723        TransactionType transactionType;
12724
12725        try {
12726            var commandForm = AccountingUtil.getHome().getGetTransactionTypeForm();
12727
12728            commandForm.setTransactionTypeName(transactionTypeName);
12729            commandForm.setUuid(id);
12730
12731            transactionType = CDI.current().select(GetTransactionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12732        } catch (NamingException ex) {
12733            throw new RuntimeException(ex);
12734        }
12735
12736        return transactionType == null ? null : new TransactionTypeObject(transactionType);
12737    }
12738
12739    @GraphQLField
12740    @GraphQLName("transactionTypes")
12741    @GraphQLNonNull
12742    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12743    static CountingPaginatedData<TransactionTypeObject> transactionTypes(final DataFetchingEnvironment env) {
12744        CountingPaginatedData<TransactionTypeObject> data;
12745
12746        try {
12747            var commandForm = AccountingUtil.getHome().getGetTransactionTypesForm();
12748            var command = CDI.current().select(GetTransactionTypesCommand.class).get();
12749
12750            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12751            if(totalEntities == null) {
12752                data = Connections.emptyConnection();
12753            } else {
12754                try(var objectLimiter = new ObjectLimiter(env, TransactionTypeConstants.COMPONENT_VENDOR_NAME, TransactionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12755                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12756
12757                    var transactionTypes = entities.stream()
12758                            .map(TransactionTypeObject::new)
12759                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12760
12761                    data = new CountedObjects<>(objectLimiter, transactionTypes);
12762                }
12763            }
12764        } catch (NamingException ex) {
12765            throw new RuntimeException(ex);
12766        }
12767
12768        return data;
12769    }
12770
12771    @GraphQLField
12772    @GraphQLName("transactionGlAccountCategory")
12773    static TransactionGlAccountCategoryObject transactionGlAccountCategory(final DataFetchingEnvironment env,
12774            @GraphQLName("transactionTypeName") final String transactionTypeName,
12775            @GraphQLName("transactionGlAccountCategoryName") final String transactionGlAccountCategoryName,
12776            @GraphQLName("id") @GraphQLID final String id) {
12777        TransactionGlAccountCategory transactionGlAccountCategory;
12778
12779        try {
12780            var commandForm = AccountingUtil.getHome().getGetTransactionGlAccountCategoryForm();
12781
12782            commandForm.setTransactionTypeName(transactionTypeName);
12783            commandForm.setTransactionGlAccountCategoryName(transactionGlAccountCategoryName);
12784            commandForm.setUuid(id);
12785
12786            transactionGlAccountCategory = CDI.current().select(GetTransactionGlAccountCategoryCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12787        } catch (NamingException ex) {
12788            throw new RuntimeException(ex);
12789        }
12790
12791        return transactionGlAccountCategory == null ? null : new TransactionGlAccountCategoryObject(transactionGlAccountCategory);
12792    }
12793
12794    @GraphQLField
12795    @GraphQLName("transactionGlAccountCategories")
12796    @GraphQLNonNull
12797    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12798    static CountingPaginatedData<TransactionGlAccountCategoryObject> transactionGlAccountCategories(final DataFetchingEnvironment env,
12799            @GraphQLName("transactionTypeName") final String transactionTypeName) {
12800        CountingPaginatedData<TransactionGlAccountCategoryObject> data;
12801
12802        try {
12803            var commandForm = AccountingUtil.getHome().getGetTransactionGlAccountCategoriesForm();
12804            var command = CDI.current().select(GetTransactionGlAccountCategoriesCommand.class).get();
12805
12806            commandForm.setTransactionTypeName(transactionTypeName);
12807
12808            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12809            if(totalEntities == null) {
12810                data = Connections.emptyConnection();
12811            } else {
12812                try(var objectLimiter = new ObjectLimiter(env, TransactionGlAccountCategoryConstants.COMPONENT_VENDOR_NAME, TransactionGlAccountCategoryConstants.ENTITY_TYPE_NAME, totalEntities)) {
12813                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12814
12815                    var transactionGlAccountCategories = entities.stream()
12816                            .map(TransactionGlAccountCategoryObject::new)
12817                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12818
12819                    data = new CountedObjects<>(objectLimiter, transactionGlAccountCategories);
12820                }
12821            }
12822        } catch (NamingException ex) {
12823            throw new RuntimeException(ex);
12824        }
12825
12826        return data;
12827    }
12828
12829    @GraphQLField
12830    @GraphQLName("transactionEntityRoleType")
12831    static TransactionEntityRoleTypeObject transactionEntityRoleType(final DataFetchingEnvironment env,
12832            @GraphQLName("transactionTypeName") final String transactionTypeName,
12833            @GraphQLName("transactionEntityRoleTypeName") final String transactionEntityRoleTypeName,
12834            @GraphQLName("id") @GraphQLID final String id) {
12835        TransactionEntityRoleType transactionEntityRoleType;
12836
12837        try {
12838            var commandForm = AccountingUtil.getHome().getGetTransactionEntityRoleTypeForm();
12839
12840            commandForm.setTransactionTypeName(transactionTypeName);
12841            commandForm.setTransactionEntityRoleTypeName(transactionEntityRoleTypeName);
12842            commandForm.setUuid(id);
12843
12844            transactionEntityRoleType = CDI.current().select(GetTransactionEntityRoleTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12845        } catch (NamingException ex) {
12846            throw new RuntimeException(ex);
12847        }
12848
12849        return transactionEntityRoleType == null ? null : new TransactionEntityRoleTypeObject(transactionEntityRoleType);
12850    }
12851
12852    @GraphQLField
12853    @GraphQLName("transactionEntityRoleTypes")
12854    @GraphQLNonNull
12855    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12856    static CountingPaginatedData<TransactionEntityRoleTypeObject> transactionEntityRoleTypes(final DataFetchingEnvironment env,
12857            @GraphQLName("transactionTypeName") final String transactionTypeName) {
12858        CountingPaginatedData<TransactionEntityRoleTypeObject> data;
12859
12860        try {
12861            var commandForm = AccountingUtil.getHome().getGetTransactionEntityRoleTypesForm();
12862            var command = CDI.current().select(GetTransactionEntityRoleTypesCommand.class).get();
12863
12864            commandForm.setTransactionTypeName(transactionTypeName);
12865
12866            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12867            if(totalEntities == null) {
12868                data = Connections.emptyConnection();
12869            } else {
12870                try(var objectLimiter = new ObjectLimiter(env, TransactionEntityRoleTypeConstants.COMPONENT_VENDOR_NAME, TransactionEntityRoleTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
12871                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12872
12873                    var transactionEntityRoleTypes = entities.stream()
12874                            .map(TransactionEntityRoleTypeObject::new)
12875                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12876
12877                    data = new CountedObjects<>(objectLimiter, transactionEntityRoleTypes);
12878                }
12879            }
12880        } catch (NamingException ex) {
12881            throw new RuntimeException(ex);
12882        }
12883
12884        return data;
12885    }
12886
12887    @GraphQLField
12888    @GraphQLName("transactionGroup")
12889    static TransactionGroupObject transactionGroup(final DataFetchingEnvironment env,
12890            @GraphQLName("transactionGroupName") final String transactionGroupName,
12891            @GraphQLName("id") @GraphQLID final String id) {
12892        TransactionGroup transactionGroup;
12893
12894        try {
12895            var commandForm = AccountingUtil.getHome().getGetTransactionGroupForm();
12896
12897            commandForm.setTransactionGroupName(transactionGroupName);
12898            commandForm.setUuid(id);
12899
12900            transactionGroup = CDI.current().select(GetTransactionGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12901        } catch (NamingException ex) {
12902            throw new RuntimeException(ex);
12903        }
12904
12905        return transactionGroup == null ? null : new TransactionGroupObject(transactionGroup);
12906    }
12907
12908    @GraphQLField
12909    @GraphQLName("transactionGroups")
12910    @GraphQLNonNull
12911    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12912    static CountingPaginatedData<TransactionGroupObject> transactionGroups(final DataFetchingEnvironment env) {
12913        CountingPaginatedData<TransactionGroupObject> data;
12914
12915        try {
12916            var commandForm = AccountingUtil.getHome().getGetTransactionGroupsForm();
12917            var command = CDI.current().select(GetTransactionGroupsCommand.class).get();
12918
12919            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12920            if(totalEntities == null) {
12921                data = Connections.emptyConnection();
12922            } else {
12923                try(var objectLimiter = new ObjectLimiter(env, TransactionGroupConstants.COMPONENT_VENDOR_NAME, TransactionGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
12924                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12925
12926                    var transactionGroups = entities.stream()
12927                            .map(TransactionGroupObject::new)
12928                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12929
12930                    data = new CountedObjects<>(objectLimiter, transactionGroups);
12931                }
12932            }
12933        } catch (NamingException ex) {
12934            throw new RuntimeException(ex);
12935        }
12936
12937        return data;
12938    }
12939
12940    @GraphQLField
12941    @GraphQLName("transaction")
12942    static TransactionObject transaction(final DataFetchingEnvironment env,
12943            @GraphQLName("transactionName") final String transactionName,
12944            @GraphQLName("id") @GraphQLID final String id) {
12945        Transaction transaction;
12946
12947        try {
12948            var commandForm = AccountingUtil.getHome().getGetTransactionForm();
12949
12950            commandForm.setTransactionName(transactionName);
12951            commandForm.setUuid(id);
12952
12953            transaction = CDI.current().select(GetTransactionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
12954        } catch (NamingException ex) {
12955            throw new RuntimeException(ex);
12956        }
12957
12958        return transaction == null ? null : new TransactionObject(transaction);
12959    }
12960
12961    @GraphQLField
12962    @GraphQLName("transactions")
12963    @GraphQLNonNull
12964    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
12965    static CountingPaginatedData<TransactionObject> transactions(final DataFetchingEnvironment env,
12966            @GraphQLName("transactionGroupName") final String transactionGroupName) {
12967        CountingPaginatedData<TransactionObject> data;
12968
12969        try {
12970            var commandForm = AccountingUtil.getHome().getGetTransactionsForm();
12971            var command = CDI.current().select(GetTransactionsCommand.class).get();
12972
12973            commandForm.setTransactionGroupName(transactionGroupName);
12974
12975            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12976            if(totalEntities == null) {
12977                data = Connections.emptyConnection();
12978            } else {
12979                try(var objectLimiter = new ObjectLimiter(env, TransactionConstants.COMPONENT_VENDOR_NAME, TransactionConstants.ENTITY_TYPE_NAME, totalEntities)) {
12980                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
12981
12982                    var transactions = entities.stream()
12983                            .map(TransactionObject::new)
12984                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
12985
12986                    data = new CountedObjects<>(objectLimiter, transactions);
12987                }
12988            }
12989        } catch (NamingException ex) {
12990            throw new RuntimeException(ex);
12991        }
12992
12993        return data;
12994    }
12995
12996    @GraphQLField
12997    @GraphQLName("campaign")
12998    static CampaignObject campaign(final DataFetchingEnvironment env,
12999            @GraphQLName("campaignName") final String campaignName,
13000            @GraphQLName("id") @GraphQLID final String id) {
13001        Campaign campaign;
13002
13003        try {
13004            var commandForm = CampaignUtil.getHome().getGetCampaignForm();
13005
13006            commandForm.setCampaignName(campaignName);
13007            commandForm.setUuid(id);
13008
13009            campaign = CDI.current().select(GetCampaignCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13010        } catch (NamingException ex) {
13011            throw new RuntimeException(ex);
13012        }
13013
13014        return campaign == null ? null : new CampaignObject(campaign);
13015    }
13016
13017    @GraphQLField
13018    @GraphQLName("campaigns")
13019    @GraphQLNonNull
13020    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13021    static CountingPaginatedData<CampaignObject> campaigns(final DataFetchingEnvironment env) {
13022        CountingPaginatedData<CampaignObject> data;
13023
13024        try {
13025            var commandForm = CampaignUtil.getHome().getGetCampaignsForm();
13026            var command = CDI.current().select(GetCampaignsCommand.class).get();
13027
13028            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13029            if(totalEntities == null) {
13030                data = Connections.emptyConnection();
13031            } else {
13032                try(var objectLimiter = new ObjectLimiter(env, CampaignConstants.COMPONENT_VENDOR_NAME, CampaignConstants.ENTITY_TYPE_NAME, totalEntities)) {
13033                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13034
13035                    var campaigns = entities.stream()
13036                            .map(CampaignObject::new)
13037                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13038
13039                    data = new CountedObjects<>(objectLimiter, campaigns);
13040                }
13041            }
13042        } catch (NamingException ex) {
13043            throw new RuntimeException(ex);
13044        }
13045
13046        return data;
13047    }
13048
13049    @GraphQLField
13050    @GraphQLName("campaignContent")
13051    static CampaignContentObject campaignContent(final DataFetchingEnvironment env,
13052            @GraphQLName("campaignContentName") final String campaignContentName,
13053            @GraphQLName("id") @GraphQLID final String id) {
13054        CampaignContent campaignContent;
13055
13056        try {
13057            var commandForm = CampaignUtil.getHome().getGetCampaignContentForm();
13058
13059            commandForm.setCampaignContentName(campaignContentName);
13060            commandForm.setUuid(id);
13061
13062            campaignContent = CDI.current().select(GetCampaignContentCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13063        } catch (NamingException ex) {
13064            throw new RuntimeException(ex);
13065        }
13066
13067        return campaignContent == null ? null : new CampaignContentObject(campaignContent);
13068    }
13069
13070    @GraphQLField
13071    @GraphQLName("campaignContents")
13072    @GraphQLNonNull
13073    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13074    static CountingPaginatedData<CampaignContentObject> campaignContents(final DataFetchingEnvironment env) {
13075        CountingPaginatedData<CampaignContentObject> data;
13076
13077        try {
13078            var commandForm = CampaignUtil.getHome().getGetCampaignContentsForm();
13079            var command = CDI.current().select(GetCampaignContentsCommand.class).get();
13080
13081            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13082            if(totalEntities == null) {
13083                data = Connections.emptyConnection();
13084            } else {
13085                try(var objectLimiter = new ObjectLimiter(env, CampaignContentConstants.COMPONENT_VENDOR_NAME, CampaignContentConstants.ENTITY_TYPE_NAME, totalEntities)) {
13086                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13087
13088                    var campaignContents = entities.stream()
13089                            .map(CampaignContentObject::new)
13090                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13091
13092                    data = new CountedObjects<>(objectLimiter, campaignContents);
13093                }
13094            }
13095        } catch (NamingException ex) {
13096            throw new RuntimeException(ex);
13097        }
13098
13099        return data;
13100    }
13101
13102    @GraphQLField
13103    @GraphQLName("campaignMedium")
13104    static CampaignMediumObject campaignMedium(final DataFetchingEnvironment env,
13105            @GraphQLName("campaignMediumName") final String campaignMediumName,
13106            @GraphQLName("id") @GraphQLID final String id) {
13107        CampaignMedium campaignMedium;
13108
13109        try {
13110            var commandForm = CampaignUtil.getHome().getGetCampaignMediumForm();
13111
13112            commandForm.setCampaignMediumName(campaignMediumName);
13113            commandForm.setUuid(id);
13114
13115            campaignMedium = CDI.current().select(GetCampaignMediumCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13116        } catch (NamingException ex) {
13117            throw new RuntimeException(ex);
13118        }
13119
13120        return campaignMedium == null ? null : new CampaignMediumObject(campaignMedium);
13121    }
13122
13123    @GraphQLField
13124    @GraphQLName("campaignMediums")
13125    @GraphQLNonNull
13126    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13127    static CountingPaginatedData<CampaignMediumObject> campaignMediums(final DataFetchingEnvironment env) {
13128        CountingPaginatedData<CampaignMediumObject> data;
13129
13130        try {
13131            var commandForm = CampaignUtil.getHome().getGetCampaignMediumsForm();
13132            var command = CDI.current().select(GetCampaignMediumsCommand.class).get();
13133
13134            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13135            if(totalEntities == null) {
13136                data = Connections.emptyConnection();
13137            } else {
13138                try(var objectLimiter = new ObjectLimiter(env, CampaignMediumConstants.COMPONENT_VENDOR_NAME, CampaignMediumConstants.ENTITY_TYPE_NAME, totalEntities)) {
13139                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13140
13141                    var campaignMediums = entities.stream()
13142                            .map(CampaignMediumObject::new)
13143                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13144
13145                    data = new CountedObjects<>(objectLimiter, campaignMediums);
13146                }
13147            }
13148        } catch (NamingException ex) {
13149            throw new RuntimeException(ex);
13150        }
13151
13152        return data;
13153    }
13154
13155    @GraphQLField
13156    @GraphQLName("campaignTerm")
13157    static CampaignTermObject campaignTerm(final DataFetchingEnvironment env,
13158            @GraphQLName("campaignTermName") final String campaignTermName,
13159            @GraphQLName("id") @GraphQLID final String id) {
13160        CampaignTerm campaignTerm;
13161
13162        try {
13163            var commandForm = CampaignUtil.getHome().getGetCampaignTermForm();
13164
13165            commandForm.setCampaignTermName(campaignTermName);
13166            commandForm.setUuid(id);
13167
13168            campaignTerm = CDI.current().select(GetCampaignTermCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13169        } catch (NamingException ex) {
13170            throw new RuntimeException(ex);
13171        }
13172
13173        return campaignTerm == null ? null : new CampaignTermObject(campaignTerm);
13174    }
13175
13176    @GraphQLField
13177    @GraphQLName("campaignTerms")
13178    @GraphQLNonNull
13179    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13180    static CountingPaginatedData<CampaignTermObject> campaignTerms(final DataFetchingEnvironment env) {
13181        CountingPaginatedData<CampaignTermObject> data;
13182
13183        try {
13184            var commandForm = CampaignUtil.getHome().getGetCampaignTermsForm();
13185            var command = CDI.current().select(GetCampaignTermsCommand.class).get();
13186
13187            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13188            if(totalEntities == null) {
13189                data = Connections.emptyConnection();
13190            } else {
13191                try(var objectLimiter = new ObjectLimiter(env, CampaignTermConstants.COMPONENT_VENDOR_NAME, CampaignTermConstants.ENTITY_TYPE_NAME, totalEntities)) {
13192                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13193
13194                    var campaignTerms = entities.stream()
13195                            .map(CampaignTermObject::new)
13196                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13197
13198                    data = new CountedObjects<>(objectLimiter, campaignTerms);
13199                }
13200            }
13201        } catch (NamingException ex) {
13202            throw new RuntimeException(ex);
13203        }
13204
13205        return data;
13206    }
13207
13208    @GraphQLField
13209    @GraphQLName("campaignSource")
13210    static CampaignSourceObject campaignSource(final DataFetchingEnvironment env,
13211            @GraphQLName("campaignSourceName") final String campaignSourceName,
13212            @GraphQLName("id") @GraphQLID final String id) {
13213        CampaignSource campaignSource;
13214
13215        try {
13216            var commandForm = CampaignUtil.getHome().getGetCampaignSourceForm();
13217
13218            commandForm.setCampaignSourceName(campaignSourceName);
13219            commandForm.setUuid(id);
13220
13221            campaignSource = CDI.current().select(GetCampaignSourceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13222        } catch (NamingException ex) {
13223            throw new RuntimeException(ex);
13224        }
13225
13226        return campaignSource == null ? null : new CampaignSourceObject(campaignSource);
13227    }
13228
13229    @GraphQLField
13230    @GraphQLName("campaignSources")
13231    @GraphQLNonNull
13232    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13233    static CountingPaginatedData<CampaignSourceObject> campaignSources(final DataFetchingEnvironment env) {
13234        CountingPaginatedData<CampaignSourceObject> data;
13235
13236        try {
13237            var commandForm = CampaignUtil.getHome().getGetCampaignSourcesForm();
13238            var command = CDI.current().select(GetCampaignSourcesCommand.class).get();
13239
13240            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13241            if(totalEntities == null) {
13242                data = Connections.emptyConnection();
13243            } else {
13244                try(var objectLimiter = new ObjectLimiter(env, CampaignSourceConstants.COMPONENT_VENDOR_NAME, CampaignSourceConstants.ENTITY_TYPE_NAME, totalEntities)) {
13245                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13246
13247                    var campaignSources = entities.stream()
13248                            .map(CampaignSourceObject::new)
13249                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13250
13251                    data = new CountedObjects<>(objectLimiter, campaignSources);
13252                }
13253            }
13254        } catch (NamingException ex) {
13255            throw new RuntimeException(ex);
13256        }
13257
13258        return data;
13259    }
13260
13261    @GraphQLField
13262    @GraphQLName("subscriptionKind")
13263    static SubscriptionKindObject subscriptionKind(final DataFetchingEnvironment env,
13264            @GraphQLName("subscriptionKindName") final String subscriptionKindName,
13265            @GraphQLName("id") @GraphQLID final String id) {
13266        SubscriptionKind subscriptionKind;
13267
13268        try {
13269            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionKindForm();
13270
13271            commandForm.setSubscriptionKindName(subscriptionKindName);
13272            commandForm.setUuid(id);
13273
13274            subscriptionKind = CDI.current().select(GetSubscriptionKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13275        } catch (NamingException ex) {
13276            throw new RuntimeException(ex);
13277        }
13278
13279        return subscriptionKind == null ? null : new SubscriptionKindObject(subscriptionKind);
13280    }
13281
13282    @GraphQLField
13283    @GraphQLName("subscriptionKinds")
13284    @GraphQLNonNull
13285    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13286    static CountingPaginatedData<SubscriptionKindObject> subscriptionKinds(final DataFetchingEnvironment env) {
13287        CountingPaginatedData<SubscriptionKindObject> data;
13288
13289        try {
13290            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionKindsForm();
13291            var command = CDI.current().select(GetSubscriptionKindsCommand.class).get();
13292
13293            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13294            if(totalEntities == null) {
13295                data = Connections.emptyConnection();
13296            } else {
13297                try(var objectLimiter = new ObjectLimiter(env, SubscriptionKindConstants.COMPONENT_VENDOR_NAME, SubscriptionKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
13298                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13299
13300                    var subscriptionKinds = entities.stream()
13301                            .map(SubscriptionKindObject::new)
13302                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13303
13304                    data = new CountedObjects<>(objectLimiter, subscriptionKinds);
13305                }
13306            }
13307        } catch (NamingException ex) {
13308            throw new RuntimeException(ex);
13309        }
13310
13311        return data;
13312    }
13313
13314    @GraphQLField
13315    @GraphQLName("subscriptionType")
13316    static SubscriptionTypeObject subscriptionType(final DataFetchingEnvironment env,
13317            @GraphQLName("subscriptionKindName") final String subscriptionKindName,
13318            @GraphQLName("subscriptionTypeName") final String subscriptionTypeName,
13319            @GraphQLName("id") @GraphQLID final String id) {
13320        SubscriptionType subscriptionType;
13321
13322        try {
13323            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionTypeForm();
13324
13325            commandForm.setSubscriptionKindName(subscriptionKindName);
13326            commandForm.setSubscriptionTypeName(subscriptionTypeName);
13327            commandForm.setUuid(id);
13328
13329            subscriptionType = CDI.current().select(GetSubscriptionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13330        } catch (NamingException ex) {
13331            throw new RuntimeException(ex);
13332        }
13333
13334        return subscriptionType == null ? null : new SubscriptionTypeObject(subscriptionType);
13335    }
13336
13337    @GraphQLField
13338    @GraphQLName("subscriptionTypes")
13339    @GraphQLNonNull
13340    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13341    static CountingPaginatedData<SubscriptionTypeObject> subscriptionTypes(final DataFetchingEnvironment env,
13342            @GraphQLName("subscriptionKindName") @GraphQLNonNull final String subscriptionKindName) {
13343        CountingPaginatedData<SubscriptionTypeObject> data;
13344
13345        try {
13346            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionTypesForm();
13347            var command = CDI.current().select(GetSubscriptionTypesCommand.class).get();
13348
13349            commandForm.setSubscriptionKindName(subscriptionKindName);
13350
13351            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13352            if(totalEntities == null) {
13353                data = Connections.emptyConnection();
13354            } else {
13355                try(var objectLimiter = new ObjectLimiter(env, SubscriptionTypeConstants.COMPONENT_VENDOR_NAME, SubscriptionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13356                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13357
13358                    var subscriptionTypes = entities.stream()
13359                            .map(SubscriptionTypeObject::new)
13360                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13361
13362                    data = new CountedObjects<>(objectLimiter, subscriptionTypes);
13363                }
13364            }
13365        } catch (NamingException ex) {
13366            throw new RuntimeException(ex);
13367        }
13368
13369        return data;
13370    }
13371
13372    @GraphQLField
13373    @GraphQLName("subscription")
13374    static SubscriptionObject subscription(final DataFetchingEnvironment env,
13375            @GraphQLName("subscriptionName") final String subscriptionName,
13376            @GraphQLName("id") @GraphQLID final String id) {
13377        Subscription subscription;
13378
13379        try {
13380            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionForm();
13381
13382            commandForm.setSubscriptionName(subscriptionName);
13383            commandForm.setUuid(id);
13384
13385            subscription = CDI.current().select(GetSubscriptionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13386        } catch (NamingException ex) {
13387            throw new RuntimeException(ex);
13388        }
13389
13390        return subscription == null ? null : new SubscriptionObject(subscription);
13391    }
13392
13393    @GraphQLField
13394    @GraphQLName("subscriptions")
13395    @GraphQLNonNull
13396    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13397    static CountingPaginatedData<SubscriptionObject> subscriptions(final DataFetchingEnvironment env,
13398            @GraphQLName("subscriptionKindName") @GraphQLNonNull final String subscriptionKindName,
13399            @GraphQLName("subscriptionTypeName") @GraphQLNonNull final String subscriptionTypeName) {
13400        CountingPaginatedData<SubscriptionObject> data;
13401
13402        try {
13403            var commandForm = SubscriptionUtil.getHome().getGetSubscriptionsForm();
13404            var command = CDI.current().select(GetSubscriptionsCommand.class).get();
13405
13406            commandForm.setSubscriptionKindName(subscriptionKindName);
13407            commandForm.setSubscriptionTypeName(subscriptionTypeName);
13408
13409            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13410            if(totalEntities == null) {
13411                data = Connections.emptyConnection();
13412            } else {
13413                try(var objectLimiter = new ObjectLimiter(env, SubscriptionConstants.COMPONENT_VENDOR_NAME, SubscriptionConstants.ENTITY_TYPE_NAME, totalEntities)) {
13414                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13415
13416                    var subscriptions = entities.stream()
13417                            .map(SubscriptionObject::new)
13418                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13419
13420                    data = new CountedObjects<>(objectLimiter, subscriptions);
13421                }
13422            }
13423        } catch (NamingException ex) {
13424            throw new RuntimeException(ex);
13425        }
13426
13427        return data;
13428    }
13429
13430    @GraphQLField
13431    @GraphQLName("chainKind")
13432    static ChainKindObject chainKind(final DataFetchingEnvironment env,
13433            @GraphQLName("chainKindName") final String chainKindName,
13434            @GraphQLName("id") @GraphQLID final String id) {
13435        ChainKind chainKind;
13436
13437        try {
13438            var commandForm = ChainUtil.getHome().getGetChainKindForm();
13439
13440            commandForm.setChainKindName(chainKindName);
13441            commandForm.setUuid(id);
13442
13443            chainKind = CDI.current().select(GetChainKindCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13444        } catch (NamingException ex) {
13445            throw new RuntimeException(ex);
13446        }
13447
13448        return chainKind == null ? null : new ChainKindObject(chainKind);
13449    }
13450
13451    @GraphQLField
13452    @GraphQLName("chainKinds")
13453    @GraphQLNonNull
13454    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13455    static CountingPaginatedData<ChainKindObject> chainKinds(final DataFetchingEnvironment env) {
13456        CountingPaginatedData<ChainKindObject> data;
13457
13458        try {
13459            var commandForm = ChainUtil.getHome().getGetChainKindsForm();
13460            var command = CDI.current().select(GetChainKindsCommand.class).get();
13461
13462            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13463            if(totalEntities == null) {
13464                data = Connections.emptyConnection();
13465            } else {
13466                try(var objectLimiter = new ObjectLimiter(env, ChainKindConstants.COMPONENT_VENDOR_NAME, ChainKindConstants.ENTITY_TYPE_NAME, totalEntities)) {
13467                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13468
13469                    var chainKinds = entities.stream()
13470                            .map(ChainKindObject::new)
13471                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13472
13473                    data = new CountedObjects<>(objectLimiter, chainKinds);
13474                }
13475            }
13476        } catch (NamingException ex) {
13477            throw new RuntimeException(ex);
13478        }
13479
13480        return data;
13481    }
13482
13483    @GraphQLField
13484    @GraphQLName("chainType")
13485    static ChainTypeObject chainType(final DataFetchingEnvironment env,
13486            @GraphQLName("chainKindName") final String chainKindName,
13487            @GraphQLName("chainTypeName") final String chainTypeName,
13488            @GraphQLName("id") @GraphQLID final String id) {
13489        ChainType chainType;
13490
13491        try {
13492            var commandForm = ChainUtil.getHome().getGetChainTypeForm();
13493
13494            commandForm.setChainKindName(chainKindName);
13495            commandForm.setChainTypeName(chainTypeName);
13496            commandForm.setUuid(id);
13497
13498            chainType = CDI.current().select(GetChainTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13499        } catch (NamingException ex) {
13500            throw new RuntimeException(ex);
13501        }
13502
13503        return chainType == null ? null : new ChainTypeObject(chainType);
13504    }
13505
13506    @GraphQLField
13507    @GraphQLName("chainTypes")
13508    @GraphQLNonNull
13509    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13510    static CountingPaginatedData<ChainTypeObject> chainTypes(final DataFetchingEnvironment env,
13511            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName) {
13512        CountingPaginatedData<ChainTypeObject> data;
13513
13514        try {
13515            var commandForm = ChainUtil.getHome().getGetChainTypesForm();
13516            var command = CDI.current().select(GetChainTypesCommand.class).get();
13517
13518            commandForm.setChainKindName(chainKindName);
13519
13520            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13521            if(totalEntities == null) {
13522                data = Connections.emptyConnection();
13523            } else {
13524                try(var objectLimiter = new ObjectLimiter(env, ChainTypeConstants.COMPONENT_VENDOR_NAME, ChainTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13525                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13526
13527                    var chainTypes = entities.stream()
13528                            .map(ChainTypeObject::new)
13529                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13530
13531                    data = new CountedObjects<>(objectLimiter, chainTypes);
13532                }
13533            }
13534        } catch (NamingException ex) {
13535            throw new RuntimeException(ex);
13536        }
13537
13538        return data;
13539    }
13540
13541    @GraphQLField
13542    @GraphQLName("chain")
13543    static ChainObject chain(final DataFetchingEnvironment env,
13544            @GraphQLName("chainKindName") final String chainKindName,
13545            @GraphQLName("chainTypeName") final String chainTypeName,
13546            @GraphQLName("chainName") final String chainName,
13547            @GraphQLName("id") @GraphQLID final String id) {
13548        Chain chain;
13549
13550        try {
13551            var commandForm = ChainUtil.getHome().getGetChainForm();
13552
13553            commandForm.setChainKindName(chainKindName);
13554            commandForm.setChainTypeName(chainTypeName);
13555            commandForm.setChainName(chainName);
13556            commandForm.setUuid(id);
13557
13558            chain = CDI.current().select(GetChainCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13559        } catch (NamingException ex) {
13560            throw new RuntimeException(ex);
13561        }
13562
13563        return chain == null ? null : new ChainObject(chain);
13564    }
13565
13566    @GraphQLField
13567    @GraphQLName("chains")
13568    @GraphQLNonNull
13569    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13570    static CountingPaginatedData<ChainObject> chains(final DataFetchingEnvironment env,
13571            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName,
13572            @GraphQLName("chainTypeName") @GraphQLNonNull final String chainTypeName) {
13573        CountingPaginatedData<ChainObject> data;
13574
13575        try {
13576            var commandForm = ChainUtil.getHome().getGetChainsForm();
13577            var command = CDI.current().select(GetChainsCommand.class).get();
13578
13579            commandForm.setChainKindName(chainKindName);
13580            commandForm.setChainTypeName(chainTypeName);
13581
13582            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13583            if(totalEntities == null) {
13584                data = Connections.emptyConnection();
13585            } else {
13586                try(var objectLimiter = new ObjectLimiter(env, ChainConstants.COMPONENT_VENDOR_NAME, ChainConstants.ENTITY_TYPE_NAME, totalEntities)) {
13587                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13588
13589                    var chains = entities.stream()
13590                            .map(ChainObject::new)
13591                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13592
13593                    data = new CountedObjects<>(objectLimiter, chains);
13594                }
13595            }
13596        } catch (NamingException ex) {
13597            throw new RuntimeException(ex);
13598        }
13599
13600        return data;
13601    }
13602
13603    @GraphQLField
13604    @GraphQLName("chainActionSet")
13605    static ChainActionSetObject chainActionSet(final DataFetchingEnvironment env,
13606            @GraphQLName("chainKindName") final String chainKindName,
13607            @GraphQLName("chainTypeName") final String chainTypeName,
13608            @GraphQLName("chainName") final String chainName,
13609            @GraphQLName("chainActionSetName") final String chainActionSetName,
13610            @GraphQLName("id") @GraphQLID final String id) {
13611        ChainActionSet chainActionSet;
13612
13613        try {
13614            var commandForm = ChainUtil.getHome().getGetChainActionSetForm();
13615
13616            commandForm.setChainKindName(chainKindName);
13617            commandForm.setChainTypeName(chainTypeName);
13618            commandForm.setChainName(chainName);
13619            commandForm.setChainActionSetName(chainActionSetName);
13620            commandForm.setUuid(id);
13621
13622            chainActionSet = CDI.current().select(GetChainActionSetCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13623        } catch (NamingException ex) {
13624            throw new RuntimeException(ex);
13625        }
13626
13627        return chainActionSet == null ? null : new ChainActionSetObject(chainActionSet);
13628    }
13629
13630    @GraphQLField
13631    @GraphQLName("chainActionSets")
13632    @GraphQLNonNull
13633    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13634    static CountingPaginatedData<ChainActionSetObject> chainActionSets(final DataFetchingEnvironment env,
13635            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName,
13636            @GraphQLName("chainTypeName") @GraphQLNonNull final String chainTypeName,
13637            @GraphQLName("chainName") @GraphQLNonNull final String chainName) {
13638        CountingPaginatedData<ChainActionSetObject> data;
13639
13640        try {
13641            var commandForm = ChainUtil.getHome().getGetChainActionSetsForm();
13642            var command = CDI.current().select(GetChainActionSetsCommand.class).get();
13643
13644            commandForm.setChainKindName(chainKindName);
13645            commandForm.setChainTypeName(chainTypeName);
13646            commandForm.setChainName(chainName);
13647
13648            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13649            if(totalEntities == null) {
13650                data = Connections.emptyConnection();
13651            } else {
13652                try(var objectLimiter = new ObjectLimiter(env, ChainActionSetConstants.COMPONENT_VENDOR_NAME, ChainActionSetConstants.ENTITY_TYPE_NAME, totalEntities)) {
13653                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13654
13655                    var chainActionSets = entities.stream()
13656                            .map(ChainActionSetObject::new)
13657                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13658
13659                    data = new CountedObjects<>(objectLimiter, chainActionSets);
13660                }
13661            }
13662        } catch (NamingException ex) {
13663            throw new RuntimeException(ex);
13664        }
13665
13666        return data;
13667    }
13668
13669    @GraphQLField
13670    @GraphQLName("chainActionType")
13671    static ChainActionTypeObject chainActionType(final DataFetchingEnvironment env,
13672            @GraphQLName("chainActionTypeName") final String chainActionTypeName,
13673            @GraphQLName("id") @GraphQLID final String id) {
13674        ChainActionType chainActionType;
13675
13676        try {
13677            var commandForm = ChainUtil.getHome().getGetChainActionTypeForm();
13678
13679            commandForm.setChainActionTypeName(chainActionTypeName);
13680            commandForm.setUuid(id);
13681
13682            chainActionType = CDI.current().select(GetChainActionTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13683        } catch (NamingException ex) {
13684            throw new RuntimeException(ex);
13685        }
13686
13687        return chainActionType == null ? null : new ChainActionTypeObject(chainActionType);
13688    }
13689
13690    @GraphQLField
13691    @GraphQLName("chainActionTypes")
13692    @GraphQLNonNull
13693    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13694    static CountingPaginatedData<ChainActionTypeObject> chainActionTypes(final DataFetchingEnvironment env) {
13695        CountingPaginatedData<ChainActionTypeObject> data;
13696
13697        try {
13698            var commandForm = ChainUtil.getHome().getGetChainActionTypesForm();
13699            var command = CDI.current().select(GetChainActionTypesCommand.class).get();
13700
13701            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13702            if(totalEntities == null) {
13703                data = Connections.emptyConnection();
13704            } else {
13705                try(var objectLimiter = new ObjectLimiter(env, ChainActionTypeConstants.COMPONENT_VENDOR_NAME, ChainActionTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13706                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13707
13708                    var chainActionTypes = entities.stream()
13709                            .map(ChainActionTypeObject::new)
13710                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13711
13712                    data = new CountedObjects<>(objectLimiter, chainActionTypes);
13713                }
13714            }
13715        } catch (NamingException ex) {
13716            throw new RuntimeException(ex);
13717        }
13718
13719        return data;
13720    }
13721
13722    @GraphQLField
13723    @GraphQLName("chainEntityTypeRole")
13724    static ChainEntityRoleTypeObject chainEntityTypeRole(final DataFetchingEnvironment env,
13725            @GraphQLName("chainKindName") final String chainKindName,
13726            @GraphQLName("chainTypeName") final String chainTypeName,
13727            @GraphQLName("chainEntityRoleTypeName") final String chainEntityRoleTypeName,
13728            @GraphQLName("id") @GraphQLID final String id) {
13729        ChainEntityRoleType chainEntityRoleType;
13730
13731        try {
13732            var commandForm = ChainUtil.getHome().getGetChainEntityRoleTypeForm();
13733
13734            commandForm.setChainKindName(chainKindName);
13735            commandForm.setChainTypeName(chainTypeName);
13736            commandForm.setChainEntityRoleTypeName(chainEntityRoleTypeName);
13737            commandForm.setUuid(id);
13738
13739            chainEntityRoleType = CDI.current().select(GetChainEntityRoleTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13740        } catch (NamingException ex) {
13741            throw new RuntimeException(ex);
13742        }
13743
13744        return chainEntityRoleType == null ? null : new ChainEntityRoleTypeObject(chainEntityRoleType);
13745    }
13746
13747    @GraphQLField
13748    @GraphQLName("chainEntityTypeRoles")
13749    @GraphQLNonNull
13750    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13751    static CountingPaginatedData<ChainEntityRoleTypeObject> chainEntityTypeRoles(final DataFetchingEnvironment env,
13752            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName,
13753            @GraphQLName("chainTypeName") @GraphQLNonNull final String chainTypeName) {
13754        CountingPaginatedData<ChainEntityRoleTypeObject> data;
13755
13756        try {
13757            var commandForm = ChainUtil.getHome().getGetChainEntityRoleTypesForm();
13758            var command = CDI.current().select(GetChainEntityRoleTypesCommand.class).get();
13759
13760            commandForm.setChainKindName(chainKindName);
13761            commandForm.setChainTypeName(chainTypeName);
13762
13763            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13764            if(totalEntities == null) {
13765                data = Connections.emptyConnection();
13766            } else {
13767                try(var objectLimiter = new ObjectLimiter(env, ChainEntityRoleTypeConstants.COMPONENT_VENDOR_NAME, ChainEntityRoleTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
13768                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13769
13770                    var chainEntityTypeRoles = entities.stream()
13771                            .map(ChainEntityRoleTypeObject::new)
13772                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13773
13774                    data = new CountedObjects<>(objectLimiter, chainEntityTypeRoles);
13775                }
13776            }
13777        } catch (NamingException ex) {
13778            throw new RuntimeException(ex);
13779        }
13780
13781        return data;
13782    }
13783
13784    @GraphQLField
13785    @GraphQLName("chainAction")
13786    static ChainActionObject chainAction(final DataFetchingEnvironment env,
13787            @GraphQLName("chainKindName") final String chainKindName,
13788            @GraphQLName("chainTypeName") final String chainTypeName,
13789            @GraphQLName("chainName") final String chainName,
13790            @GraphQLName("chainActionSetName") final String chainActionSetName,
13791            @GraphQLName("chainActionName") final String chainActionName,
13792            @GraphQLName("id") @GraphQLID final String id) {
13793        ChainAction chainAction;
13794
13795        try {
13796            var commandForm = ChainUtil.getHome().getGetChainActionForm();
13797
13798            commandForm.setChainKindName(chainKindName);
13799            commandForm.setChainTypeName(chainTypeName);
13800            commandForm.setChainName(chainName);
13801            commandForm.setChainActionSetName(chainActionSetName);
13802            commandForm.setChainActionName(chainActionName);
13803            commandForm.setUuid(id);
13804
13805            chainAction = CDI.current().select(GetChainActionCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13806        } catch (NamingException ex) {
13807            throw new RuntimeException(ex);
13808        }
13809
13810        return chainAction == null ? null : new ChainActionObject(chainAction);
13811    }
13812
13813    @GraphQLField
13814    @GraphQLName("chainActions")
13815    @GraphQLNonNull
13816    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13817    static CountingPaginatedData<ChainActionObject> chainActions(final DataFetchingEnvironment env,
13818            @GraphQLName("chainKindName") @GraphQLNonNull final String chainKindName,
13819            @GraphQLName("chainTypeName") @GraphQLNonNull final String chainTypeName,
13820            @GraphQLName("chainName") @GraphQLNonNull final String chainName,
13821            @GraphQLName("chainActionSetName") @GraphQLNonNull final String chainActionSetName) {
13822        CountingPaginatedData<ChainActionObject> data;
13823
13824        try {
13825            var commandForm = ChainUtil.getHome().getGetChainActionsForm();
13826            var command = CDI.current().select(GetChainActionsCommand.class).get();
13827
13828            commandForm.setChainKindName(chainKindName);
13829            commandForm.setChainTypeName(chainTypeName);
13830            commandForm.setChainName(chainName);
13831            commandForm.setChainActionSetName(chainActionSetName);
13832
13833            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13834            if(totalEntities == null) {
13835                data = Connections.emptyConnection();
13836            } else {
13837                try(var objectLimiter = new ObjectLimiter(env, ChainActionConstants.COMPONENT_VENDOR_NAME, ChainActionConstants.ENTITY_TYPE_NAME, totalEntities)) {
13838                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13839
13840                    var chainActions = entities.stream()
13841                            .map(ChainActionObject::new)
13842                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13843
13844                    data = new CountedObjects<>(objectLimiter, chainActions);
13845                }
13846            }
13847        } catch (NamingException ex) {
13848            throw new RuntimeException(ex);
13849        }
13850
13851        return data;
13852    }
13853
13854    @GraphQLField
13855    @GraphQLName("chainInstance")
13856    static ChainInstanceObject chainInstance(final DataFetchingEnvironment env,
13857            @GraphQLName("chainInstanceName") final String chainInstanceName,
13858            @GraphQLName("id") @GraphQLID final String id) {
13859        ChainInstance chainInstance;
13860
13861        try {
13862            var commandForm = ChainUtil.getHome().getGetChainInstanceForm();
13863
13864            commandForm.setChainInstanceName(chainInstanceName);
13865            commandForm.setUuid(id);
13866
13867            chainInstance = CDI.current().select(GetChainInstanceCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13868        } catch (NamingException ex) {
13869            throw new RuntimeException(ex);
13870        }
13871
13872        return chainInstance == null ? null : new ChainInstanceObject(chainInstance);
13873    }
13874
13875    @GraphQLField
13876    @GraphQLName("chainInstances")
13877    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13878    static CountingPaginatedData<ChainInstanceObject> chainInstances(final DataFetchingEnvironment env,
13879            @GraphQLName("chainKindName") final String chainKindName,
13880            @GraphQLName("chainTypeName") final String chainTypeName,
13881            @GraphQLName("chainName") final String chainName) {
13882        CountingPaginatedData<ChainInstanceObject> data;
13883
13884        try {
13885            var commandForm = ChainUtil.getHome().getGetChainInstancesForm();
13886            var command = CDI.current().select(GetChainInstancesCommand.class).get();
13887
13888            commandForm.setChainKindName(chainKindName);
13889            commandForm.setChainTypeName(chainTypeName);
13890            commandForm.setChainName(chainName);
13891
13892            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13893            if(totalEntities == null) {
13894                data = Connections.emptyConnection();
13895            } else {
13896                try(var objectLimiter = new ObjectLimiter(env, ChainInstanceConstants.COMPONENT_VENDOR_NAME, ChainInstanceConstants.ENTITY_TYPE_NAME, totalEntities)) {
13897                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13898
13899                    var chainInstances = entities.stream()
13900                            .map(ChainInstanceObject::new)
13901                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13902
13903                    data = new CountedObjects<>(objectLimiter, chainInstances);
13904                }
13905            }
13906        } catch (NamingException ex) {
13907            throw new RuntimeException(ex);
13908        }
13909
13910        return data;
13911    }
13912
13913
13914    @GraphQLField
13915    @GraphQLName("contactListFrequency")
13916    static ContactListFrequencyObject contactListFrequency(final DataFetchingEnvironment env,
13917            @GraphQLName("contactListFrequencyName") final String contactListFrequencyName,
13918            @GraphQLName("id") @GraphQLID final String id) {
13919        ContactListFrequency contactListFrequency;
13920
13921        try {
13922            var commandForm = ContactListUtil.getHome().getGetContactListFrequencyForm();
13923
13924            commandForm.setContactListFrequencyName(contactListFrequencyName);
13925            commandForm.setUuid(id);
13926
13927            contactListFrequency = CDI.current().select(GetContactListFrequencyCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13928        } catch (NamingException ex) {
13929            throw new RuntimeException(ex);
13930        }
13931
13932        return contactListFrequency == null ? null : new ContactListFrequencyObject(contactListFrequency);
13933    }
13934
13935    @GraphQLField
13936    @GraphQLName("contactListFrequencies")
13937    @GraphQLNonNull
13938    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13939    static CountingPaginatedData<ContactListFrequencyObject> contactListFrequencies(final DataFetchingEnvironment env) {
13940        CountingPaginatedData<ContactListFrequencyObject> data;
13941
13942        try {
13943            var commandForm = ContactListUtil.getHome().getGetContactListFrequenciesForm();
13944            var command = CDI.current().select(GetContactListFrequenciesCommand.class).get();
13945
13946            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13947            if(totalEntities == null) {
13948                data = Connections.emptyConnection();
13949            } else {
13950                try(var objectLimiter = new ObjectLimiter(env, ContactListFrequencyConstants.COMPONENT_VENDOR_NAME, ContactListFrequencyConstants.ENTITY_TYPE_NAME, totalEntities)) {
13951                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
13952
13953                    var contactListFrequencies = entities.stream()
13954                            .map(ContactListFrequencyObject::new)
13955                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
13956
13957                    data = new CountedObjects<>(objectLimiter, contactListFrequencies);
13958                }
13959            }
13960        } catch (NamingException ex) {
13961            throw new RuntimeException(ex);
13962        }
13963
13964        return data;
13965    }
13966
13967    @GraphQLField
13968    @GraphQLName("contactMechanismPurpose")
13969    static ContactMechanismPurposeObject contactMechanismPurpose(final DataFetchingEnvironment env,
13970            @GraphQLName("contactMechanismPurposeName") final String contactMechanismPurposeName,
13971            @GraphQLName("id") @GraphQLID final String id) {
13972        ContactMechanismPurpose contactMechanismPurpose;
13973
13974        try {
13975            var commandForm = ContactUtil.getHome().getGetContactMechanismPurposeForm();
13976
13977            commandForm.setContactMechanismPurposeName(contactMechanismPurposeName);
13978            commandForm.setUuid(id);
13979
13980            contactMechanismPurpose = CDI.current().select(GetContactMechanismPurposeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
13981        } catch (NamingException ex) {
13982            throw new RuntimeException(ex);
13983        }
13984
13985        return contactMechanismPurpose == null ? null : new ContactMechanismPurposeObject(contactMechanismPurpose);
13986    }
13987
13988    @GraphQLField
13989    @GraphQLName("contactMechanismPurposes")
13990    @GraphQLNonNull
13991    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
13992    static CountingPaginatedData<ContactMechanismPurposeObject> contactMechanismPurposes(final DataFetchingEnvironment env) {
13993        CountingPaginatedData<ContactMechanismPurposeObject> data;
13994
13995        try {
13996            var commandForm = ContactUtil.getHome().getGetContactMechanismPurposesForm();
13997            var command = CDI.current().select(GetContactMechanismPurposesCommand.class).get();
13998
13999            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14000            if(totalEntities == null) {
14001                data = Connections.emptyConnection();
14002            } else {
14003                try(var objectLimiter = new ObjectLimiter(env, ContactMechanismPurposeConstants.COMPONENT_VENDOR_NAME, ContactMechanismPurposeConstants.ENTITY_TYPE_NAME, totalEntities)) {
14004                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14005
14006                    var contactMechanismPurposes = entities.stream()
14007                            .map(ContactMechanismPurposeObject::new)
14008                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14009
14010                    data = new CountedObjects<>(objectLimiter, contactMechanismPurposes);
14011                }
14012            }
14013        } catch (NamingException ex) {
14014            throw new RuntimeException(ex);
14015        }
14016
14017        return data;
14018    }
14019
14020    @GraphQLField
14021    @GraphQLName("contactListGroup")
14022    static ContactListGroupObject contactListGroup(final DataFetchingEnvironment env,
14023            @GraphQLName("contactListGroupName") final String contactListGroupName,
14024            @GraphQLName("id") @GraphQLID final String id) {
14025        ContactListGroup contactListGroup;
14026
14027        try {
14028            var commandForm = ContactListUtil.getHome().getGetContactListGroupForm();
14029
14030            commandForm.setContactListGroupName(contactListGroupName);
14031            commandForm.setUuid(id);
14032
14033            contactListGroup = CDI.current().select(GetContactListGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14034        } catch (NamingException ex) {
14035            throw new RuntimeException(ex);
14036        }
14037
14038        return contactListGroup == null ? null : new ContactListGroupObject(contactListGroup);
14039    }
14040
14041    @GraphQLField
14042    @GraphQLName("contactListGroups")
14043    @GraphQLNonNull
14044    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14045    static CountingPaginatedData<ContactListGroupObject> contactListGroups(final DataFetchingEnvironment env) {
14046        CountingPaginatedData<ContactListGroupObject> data;
14047
14048        try {
14049            var commandForm = ContactListUtil.getHome().getGetContactListGroupsForm();
14050            var command = CDI.current().select(GetContactListGroupsCommand.class).get();
14051
14052            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14053            if(totalEntities == null) {
14054                data = Connections.emptyConnection();
14055            } else {
14056                try(var objectLimiter = new ObjectLimiter(env, ContactListGroupConstants.COMPONENT_VENDOR_NAME, ContactListGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
14057                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14058
14059                    var contactListGroups = entities.stream()
14060                            .map(ContactListGroupObject::new)
14061                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14062
14063                    data = new CountedObjects<>(objectLimiter, contactListGroups);
14064                }
14065            }
14066        } catch (NamingException ex) {
14067            throw new RuntimeException(ex);
14068        }
14069
14070        return data;
14071    }
14072
14073    @GraphQLField
14074    @GraphQLName("customerTypeContactListGroup")
14075    static CustomerTypeContactListGroupObject customerTypeContactListGroup(final DataFetchingEnvironment env,
14076            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName,
14077            @GraphQLName("contactListGroupName") @GraphQLNonNull final String contactListGroupName) {
14078        CustomerTypeContactListGroup customerTypeContactListGroup;
14079
14080        try {
14081            var commandForm = ContactListUtil.getHome().getGetCustomerTypeContactListGroupForm();
14082
14083            commandForm.setCustomerTypeName(customerTypeName);
14084            commandForm.setContactListGroupName(contactListGroupName);
14085
14086            customerTypeContactListGroup = CDI.current().select(GetCustomerTypeContactListGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14087        } catch (NamingException ex) {
14088            throw new RuntimeException(ex);
14089        }
14090
14091        return customerTypeContactListGroup == null ? null : new CustomerTypeContactListGroupObject(customerTypeContactListGroup);
14092    }
14093
14094    @GraphQLField
14095    @GraphQLName("customerTypeContactListGroups")
14096    @GraphQLNonNull
14097    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14098    static CountingPaginatedData<CustomerTypeContactListGroupObject> customerTypeContactListGroups(final DataFetchingEnvironment env,
14099            @GraphQLName("customerTypeName") final String customerTypeName,
14100            @GraphQLName("contactListGroupName") final String contactListGroupName) {
14101        CountingPaginatedData<CustomerTypeContactListGroupObject> data;
14102
14103        try {
14104            var commandForm = ContactListUtil.getHome().getGetCustomerTypeContactListGroupsForm();
14105            var command = CDI.current().select(GetCustomerTypeContactListGroupsCommand.class).get();
14106
14107            commandForm.setCustomerTypeName(customerTypeName);
14108            commandForm.setContactListGroupName(contactListGroupName);
14109
14110            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14111            if(totalEntities == null) {
14112                data = Connections.emptyConnection();
14113            } else {
14114                try(var objectLimiter = new ObjectLimiter(env, CustomerTypeContactListGroupConstants.COMPONENT_VENDOR_NAME, CustomerTypeContactListGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
14115                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14116
14117                    var customerTypeContactListGroups = entities.stream()
14118                            .map(CustomerTypeContactListGroupObject::new)
14119                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14120
14121                    data = new CountedObjects<>(objectLimiter, customerTypeContactListGroups);
14122                }
14123            }
14124        } catch (NamingException ex) {
14125            throw new RuntimeException(ex);
14126        }
14127
14128        return data;
14129    }
14130
14131    @GraphQLField
14132    @GraphQLName("partyTypeContactListGroup")
14133    static PartyTypeContactListGroupObject partyTypeContactListGroup(final DataFetchingEnvironment env,
14134            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName,
14135            @GraphQLName("contactListGroupName") @GraphQLNonNull final String contactListGroupName) {
14136        PartyTypeContactListGroup partyTypeContactListGroup;
14137
14138        try {
14139            var commandForm = ContactListUtil.getHome().getGetPartyTypeContactListGroupForm();
14140
14141            commandForm.setPartyTypeName(partyTypeName);
14142            commandForm.setContactListGroupName(contactListGroupName);
14143
14144            partyTypeContactListGroup = CDI.current().select(GetPartyTypeContactListGroupCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14145        } catch (NamingException ex) {
14146            throw new RuntimeException(ex);
14147        }
14148
14149        return partyTypeContactListGroup == null ? null : new PartyTypeContactListGroupObject(partyTypeContactListGroup);
14150    }
14151
14152    @GraphQLField
14153    @GraphQLName("partyTypeContactListGroups")
14154    @GraphQLNonNull
14155    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14156    static CountingPaginatedData<PartyTypeContactListGroupObject> partyTypeContactListGroups(final DataFetchingEnvironment env,
14157            @GraphQLName("partyTypeName") final String partyTypeName,
14158            @GraphQLName("contactListGroupName") final String contactListGroupName) {
14159        CountingPaginatedData<PartyTypeContactListGroupObject> data;
14160
14161        try {
14162            var commandForm = ContactListUtil.getHome().getGetPartyTypeContactListGroupsForm();
14163            var command = CDI.current().select(GetPartyTypeContactListGroupsCommand.class).get();
14164
14165            commandForm.setPartyTypeName(partyTypeName);
14166            commandForm.setContactListGroupName(contactListGroupName);
14167
14168            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14169            if(totalEntities == null) {
14170                data = Connections.emptyConnection();
14171            } else {
14172                try(var objectLimiter = new ObjectLimiter(env, PartyTypeContactListGroupConstants.COMPONENT_VENDOR_NAME, PartyTypeContactListGroupConstants.ENTITY_TYPE_NAME, totalEntities)) {
14173                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14174
14175                    var partyTypeContactListGroups = entities.stream()
14176                            .map(PartyTypeContactListGroupObject::new)
14177                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14178
14179                    data = new CountedObjects<>(objectLimiter, partyTypeContactListGroups);
14180                }
14181            }
14182        } catch (NamingException ex) {
14183            throw new RuntimeException(ex);
14184        }
14185
14186        return data;
14187    }
14188
14189    @GraphQLField
14190    @GraphQLName("contactListType")
14191    static ContactListTypeObject contactListType(final DataFetchingEnvironment env,
14192            @GraphQLName("contactListTypeName") final String contactListTypeName,
14193            @GraphQLName("id") @GraphQLID final String id) {
14194        ContactListType contactListType;
14195
14196        try {
14197            var commandForm = ContactListUtil.getHome().getGetContactListTypeForm();
14198
14199            commandForm.setContactListTypeName(contactListTypeName);
14200            commandForm.setUuid(id);
14201
14202            contactListType = CDI.current().select(GetContactListTypeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14203        } catch (NamingException ex) {
14204            throw new RuntimeException(ex);
14205        }
14206
14207        return contactListType == null ? null : new ContactListTypeObject(contactListType);
14208    }
14209
14210    @GraphQLField
14211    @GraphQLName("contactListTypes")
14212    @GraphQLNonNull
14213    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14214    static CountingPaginatedData<ContactListTypeObject> contactListTypes(final DataFetchingEnvironment env) {
14215        CountingPaginatedData<ContactListTypeObject> data;
14216
14217        try {
14218            var commandForm = ContactListUtil.getHome().getGetContactListTypesForm();
14219            var command = CDI.current().select(GetContactListTypesCommand.class).get();
14220
14221            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14222            if(totalEntities == null) {
14223                data = Connections.emptyConnection();
14224            } else {
14225                try(var objectLimiter = new ObjectLimiter(env, ContactListTypeConstants.COMPONENT_VENDOR_NAME, ContactListTypeConstants.ENTITY_TYPE_NAME, totalEntities)) {
14226                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14227
14228                    var contactListTypes = entities.stream()
14229                            .map(ContactListTypeObject::new)
14230                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14231
14232                    data = new CountedObjects<>(objectLimiter, contactListTypes);
14233                }
14234            }
14235        } catch (NamingException ex) {
14236            throw new RuntimeException(ex);
14237        }
14238
14239        return data;
14240    }
14241
14242    @GraphQLField
14243    @GraphQLName("contactList")
14244    static ContactListObject contactList(final DataFetchingEnvironment env,
14245            @GraphQLName("contactListName") final String contactListName,
14246            @GraphQLName("id") @GraphQLID final String id) {
14247        ContactList contactList;
14248
14249        try {
14250            var commandForm = ContactListUtil.getHome().getGetContactListForm();
14251
14252            commandForm.setContactListName(contactListName);
14253            commandForm.setUuid(id);
14254
14255            contactList = CDI.current().select(GetContactListCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14256        } catch (NamingException ex) {
14257            throw new RuntimeException(ex);
14258        }
14259
14260        return contactList == null ? null : new ContactListObject(contactList);
14261    }
14262
14263    @GraphQLField
14264    @GraphQLName("contactLists")
14265    @GraphQLNonNull
14266    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14267    static CountingPaginatedData<ContactListObject> contactLists(final DataFetchingEnvironment env) {
14268        CountingPaginatedData<ContactListObject> data;
14269
14270        try {
14271            var commandForm = ContactListUtil.getHome().getGetContactListsForm();
14272            var command = CDI.current().select(GetContactListsCommand.class).get();
14273
14274            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14275            if(totalEntities == null) {
14276                data = Connections.emptyConnection();
14277            } else {
14278                try(var objectLimiter = new ObjectLimiter(env, ContactListConstants.COMPONENT_VENDOR_NAME, ContactListConstants.ENTITY_TYPE_NAME, totalEntities)) {
14279                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14280
14281                    var contactLists = entities.stream()
14282                            .map(ContactListObject::new)
14283                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14284
14285                    data = new CountedObjects<>(objectLimiter, contactLists);
14286                }
14287            }
14288        } catch (NamingException ex) {
14289            throw new RuntimeException(ex);
14290        }
14291
14292        return data;
14293    }
14294
14295    @GraphQLField
14296    @GraphQLName("customerTypeContactList")
14297    static CustomerTypeContactListObject customerTypeContactList(final DataFetchingEnvironment env,
14298            @GraphQLName("customerTypeName") @GraphQLNonNull final String customerTypeName,
14299            @GraphQLName("contactListName") @GraphQLNonNull final String contactListName) {
14300        CustomerTypeContactList customerTypeContactList;
14301
14302        try {
14303            var commandForm = ContactListUtil.getHome().getGetCustomerTypeContactListForm();
14304
14305            commandForm.setCustomerTypeName(customerTypeName);
14306            commandForm.setContactListName(contactListName);
14307
14308            customerTypeContactList = CDI.current().select(GetCustomerTypeContactListCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14309        } catch (NamingException ex) {
14310            throw new RuntimeException(ex);
14311        }
14312
14313        return customerTypeContactList == null ? null : new CustomerTypeContactListObject(customerTypeContactList);
14314    }
14315
14316    @GraphQLField
14317    @GraphQLName("customerTypeContactLists")
14318    @GraphQLNonNull
14319    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14320    static CountingPaginatedData<CustomerTypeContactListObject> customerTypeContactLists(final DataFetchingEnvironment env,
14321            @GraphQLName("customerTypeName") final String customerTypeName,
14322            @GraphQLName("contactListName") final String contactListName) {
14323        CountingPaginatedData<CustomerTypeContactListObject> data;
14324
14325        try {
14326            var commandForm = ContactListUtil.getHome().getGetCustomerTypeContactListsForm();
14327            var command = CDI.current().select(GetCustomerTypeContactListsCommand.class).get();
14328
14329            commandForm.setCustomerTypeName(customerTypeName);
14330            commandForm.setContactListName(contactListName);
14331
14332            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14333            if(totalEntities == null) {
14334                data = Connections.emptyConnection();
14335            } else {
14336                try(var objectLimiter = new ObjectLimiter(env, CustomerTypeContactListConstants.COMPONENT_VENDOR_NAME, CustomerTypeContactListConstants.ENTITY_TYPE_NAME, totalEntities)) {
14337                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14338
14339                    var customerTypeContactLists = entities.stream()
14340                            .map(CustomerTypeContactListObject::new)
14341                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14342
14343                    data = new CountedObjects<>(objectLimiter, customerTypeContactLists);
14344                }
14345            }
14346        } catch (NamingException ex) {
14347            throw new RuntimeException(ex);
14348        }
14349
14350        return data;
14351    }
14352
14353    @GraphQLField
14354    @GraphQLName("partyTypeContactList")
14355    static PartyTypeContactListObject partyTypeContactList(final DataFetchingEnvironment env,
14356            @GraphQLName("partyTypeName") @GraphQLNonNull final String partyTypeName,
14357            @GraphQLName("contactListName") @GraphQLNonNull final String contactListName) {
14358        PartyTypeContactList partyTypeContactList;
14359
14360        try {
14361            var commandForm = ContactListUtil.getHome().getGetPartyTypeContactListForm();
14362
14363            commandForm.setPartyTypeName(partyTypeName);
14364            commandForm.setContactListName(contactListName);
14365
14366            partyTypeContactList = CDI.current().select(GetPartyTypeContactListCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14367        } catch (NamingException ex) {
14368            throw new RuntimeException(ex);
14369        }
14370
14371        return partyTypeContactList == null ? null : new PartyTypeContactListObject(partyTypeContactList);
14372    }
14373
14374    @GraphQLField
14375    @GraphQLName("partyTypeContactLists")
14376    @GraphQLNonNull
14377    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14378    static CountingPaginatedData<PartyTypeContactListObject> partyTypeContactLists(final DataFetchingEnvironment env,
14379            @GraphQLName("partyTypeName") final String partyTypeName,
14380            @GraphQLName("contactListName") final String contactListName) {
14381        CountingPaginatedData<PartyTypeContactListObject> data;
14382
14383        try {
14384            var commandForm = ContactListUtil.getHome().getGetPartyTypeContactListsForm();
14385            var command = CDI.current().select(GetPartyTypeContactListsCommand.class).get();
14386
14387            commandForm.setPartyTypeName(partyTypeName);
14388            commandForm.setContactListName(contactListName);
14389
14390            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14391            if(totalEntities == null) {
14392                data = Connections.emptyConnection();
14393            } else {
14394                try(var objectLimiter = new ObjectLimiter(env, PartyTypeContactListConstants.COMPONENT_VENDOR_NAME, PartyTypeContactListConstants.ENTITY_TYPE_NAME, totalEntities)) {
14395                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14396
14397                    var partyTypeContactLists = entities.stream()
14398                            .map(PartyTypeContactListObject::new)
14399                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14400
14401                    data = new CountedObjects<>(objectLimiter, partyTypeContactLists);
14402                }
14403            }
14404        } catch (NamingException ex) {
14405            throw new RuntimeException(ex);
14406        }
14407
14408        return data;
14409    }
14410
14411    @GraphQLField
14412    @GraphQLName("partyContactList")
14413    static PartyContactListObject partyContactList(final DataFetchingEnvironment env,
14414            @GraphQLName("partyName") final String partyName,
14415            @GraphQLName("contactListName") final String contactListName,
14416            @GraphQLName("id") @GraphQLID final String id) {
14417        PartyContactList partyContactList;
14418
14419        try {
14420            var commandForm = ContactListUtil.getHome().getGetPartyContactListForm();
14421
14422            commandForm.setPartyName(partyName);
14423            commandForm.setContactListName(contactListName);
14424            commandForm.setUuid(id);
14425
14426            partyContactList = CDI.current().select(GetPartyContactListCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14427        } catch (NamingException ex) {
14428            throw new RuntimeException(ex);
14429        }
14430
14431        return partyContactList == null ? null : new PartyContactListObject(partyContactList);
14432    }
14433
14434    @GraphQLField
14435    @GraphQLName("partyContactLists")
14436    @GraphQLNonNull
14437    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14438    static CountingPaginatedData<PartyContactListObject> partyContactLists(final DataFetchingEnvironment env,
14439            @GraphQLName("partyName") final String partyName,
14440            @GraphQLName("contactListName") final String contactListName) {
14441        CountingPaginatedData<PartyContactListObject> data;
14442
14443        try {
14444            var commandForm = ContactListUtil.getHome().getGetPartyContactListsForm();
14445            var command = CDI.current().select(GetPartyContactListsCommand.class).get();
14446
14447            commandForm.setPartyName(partyName);
14448            commandForm.setContactListName(contactListName);
14449
14450            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14451            if(totalEntities == null) {
14452                data = Connections.emptyConnection();
14453            } else {
14454                try(var objectLimiter = new ObjectLimiter(env, PartyContactListConstants.COMPONENT_VENDOR_NAME, PartyContactListConstants.ENTITY_TYPE_NAME, totalEntities)) {
14455                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14456
14457                    var partyContactLists = entities.stream()
14458                            .map(PartyContactListObject::new)
14459                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14460
14461                    data = new CountedObjects<>(objectLimiter, partyContactLists);
14462                }
14463            }
14464        } catch (NamingException ex) {
14465            throw new RuntimeException(ex);
14466        }
14467
14468        return data;
14469    }
14470
14471    @GraphQLField
14472    @GraphQLName("contactListContactMechanismPurpose")
14473    static ContactListContactMechanismPurposeObject contactListContactMechanismPurpose(final DataFetchingEnvironment env,
14474            @GraphQLName("contactListName") final String contactListName,
14475            @GraphQLName("contactMechanismPurposeName") final String contactMechanismPurposeName) {
14476        ContactListContactMechanismPurpose contactListContactMechanismPurpose = null;
14477
14478        try {
14479            var commandForm = ContactListUtil.getHome().getGetContactListContactMechanismPurposeForm();
14480
14481            commandForm.setContactListName(contactListName);
14482            commandForm.setContactMechanismPurposeName(contactMechanismPurposeName);
14483
14484            contactListContactMechanismPurpose = CDI.current().select(GetContactListContactMechanismPurposeCommand.class).get().getEntityForGraphQl(getUserVisitPK(env), commandForm);
14485        } catch (NamingException ex) {
14486            throw new RuntimeException(ex);
14487        }
14488
14489        return contactListContactMechanismPurpose == null ? null : new ContactListContactMechanismPurposeObject(contactListContactMechanismPurpose);
14490    }
14491
14492    @GraphQLField
14493    @GraphQLName("contactListContactMechanismPurposes")
14494    @GraphQLNonNull
14495    @GraphQLConnection(connectionFetcher = CountingDataConnectionFetcher.class)
14496    static CountingPaginatedData<ContactListContactMechanismPurposeObject> contactListContactMechanismPurposes(final DataFetchingEnvironment env,
14497            @GraphQLName("contactListName") final String contactListName) {
14498        CountingPaginatedData<ContactListContactMechanismPurposeObject> data;
14499
14500        try {
14501            var commandForm = ContactListUtil.getHome().getGetContactListContactMechanismPurposesForm();
14502            var command = CDI.current().select(GetContactListContactMechanismPurposesCommand.class).get();
14503
14504            commandForm.setContactListName(contactListName);
14505
14506            var totalEntities = command.getTotalEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14507            if(totalEntities == null) {
14508                data = Connections.emptyConnection();
14509            } else {
14510                try(var objectLimiter = new ObjectLimiter(env, ContactListContactMechanismPurposeConstants.COMPONENT_VENDOR_NAME, ContactListContactMechanismPurposeConstants.ENTITY_TYPE_NAME, totalEntities)) {
14511                    var entities = command.getEntitiesForGraphQl(getUserVisitPK(env), commandForm);
14512
14513                    var contactListContactMechanismPurposes = entities.stream()
14514                            .map(ContactListContactMechanismPurposeObject::new)
14515                            .collect(Collectors.toCollection(() -> new ArrayList<>(entities.size())));
14516
14517                    data = new CountedObjects<>(objectLimiter, contactListContactMechanismPurposes);
14518                }
14519            }
14520        } catch (NamingException ex) {
14521            throw new RuntimeException(ex);
14522        }
14523
14524        return data;
14525    }
14526
14527}