|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthu.midori.kosmos.model.util.ModelUtils
public class ModelUtils
Utility methods for the domain model classes.
Field Summary | |
---|---|
static long |
MILLIS_PER_DAY
Millis in one day. |
static long |
MILLIS_PER_HOUR
Millis in one hour. |
static long |
MILLIS_PER_MONTH
Millis in one month (31 days). |
static long |
MILLIS_PER_WEEK
Millis in one week. |
Constructor Summary | |
---|---|
protected |
ModelUtils()
This class should never be instantiated. |
Method Summary | |
---|---|
static IdentifiedEntity |
findInCollection(java.util.Collection<? extends IdentifiedEntity> items,
int id)
Returns the Identified object from a collection
by using a simple linear search, or null if not found. |
static IdentifiedEntity |
findInCollection(java.util.Collection<? extends IdentifiedEntity> items,
java.lang.String id)
Returns the Identified object from a collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long MILLIS_PER_HOUR
public static final long MILLIS_PER_DAY
public static final long MILLIS_PER_WEEK
public static final long MILLIS_PER_MONTH
Constructor Detail |
---|
protected ModelUtils()
Method Detail |
---|
public static IdentifiedEntity findInCollection(java.util.Collection<? extends IdentifiedEntity> items, int id)
Identified
object from a collection
by using a simple linear search, or null
if not found.
public static IdentifiedEntity findInCollection(java.util.Collection<? extends IdentifiedEntity> items, java.lang.String id)
Identified
object from a collection.
It receives the ID as String, so can be passed from request
params directly.
findInCollection(Collection, int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |