EN · DE · RU · FR · ES

#1034: PollResponseDO.kt

projectforge-business/src/main/kotlin/org/projectforge/business/poll/PollResponseDO.kt Type: Kotlin · Role: Poll · Source: projectforge-business/src/main/kotlin/org/projectforge/business/poll/PollResponseDO.kt 54 lines · 26 code · 22 comments · 6 blank
JPA entity (Data Object) representing PollResponse in the database. Maps to a table with Hibernate annotations, JPA relationships, and transient computed properties.

Code Structure

Annotations: AUserRightId, Indexed, Table, PropertyInfo, get, DependsOn, Entity

Classes: PollResponseDO

Supertype(s): DefaultBaseDO

JPA Entities: PollResponseDO (table: t_poll_response)

Properties (3): poll, owner, responses

Imports: 7 packages

Package: org.projectforge.business.poll

Source Code (abridged)

package org.projectforge.business.poll

import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed
import org.projectforge.common.anots.PropertyInfo
import org.projectforge.framework.persistence.api.AUserRightId
import org.projectforge.framework.persistence.entities.DefaultBaseDO
import org.projectforge.framework.persistence.user.entities.PFUserDO
import org.springframework.context.annotation.DependsOn
import jakarta.persistence.*

@Entity
@Indexed
@Table(name = "t_poll_response")
@AUserRightId(value = "poll.response", checkAccess = false)
@DependsOn("org.projectforge.framework.persistence.user.entities.PFUserDO")
open class PollResponseDO : DefaultBaseDO() {

    @get:PropertyInfo(i18nKey = "poll.response.poll")
    @get:ManyToOne(fetch = FetchType.LAZY)
    @get:JoinColumn(name = "poll_fk", nullable = false)
    open var poll: PollDO? = null

    @get:PropertyInfo(i18nKey = "poll.response.owner")
    @get:ManyToOne(fetch = FetchType.LAZY)
    @get:JoinColumn(name = "owner_fk", nullable = false)
    open var owner: PFUserDO? = null

    @PropertyInfo(i18nKey = "poll.responses")
    @get:Column(name = "responses", nullable = true, length = 1000)
    open var responses: String? = null
}

Git History

868d6abb7 2025 -> 2026
63081666f Source file headers: 2024-> 2025.
c04fb0d51 Migration stuff in progress...
06828f490 Migration stuff in progress...
b6092df09 Copyright 2023 -> 2024