Package net.sf.basedb.core.data
Interface FileAttachableData
-
- All Superinterfaces:
IdentifiableData
- All Known Implementing Classes:
ProtocolData
public interface FileAttachableData extends IdentifiableData
A fileattachable item is an item which can have aFile
attached to it.This interface defines Hibernate database mapping for the
file
property to the database columnfile_id
. If a subclass wants to map the property to another column, it should override thegetFile()
method and add a Hibernate tag in the comment.Reference implementation
private FileData file; public FileData getFile() { return file; } public void setFile(FileData file) { this.file = file; }
- Version:
- 2.0
- Author:
- enell
- See Also:
BasicData
, Developer documentation: Basic classes and interfaces
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FileData
getFile()
Get the file that is attached to the item.void
setFile(FileData file)
Attach a file to the item.-
Methods inherited from interface net.sf.basedb.core.data.IdentifiableData
getId, getVersion
-
-
-
-
Method Detail
-
getFile
FileData getFile()
Get the file that is attached to the item.- Returns:
- A
FileData
object or null if no file is attached - Hibernate: many-to-one
- column="`file_id`" not-null="false" outer-join="false"
-
setFile
void setFile(FileData file)
Attach a file to the item. Null is allowed.
-
-