use of org.qi4j.logging.debug.records.EntityDebugRecordEntity in project qi4j-sdk by Qi4j.
the class DebuggingServiceMixin method createDebugRecord.
private void createDebugRecord(UnitOfWork uow, Composite composite, String message, List<Serializable> params) {
if (composite instanceof ServiceComposite) {
EntityBuilder<ServiceDebugRecordEntity> builder = uow.newEntityBuilder(ServiceDebugRecordEntity.class);
ServiceDebugRecordEntity state = builder.instance();
setStandardStuff(composite, message, state, params);
state.source().set(((ServiceComposite) composite).identity().get());
ServiceDebugRecordEntity slr = builder.newInstance();
} else if (composite instanceof EntityComposite) {
EntityBuilder<EntityDebugRecordEntity> builder = uow.newEntityBuilder(EntityDebugRecordEntity.class);
EntityDebugRecordEntity state = builder.instance();
setStandardStuff(composite, message, state, params);
state.source().set((EntityComposite) composite);
EntityDebugRecordEntity elr = builder.newInstance();
} else {
EntityBuilder<CompositeDebugRecordEntity> builder = uow.newEntityBuilder(CompositeDebugRecordEntity.class);
CompositeDebugRecordEntity state = builder.instance();
setStandardStuff(composite, message, state, params);
state.source().set(composite);
CompositeDebugRecordEntity clr = builder.newInstance();
}
}
Aggregations