Search in sources :

Example 1 with BehaviorGroupActionId

use of com.redhat.cloud.notifications.models.BehaviorGroupActionId in project notifications-backend by RedHatInsights.

the class LifecycleITest method addBehaviorGroupAction.

@Transactional
void addBehaviorGroupAction(UUID behaviorGroupId, UUID endpointId) {
    BehaviorGroup behaviorGroup = entityManager.find(BehaviorGroup.class, behaviorGroupId);
    Endpoint endpoint = entityManager.find(Endpoint.class, endpointId);
    BehaviorGroupAction action = new BehaviorGroupAction();
    action.setId(new BehaviorGroupActionId());
    action.setBehaviorGroup(behaviorGroup);
    action.setEndpoint(endpoint);
    entityManager.persist(action);
}
Also used : BehaviorGroupActionId(com.redhat.cloud.notifications.models.BehaviorGroupActionId) Endpoint(com.redhat.cloud.notifications.models.Endpoint) BehaviorGroup(com.redhat.cloud.notifications.models.BehaviorGroup) BehaviorGroupAction(com.redhat.cloud.notifications.models.BehaviorGroupAction) Transactional(javax.transaction.Transactional)

Aggregations

BehaviorGroup (com.redhat.cloud.notifications.models.BehaviorGroup)1 BehaviorGroupAction (com.redhat.cloud.notifications.models.BehaviorGroupAction)1 BehaviorGroupActionId (com.redhat.cloud.notifications.models.BehaviorGroupActionId)1 Endpoint (com.redhat.cloud.notifications.models.Endpoint)1 Transactional (javax.transaction.Transactional)1