EN · DE · RU · FR · ES

#1067: SipgateDeleteContactService.kt

projectforge-business/src/main/kotlin/org/projectforge/business/sipgate/SipgateDeleteContactService.kt Type: Kotlin · Role: Service · Source: projectforge-business/src/main/kotlin/org/projectforge/business/sipgate/SipgateDeleteContactService.kt 47 lines · 17 code · 26 comments · 4 blank
Spring service for SipgateDeleteContact. Provides business logic between controllers/rest endpoints and the data access layer.

Code Structure

Annotations: author, Autowired, Service, micromata

Classes: SipgateDeleteContactService

Functions (1): deleteContact

Properties (1): persistenceService

Imports: 3 packages

Package: org.projectforge.business.sipgate

Source Code (abridged)

package org.projectforge.business.sipgate

import org.projectforge.framework.persistence.jpa.PfPersistenceService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service

/**
 * Used by AddressDao if addresses are forced to be deleted.
 * @author K. Reinhard (k.reinhard@micromata.de)
 */
@Service
class SipgateDeleteContactService {
    @Autowired
    private lateinit var persistenceService: PfPersistenceService

    fun deleteContact(addressId: Long) {
        persistenceService.runInTransaction { ctx ->
            ctx.executeNamedUpdate(
                SipgateContactSyncDO.DELETE_BY_ADDRESS_ID,
                Pair("addressId", addressId),
            )
        }
    }
}

Git History

868d6abb7 2025 -> 2026
b7861b2ff Addresses: forced deletion fixed (after mgc migration): sipgate-contacts and history entries / attrs.