All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apereo.cas.couchdb.tickets.TicketDocument Maven / Gradle / Ivy

There is a newer version: 7.0.0-RC5
Show newest version
package org.apereo.cas.couchdb.tickets;

import org.apereo.cas.ticket.Ticket;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.ektorp.support.CouchDbDocument;

/**
 * This is {@link TicketDocument}. Wraps a {@link Ticket} for use with CouchDB.
 *
 * @author Timur Duehr
 * @since 5.3.0
 */
@Getter
@Setter
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
@NoArgsConstructor
public class TicketDocument extends CouchDbDocument {
    private static final long serialVersionUID = -5460618381339711000L;

    private Ticket ticket;

    @JsonCreator
    public TicketDocument(@JsonProperty("ticket") final Ticket ticket) {
        this.setId(ticket.getId());
        this.ticket = ticket;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy