📄 relationscache.java
字号:
/*
Loader - tool for transfering data from one JDBC source to another and
doing transformations during copy.
Copyright (C) 2002-2003 Together
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Loader.java
Date: 03.03.2003.
@version 2.1 alpha
@authors:
Radoslav Dutina rale@prozone.co.yu
*/
package org.webdocwf.util.loader;
import java.util.*;
/**
* RelationsCache class is used for caching value of relation column if the tableMode
* is Cache in <table> tag of impordDefinition job
* @author not Radoslav Dutina
* @version 1.0
*/
public class RelationsCache {
private Hashtable relationCacheValue = new Hashtable();
private Hashtable relationCacheType = new Hashtable();
/**
* Empty constructor of RelationsCache class
*/
public RelationsCache() {
}
/**
* This method sets the value of relationCacheValue hashtable
* @param key is string which reperesents sql statement
* @param obj is value of this sql statement
*/
public void setRelationsCacheValue(String key, Object obj){
relationCacheValue.put(key,obj);
}
/**
* This method sets the value of relationCacheType hashtable
* @param key is string which reperesents sql statement
* @param type is value of this sql statement
*/
public void setRelationsCacheType(String key, String type){
relationCacheType.put(key,type);
}
/**
* This method read value from relationCacheValue hashtable
* @param key is string which reperesents sql statement
* @return value from hashtable
*/
public Object getRelationsCacheValue(String key) {
Object obj = relationCacheValue.get(key);
if (obj == null)
return null;
else
return obj;
}
/**
* This method read value from relationCacheType hashtable
* @param key is string which reperesents sql statement
* @return value from hashtable
*/
public String getRelationsCachType(String key){
String type=relationCacheType.get(key).toString();
return type;
}
/**
* This method empty all values of hashtables:
* relationCacheValue and relationCacheType
*/
public void resetRelationsCache(){
relationCacheValue.clear();
relationCacheType.clear();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -