public class Parser
extends Object
コンストラクタと説明 |
---|
Parser() |
修飾子とタイプ | メソッドと説明 |
---|---|
static boolean |
conclude(String[] ss)
分割した表現式の真偽判定
|
static String |
entityValue(Object entity,
String field)
エンティティクラスに属性の値を抽出
|
static boolean |
express(String expr2,
Object entity)
表現式の真偽判定
|
static String |
getPreSql(String file,
String id,
Object entity)
PreparedStatement SQL文の解析及び抽出
事前に書き込むパラメータ名の先頭に「$」が付けてない場合、 「'」 --> 「''」に自動に文字変換する。
|
static String |
getSql(String file,
String id,
Object entity)
Statement SQL文の解析及び抽出
パラメータ名の先頭に「$」が付けてない場合、 「'」 --> 「''」に自動に文字変換する。 |
static int |
invalid(Element e,
Object entity,
boolean pre)
XML要素の真偽判定
|
static Valid |
parseElement(Element el,
Object entity,
boolean pre)
条件満たすSQL文の抽出
|
static String |
parserSql(String file,
String id,
Object entity,
boolean isPre)
Statement SQL文の解析及び抽出
パラメータ名の先頭に「$」が付けてない場合、 「'」 --> 「''」に自動に文字変換する。 |
static boolean |
simple(String x2,
String ep,
String y2)
単純表現式の真偽判定
|
static boolean |
simpleNumber(String x2,
String ep,
String y2)
数値単純表現式の真偽判定
|
public static String getPreSql(String file, String id, Object entity) throws Exception
file
- SQL文所在のファイルid
- SQL文指定するIDentity
- パラメータに代入するエンティティクラスException
public static String getSql(String file, String id, Object entity) throws Exception
file
- SQL文所在のファイルid
- SQL文指定するIDentity
- パラメータに代入するエンティティクラスException
public static String parserSql(String file, String id, Object entity, boolean isPre) throws Exception
file
- SQL文所在のファイルid
- SQL文指定するIDentity
- パラメータに代入するエンティティクラスisPre
- trueの場合はPreparedStatement SQL、falseの場合はStatement SQLとするException
public static Valid parseElement(Element el, Object entity, boolean pre) throws Exception
el
- SQL文のXML要素entity
- パラメータに代入するエンティティクラスException
public static int invalid(Element e, Object entity, boolean pre) throws Exception
e
- SQL文のXML要素entity
- パラメータに代入するエンティティクラスException
public static boolean express(String expr2, Object entity) throws Exception
expr2
- 判定する表現式entity
- パラメータに代入するエンティティクラスException
public static boolean conclude(String[] ss) throws Exception
ss
- 分割した表現式Exception
public static String entityValue(Object entity, String field) throws Exception
entity
- エンティティクラスfield
- 属性Exception
public static boolean simple(String x2, String ep, String y2)
x2
- 左値ep
- 比較記号y2
- 右値public static boolean simpleNumber(String x2, String ep, String y2)
x2
- 左値ep
- 比較記号y2
- 右値