public void setFile(ITextFile file) { this.file = (TextFile) file; if (id == null) id = new KeywordsOccurrencePK(); id.setFileId(file.getFileId()); }