org.jtheque.filmstobuy.services.impl
Class FilmsToBuyService

java.lang.Object
  extended by org.jtheque.filmstobuy.services.impl.FilmsToBuyService
All Implemented Interfaces:
org.jtheque.core.managers.persistence.able.DataContainer<FilmToBuy>, IFilmsToBuyService

public final class FilmsToBuyService
extends Object
implements IFilmsToBuyService

The implementation of the films to buy service.

Author:
Baptiste Wicht

Field Summary
 
Fields inherited from interface org.jtheque.filmstobuy.services.able.IFilmsToBuyService
DATA_TYPE
 
Constructor Summary
FilmsToBuyService()
           
 
Method Summary
 void addDataListener(org.jtheque.core.managers.persistence.able.DataListener listener)
           
 void clearAll()
           
 void create(FilmToBuy filmToBuy)
          Create a new film to buy.
 boolean delete(FilmToBuy filmToBuy)
          Delete a film to buy.
 void delete(int index)
          Delete the film to buy.
 void editFilmToBuy(Integer index, String title)
          Edit a film to buy.
 Collection<FilmToBuy> getDatas()
           
 String getDataType()
           
 FilmToBuy getEmptyFilmToBuy()
          Return an empty film to buy.
 Collection<FilmToBuy> getFilmsToBuy()
          Return all the films to buy.
 FilmToBuy getFilmToBuy(int id)
          Return the film to buy denoted by a specific id.
 void newFilmToBuy(String title)
          Create a new FilmToBuy.
 void save(FilmToBuy film)
          Save the film to buy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilmsToBuyService

public FilmsToBuyService()
Method Detail

newFilmToBuy

@Transactional
public void newFilmToBuy(String title)
Description copied from interface: IFilmsToBuyService
Create a new FilmToBuy.

Specified by:
newFilmToBuy in interface IFilmsToBuyService
Parameters:
title - The title of the film.

getEmptyFilmToBuy

public FilmToBuy getEmptyFilmToBuy()
Description copied from interface: IFilmsToBuyService
Return an empty film to buy.

Specified by:
getEmptyFilmToBuy in interface IFilmsToBuyService
Returns:
An empty film to buy.

delete

@Transactional
public void delete(int index)
Description copied from interface: IFilmsToBuyService
Delete the film to buy.

Specified by:
delete in interface IFilmsToBuyService
Parameters:
index - The index of the film to delete.

editFilmToBuy

@Transactional
public void editFilmToBuy(Integer index,
                                        String title)
Description copied from interface: IFilmsToBuyService
Edit a film to buy.

Specified by:
editFilmToBuy in interface IFilmsToBuyService
Parameters:
index - The index of the film.
title - The new title of the film.

create

@Transactional
public void create(FilmToBuy filmToBuy)
Description copied from interface: IFilmsToBuyService
Create a new film to buy.

Specified by:
create in interface IFilmsToBuyService
Parameters:
filmToBuy - The film to buy to create.

getFilmsToBuy

public Collection<FilmToBuy> getFilmsToBuy()
Description copied from interface: IFilmsToBuyService
Return all the films to buy.

Specified by:
getFilmsToBuy in interface IFilmsToBuyService
Returns:
A List containing all the films to buy.

save

@Transactional
public void save(FilmToBuy film)
Description copied from interface: IFilmsToBuyService
Save the film to buy.

Specified by:
save in interface IFilmsToBuyService
Parameters:
film - The film to buy to save.

getFilmToBuy

public FilmToBuy getFilmToBuy(int id)
Description copied from interface: IFilmsToBuyService
Return the film to buy denoted by a specific id.

Specified by:
getFilmToBuy in interface IFilmsToBuyService
Parameters:
id - The id we want to search for.
Returns:
The corresponding film to buy else null if there is no film to buy with this.

delete

@Transactional
public boolean delete(FilmToBuy filmToBuy)
Description copied from interface: IFilmsToBuyService
Delete a film to buy.

Specified by:
delete in interface IFilmsToBuyService
Parameters:
filmToBuy - The film to buy to delete.
Returns:
true if the entity has been deleted else false.

getDatas

public Collection<FilmToBuy> getDatas()
Specified by:
getDatas in interface org.jtheque.core.managers.persistence.able.DataContainer<FilmToBuy>

addDataListener

public void addDataListener(org.jtheque.core.managers.persistence.able.DataListener listener)
Specified by:
addDataListener in interface org.jtheque.core.managers.persistence.able.DataContainer<FilmToBuy>

clearAll

@Transactional
public void clearAll()
Specified by:
clearAll in interface org.jtheque.core.managers.persistence.able.DataContainer<FilmToBuy>

getDataType

public String getDataType()
Specified by:
getDataType in interface org.jtheque.core.managers.persistence.able.DataContainer<FilmToBuy>


Copyright © 2010 JTheque. All Rights Reserved.