001// Generated by delombok at Mon Oct 12 22:59:35 BST 2020 002/* 003 * Licensed to the Apache Software Foundation (ASF) under one 004 * or more contributor license agreements. See the NOTICE file 005 * distributed with this work for additional information 006 * regarding copyright ownership. The ASF licenses this file 007 * to you under the Apache License, Version 2.0 (the 008 * "License"); you may not use this file except in compliance 009 * with the License. You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, 014 * software distributed under the License is distributed on an 015 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 016 * KIND, either express or implied. See the License for the 017 * specific language governing permissions and limitations 018 * under the License. 019 */ 020package org.apache.isis.extensions.commandreplay.secondary.mixins; 021 022import java.util.List; 023import javax.inject.Inject; 024import org.apache.isis.applib.annotation.Collection; 025import org.apache.isis.applib.annotation.CollectionLayout; 026import org.apache.isis.applib.annotation.MemberOrder; 027import org.apache.isis.extensions.commandlog.impl.jdo.CommandJdo; 028import org.apache.isis.extensions.commandlog.impl.jdo.CommandJdoRepository; 029import org.apache.isis.extensions.commandreplay.secondary.IsisModuleExtCommandReplaySecondary; 030import org.apache.isis.extensions.commandreplay.secondary.config.SecondaryConfig; 031 032@Collection(domainEvent = CommandJdo_replayQueue.CollectionDomainEvent.class) 033@CollectionLayout(defaultView = "table") 034public class CommandJdo_replayQueue { 035 036 public static class CollectionDomainEvent extends IsisModuleExtCommandReplaySecondary.CollectionDomainEvent<CommandJdo_replayQueue, CommandJdo> { 037 } 038 039 final CommandJdo commandJdo; 040 041 @MemberOrder(sequence = "100.100") 042 public List<CommandJdo> coll() { 043 return commandJdoRepository.findReplayedOnSecondary(); 044 } 045 046 public boolean hideColl() { 047 return !secondaryConfig.isConfigured(); 048 } 049 050 @Inject 051 SecondaryConfig secondaryConfig; 052 @Inject 053 CommandJdoRepository commandJdoRepository; 054 055 @java.lang.SuppressWarnings("all") 056 public CommandJdo_replayQueue(final CommandJdo commandJdo) { 057 this.commandJdo = commandJdo; 058 } 059}