private void addSourceHint(SourceHint sh) { if (sh != null) { append(SPACE); append(BEGIN_HINT); append("sh"); //$NON-NLS-1$ if (sh.isUseAliases()) { append(SPACE); append("KEEP ALIASES"); //$NON-NLS-1$ } if (sh.getGeneralHint() != null) { appendSourceHintValue(sh.getGeneralHint()); } else { append(SPACE); } if (sh.getSpecificHints() != null) { for (Map.Entry<String, SpecificHint> entry : sh.getSpecificHints().entrySet()) { append(entry.getKey()); if (entry.getValue().isUseAliases()) { append(SPACE); append("KEEP ALIASES"); //$NON-NLS-1$ } appendSourceHintValue(entry.getValue().getHint()); } } append(END_HINT); } }
private void addSourceHint(SourceHint sh) { if (sh != null) { append(SPACE); append(BEGIN_HINT); append("sh"); //$NON-NLS-1$ if (sh.isUseAliases()) { append(SPACE); append("KEEP ALIASES"); //$NON-NLS-1$ } if (sh.getGeneralHint() != null) { appendSourceHintValue(sh.getGeneralHint()); } else { append(SPACE); } if (sh.getSpecificHints() != null) { for (Map.Entry<String, SpecificHint> entry : sh.getSpecificHints().entrySet()) { append(entry.getKey()); if (entry.getValue().isUseAliases()) { append(SPACE); append("KEEP ALIASES"); //$NON-NLS-1$ } appendSourceHintValue(entry.getValue().getHint()); } } append(END_HINT); } }
private void addSourceHint(SourceHint sh) { if (sh != null) { append(SPACE); append(BEGIN_HINT); append("sh"); //$NON-NLS-1$ if (sh.isUseAliases()) { append(SPACE); append("KEEP ALIASES"); //$NON-NLS-1$ } if (sh.getGeneralHint() != null) { appendSourceHintValue(sh.getGeneralHint()); } else { append(SPACE); } if (sh.getSpecificHints() != null) { for (Map.Entry<String, SpecificHint> entry : sh.getSpecificHints().entrySet()) { append(entry.getKey()); if (entry.getValue().isUseAliases()) { append(SPACE); append("KEEP ALIASES"); //$NON-NLS-1$ } appendSourceHintValue(entry.getValue().getHint()); } } append(END_HINT); } }
@Override public TupleSource registerRequest(CommandContext context, Command command, String modelName, RegisterRequestParameter parameterObject) throws TeiidComponentException { if (hints[i*2] == null && hints[i*2+1] == null) { assertNull(command.getSourceHint()); } else { assertEquals(hints[i*2], command.getSourceHint().getGeneralHint()); //$NON-NLS-1$ assertEquals(hints[i*2+1], command.getSourceHint().getSourceHint("bar")); //$NON-NLS-1$ } i = ++i%(hints.length/2); if (getData(command.toString()) != null) { return super.registerRequest(context, command, modelName, parameterObject); } return CollectionTupleSource.createNullTupleSource(); } };