public class FileSqlManager extends Object implements SqlManager
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowDuplicate |
protected boolean |
inited |
protected String |
pairBegin |
protected String |
pairEnd |
protected String[] |
paths |
protected String |
regex |
protected Map<String,String> |
sqls |
| Constructor and Description |
|---|
FileSqlManager() |
FileSqlManager(String... paths) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_check_inited() |
void |
add(Reader r) |
void |
addSql(String key,
String value)
增加一条 Sql
|
void |
clear() |
int |
count() |
Sql |
create(String key)
创建一个 Sql 对象
|
List<Sql> |
createCombo(String... keys)
根据一组 Sql 的键值,创建一个 Sql 列表
|
String |
get(String key)
获取一段 Sql 的原始文本
|
String |
getPairBegin() |
String |
getPairEnd() |
String[] |
getPaths() |
String |
getRegex() |
boolean |
isAllowDuplicate() |
String[] |
keys() |
void |
refresh()
刷新缓存
|
void |
remove(String key)
移除一条 Sql
|
void |
setAllowDuplicate(boolean allowDuplicate) |
void |
setPairBegin(String pairBegin) |
void |
setPairEnd(String pairEnd) |
void |
setPaths(String[] paths) |
FileSqlManager |
setRegex(String regex) |
protected String[] paths
protected boolean allowDuplicate
protected String pairBegin
protected String pairEnd
protected String regex
protected boolean inited
public FileSqlManager()
public FileSqlManager(String... paths)
public void refresh()
SqlManagerrefresh in interface SqlManagerpublic void add(Reader r) throws IOException
IOExceptionpublic String get(String key) throws SqlNotFoundException
SqlManagerget in interface SqlManagerkey - Sql 的键值SqlNotFoundExceptionpublic Sql create(String key) throws SqlNotFoundException
SqlManagercreate in interface SqlManagerkey - Sql 的键值SqlNotFoundExceptionpublic List<Sql> createCombo(String... keys)
SqlManagercreateCombo in interface SqlManagerkeys - 键值数组public int count()
count in interface SqlManagerpublic String[] keys()
keys in interface SqlManagerpublic void addSql(String key, String value)
SqlManageraddSql in interface SqlManagerkey - 键值value - Sql 原始字符串public void remove(String key)
SqlManagerremove in interface SqlManagerkey - 键值public void setAllowDuplicate(boolean allowDuplicate)
public boolean isAllowDuplicate()
public void setPaths(String[] paths)
public String getRegex()
public FileSqlManager setRegex(String regex)
public void setPairBegin(String pairBegin)
public void setPairEnd(String pairEnd)
public String getPairBegin()
public String getPairEnd()
public String[] getPaths()
protected void _check_inited()
public void clear()
clear in interface SqlManagerCopyright © 2017. All rights reserved.