org.jtheque.films.services.impl.utils
Class DataUtils

java.lang.Object
  extended by org.jtheque.films.services.impl.utils.DataUtils

public final class DataUtils
extends Object

An utility class for Data.

Author:
Baptiste Wicht

Method Summary
static
<T extends org.jtheque.primary.od.able.Data>
T
getDataByTemporaryId(int id, Iterable<T> collection)
          Return the data with the searched temporary id in the collection.
static org.jtheque.primary.od.able.Lending getLendingForFilm(Film film, Iterable<org.jtheque.primary.od.able.Lending> collection)
          Return the lending for the specified film.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDataByTemporaryId

public static <T extends org.jtheque.primary.od.able.Data> T getDataByTemporaryId(int id,
                                                                                  Iterable<T> collection)
Return the data with the searched temporary id in the collection.

Type Parameters:
T - The specialized type of Data.
Parameters:
id - The id searched.
collection - The collection in which we must search.
Returns:
The good data or null if we doesn't find it.

getLendingForFilm

public static org.jtheque.primary.od.able.Lending getLendingForFilm(Film film,
                                                                    Iterable<org.jtheque.primary.od.able.Lending> collection)
Return the lending for the specified film.

Parameters:
film - The film for which we want the lending.
collection - The collection of lendings.
Returns:
The good lending or null if we don't find one.


Copyright © 2010 JTheque. All Rights Reserved.