Package org.zeroexchange.model.resource.property

Examples of org.zeroexchange.model.resource.property.Property


        targetCategory.setAlias(sourceCategory.getAlias() != null ? sourceCategory.getAlias() :
            parent != null ? parent.getAlias() : null);
        Collection<XProperty> sourceProperties = sourceCategory.getProperties();
        Collection<Property> targetProperties = targetCategory.getProperties();
        for(XProperty sourceProperty: sourceProperties) {
            Property targetProperty = new Property();
            targetProperty.setCategory(targetCategory);
            targetProperty.setName(sourceProperty.getName());
            PropertyType propertyType = (PropertyType) propertyTypeDAO.getById(sourceProperty.getPropertyType());
            if(propertyType == null) {
                throw new BusinessLogicException("Property type is unknown: '" + sourceProperty.getPropertyType() + "'");
            }
            targetProperty.setPropertyType(propertyType);
            targetProperty.setDictionary(sourceProperty.getDictonary());
           
            //Setup property titles
            PropertyStrings propertyStrings = new PropertyStrings();
            propertyStrings.setTarget(targetProperty);
            for(XLocalizedString title: sourceProperty.getTitles()) {
                LocalizationUtils.setValue(propertyStrings, title.getValue(), title.getLang());
            }
            targetProperty.setTitles(propertyStrings);
            targetProperty.setContainerType(0);
            targetProperties.add(targetProperty);
        }
       
        //Setup category titles
        CategoryStrings categoryStrings = new CategoryStrings();
View Full Code Here

TOP

Related Classes of org.zeroexchange.model.resource.property.Property

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.