Converts the soap model instance into a normal model instance.

@param soapModel the soap model instance to convert
@return the normal model instance
764076
public static CommerceNotificationQueueEntry toModel(
		CommerceNotificationQueueEntrySoap soapModel) {
		if (soapModel == null) {
			return null;
		}

		CommerceNotificationQueueEntry model = new CommerceNotificationQueueEntryImpl();

		model.setCommerceNotificationQueueEntryId(soapModel.getCommerceNotificationQueueEntryId());
		model.setGroupId(soapModel.getGroupId());
		model.setCompanyId(soapModel.getCompanyId());
		model.setUserId(soapModel.getUserId());
		model.setUserName(soapModel.getUserName());
		model.setCreateDate(soapModel.getCreateDate());
		model.setModifiedDate(soapModel.getModifiedDate());
		model.setCommerceNotificationTemplateId(soapModel.getCommerceNotificationTemplateId());
		model.setFrom(soapModel.getFrom());
		model.setFromName(soapModel.getFromName());
		model.setTo(soapModel.getTo());
		model.setToName(soapModel.getToName());
		model.setCc(soapModel.getCc());
		model.setBcc(soapModel.getBcc());
		model.setSubject(soapModel.getSubject());
		model.setBody(soapModel.getBody());
		model.setPriority(soapModel.getPriority());
		model.setSent(soapModel.isSent());
		model.setSentDate(soapModel.getSentDate());

		return model;
	}
