/** * Validates an attribute value list key. * * @param attributeValueListKey the attribute value list key */ public void validateAttributeValueListKey(AttributeValueListKey attributeValueListKey) { // Validate. Assert.notNull(attributeValueListKey, "An attribute value list key must be specified."); attributeValueListKey.setNamespace(alternateKeyHelper.validateStringParameter("namespace", attributeValueListKey.getNamespace())); attributeValueListKey.setAttributeValueListName( alternateKeyHelper.validateStringParameter("An", "attribute value list name", attributeValueListKey.getAttributeValueListName())); } }
/** * Validates an attribute value list key. * * @param attributeValueListKey the attribute value list key */ public void validateAttributeValueListKey(AttributeValueListKey attributeValueListKey) { // Validate. Assert.notNull(attributeValueListKey, "An attribute value list key must be specified."); attributeValueListKey.setNamespace(alternateKeyHelper.validateStringParameter("namespace", attributeValueListKey.getNamespace())); attributeValueListKey.setAttributeValueListName( alternateKeyHelper.validateStringParameter("An", "attribute value list name", attributeValueListKey.getAttributeValueListName())); } }
/** * Creates the allowed attribute values information from the persisted entities. * * @param attributeValueListEntity the attribute value list entity * @param allowedAttributeValueEntities the list of allowed attribute value entities * * @return the allowed attribute values information */ private AllowedAttributeValuesInformation createAllowedAttributeValuesInformationFromEntities(AttributeValueListEntity attributeValueListEntity, Collection<AllowedAttributeValueEntity> allowedAttributeValueEntities) { // Create an allowed attribute values information instance. AllowedAttributeValuesInformation allowedAttributeValuesInformation = new AllowedAttributeValuesInformation(); // Add the attribute value list key. AttributeValueListKey attributeValueListKey = new AttributeValueListKey(); allowedAttributeValuesInformation.setAttributeValueListKey(attributeValueListKey); attributeValueListKey.setNamespace(attributeValueListEntity.getNamespace().getCode()); attributeValueListKey.setAttributeValueListName(attributeValueListEntity.getName()); // Add the allowed attribute values. List<String> allowedAttributeValues = new ArrayList<>(); allowedAttributeValuesInformation.setAllowedAttributeValues(allowedAttributeValues); allowedAttributeValueEntities.forEach(allowedAttributeValueEntity -> { allowedAttributeValues.add(allowedAttributeValueEntity.getAllowedAttributeValue()); }); return allowedAttributeValuesInformation; }
/** * Creates the allowed attribute values information from the persisted entities. * * @param attributeValueListEntity the attribute value list entity * @param allowedAttributeValueEntities the list of allowed attribute value entities * * @return the allowed attribute values information */ private AllowedAttributeValuesInformation createAllowedAttributeValuesInformationFromEntities(AttributeValueListEntity attributeValueListEntity, Collection<AllowedAttributeValueEntity> allowedAttributeValueEntities) { // Create an allowed attribute values information instance. AllowedAttributeValuesInformation allowedAttributeValuesInformation = new AllowedAttributeValuesInformation(); // Add the attribute value list key. AttributeValueListKey attributeValueListKey = new AttributeValueListKey(); allowedAttributeValuesInformation.setAttributeValueListKey(attributeValueListKey); attributeValueListKey.setNamespace(attributeValueListEntity.getNamespace().getCode()); attributeValueListKey.setAttributeValueListName(attributeValueListEntity.getName()); // Add the allowed attribute values. List<String> allowedAttributeValues = new ArrayList<>(); allowedAttributeValuesInformation.setAllowedAttributeValues(allowedAttributeValues); allowedAttributeValueEntities.forEach(allowedAttributeValueEntity -> { allowedAttributeValues.add(allowedAttributeValueEntity.getAllowedAttributeValue()); }); return allowedAttributeValuesInformation; }
/** * Creates the attribute value list from the persisted entity. * * @param attributeValueListEntity the attribute value list entity * * @return the attribute value list */ public AttributeValueList createAttributeValueListFromEntity(AttributeValueListEntity attributeValueListEntity) { // Create the attribute value list. AttributeValueList attributeValueList = new AttributeValueList(); AttributeValueListKey attributeValueListKey = new AttributeValueListKey(); attributeValueListKey.setNamespace(attributeValueListEntity.getNamespace().getCode()); attributeValueListKey.setAttributeValueListName(attributeValueListEntity.getName()); attributeValueList.setAttributeValueListKey(attributeValueListKey); attributeValueList.setId(attributeValueListEntity.getId()); return attributeValueList; } }
/** * Creates the attribute value list from the persisted entity. * * @param attributeValueListEntity the attribute value list entity * * @return the attribute value list */ public AttributeValueList createAttributeValueListFromEntity(AttributeValueListEntity attributeValueListEntity) { // Create the attribute value list. AttributeValueList attributeValueList = new AttributeValueList(); AttributeValueListKey attributeValueListKey = new AttributeValueListKey(); attributeValueListKey.setNamespace(attributeValueListEntity.getNamespace().getCode()); attributeValueListKey.setAttributeValueListName(attributeValueListEntity.getName()); attributeValueList.setAttributeValueListKey(attributeValueListKey); attributeValueList.setId(attributeValueListEntity.getId()); return attributeValueList; } }
sourceNamespace = this.getNamespace(); String copyNamespace = ((String) strategy.copy(LocatorUtils.property(locator, "namespace", sourceNamespace), sourceNamespace, (this.namespace!= null))); copy.setNamespace(copyNamespace); } else { if (namespaceShouldBeCopiedAndSet == Boolean.FALSE) {
sourceNamespace = this.getNamespace(); String copyNamespace = ((String) strategy.copy(LocatorUtils.property(locator, "namespace", sourceNamespace), sourceNamespace, (this.namespace!= null))); copy.setNamespace(copyNamespace); } else { if (namespaceShouldBeCopiedAndSet == Boolean.FALSE) {
sourceNamespace = this.getNamespace(); String copyNamespace = ((String) strategy.copy(LocatorUtils.property(locator, "namespace", sourceNamespace), sourceNamespace, (this.namespace!= null))); copy.setNamespace(copyNamespace); } else { if (namespaceShouldBeCopiedAndSet == Boolean.FALSE) {