Purpose: Represent a SUBSTRING
Responsibilities:
SubstringNode constructor comment. super();
super();
INTERNAL Generate the TopLink expression for this node Expression whereClause = getLeft().generateExpression(context); Expression startPosition = getStartPosition().generateExpression(context); Expression stringLength = getStringLength().generateExpression(context); whereClause = whereClause.substring(startPosition, stringLength); return whereClause;
Expression whereClause = getLeft().generateExpression(context); Expression startPosition = getStartPosition().generateExpression(context); Expression stringLength = getStringLength().generateExpression(context); whereClause = whereClause.substring(startPosition, stringLength); return whereClause;
Return the start position object return startPosition;
return startPosition;
Return the string length object return stringLength;
return stringLength;
INTERNAL Check the child nodes for an unqualified field access and if so, replace them by a qualified field access. if (left != null) { left = left.qualifyAttributeAccess(context); } if (startPosition != null) { startPosition = startPosition.qualifyAttributeAccess(context); } if (stringLength != null) { stringLength = stringLength.qualifyAttributeAccess(context); } return this;
if (left != null) { left = left.qualifyAttributeAccess(context); } if (startPosition != null) { startPosition = startPosition.qualifyAttributeAccess(context); } if (stringLength != null) { stringLength = stringLength.qualifyAttributeAccess(context); } return this;
Insert the method's description here. Creation date: (1/19/01 3:41:55 PM)paramnewStartPosition java.lang.Integer startPosition = newStartPosition;
startPosition = newStartPosition;
Insert the method's description here. Creation date: (1/19/01 3:42:26 PM)paramnewStringLength java.lang.Integer stringLength = newStringLength;
stringLength = newStringLength;
INTERNAL Validate node and calculate its type. TypeHelper typeHelper = context.getTypeHelper(); if (left != null) { left.validate(context); left.validateParameter(context, typeHelper.getStringType()); } if (startPosition != null) { startPosition.validate(context); startPosition.validateParameter(context, typeHelper.getIntType()); } if (stringLength != null) { stringLength.validate(context); stringLength.validateParameter(context, typeHelper.getIntType()); } setType(typeHelper.getStringType());
TypeHelper typeHelper = context.getTypeHelper(); if (left != null) { left.validate(context); left.validateParameter(context, typeHelper.getStringType()); } if (startPosition != null) { startPosition.validate(context); startPosition.validateParameter(context, typeHelper.getIntType()); } if (stringLength != null) { stringLength.validate(context); stringLength.validateParameter(context, typeHelper.getIntType()); } setType(typeHelper.getStringType());