#352- Unit Of Work : Update java doc for methods.
This commit is contained in:
parent
f3f1f54ccc
commit
51096ec445
@ -32,12 +32,24 @@ public interface IUnitOfWork<T> {
|
|||||||
String DELETE = "DELETE";
|
String DELETE = "DELETE";
|
||||||
String MODIFY = "MODIFY";
|
String MODIFY = "MODIFY";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Any register new operation occurring on UnitOfWork is only going to be performed on commit.
|
||||||
|
*/
|
||||||
void registerNew(T entity);
|
void registerNew(T entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Any register modify operation occurring on UnitOfWork is only going to be performed on commit.
|
||||||
|
*/
|
||||||
void registerModified(T entity);
|
void registerModified(T entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Any register delete operation occurring on UnitOfWork is only going to be performed on commit.
|
||||||
|
*/
|
||||||
void registerDeleted(T entity);
|
void registerDeleted(T entity);
|
||||||
|
|
||||||
|
/***
|
||||||
|
* All UnitOfWork operations batched together executed in commit only.
|
||||||
|
*/
|
||||||
void commit();
|
void commit();
|
||||||
|
|
||||||
}
|
}
|
@ -78,6 +78,9 @@ public class StudentRepository implements IUnitOfWork<Student> {
|
|||||||
context.put(operation, studentsToOperate);
|
context.put(operation, studentsToOperate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* All UnitOfWork operations are batched and executed together on commit only.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void commit() {
|
public void commit() {
|
||||||
if (context == null || context.size() == 0) {
|
if (context == null || context.size() == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user