1 20 package com.nilostep.xlsql.database; 21 22 import com.nilostep.xlsql.sql.xlSqlSelect; 23 24 import java.io.File ; 25 26 import java.util.HashMap ; 27 import java.util.Map ; 28 import java.util.logging.*; 29 30 31 37 public abstract class xlSubFolder { 38 protected static final Logger logger = Logger.getAnonymousLogger(); 39 protected static final int ADD = 0; 40 protected static final int UPDATE = 1; 41 protected static final int DELETE = 2; 42 protected File directory; 43 protected xlSqlSelect sqlSelect; 44 protected String subFolderName; 45 protected Map files = new HashMap (); 46 protected Map validfiles = new HashMap (); 47 protected boolean[] bDirty = new boolean[3]; 48 49 55 public xlSubFolder(File dir, String name) throws xlException { 56 directory = dir; 57 subFolderName = name; 58 readFiles(); 59 } 60 61 68 public xlSubFolder(File dir, String name, boolean dirty) { 69 directory = dir; 70 subFolderName = name; 71 bDirty[ADD] = dirty; 72 } 73 74 80 public void setDirty(int i, boolean val) { 81 bDirty[i] = val; 82 } 83 84 89 public java.util.Map getFiles() { 90 return files; 91 } 92 93 98 public java.util.Map getValidFiles() { 99 return validfiles; 100 } 101 102 107 public String getSubFolderName() { 108 return subFolderName; 109 } 110 111 protected abstract void readFiles() throws xlException; 112 113 protected abstract void close(xlSqlSelect select) throws xlException; 114 } | Popular Tags |