414652
public static List<CommercePriceListAccountRel> toModels(
		CommercePriceListAccountRelSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CommercePriceListAccountRel> models = new ArrayList<CommercePriceListAccountRel>(soapModels.length);

		for (CommercePriceListAccountRelSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
535669
public static List<CommerceNotificationTemplateUserSegmentRel> toModels(
		CommerceNotificationTemplateUserSegmentRelSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CommerceNotificationTemplateUserSegmentRel> models = new ArrayList<CommerceNotificationTemplateUserSegmentRel>(soapModels.length);

		for (CommerceNotificationTemplateUserSegmentRelSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
382672
public static List<CommerceAccountOrganizationRel> toModels(
		CommerceAccountOrganizationRelSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CommerceAccountOrganizationRel> models = new ArrayList<CommerceAccountOrganizationRel>(soapModels.length);

		for (CommerceAccountOrganizationRelSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
1065071
public static List<CommerceTaxFixedRate> toModels(
		CommerceTaxFixedRateSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CommerceTaxFixedRate> models = new ArrayList<CommerceTaxFixedRate>(soapModels.length);

		for (CommerceTaxFixedRateSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
301800
public static List<CommercePriceListUserSegmentEntryRel> toModels(
		CommercePriceListUserSegmentEntryRelSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CommercePriceListUserSegmentEntryRel> models = new ArrayList<CommercePriceListUserSegmentEntryRel>(soapModels.length);

		for (CommercePriceListUserSegmentEntryRelSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
236570
public static CommerceShippingMethod toModel(
		CommerceShippingMethodSoap soapModel) {
		if (soapModel == null) {
			return null;
		}

		CommerceShippingMethod model = new CommerceShippingMethodImpl();

		model.setCommerceShippingMethodId(soapModel.getCommerceShippingMethodId());
		model.setGroupId(soapModel.getGroupId());
		model.setCompanyId(soapModel.getCompanyId());
		model.setUserId(soapModel.getUserId());
		model.setUserName(soapModel.getUserName());
		model.setCreateDate(soapModel.getCreateDate());
		model.setModifiedDate(soapModel.getModifiedDate());
		model.setName(soapModel.getName());
		model.setDescription(soapModel.getDescription());
		model.setImageId(soapModel.getImageId());
		model.setEngineKey(soapModel.getEngineKey());
		model.setPriority(soapModel.getPriority());
		model.setActive(soapModel.isActive());

		return model;
	}
558061
public static List<CommerceShippingFixedOptionRel> toModels(
		CommerceShippingFixedOptionRelSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CommerceShippingFixedOptionRel> models = new ArrayList<CommerceShippingFixedOptionRel>(soapModels.length);

		for (CommerceShippingFixedOptionRelSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
730044
public static InstanceChange<ServiceInstance> toServiceInstanceChange(InstanceChange<ModelServiceInstance> modelInstanceChange){
        Objects.requireNonNull(modelInstanceChange);
        return new InstanceChange<ServiceInstance>(modelInstanceChange.changedTimeMills,
                modelInstanceChange.serviceName,
                modelInstanceChange.changeType,
                modelInstanceChange.from==null?null:toServiceInstance(modelInstanceChange.from),
                modelInstanceChange.to==null?null:toServiceInstance(modelInstanceChange.to));
    }
745429
public static List<CommerceNotificationQueueEntry> toModels(
		CommerceNotificationQueueEntrySoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CommerceNotificationQueueEntry> models = new ArrayList<CommerceNotificationQueueEntry>(soapModels.length);

		for (CommerceNotificationQueueEntrySoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
708689
@Override
    public ModelNode cloneModel()
    {
        int len = mSubModels.length;
        ModelNode[] newModels = new ModelNode[len];
        for (int i = 0; i < len; ++i) {
            newModels[i] = mSubModels[i].cloneModel();
        }
        return new ChoiceModel(newModels);
    }
134738
public static List<CommerceDiscountRel> toModels(
		CommerceDiscountRelSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CommerceDiscountRel> models = new ArrayList<CommerceDiscountRel>(soapModels.length);

		for (CommerceDiscountRelSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
410792
public static List<CommerceAccountUserRel> toModels(
		CommerceAccountUserRelSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CommerceAccountUserRel> models = new ArrayList<CommerceAccountUserRel>(soapModels.length);

		for (CommerceAccountUserRelSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
1224427
public ModelService getModelService(String serviceName) {
        ModelService service = null;
        try{
            service = getDirectoryServiceClient().lookupService(serviceName);
        }catch(ServiceException se){
            if (se.getErrorCode()==ErrorCode.SERVICE_DOES_NOT_EXIST){
                LOGGER.error(se.getMessage());
            }else {
                LOGGER.error("Error when getModelService", se);
            }
            throw se;
        }
        return service;
    }
1192283
public static CPOptionCategory toModel(CPOptionCategorySoap soapModel) {
		if (soapModel == null) {
			return null;
		}

		CPOptionCategory model = new CPOptionCategoryImpl();

		model.setUuid(soapModel.getUuid());
		model.setCPOptionCategoryId(soapModel.getCPOptionCategoryId());
		model.setGroupId(soapModel.getGroupId());
		model.setCompanyId(soapModel.getCompanyId());
		model.setUserId(soapModel.getUserId());
		model.setUserName(soapModel.getUserName());
		model.setCreateDate(soapModel.getCreateDate());
		model.setModifiedDate(soapModel.getModifiedDate());
		model.setTitle(soapModel.getTitle());
		model.setDescription(soapModel.getDescription());
		model.setPriority(soapModel.getPriority());
		model.setKey(soapModel.getKey());
		model.setLastPublishDate(soapModel.getLastPublishDate());

		return model;
	}
833176
public static List<CPDefinition> toModels(CPDefinitionSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CPDefinition> models = new ArrayList<CPDefinition>(soapModels.length);

		for (CPDefinitionSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
375763
public static CPDefinition toModel(CPDefinitionSoap soapModel) {
		if (soapModel == null) {
			return null;
		}

		CPDefinition model = new CPDefinitionImpl();

		model.setUuid(soapModel.getUuid());
		model.setExternalReferenceCode(soapModel.getExternalReferenceCode());
		model.setDefaultLanguageId(soapModel.getDefaultLanguageId());
		model.setCPDefinitionId(soapModel.getCPDefinitionId());
		model.setGroupId(soapModel.getGroupId());
		model.setCompanyId(soapModel.getCompanyId());
		model.setUserId(soapModel.getUserId());
		model.setUserName(soapModel.getUserName());
		model.setCreateDate(soapModel.getCreateDate());
		model.setModifiedDate(soapModel.getModifiedDate());
		model.setCProductId(soapModel.getCProductId());
		model.setCPTaxCategoryId(soapModel.getCPTaxCategoryId());
		model.setProductTypeName(soapModel.getProductTypeName());
		model.setAvailableIndividually(soapModel.isAvailableIndividually());
		model.setIgnoreSKUCombinations(soapModel.isIgnoreSKUCombinations());
		model.setShippable(soapModel.isShippable());
		model.setFreeShipping(soapModel.isFreeShipping());
		model.setShipSeparately(soapModel.isShipSeparately());
		model.setShippingExtraPrice(soapModel.getShippingExtraPrice());
		model.setWidth(soapModel.getWidth());
		model.setHeight(soapModel.getHeight());
		model.setDepth(soapModel.getDepth());
		model.setWeight(soapModel.getWeight());
		model.setTaxExempt(soapModel.isTaxExempt());
		model.setTelcoOrElectronics(soapModel.isTelcoOrElectronics());
		model.setDDMStructureKey(soapModel.getDDMStructureKey());
		model.setPublished(soapModel.isPublished());
		model.setDisplayDate(soapModel.getDisplayDate());
		model.setExpirationDate(soapModel.getExpirationDate());
		model.setLastPublishDate(soapModel.getLastPublishDate());
		model.setSubscriptionEnabled(soapModel.isSubscriptionEnabled());
		model.setSubscriptionLength(soapModel.getSubscriptionLength());
		model.setSubscriptionType(soapModel.getSubscriptionType());
		model.setSubscriptionTypeSettings(soapModel.getSubscriptionTypeSettings());
		model.setMaxSubscriptionCycles(soapModel.getMaxSubscriptionCycles());
		model.setVersion(soapModel.getVersion());
		model.setStatus(soapModel.getStatus());
		model.setStatusByUserId(soapModel.getStatusByUserId());
		model.setStatusByUserName(soapModel.getStatusByUserName());
		model.setStatusDate(soapModel.getStatusDate());

		return model;
	}