Class File

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    ImageFile

    @Entity
    public class File
    extends PersistentObject
    This class represents a file which is stored as a bytearray in the database
    Author:
    Johannes Weskamm, Daniel Koch
    See Also:
    Serialized Form
    • Constructor Detail

      • File

        public File()
    • Method Detail

      • getActive

        public java.lang.Boolean getActive()
        Returns:
        the active
      • setActive

        public void setActive​(java.lang.Boolean active)
        Parameters:
        active - the active to set
      • getFileName

        public java.lang.String getFileName()
        Returns:
        the fileName
      • setFileName

        public void setFileName​(java.lang.String fileName)
        Parameters:
        fileName - the fileName to set
      • getFileType

        public java.lang.String getFileType()
        Returns:
        the fileType
      • setFileType

        public void setFileType​(java.lang.String fileType)
        Parameters:
        fileType - the fileType to set
      • getFile

        public byte[] getFile()
        Returns:
        the file
      • setFile

        public void setFile​(byte[] file)
        Parameters:
        file - the file to set
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class PersistentObject
        See Also:
        According to http://stackoverflow.com/questions/27581/overriding-equals -and-hashcode-in-java it is recommended only to use getter-methods when using ORM like Hibernate
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class PersistentObject
        See Also:
        According to http://stackoverflow.com/questions/27581/overriding-equals -and-hashcode-in-java it is recommended only to use getter-methods when using ORM like Hibernate