Rev 45 | Rev 102 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
/****/package in.shop2020.metamodel.util;import in.shop2020.metamodel.definitions.BulletDefinition;import in.shop2020.metamodel.definitions.FeatureDefinition;/*** Utility class that supports FeatureDefinition class. All related* objects are fetched from database and aggregated here.** @author naveen**/public class ExpandedFeatureDefinition extends FeatureDefinition {/****/private static final long serialVersionUID = 1L;/*** Expanded from BulletDefinition ID*/private ExpandedBulletDefinition expandedBulletDefinition;/*** Takes FeatureDefinition object as input and converts all references* into corresponding detail objects** @param featureDefintion Feature Definition object* @throws Exception*/public ExpandedFeatureDefinition(FeatureDefinition featureDefinition)throws Exception {super(featureDefinition.getID(), featureDefinition.getLabel());// Copy rest of the propertiesthis.setAllowsBlank(featureDefinition.allowsBlank());this.setDescription(featureDefinition.getDescription());this.setBulletDefinition(featureDefinition.getBulletDefinition());// Expand BulletDefinitionBulletDefinition bulletDef = featureDefinition.getBulletDefinition();this.expandedBulletDefinition = new ExpandedBulletDefinition(bulletDef);}/*** @return the expandedBulletDefinition ExpandedBulletDefinition object*/public ExpandedBulletDefinition getExpandedBulletDefinition() {return expandedBulletDefinition;}/* (non-Javadoc)* @see java.lang.Object#toString()*/@Overridepublic String toString() {return "ExpandedFeatureDefinition [expandedBulletDefinition="+ expandedBulletDefinition + ", allowsBlank()=" + allowsBlank()+ ", getBulletDefinition()=" + getBulletDefinition()+ ", getDescription()=" + getDescription() + ", getLabel()="+ getLabel() + ", getID()=" + getID() + "]";}}