|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.jdo.Factory<Category>
com.sptci.jdo.CategoryFactory
public class CategoryFactory
Repository class for the Category model object. Manages all
interactions with the data store.
© Copyright 2009 Sans Pareil Technologies, Inc.
| Field Summary | |
|---|---|
static CategoryFactory |
categoryFactory
A singleton instance of the repository class. |
| Fields inherited from class com.sptci.jdo.Factory |
|---|
logger |
| Constructor Summary | |
|---|---|
CategoryFactory()
|
|
| Method Summary | |
|---|---|
List<Category> |
children(Category parent,
javax.jdo.PersistenceManager pm)
Return all the children of the specified category. |
Collection<Category> |
fetchAll(javax.jdo.PersistenceManager pm)
Return all the categories stored in the data store. |
Collection<Category> |
fetchByName(String name,
javax.jdo.PersistenceManager pm)
Return all the categories with the specified name. |
Category |
fetchByNameAndParent(String name,
Category parent,
javax.jdo.PersistenceManager pm)
Return the category uniquely identified by the specified name and parent category. |
static CategoryFactory |
getInstance()
Return the singleton instance of this repository class. |
Collection<Category> |
parents(javax.jdo.PersistenceManager pm)
Return all the root level categories in the data store. |
| Methods inherited from class com.sptci.jdo.Factory |
|---|
addAlphabeticalIndex, begin, close, close, commit, count, delete, fetch, fetch, fetch, fetchAll, getPersistenceManager, removeStartLetter, rollback, save |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final CategoryFactory categoryFactory
| Constructor Detail |
|---|
public CategoryFactory()
| Method Detail |
|---|
public static CategoryFactory getInstance()
categoryFactory instance.public Collection<Category> fetchAll(javax.jdo.PersistenceManager pm)
pm - The persistence manager to use.
public Collection<Category> parents(javax.jdo.PersistenceManager pm)
null parent fields.
pm - The persistence manager to use.
public List<Category> children(Category parent,
javax.jdo.PersistenceManager pm)
parent - The category whose child categories are to be retrieved.pm - The persistence manager to use.
public Collection<Category> fetchByName(String name,
javax.jdo.PersistenceManager pm)
name - The name of the category.pm - The persistence manager to use.
public Category fetchByNameAndParent(String name,
Category parent,
javax.jdo.PersistenceManager pm)
name - The name of the categoryparent - The parent category.
null if no such
category exists.
|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||