public class Condition extends Object
new Condition("std.id=?",new Long(2));
或者 Condition("std.id=:std_id",new Long(2));
?绑定单值.命名参数允许绑定多值.但是只能由字母,数组和下划线组成
一组condition只能采取上面一种形式
| Constructor and Description |
|---|
Condition(String content)
Constructor for Condition.
|
Condition(String content,
Object param1)
Constructor for Condition.
|
Condition(String content,
Object param1,
Object param2)
Constructor for Condition.
|
Condition(String content,
Object param1,
Object param2,
Object param3)
Constructor for Condition.
|
| Modifier and Type | Method and Description |
|---|---|
static Condition |
eq(String content,
Number value)
eq.
|
static Condition |
eq(String content,
String value)
eq.
|
boolean |
equals(Object obj) |
static Condition |
ge(String content,
Number value)
ge.
|
String |
getContent()
Getter for the field
content. |
List<String> |
getParamNames()
得到查询条件中所有的命名参数.
|
List<Object> |
getParams()
Getter for the field
params. |
int |
hashCode()
hashCode.
|
boolean |
isNamed()
isNamed.
|
static Condition |
le(String content,
Number value)
le.
|
static Condition |
like(String content,
String value)
like.
|
static Condition |
ne(String content,
Number value)
ne.
|
Condition |
param(Object value)
param.
|
Condition |
params(List<?> values)
params.
|
String |
toString()
toString.
|
public Condition(String content)
Constructor for Condition.
content - a String object.public boolean isNamed()
isNamed.
public String toString()
toString.
toString in class ObjectString object.Object.toString()Copyright © 2005–2018 The Beangle Software. All rights reserved.