@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (blockedId != null ? blockedId.hashCode() : 0); result = 31 * result + (stateName != null ? stateName.hashCode() : 0); result = 31 * result + (service != null ? service.hashCode() : 0); result = 31 * result + (blockChange ? 1 : 0); result = 31 * result + (blockEntitlement ? 1 : 0); result = 31 * result + (blockBilling ? 1 : 0); result = 31 * result + (effectiveDate != null ? effectiveDate.hashCode() : 0); result = 31 * result + (type != null ? type.hashCode() : 0); result = 31 * result + (totalOrdering != null ? totalOrdering.hashCode() : 0); return result; }
protected Response addBlockingState(final BlockingStateJson json, final UUID accountId, final UUID blockableId, final BlockingStateType type, final String requestedDate, final List<String> pluginPropertiesString, final String createdBy, final String reason, final String comment, final HttpServletRequest request, @Nullable final UriInfo uriInfo) throws SubscriptionApiException, EntitlementApiException, AccountApiException { final Iterable<PluginProperty> pluginProperties = extractPluginProperties(pluginPropertiesString); final CallContext callContext = context.createCallContextNoAccountId(createdBy, reason, comment, request); final boolean isBlockBilling = (json.isBlockBilling() != null && json.isBlockBilling()); final boolean isBlockEntitlement = (json.isBlockEntitlement() != null && json.isBlockEntitlement()); final boolean isBlockChange = (json.isBlockChange() != null && json.isBlockChange()); final LocalDate resolvedRequestedDate = toLocalDate(requestedDate); final BlockingState input = new DefaultBlockingState(blockableId, type, json.getStateName(), json.getService(), isBlockChange, isBlockEntitlement, isBlockBilling, null); subscriptionApi.addBlockingState(input, resolvedRequestedDate, pluginProperties, callContext); return uriInfo != null ? uriBuilder.buildResponse(uriInfo, AccountResource.class, "getBlockingStates", accountId, ImmutableMap.<String, String>of(QUERY_BLOCKING_STATE_TYPES, type.name()) , request) : null; }
@Override public int hashCode() { int result = blockedId != null ? blockedId.hashCode() : 0; result = 31 * result + (stateName != null ? stateName.hashCode() : 0); result = 31 * result + (service != null ? service.hashCode() : 0); result = 31 * result + (isBlockChange ? 1 : 0); result = 31 * result + (isBlockEntitlement ? 1 : 0); result = 31 * result + (isBlockBilling ? 1 : 0); result = 31 * result + (effectiveDate != null ? effectiveDate.hashCode() : 0); result = 31 * result + (type != null ? type.hashCode() : 0); return result; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (blockedId != null ? blockedId.hashCode() : 0); result = 31 * result + (stateName != null ? stateName.hashCode() : 0); result = 31 * result + (service != null ? service.hashCode() : 0); result = 31 * result + (blockChange ? 1 : 0); result = 31 * result + (blockEntitlement ? 1 : 0); result = 31 * result + (blockBilling ? 1 : 0); result = 31 * result + (effectiveDate != null ? effectiveDate.hashCode() : 0); result = 31 * result + (type != null ? type.hashCode() : 0); result = 31 * result + (totalOrdering != null ? totalOrdering.hashCode() : 0); return result; }