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

com.formkiq.server.domain.Asset Maven / Gradle / Ivy

/*
 * Copyright (C) 2016 FormKiQ Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.formkiq.server.domain;

import java.sql.Blob;
import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Type;

/**
 * Form domain.
 *
 */
@Entity
@Table(name = "assets")
public class Asset {

	/** identifier column. */
    @Id
    @Column(name = "asset_id", unique = true, columnDefinition = "uuid")
    @Type(type = "pg-uuid")
    private UUID assetId;

    /** Data Blob. */
    @Lob
    @NotNull
    @Column(name = "data", nullable = false,  columnDefinition = "lo")
    private Blob data;

	/**
	 * default constructor.
	 */
	public Asset() {
	}

	/**
	 * @return {@link UUID}
	 */
    public UUID getAssetId() {
        return this.assetId;
    }

    /**
     * @param asset String
     */
    public void setAssetId(final UUID asset) {
        this.assetId = asset;
    }

    /**
     * @return Blob
     */
    public Blob getData() {
        return this.data;
    }

    /**
     * @param blob Blob
     */
    public void setData(final Blob blob) {
        this.data = blob;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy