Joutsen Persistence v0.3.0+1-ga730d6d
Public Member Functions | List of all members
Joutsen.Persistence.Repository< EntityType, IdentifierType > Interface Template Reference

A full repository of persisted objects that can be used to store, update, delete and retrieve objects. More...

Public Member Functions

IdentifierType Save (EntityType entity)
 Adds or updates an object in the repository. More...
 
void Delete (EntityType entity)
 Removes an object from the repository. More...
 
EntityType Create ()
 Creates a new instance of the objects handled by the repository without adding it to the repository. More...
 
- Public Member Functions inherited from Joutsen.Persistence.ReadOnlyRepository< EntityType, IdentifierType >
EntityType GetById (IdentifierType id)
 Fetches an object identified by its id from the repository. More...
 

Detailed Description

A full repository of persisted objects that can be used to store, update, delete and retrieve objects.

Template Parameters
EntityTypethe type of the persisted objects handled by the repository
IdentifierTypethe type of the unique identifier of the persisted objects handled by the repository
Since
0.2.0
Type Constraints
IdentifierType :struct 
EntityType :class 

Member Function Documentation

◆ Create()

EntityType Joutsen.Persistence.Repository< EntityType, IdentifierType >.Create ( )

Creates a new instance of the objects handled by the repository without adding it to the repository.

Implemented in Joutsen.Persistence.NHibernate.NHibernateInterfacedEntityRepository< EntityType, IdentifierType >, and Joutsen.Persistence.NHibernate.NHibernateRepository< EntityType, IdentifierType >.

◆ Delete()

void Joutsen.Persistence.Repository< EntityType, IdentifierType >.Delete ( EntityType  entity)

◆ Save()

IdentifierType Joutsen.Persistence.Repository< EntityType, IdentifierType >.Save ( EntityType  entity)