001/*- 002 * #%L 003 * HAPI FHIR JPA Server 004 * %% 005 * Copyright (C) 2014 - 2024 Smile CDR, Inc. 006 * %% 007 * Licensed under the Apache License, Version 2.0 (the "License"); 008 * you may not use this file except in compliance with the License. 009 * You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 * #L% 019 */ 020package ca.uhn.fhir.jpa.entity; 021 022import ca.uhn.fhir.jpa.model.entity.ResourceTable; 023import jakarta.persistence.Column; 024import jakarta.persistence.Entity; 025import jakarta.persistence.FetchType; 026import jakarta.persistence.ForeignKey; 027import jakarta.persistence.GeneratedValue; 028import jakarta.persistence.GenerationType; 029import jakarta.persistence.Id; 030import jakarta.persistence.JoinColumn; 031import jakarta.persistence.ManyToOne; 032import jakarta.persistence.SequenceGenerator; 033import jakarta.persistence.Table; 034 035import java.io.Serializable; 036 037/* 038 * These classes are no longer needed. 039 * Metadata on the job is contained in the job itself 040 * (no separate storage required). 041 * 042 * See the BulkExportAppCtx for job details 043 */ 044@Entity 045@Table(name = "HFJ_BLK_EXPORT_COLFILE") 046@Deprecated 047public class BulkExportCollectionFileEntity implements Serializable { 048 049 @Id 050 @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_BLKEXCOLFILE_PID") 051 @SequenceGenerator(name = "SEQ_BLKEXCOLFILE_PID", sequenceName = "SEQ_BLKEXCOLFILE_PID") 052 @Column(name = "PID") 053 private Long myId; 054 055 @ManyToOne(fetch = FetchType.LAZY) 056 @JoinColumn( 057 name = "COLLECTION_PID", 058 referencedColumnName = "PID", 059 nullable = false, 060 foreignKey = @ForeignKey(name = "FK_BLKEXCOLFILE_COLLECT")) 061 private BulkExportCollectionEntity myCollection; 062 063 @Column(name = "RES_ID", length = ResourceTable.MAX_FORCED_ID_LENGTH, nullable = false) 064 private String myResourceId; 065 066 public void setCollection(BulkExportCollectionEntity theCollection) { 067 myCollection = theCollection; 068 } 069 070 public void setResource(String theResourceId) { 071 myResourceId = theResourceId; 072 } 073 074 public String getResourceId() { 075 return myResourceId; 076 } 077 078 public Long getId() { 079 return myId; 080 } 081}