Subversion Repositories SmartDukaan

Rev

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

Rev 81 Rev 83
Line 947... Line 947...
947
			}
947
			}
948
		}
948
		}
949
		
949
		
950
		return null;
950
		return null;
951
	}
951
	}
-
 
952
	
-
 
953
	/**
-
 
954
	 * Returns list of facet definition IDs for given category ID
-
 
955
	 * 
-
 
956
	 * @param categoryID
-
 
957
	 * @return list of facet definition IDs
-
 
958
	 * @throws Exception 
-
 
959
	 */
-
 
960
	public List<Long> getFacetDefinitionIDs(long categoryID) throws Exception {
-
 
961
		List<Long> facetDefIDs = new ArrayList<Long>();
-
 
962
		
-
 
963
		CategoryFacetDefinition categoryFacetDef = 
-
 
964
			this.getCategoryFacetDefinition(categoryID);
-
 
965
		
-
 
966
		List<FacetRuleDefinition> facetRuleDefs = 
-
 
967
			categoryFacetDef.getFacetRuleDefinitions();
-
 
968
		
-
 
969
		for(FacetRuleDefinition facetRuleDef : facetRuleDefs) {
-
 
970
			facetDefIDs.add(new Long(facetRuleDef.getFacetDefinitionID()));
-
 
971
		}
-
 
972
		
-
 
973
		return facetDefIDs;
-
 
974
	}
-
 
975
	
-
 
976
	/**
-
 
977
	 * Returns list of feature definition IDs for given category ID
-
 
978
	 * 
-
 
979
	 * @param categoryID
-
 
980
	 * @return list of feature definition IDs
-
 
981
	 * @throws Exception 
-
 
982
	 */
-
 
983
	public List<Long> getFeatureDefinitionIDs(long categoryID) 
-
 
984
		throws Exception {
-
 
985
		
-
 
986
		List<Long> featureDefIDs = new ArrayList<Long>();
-
 
987
		
-
 
988
		List<SlideDefinition> slideDefs = this.getSlideDefinitions(categoryID);
-
 
989
		
-
 
990
		for(SlideDefinition slideDef : slideDefs) {
-
 
991
			List<Long> slideFeatureDefIDs = 
-
 
992
				this.getFeatureDefintionIDs(slideDef);
-
 
993
			
-
 
994
			featureDefIDs.addAll(slideFeatureDefIDs);
-
 
995
		}
-
 
996
		
-
 
997
		return featureDefIDs;
-
 
998
	}
-
 
999
	
-
 
1000
	/**
-
 
1001
	 * Returns list of feature definition IDs for given slide definition ID
-
 
1002
	 * 
-
 
1003
	 * @param slideDef
-
 
1004
	 * @return list of feature definition IDs
-
 
1005
	 */
-
 
1006
	public List<Long> getFeatureDefintionIDs(SlideDefinition slideDef) {
-
 
1007
		List<Long> featureDefIDs = new ArrayList<Long>();
-
 
1008
		
-
 
1009
		List<SlideFeatureDefinition> slideFeatureDefs = 
-
 
1010
			slideDef.getSlideFeatureDefinitions();
-
 
1011
		
-
 
1012
		for(SlideFeatureDefinition slideFeatureDef : slideFeatureDefs) {
-
 
1013
			featureDefIDs.add(
-
 
1014
					new Long(slideFeatureDef.getFeatureDefintionID()));
-
 
1015
		}
-
 
1016
		
-
 
1017
		return featureDefIDs;
-
 
1018
	}
952
}
1019
}