1 package de.dlr.shepard.neo4Core.entities;
2
3 import de.dlr.shepard.mongoDB.ShepardFile;
4 import de.dlr.shepard.util.Constants;
5 import java.util.ArrayList;
6 import java.util.List;
7 import lombok.Data;
8 import lombok.EqualsAndHashCode;
9 import lombok.NoArgsConstructor;
10 import org.neo4j.ogm.annotation.NodeEntity;
11 import org.neo4j.ogm.annotation.Relationship;
12
13 @NodeEntity
14 @Data
15 @NoArgsConstructor
16 @EqualsAndHashCode(callSuper = true)
17 public class FileContainer extends BasicContainer {
18
19 private String mongoId;
20
21 @Relationship(type = Constants.FILE_IN_CONTAINER)
22 private List<ShepardFile> files = new ArrayList<>();
23
24
25
26
27
28
29 public FileContainer(long id) {
30 super(id);
31 }
32
33 public void addFile(ShepardFile file) {
34 files.add(file);
35 }
36 }