|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.wordhoard.swing.calculator.modelutils.WorkUtils
public class WorkUtils
Work and work part utilities.
Field Summary | |
---|---|
protected static boolean |
workPartMapsAvailable
True if work part maps are created. |
Constructor Summary | |
---|---|
protected |
WorkUtils()
Don't allow instantiation but do allow overrides. |
Method Summary | |
---|---|
static void |
createWorkPartMaps(java.util.Collection workParts)
Create work part Id to work part tag maps. |
static java.util.Collection |
expandWorkParts(WorkPart[] workParts)
Convert mixed list of works and work parts to lowest level work parts. |
static WorkPart[] |
expandWorkPartsToArray(WorkPart[] workParts)
Convert mixed list of works and work parts to lowest level work parts. |
static java.util.Collection |
getAncestors(WorkPart workPart)
Get ancestor work parts. |
static WorkPart[] |
getUniqueWorkParts(java.util.List workParts)
Get list of unique work parts in a listr of work parts. |
static WorkPart[] |
getUniqueWorkParts(java.util.Map workPartsMap)
Get list of unique work parts in a map of work parts. |
static WorkPart[] |
getUniqueWorkParts(WorkPart[] workParts)
Get list of unique work parts in an array of work parts. |
static WorkPart[] |
getUniqueWorkParts(WorkPart[] workParts1,
WorkPart[] workParts2)
Get list of unique work parts from two work part arrays. |
static Work |
getWork(java.lang.String title)
Get a work by full title. |
static Work |
getWorkById(java.lang.Long workId)
Get a work by Id. |
static Work |
getWorkByShortTitle(java.lang.String title)
Get a work by short title. |
static Work |
getWorkByTag(java.lang.String tag)
Get a work by tag. |
static java.lang.Long |
getWorkIDByTag(java.lang.String tag)
Get a work ID by tag. |
static WorkPart |
getWorkPartByTag(java.lang.String tag)
Gets a work part by tag. |
static WorkPart[] |
getWorkParts()
Get array of all work parts for all works. |
static WorkPart[] |
getWorkParts(Work work)
Get array of all work parts for a work. |
static WorkPart[] |
getWorkPartsById(java.lang.Long[] workPartIds)
Get array of work parts for a list of work part IDs. |
static WorkPart[] |
getWorkPartsByTag(java.util.Collection workPartTags)
Get array of work parts for a list of work part tags. |
static WorkPart[] |
getWorkPartsByTag(java.util.Collection workPartTags,
org.hibernate.Session session)
Get array of work parts for a list of work part tags. |
static WorkPart[] |
getWorkPartsByTag(java.lang.String[] workPartTags)
Get array of work parts for a list of work part tags. |
static java.lang.String |
getWorkPartTagById(java.lang.Long workPartId)
Get work part tag for a work part ID. |
static java.lang.String[] |
getWorkPartTagsById(java.util.Collection workPartIds)
Get array of work part tags for a list of work part IDs. |
static Work[] |
getWorks()
Get array of all available works. |
static Work[] |
getWorksByTag(java.util.Collection workTags)
Get array of works for a list of work tags. |
static java.lang.String[] |
getWorkTagsById(java.util.Collection workIds)
Get array of work tags for a list of work part IDs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static boolean workPartMapsAvailable
Constructor Detail |
---|
protected WorkUtils()
Method Detail |
---|
public static void createWorkPartMaps(java.util.Collection workParts)
public static Work getWork(java.lang.String title)
title
- The full title of the work to fetch.
public static Work getWorkByShortTitle(java.lang.String title)
title
- The short title of the work to fetch.
public static Work getWorkByTag(java.lang.String tag)
tag
- The tag of the work to fetch.
public static java.lang.Long getWorkIDByTag(java.lang.String tag)
tag
- The tag of the work to fetch.
public static WorkPart getWorkPartByTag(java.lang.String tag)
tag
- The tag of the work part to fetch.
public static Work getWorkById(java.lang.Long workId)
workId
- The Id of the work to fetch.
public static Work[] getWorks()
public static WorkPart[] getWorkParts(Work work)
work
- The work.
The returned array does not include the work part entry for the work itself.
public static WorkPart[] getWorkPartsById(java.lang.Long[] workPartIds)
workPartIds
- The work part Ids.
public static java.lang.String[] getWorkTagsById(java.util.Collection workIds)
workIds
- The work Ids.
public static java.lang.String[] getWorkPartTagsById(java.util.Collection workPartIds)
workPartIds
- The work part Ids.
public static WorkPart[] getWorkPartsByTag(java.util.Collection workPartTags, org.hibernate.Session session)
workPartTags
- The work part tags.session
- Persistence manager session.
public static WorkPart[] getWorkPartsByTag(java.util.Collection workPartTags)
workPartTags
- The work part tags.
public static Work[] getWorksByTag(java.util.Collection workTags)
workTags
- The work tags.
public static java.lang.String getWorkPartTagById(java.lang.Long workPartId)
workPartId
- The work part Id.
public static WorkPart[] getWorkPartsByTag(java.lang.String[] workPartTags)
workPartTags
- The work part tags.
public static WorkPart[] getWorkParts()
public static WorkPart[] getUniqueWorkParts(java.util.Map workPartsMap)
workPartsMap
- Map with work part ID of work parts.
public static WorkPart[] getUniqueWorkParts(WorkPart[] workParts)
workParts
- Array of work parts.
public static WorkPart[] getUniqueWorkParts(java.util.List workParts)
workParts
- List of work parts.
public static WorkPart[] getUniqueWorkParts(WorkPart[] workParts1, WorkPart[] workParts2)
workParts1
- First array of work parts.workParts2
- Second array of work parts.
public static java.util.Collection getAncestors(WorkPart workPart)
public static java.util.Collection expandWorkParts(WorkPart[] workParts)
workParts
- The mixed works and work parts.
public static WorkPart[] expandWorkPartsToArray(WorkPart[] workParts)
workParts
- The mixed works and work parts.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |