Methods Summary |
---|
public oracle.toplink.essentials.expressions.Expression | generateExpression(oracle.toplink.essentials.internal.parsing.GenerationContext context)INTERNAL
Generate the TopLink expression for this node
Expression whereClause = getLeft().generateExpression(context);
if (leading) {
// use leftTrim
if (trimChar != null) {
Expression trimCharExpr = trimChar.generateExpression(context);
whereClause = whereClause.leftTrim(trimCharExpr);
} else {
whereClause = whereClause.leftTrim();
}
} else if (trailing) {
if (trimChar != null) {
Expression trimCharExpr = trimChar.generateExpression(context);
whereClause = whereClause.rightTrim(trimCharExpr);
} else {
whereClause = whereClause.rightTrim();
}
} else {
if (trimChar != null) {
Expression trimCharExpr = trimChar.generateExpression(context);
whereClause = whereClause.leftTrim(trimCharExpr).rightTrim(trimCharExpr);
} else {
whereClause = whereClause.leftTrim().rightTrim();
}
}
return whereClause;
|
public boolean | isBoth()
return both;
|
public boolean | isLeading()
return leading;
|
public boolean | isTrailing()
return trailing;
|
public void | setBoth(boolean newBoth)
this.both = newBoth;
|
public void | setLeading(boolean newLeading)
this.leading = newLeading;
|
public void | setTrailing(boolean newTrailing)
this.trailing = newTrailing;
|
public void | setTrimChar(oracle.toplink.essentials.internal.parsing.Node trimChar)
this.trimChar = trimChar;
|
public void | validate(oracle.toplink.essentials.internal.parsing.ParseTreeContext context)INTERNAL
Validate node and calculate its type.
TypeHelper typeHelper = context.getTypeHelper();
if (left != null) {
left.validate(context);
left.validateParameter(context, typeHelper.getStringType());
}
if (trimChar != null) {
trimChar.validate(context);
trimChar.validateParameter(context, typeHelper.getCharType());
}
setType(typeHelper.getStringType());
|