Subversion Repositories SmartDukaan

Rev

Rev 1061 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1061 Rev 1314
Line 7... Line 7...
7
import java.util.List;
7
import java.util.List;
8
 
8
 
9
import in.shop2020.metamodel.util.MetaModelComponent;
9
import in.shop2020.metamodel.util.MetaModelComponent;
10
 
10
 
11
/**
11
/**
12
 * @author naveen
12
 * @author rajveer
13
 *
13
 *
14
 */
14
 */
15
public class CategoryFacetDefinition extends MetaModelComponent {
15
public class CategoryFacetDefinition extends MetaModelComponent {
16
 
16
 
17
	/**
17
	/**
Line 23... Line 23...
23
	 * Category ID
23
	 * Category ID
24
	 */
24
	 */
25
	private long categoryID;
25
	private long categoryID;
26
	
26
	
27
	/**
27
	/**
28
	 * List of facet rules for the category ID
28
	 * List of facet for the category ID
29
	 */
29
	 */
30
	private List<FacetRuleDefinition> facetRuleDefinitions;
30
	private List<FacetDefinition> facetDefinitions;
31
 
31
 
32
	/**
32
	/**
33
	 * 
33
	 * 
34
	 */
34
	 */
35
	public CategoryFacetDefinition(long categoryID) {
35
	public CategoryFacetDefinition(long categoryID) {
Line 42... Line 42...
42
	public long getCategoryID() {
42
	public long getCategoryID() {
43
		return this.categoryID;
43
		return this.categoryID;
44
	}
44
	}
45
	
45
	
46
	/**
46
	/**
47
	 * @param facetRuleDefinitions the facetRuleDefinitions to set
47
	 * @param facetDefinitions the facetDefinitions to set
48
	 */
48
	 */
49
	public void setFacetRuleDefinitions(List<FacetRuleDefinition> facetRuleDefinitions) {
49
	public void setFacetDefinitions(List<FacetDefinition> facetDefinitions) {
50
		this.facetRuleDefinitions = facetRuleDefinitions;
50
		this.facetDefinitions = facetDefinitions;
51
	}
51
	}
52
 
52
 
53
	/**
53
	/**
54
	 * @return the facetRuleDefinitions
54
	 * @return the facetDefinitions
55
	 */
55
	 */
56
	public List<FacetRuleDefinition> getFacetRuleDefinitions() {
56
	public List<FacetDefinition> getFacetDefinitions() {
57
		return facetRuleDefinitions;
57
		return facetDefinitions;
58
	}
58
	}
59
	
59
	
60
	/**
60
	/**
61
	 * Utility method to add new FacetRuleDefinition objects
61
	 * Utility method to add new FacetDefinition objects
62
	 * 
62
	 * 
63
	 * @param facetRuleDef
63
	 * @param facetDef
64
	 */
64
	 */
65
	public void addFacetRuleDefinition(FacetRuleDefinition facetRuleDef) {
65
	public void addFacetDefinition(FacetDefinition facetRuleDef) {
66
		if(this.facetRuleDefinitions == null) {
66
		if(this.facetDefinitions == null) {
67
			this.facetRuleDefinitions = new ArrayList<FacetRuleDefinition>();
67
			this.facetDefinitions = new ArrayList<FacetDefinition>();
68
		}
68
		}
69
		
69
		
70
		this.facetRuleDefinitions.add(facetRuleDef);
70
		this.facetDefinitions.add(facetRuleDef);
71
	}
71
	}
72
	
72
	
73
	/**
73
	/**
74
	 * Utility method to append list of FacetRuleDefinition objects
74
	 * Utility method to append list of FacetDefinition objects
75
	 * 
75
	 * 
76
	 * @param facetRuleDefs
76
	 * @param facetDefs
77
	 */
77
	 */
78
	public void appendFacetRuleDefinitions(
78
	public void appendFacetDefinitions(List<FacetDefinition> facetDefs) {
79
			List<FacetRuleDefinition> facetRuleDefs) {
-
 
80
		if(this.facetRuleDefinitions == null) {
79
		if(this.facetDefinitions == null) {
81
			this.facetRuleDefinitions = new ArrayList<FacetRuleDefinition>();
80
			this.facetDefinitions = new ArrayList<FacetDefinition>();
82
		}
81
		}
83
		
82
		
84
		this.facetRuleDefinitions.addAll(facetRuleDefs);
83
		this.facetDefinitions.addAll(facetDefs);
85
	}
84
	}
86
 
85
 
87
	/* (non-Javadoc)
86
	/* (non-Javadoc)
88
	 * @see java.lang.Object#toString()
87
	 * @see java.lang.Object#toString()
89
	 */
88
	 */
90
	@Override
89
	@Override
91
	public String toString() {
90
	public String toString() {
92
		return "CategoryFacetDefinition [categoryID=" + categoryID
91
		return "CategoryFacetDefinition [categoryID=" + categoryID
93
				+ ", facetRuleDefinitions=" + facetRuleDefinitions + "]";
92
				+ ", facetDefinitions=" + facetDefinitions + "]";
94
	}
93
	}
95
 
94
 
96
}
95
}