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

com.yahoo.elide.async.models.TableExport Maven / Gradle / Ivy

There is a newer version: 7.1.2
Show newest version
/*
 * Copyright 2021, Yahoo Inc.
 * Licensed under the Apache License, Version 2.0
 * See LICENSE file in project root for terms.
 */
package com.yahoo.elide.async.models;

import com.yahoo.elide.annotation.DeletePermission;
import com.yahoo.elide.annotation.Include;
import com.yahoo.elide.annotation.ReadPermission;
import com.yahoo.elide.annotation.UpdatePermission;

import jakarta.persistence.Embedded;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * Model for Table Export.
 * TableExportHook is binded manually during the elide startup,
 * after asyncexecutorservice is initialized.
 */
@Entity
@Include(name = "tableExport")
@ReadPermission(expression = "Principal is Owner OR Principal is Admin")
@UpdatePermission(expression = "Prefab.Role.None")
@DeletePermission(expression = "Prefab.Role.None")
@Data
@EqualsAndHashCode(callSuper = true)
public class TableExport extends AsyncApi {

    @Enumerated(EnumType.STRING)
    @NotNull
    private ResultType resultType; //CSV, JSON

    @Embedded
    private TableExportResult result;

    @Override
    public void setResult(AsyncApiResult result) {
        this.result = (TableExportResult) result;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy