package com.sequenceiq.cloudbreak.domain; import java.util.Map; import javax.persistence.Column; import javax.persistence.ElementCollection; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.MapKeyColumn; import javax.persistence.SequenceGenerator; @Entity public class FileSystem { @Id @GeneratedValue(strategy = GenerationType.AUTO, generator = "filesystem_generator") @SequenceGenerator(name = "filesystem_generator", sequenceName = "filesystem_id_seq", allocationSize = 1) private Long id; @Column(nullable = false) private String name; @Column(nullable = false) private String type; @Column(nullable = false) private boolean defaultFs; @ElementCollection(fetch = FetchType.EAGER) @MapKeyColumn(name = "key") @Column(name = "value", columnDefinition = "TEXT", length = 100000) private Map<String, String> properties; public FileSystem() { } public FileSystem(String name, String type, boolean defaultFs) { this.name = name; this.type = type; this.defaultFs = defaultFs; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getType() { return type; } public void setType(String type) { this.type = type; } public boolean isDefaultFs() { return defaultFs; } public void setDefaultFs(boolean defaultFs) { this.defaultFs = defaultFs; } public Map<String, String> getProperties() { return properties; } public void setProperties(Map<String, String> properties) { this.properties = properties; } }