Condition

org.beangle.data.dao.Condition
See theCondition companion object
class Condition(val content: String, initParams: Any*)

查询条件

使用例子如下

new Condition("std.id=?",new Long(2));
或者 Condition("std.id=:std_id",new Long(2));
?绑定单值.命名参数允许绑定多值.但是只能由字母,数组和下划线组成
一组condition只能采取上面一种形式

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

override def equals(obj: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Attributes

that

the object to compare against this object for equality.

Returns:

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
Any
override def hashCode(): Int

hashCode

hashCode

Attributes

Returns:

a int.

Definition Classes
Any
def isValidIdentifierStarter(ch: Char): Boolean
def named: Boolean

是否是包含命名参数

是否是包含命名参数

Attributes

Returns:

a boolean.

def param(value: Any): Condition.this.type

添加参数

添加参数

Attributes

value

a { @link java.lang.Object} object.

Returns:

a { @link org.beangle.data.dao.query.builder.Condition} object.

def paramNames: List[String]

得到查询条件中所有的命名参数.

得到查询条件中所有的命名参数.

Attributes

def params(values: Seq[Any]): Condition.this.type

添加多个参数 params.

添加多个参数 params.

Attributes

override def toString: String

toString

toString

Attributes

Returns:

a String object.

See also:

java.lang.Object#toString()

Definition Classes
Any

Concrete fields

val content: String
val params: ListBuffer[Any]