本文整理汇总了Java中org.axonframework.repository.Repository类的典型用法代码示例。如果您正苦于以下问题:Java Repository类的具体用法?Java Repository怎么用?Java Repository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Repository类属于org.axonframework.repository包,在下文中一共展示了Repository类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: UserCommandHandler
import org.axonframework.repository.Repository; //导入依赖的package包/类
@Autowired
public UserCommandHandler(Repository<UserAggregate> userAggregateRepository,
UserRepository userRepository,
PasswordEncryptor passwordEncryptor) {
this.userAggregateRepository = userAggregateRepository;
this.userRepository = userRepository;
this.passwordEncryptor = passwordEncryptor;
}
开发者ID:bjornharvold,项目名称:bearchoke,代码行数:9,代码来源:UserCommandHandler.java
示例2: addAggregateType
import org.axonframework.repository.Repository; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public <T extends EventSourcedAggregateRoot> void addAggregateType(Class<T> aggregateType) {
removeAggregateType(aggregateType);
Repository<T> repo = m_repoFactory.createRepository(aggregateType);
m_aggregates.put(aggregateType,new AggregateSubscription(
repo,
AggregateAnnotationCommandHandler.subscribe(
aggregateType,
repo,
m_commandBus)));
}
开发者ID:lburgazzoli,项目名称:lb-axon,代码行数:14,代码来源:AxonService.java
示例3: createAggregateSubscription
import org.axonframework.repository.Repository; //导入依赖的package包/类
private <T extends EventSourcedAggregateRoot> AggregateSubscription<T> createAggregateSubscription(
Repository<T> repo, Class<T> aggregateType) {
return new AggregateSubscription(
repo,
AggregateAnnotationCommandHandler.subscribe(
aggregateType,
repo,
m_cmdBus)
);
}
开发者ID:lburgazzoli,项目名称:lb-axon,代码行数:11,代码来源:AxonService.java
示例4: createRepository
import org.axonframework.repository.Repository; //导入依赖的package包/类
@Override
public <I, T extends EventSourcedAggregateRoot<I>> Repository<T> createRepository(Class<T> type) {
EventSourcingRepository<T> repo = new EventSourcingRepository<>(type,m_evtStore);
repo.setEventBus(m_evtBus);
return repo;
}
开发者ID:lburgazzoli,项目名称:lb-axon,代码行数:8,代码来源:EventSourcingRepositoryFactory.java
示例5: createRepository
import org.axonframework.repository.Repository; //导入依赖的package包/类
@Override
public <I, T extends EventSourcedAggregateRoot<I>> Repository<T> createRepository(Class<T> type) {
final CachingEventSourcingRepository<T> repo =
new CachingEventSourcingRepository<>(
new GenericAggregateFactory<>(type),
m_evtStore);
repo.setEventBus(m_evtBus);
repo.setCache(m_cache);
return repo;
}
开发者ID:lburgazzoli,项目名称:lb-axon,代码行数:13,代码来源:CachingEventSourcingRepositoryFactory.java
示例6: produceAccountRepository
import org.axonframework.repository.Repository; //导入依赖的package包/类
@Produces @Default Repository<Account> produceAccountRepository() {
SimpleEntityManagerProvider simpleEntityManagerProvider = new SimpleEntityManagerProvider(em);
GenericJpaRepository<Account> jpaRepository = new GenericJpaRepository<Account>(simpleEntityManagerProvider, Account.class);
CdiEventListener cdiEventListener = new CdiEventListener();
cdiEventListener.registerEventHandler(AccountDebitedEvent.class, accountDebitedEventHandler);
eventBus.subscribe(cdiEventListener);
jpaRepository.setEventBus(eventBus);
return jpaRepository;
}
开发者ID:arturgaleno,项目名称:cqrs-tutorial,代码行数:17,代码来源:RepositoryProducer.java
示例7: OrderCommandHandler
import org.axonframework.repository.Repository; //导入依赖的package包/类
@Autowired
public OrderCommandHandler(Repository<Order> repository) {
this.repository = repository;
}
开发者ID:psamatt,项目名称:OrderFulfilmentCQRSDemo,代码行数:5,代码来源:OrderCommandHandler.java
示例8: StoreAssistantCommandHandler
import org.axonframework.repository.Repository; //导入依赖的package包/类
@Autowired
public StoreAssistantCommandHandler(Repository<StoreAssistant> repository) {
this.repository = repository;
}
开发者ID:psamatt,项目名称:OrderFulfilmentCQRSDemo,代码行数:5,代码来源:StoreAssistantCommandHandler.java
示例9: DeliveryDayCommandHandler
import org.axonframework.repository.Repository; //导入依赖的package包/类
@Autowired
public DeliveryDayCommandHandler(Repository<DeliveryDay> repository) {
this.repository = repository;
}
开发者ID:psamatt,项目名称:OrderFulfilmentCQRSDemo,代码行数:5,代码来源:DeliveryDayCommandHandler.java
示例10: RoleCommandHandler
import org.axonframework.repository.Repository; //导入依赖的package包/类
@Autowired
public RoleCommandHandler(Repository<RoleAggregate> roleAggregateRepository) {
this.roleAggregateRepository = roleAggregateRepository;
}
开发者ID:bjornharvold,项目名称:bearchoke,代码行数:5,代码来源:RoleCommandHandler.java
示例11: ToDoCommandHandler
import org.axonframework.repository.Repository; //导入依赖的package包/类
@Autowired
public ToDoCommandHandler(Repository<ToDoItemAggregate> repository) {
this.repository = repository;
}
开发者ID:bjornharvold,项目名称:bearchoke,代码行数:5,代码来源:ToDoCommandHandler.java
示例12: setOrganizationRepository
import org.axonframework.repository.Repository; //导入依赖的package包/类
public void setOrganizationRepository(Repository<Organization> organizationRepository) {
this.repository = organizationRepository;
}
开发者ID:dma-graveyard,项目名称:MaritimeCloudPortalTestbed,代码行数:4,代码来源:OrganizationCommandHandler.java
示例13: setServiceSpecificationRepository
import org.axonframework.repository.Repository; //导入依赖的package包/类
public void setServiceSpecificationRepository(Repository<ServiceSpecification> serviceSpecificationRepository) {
this.serviceSpecificationRepository = serviceSpecificationRepository;
}
开发者ID:dma-graveyard,项目名称:MaritimeCloudPortalTestbed,代码行数:4,代码来源:OrganizationCommandHandler.java
示例14: setServiceInstanceRepository
import org.axonframework.repository.Repository; //导入依赖的package包/类
public void setServiceInstanceRepository(Repository<ServiceInstance> serviceInstanceRepository) {
this.serviceInstanceRepository = serviceInstanceRepository;
}
开发者ID:dma-graveyard,项目名称:MaritimeCloudPortalTestbed,代码行数:4,代码来源:OrganizationCommandHandler.java
示例15: setMembershipRepository
import org.axonframework.repository.Repository; //导入依赖的package包/类
public void setMembershipRepository(Repository<Membership> membershipRepository) {
this.membershipRepository = membershipRepository;
}
开发者ID:dma-graveyard,项目名称:MaritimeCloudPortalTestbed,代码行数:4,代码来源:OrganizationCommandHandler.java
示例16: userAggregateRepository
import org.axonframework.repository.Repository; //导入依赖的package包/类
@Bean
public Repository<User> userAggregateRepository() {
EventSourcingRepository repository = new EventSourcingRepository<>(User.class, eventStore());
repository.setEventBus(eventBus());
return repository;
}
开发者ID:dma-graveyard,项目名称:MaritimeCloudPortalTestbed,代码行数:7,代码来源:AxonConfig.java
示例17: organizationRepository
import org.axonframework.repository.Repository; //导入依赖的package包/类
@Bean
public Repository<Organization> organizationRepository() {
EventSourcingRepository repository = new EventSourcingRepository<>(Organization.class, eventStore());
repository.setEventBus(eventBus());
return repository;
}
开发者ID:dma-graveyard,项目名称:MaritimeCloudPortalTestbed,代码行数:7,代码来源:AxonConfig.java
示例18: serviceSpecificationRepository
import org.axonframework.repository.Repository; //导入依赖的package包/类
@Bean
public Repository<ServiceSpecification> serviceSpecificationRepository() {
EventSourcingRepository repository = new EventSourcingRepository<>(ServiceSpecification.class, eventStore());
repository.setEventBus(eventBus());
return repository;
}
开发者ID:dma-graveyard,项目名称:MaritimeCloudPortalTestbed,代码行数:7,代码来源:AxonConfig.java
示例19: serviceInstanceRepository
import org.axonframework.repository.Repository; //导入依赖的package包/类
@Bean
public Repository<ServiceInstance> serviceInstanceRepository() {
EventSourcingRepository repository = new EventSourcingRepository<>(ServiceInstance.class, eventStore());
repository.setEventBus(eventBus());
return repository;
}
开发者ID:dma-graveyard,项目名称:MaritimeCloudPortalTestbed,代码行数:7,代码来源:AxonConfig.java
示例20: organizationMembershipRepository
import org.axonframework.repository.Repository; //导入依赖的package包/类
@Bean
public Repository<Membership> organizationMembershipRepository() {
EventSourcingRepository repository = new EventSourcingRepository<>(Membership.class, eventStore());
repository.setEventBus(eventBus());
return repository;
}
开发者ID:dma-graveyard,项目名称:MaritimeCloudPortalTestbed,代码行数:7,代码来源:AxonConfig.java
注:本文中的org.axonframework.repository.Repository类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论