* @param projection Specifies, if this is a projection.
*/
public void addResult(String name,
RetrieveDesc foreignConstraint,
boolean projection) {
ConstraintFieldName cfName = new ConstraintFieldName(name, foreignConstraint);
if (projection) {
if ((options & OPT_PROJECTION) > 0) {
throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
"sqlstore.retrievedesc.toomanyprojections")); // NOI18N
}
// For projections on foreign fields, mark the foreign constraint.
// For local fields, set the property on the field constraint.
if (foreignConstraint != null) {
((RetrieveDescImpl) foreignConstraint).options |= OPT_PROJECTION;
} else {
cfName.setProjection();
// Set this property if you want to have DFG fields added for
// projections on local fields.
// options = options | OPT_PROJECTION;
}