178179180181182183184185186187188
private void initState() { if( !uow.isOpen() ) { throw new UnitOfWorkException( "Unit of work has been closed" ); } if( status() == EntityStatus.REMOVED ) { throw new NoSuchEntityException( identity );
430431432433434435436437438439440
if( store == null ) { ServiceReference<EntityStore> service = findService( EntityStore.class ); if( service == null ) { throw new UnitOfWorkException( "No EntityStore service available in module " + name() ); } store = service.get(); } } return store;
241242243244245246247248
} } } else { throw new UnitOfWorkException( "Unit of work is not active" ); } }
254255256257258259260261
paused = false; getCurrent().push( this ); } else { throw new UnitOfWorkException( "Unit of work has not been paused" ); } }
474475476477478479480481
public void checkOpen() { if( !isOpen() ) { throw new UnitOfWorkException( "Unit of work has been closed" ); } }
193194195196197198199200201202203
private void initState() { if( !uow.isOpen() ) { throw new UnitOfWorkException( "Unit of work has been closed" ); } if( status() == EntityStatus.REMOVED ) { throw new NoSuchEntityException( identity, entityModel.types() );
659660661662663664665666667668669
5152535455565758
sqle = sqle.getNextException(); } LOGGER.error( "Error when indexing entities", sqle ); // TODO is UoWException right one for this? throw new UnitOfWorkException( lastException ); } }