at.ac.tuwien.vitalab.hrcrm.dao
Interface GenericDao<T>

All Known Implementing Classes:
GenericDaoIbatisImpl

public interface GenericDao<T>

Define interface which provides a CRUD functions for all database requests.

Author:
Vassil Nikolov

Method Summary
 boolean addAddressToParty(AddressParty addressParty)
           
 boolean addNameToParty(NameParty nameParty)
           
 void create(T object)
          Persists the given object to the database.
 boolean deleteById(T object)
           
 java.util.List<T> retrieveAll(T object)
           
 T retrieveById(T object)
          Search in the database for an object, with the given id.
 boolean updateById(T object)
           
 

Method Detail

create

void create(T object)
Persists the given object to the database.

Parameters:
object - Object to be persisted.
Throws:
java.lang.IllegalArgumentException - If the given argument is null.
DataIntegrityViolationException - If an entity with this id already exist.

retrieveById

T retrieveById(T object)
Search in the database for an object, with the given id.

Parameters:
object - Contains the id.
Returns:
An entity if found, else null.
Throws:
java.lang.IllegalArgumentException - If the given argument is null, or its id is null.

retrieveAll

java.util.List<T> retrieveAll(T object)

updateById

boolean updateById(T object)

deleteById

boolean deleteById(T object)

addAddressToParty

boolean addAddressToParty(AddressParty addressParty)

addNameToParty

boolean addNameToParty(NameParty nameParty)


Copyright © 2008 null. All Rights Reserved.