1 16 17 package org.apache.jetspeed.cache; 18 19 import java.util.Date ; 20 import java.io.File ; 21 22 28 29 public class FileCacheEntry 30 { 31 protected File file; 32 protected Object document; 33 34 protected long lastAccessed; 35 protected Date lastModified; 36 37 private FileCacheEntry() 38 { 39 } 40 41 47 public FileCacheEntry(File file, Object document) 48 { 49 this.file = file; 50 this.document = document; 51 this.lastModified = new Date (file.lastModified()); 52 this.lastAccessed = new Date ().getTime(); 53 } 54 55 60 public File getFile() 61 { 62 return this.file; 63 } 64 65 70 public void setFile(File file) 71 { 72 this.file = file; 73 } 74 75 80 public void setLastAccessed(long lastAccessed) 81 { 82 this.lastAccessed = lastAccessed; 83 } 84 85 90 public long getLastAccessed() 91 { 92 return this.lastAccessed; 93 } 94 95 100 public void setLastModified(Date lastModified) 101 { 102 this.lastModified = lastModified; 103 } 104 105 110 public Date getLastModified() 111 { 112 return this.lastModified; 113 } 114 115 120 public void setDocument(Object document) 121 { 122 this.document = document; 123 } 124 125 130 public Object getDocument() 131 { 132 return this.document; 133 } 134 135 } 136 137 138 | Popular Tags |