1 package org.jahia.content; 2 3 11 12 public class CategoryKey extends ObjectKey { 13 14 public static final String CATEGORY_TYPE = "Category"; 15 16 static { 17 ObjectKey.registerType(CATEGORY_TYPE, CategoryKey.class.getName()); 18 } 19 20 public CategoryKey(int categoryID) { 21 super(CATEGORY_TYPE, Integer.toString(categoryID)); 22 } 23 24 public int getCategoryID() { 25 return getIdInType(); 26 } 27 28 public static ObjectKey getChildInstance(String IDInType) { 29 return new CategoryKey(Integer.parseInt(IDInType)); 30 } 31 32 } | Popular Tags |