Purpose: Represent a LOCATE
Responsibilities:
Return a new LocateNode. super();
super();
INTERNAL Generate the TopLink expression for this node Expression whereClause = getFindIn().generateExpression(context); Expression findExpr = getFind().generateExpression(context); if (startPosition != null) { whereClause = whereClause.locate(findExpr, getStartPosition().generateExpression(context)); } else { whereClause = whereClause.locate(findExpr); } return whereClause;
Expression whereClause = getFindIn().generateExpression(context); Expression findExpr = getFind().generateExpression(context); if (startPosition != null) { whereClause = whereClause.locate(findExpr, getStartPosition().generateExpression(context)); } else { whereClause = whereClause.locate(findExpr); } return whereClause;
return find;
return findIn;
return startPosition;
INTERNAL Check the child nodes for an unqualified field access and if so, replace them by a qualified field access. if (find != null) { find = find.qualifyAttributeAccess(context); } if (findIn != null) { findIn = findIn.qualifyAttributeAccess(context); } if (startPosition != null) { startPosition = startPosition.qualifyAttributeAccess(context); } return this;
if (find != null) { find = find.qualifyAttributeAccess(context); } if (findIn != null) { findIn = findIn.qualifyAttributeAccess(context); } if (startPosition != null) { startPosition = startPosition.qualifyAttributeAccess(context); } return this;
find = newFind;
findIn = newFindIn;
startPosition = newStartPosition;
INTERNAL Validate node and calculate its type. TypeHelper typeHelper = context.getTypeHelper(); if (findIn != null) { findIn.validate(context); findIn.validateParameter(context, typeHelper.getStringType()); } if (find != null) { find.validate(context); find.validateParameter(context, typeHelper.getStringType()); } if (startPosition != null) { startPosition.validate(context); startPosition.validateParameter(context, typeHelper.getIntType()); } setType(typeHelper.getIntType());
TypeHelper typeHelper = context.getTypeHelper(); if (findIn != null) { findIn.validate(context); findIn.validateParameter(context, typeHelper.getStringType()); } if (find != null) { find.validate(context); find.validateParameter(context, typeHelper.getStringType()); } if (startPosition != null) { startPosition.validate(context); startPosition.validateParameter(context, typeHelper.getIntType()); } setType(typeHelper.getIntType());