org.jtheque.primary.services.impl
Class BorrowersService

java.lang.Object
  extended by org.jtheque.primary.services.impl.BorrowersService
All Implemented Interfaces:
org.jtheque.core.managers.persistence.able.DataContainer<Person>, IBorrowersService

@Service
public final class BorrowersService
extends Object
implements IBorrowersService

A borrowers service implementation.

Author:
Baptiste Wicht

Field Summary
 
Fields inherited from interface org.jtheque.primary.services.able.IBorrowersService
DATA_TYPE, PERSON_TYPE
 
Constructor Summary
BorrowersService()
           
 
Method Summary
 void addDataListener(org.jtheque.core.managers.persistence.able.DataListener listener)
           
 void clearAll()
           
 void create(Person borrower)
          Create a borrower.
 void createAll(Iterable<Person> borrowers)
          Create all the borrowers.
 boolean delete(Person borrower)
          Delete a borrower.
 Collection<Person> getBorrowers()
          Return the borrowers.
 Collection<Person> getDatas()
           
 String getDataType()
           
 Person getEmptyBorrower()
          Return an empty borrower.
 boolean hasNoBorrowers()
          Indicate if there is no borrowers.
 void save(Person borrower)
          Save the borrower.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BorrowersService

public BorrowersService()
Method Detail

delete

@Transactional
public boolean delete(Person borrower)
Description copied from interface: IBorrowersService
Delete a borrower.

Specified by:
delete in interface IBorrowersService
Parameters:
borrower - The borrower to delete.
Returns:
true if the borrower has been deleted else false.

create

@Transactional
public void create(Person borrower)
Description copied from interface: IBorrowersService
Create a borrower.

Specified by:
create in interface IBorrowersService
Parameters:
borrower - The borrower to create.

save

@Transactional
public void save(Person borrower)
Description copied from interface: IBorrowersService
Save the borrower.

Specified by:
save in interface IBorrowersService
Parameters:
borrower - The borrower to save.

getBorrowers

public Collection<Person> getBorrowers()
Description copied from interface: IBorrowersService
Return the borrowers.

Specified by:
getBorrowers in interface IBorrowersService
Returns:
A List containing all the borrowers.

hasNoBorrowers

public boolean hasNoBorrowers()
Description copied from interface: IBorrowersService
Indicate if there is no borrowers.

Specified by:
hasNoBorrowers in interface IBorrowersService
Returns:
true if there is no borrowers else false.

createAll

public void createAll(Iterable<Person> borrowers)
Description copied from interface: IBorrowersService
Create all the borrowers.

Specified by:
createAll in interface IBorrowersService
Parameters:
borrowers - The borrowers to create.

getDatas

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

addDataListener

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

clearAll

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

getDataType

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

getEmptyBorrower

public Person getEmptyBorrower()
Description copied from interface: IBorrowersService
Return an empty borrower.

Specified by:
getEmptyBorrower in interface IBorrowersService
Returns:
An empty borrower.


Copyright © 2010 JTheque. All Rights Reserved.