org.itracker.persistence.dao
Interface BaseDAO<T extends Entity>

All Known Subinterfaces:
ComponentDAO, ConfigurationDAO, CustomFieldDAO, CustomFieldValueDAO, IssueActivityDAO, IssueAttachmentDAO, IssueDAO, IssueHistoryDAO, IssueRelationDAO, LanguageDAO, NotificationDAO, PermissionDAO, ProjectDAO, ProjectScriptDAO, ReportDAO, UserDAO, UserPreferencesDAO, VersionDAO, WorkflowScriptDAO
All Known Implementing Classes:
BaseHibernateDAOImpl, ComponentDAOImpl, ConfigurationDAOImpl, CustomFieldDAOImpl, CustomFieldValueDAOImpl, IssueActivityDAOImpl, IssueAttachmentDAOImpl, IssueDAOImpl, IssueHistoryDAOImpl, IssueRelationDAOImpl, LanguageDAOImpl, NotificationDAOImpl, PermissionDAOImpl, ProjectDAOImpl, ProjectScriptDAOImpl, ReportDAOImpl, UserDAOImpl, UserPreferencesDAOImpl, VersionDAOImpl, WorkflowScriptDAOImpl

public interface BaseDAO<T extends Entity>


Method Summary
 void delete(T entity)
          Deletes entity from persistence store.
 void detach(T entity)
          Remove this instance from the session cache.
 T merge(T entity)
          Copy the state of the given object onto the persistent object with the same identifier.
 void refresh(T entity)
          Reloads an entity from persistance.
 void save(T entity)
          Insert a new entity.
 void saveOrUpdate(T entity)
          Inserts a new detached entity or updates if it already exists.
 

Method Detail

save

void save(T entity)
Insert a new entity. create- and lastmodified-date is set with current time.

Parameters:
entity - - detached entity object
See Also:
Session.save(Object)

saveOrUpdate

void saveOrUpdate(T entity)
Inserts a new detached entity or updates if it already exists. create- and update-date are set automatically.

Parameters:
entity - - entity object to be inserted or updated
See Also:
Session.saveOrUpdate(Object)

delete

void delete(T entity)
Deletes entity from persistence store.

Parameters:
entity -
See Also:
Session.delete(Object)

detach

void detach(T entity)
Remove this instance from the session cache.

Parameters:
entity -
See Also:
Session.evict(Object)

refresh

void refresh(T entity)
Reloads an entity from persistance.

Parameters:
entity -
See Also:
Session.refresh(Object)

merge

T merge(T entity)
Copy the state of the given object onto the persistent object with the same identifier. If there is no persistent instance currently associated with the session, it will be loaded.

Parameters:
entity -
Returns:
See Also:
Session.merge(Object)


Copyright © 2002-2012 itracker. All Rights Reserved.