private void setUpdateFlags(GroupSymbol groupSymbol) throws QueryMetadataException, TeiidComponentException { UpdateMapping info = updateInfo.updatableGroups.get(groupSymbol.getName()); if (info == null) { return; // not projected } if (!metadata.groupSupports(groupSymbol.getMetadataID(), SupportConstants.Group.UPDATE)) { report.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0003", groupSymbol)); //$NON-NLS-1$ return; } info.insertAllowed = true; for (ElementSymbol es : ResolverUtil.resolveElementsInGroup(info.group, metadata)) { if (!info.updatableViewSymbols.values().contains(es) && !validateInsertElement(es)) { info.insertAllowed = false; } } info.updateAllowed = true; }
private void setUpdateFlags(GroupSymbol groupSymbol) throws QueryMetadataException, TeiidComponentException { UpdateMapping info = updateInfo.updatableGroups.get(groupSymbol.getName()); if (info == null) { return; // not projected } if (!metadata.groupSupports(groupSymbol.getMetadataID(), SupportConstants.Group.UPDATE)) { report.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0003", groupSymbol)); //$NON-NLS-1$ return; } info.insertAllowed = true; for (ElementSymbol es : ResolverUtil.resolveElementsInGroup(info.group, metadata)) { if (!info.updatableViewSymbols.values().contains(es) && !validateInsertElement(es)) { info.insertAllowed = false; } } info.updateAllowed = true; }
private void setUpdateFlags(GroupSymbol groupSymbol) throws QueryMetadataException, TeiidComponentException { UpdateMapping info = updateInfo.updatableGroups.get(groupSymbol.getName()); if (info == null) { return; // not projected } if (!metadata.groupSupports(groupSymbol.getMetadataID(), SupportConstants.Group.UPDATE)) { report.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0003", groupSymbol)); //$NON-NLS-1$ return; } info.insertAllowed = true; for (ElementSymbol es : ResolverUtil.resolveElementsInGroup(info.group, metadata)) { if (!info.updatableViewSymbols.values().contains(es) && !validateInsertElement(es)) { info.insertAllowed = false; } } info.updateAllowed = true; }
/** * <p> This method validates an elements present in the group specified in the * FROM clause of the query but not specified in its SELECT clause</p> * @param element The <code>ElementSymbol</code> being validated * @throws TeiidComponentException * @throws QueryMetadataException */ private boolean validateInsertElement(ElementSymbol element) throws QueryMetadataException, TeiidComponentException { // checking if the elements not specified in the query are required. if(metadata.elementSupports(element.getMetadataID(), SupportConstants.Element.NULL) || metadata.elementSupports(element.getMetadataID(), SupportConstants.Element.DEFAULT_VALUE) || metadata.elementSupports(element.getMetadataID(), SupportConstants.Element.AUTO_INCREMENT)) { return true; } if (this.updateInfo.insertType == UpdateType.INHERENT) { insertReport.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0010", element, element.getGroupSymbol())); //$NON-NLS-1$ } return false; } }
updateReport.handleValidationWarning(warning); deleteReport.handleValidationWarning(warning); updateInfo.isSimple = false; report.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0007", viewSymbols.get(i), symbol)); //$NON-NLS-1$ updateReport.handleValidationWarning(warning); deleteReport.handleValidationWarning(warning); updateInfo.isSimple = false; report.handleValidationWarning(warning);
/** * <p> This method validates an elements present in the group specified in the * FROM clause of the query but not specified in its SELECT clause</p> * @param element The <code>ElementSymbol</code> being validated * @throws TeiidComponentException * @throws QueryMetadataException */ private boolean validateInsertElement(ElementSymbol element) throws QueryMetadataException, TeiidComponentException { // checking if the elements not specified in the query are required. if(metadata.elementSupports(element.getMetadataID(), SupportConstants.Element.NULL) || metadata.elementSupports(element.getMetadataID(), SupportConstants.Element.DEFAULT_VALUE) || metadata.elementSupports(element.getMetadataID(), SupportConstants.Element.AUTO_INCREMENT)) { return true; } if (this.updateInfo.insertType == UpdateType.INHERENT) { insertReport.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0010", element, element.getGroupSymbol())); //$NON-NLS-1$ } return false; } }
/** * <p> This method validates an elements present in the group specified in the * FROM clause of the query but not specified in its SELECT clause</p> * @param element The <code>ElementSymbol</code> being validated * @throws TeiidComponentException * @throws QueryMetadataException */ private boolean validateInsertElement(ElementSymbol element) throws QueryMetadataException, TeiidComponentException { // checking if the elements not specified in the query are required. if(metadata.elementSupports(element.getMetadataID(), SupportConstants.Element.NULL) || metadata.elementSupports(element.getMetadataID(), SupportConstants.Element.DEFAULT_VALUE) || metadata.elementSupports(element.getMetadataID(), SupportConstants.Element.AUTO_INCREMENT)) { return true; } if (this.updateInfo.insertType == UpdateType.INHERENT) { insertReport.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0010", element, element.getGroupSymbol())); //$NON-NLS-1$ } return false; } }
updateReport.handleValidationWarning(warning); deleteReport.handleValidationWarning(warning); updateInfo.isSimple = false; report.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0007", viewSymbols.get(i), symbol)); //$NON-NLS-1$ updateReport.handleValidationWarning(warning); deleteReport.handleValidationWarning(warning); updateInfo.isSimple = false; report.handleValidationWarning(warning);
updateReport.handleValidationWarning(warning); deleteReport.handleValidationWarning(warning); updateInfo.isSimple = false; report.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0007", viewSymbols.get(i), symbol)); //$NON-NLS-1$ updateReport.handleValidationWarning(warning); deleteReport.handleValidationWarning(warning); updateInfo.isSimple = false; report.handleValidationWarning(warning);