Coverage Report - com.buckosoft.PicMan.domain.Pic
 
Classes in this File Line Coverage Branch Coverage Complexity
Pic
0%
0/33
N/A
1
 
 1  
 /******************************************************************************
 2  
  * Pic.java - Define one pic.
 3  
  * 
 4  
  * PicMan - The BuckoSoft Picture Manager in Java
 5  
  * Copyright(c) 2005 - Dick Balaska
 6  
  * 
 7  
  */
 8  
 package com.buckosoft.PicMan.domain;
 9  
 
 10  
 import java.util.Date;
 11  
 
 12  
 /** Define one pic.
 13  
  * @author Dick Balaska
 14  
  * @since 2005/08/01
 15  
  */
 16  
 public class Pic {
 17  0
         private        int                pid = -1;
 18  
         private        String        name;
 19  
         private int                width;
 20  
         private        int                height;
 21  0
         private        int                rid = -1;
 22  
         private        String        location;
 23  0
         private        Date        date = new Date(0);
 24  0
         private        boolean        importPic = false;
 25  
         private        int                cacheDir;
 26  
         private        long        md5;
 27  
         
 28  
         /** Bean constructor */
 29  0
         public Pic() {}
 30  
 
 31  
         /** Create a Pic with this importPic attribute and name
 32  
          * @param importPic true if this is an importPic.
 33  
          * @param name The filename of the pic to be imported
 34  
          */
 35  0
         public Pic(boolean importPic, String name){
 36  0
                 this.importPic = importPic;
 37  0
                 this.name = name;
 38  0
         }
 39  
 
 40  
         /** Set the Picture Id
 41  
          * @param pid
 42  
          */
 43  0
         public        void        setPid(int pid) { this.pid = pid; }
 44  0
         public        int                getPid() { return(pid); }
 45  
 
 46  0
         public        void        setName(String name) { this.name = name; }
 47  0
         public        String        getName() { return(name); }
 48  0
         public        void        setWidth(int width) { this.width = width; }
 49  0
         public        int                getWidth() { return(width); }
 50  0
         public        void        setHeight(int height) { this.height = height; }
 51  0
         public        int                getHeight() { return(height); }
 52  
 
 53  
         /** Set the relative directory of this pic
 54  
          * @param location
 55  
          */
 56  
         public        void        setLocation(String location) {
 57  0
                 this.location = location;
 58  0
         }
 59  
 
 60  
         /** Get the relative directory of this pic
 61  
          * @return the subdirectory we live under
 62  
          */
 63  
         public        String        getLocation() { 
 64  0
                 return(location); 
 65  
         }
 66  
 //        public        void                setDate(Date date) { this.date = date; }
 67  0
         public        Date        getDate() { return(date); }
 68  
 //        public        void        updateSizes() {}
 69  
 
 70  
         /** Get the Root id for where this pic is stored
 71  
          * @return the rid
 72  
          */
 73  
         public int getRid() {
 74  0
                 return rid;
 75  
         }
 76  
         /** Set the Root id for where this pic is stored
 77  
          * @param rid the rid to set
 78  
          */
 79  
         public void setRid(int rid) {
 80  0
                 this.rid = rid;
 81  0
         }
 82  
         /**
 83  
          * @return the importPic
 84  
          */
 85  
         public boolean isImportPic() {
 86  0
                 return importPic;
 87  
         }
 88  
         /** If this is an importPic, then set this flag
 89  
          * @param importPic the importPic to set
 90  
          */
 91  
         public void setImportPic(boolean importPic) {
 92  0
                 this.importPic = importPic;
 93  0
         }
 94  
         /** Fetch the cache subdirectory that this pic was written to.
 95  
          * @return the cacheDir
 96  
          */
 97  
         public int getCacheDir() {
 98  0
                 return cacheDir;
 99  
         }
 100  
         /** Set which cache subdirectory this pic is written to.
 101  
          * @param cacheDir the cacheDir to set
 102  
          */
 103  
         public void setCacheDir(int cacheDir) {
 104  0
                 this.cacheDir = cacheDir;
 105  0
         }
 106  
         /** Get the md5 checksum for this pic
 107  
          * @return the md5
 108  
          */
 109  
         public long getMd5() {
 110  0
                 return md5;
 111  
         }
 112  
         /** Set the md5 checksum for this pic
 113  
          * @param md5 the md5 to set
 114  
          */
 115  
         public void setMd5(long md5) {
 116  0
                 this.md5 = md5;
 117  0
         }
 118  
 
 119  
 }