/** * Handles the start of the <joinDef> tag. * * @param inName java.lang.String * @param inAttributes org.xml.sax.Attributes */ private void start_joinDef( final String inName, final Attributes inAttributes) { // NOPMD by lbenno // There must be something wrong in the definition if (VSys.assertNotNull(this, "start_joinDef", objectDef) == Assert.FAILURE) { return; } final String lJoinType = (inAttributes == null) ? null : inAttributes.getValue(JoinDefDef.joinType); // NOPMD final JoinDef lJoinDef = new JoinDefImpl(); try { lJoinDef.set(JoinDefDef.joinType, lJoinType); } catch (final SettingException exc) { DefaultExceptionWriter.printOut(this, exc, true); } if (currentJoinDef == null) { objectDef.setJoinDef(lJoinDef); } else { lJoinDef.setParentJoinDef(currentJoinDef); } currentJoinDef = lJoinDef; }
private String retrieveColumnName(final NameValueList inList) throws VInvalidNameException { // NOPMD by lbenno String outColumnName = objectDef.getColumnName(inList); if (inList.hasValue(ColumnDefDef.nestedObject)) { final String lTableName = (String) inList.getValue(ColumnDefDef.nestedObject); outColumnName = lTableName + outColumnName.substring(outColumnName.indexOf('.')); } return outColumnName; }
/** * Handles the start of the <objectNested> tag. * * @param inName java.lang.String * @param inAttributes org.xml.sax.Attributes */ private void start_objectNested(final String inName, final Attributes inAttributes) { // NOPMD // There must be something wrong in the definition if (VSys.assertNotNull(this, "start_objectNested", currentJoinDef) == Assert.FAILURE) { return; } final String lNestingName = (inAttributes != null) ? inAttributes.getValue(NestedDefDef.name) : null; // NOPMD nestedDef = new NestedDefImpl(lNestingName); objectDef.addNestedDef(nestedDef); columnDefState.setToObjectNested(); }
/** * Handles the start of the <joinedObjectDef> tag. * * @param inName java.lang.String * @param inAttributes org.xml.sax.Attributes */ private synchronized void start_objectDef( final String inName, final Attributes inAttributes) { // NOPMD this.objectDef = new JoinedObjectDefImpl(); for (int i = 0; i < inAttributes.getLength(); i++) { try { objectDef.set(inAttributes.getQName(i), inAttributes.getValue(i).intern()); } catch (final SettingException exc) { DefaultExceptionWriter.printOut(this, exc, true); } } }
/** * Handles the start of the <objectDesc> tag. * * @param inName java.lang.String * @param inAttributes org.xml.sax.Attributes */ private void start_objectDesc( final String inName, final Attributes inAttributes) { // NOPMD by lbenno // There must be something wrong in the definition if (VSys.assertNotNull(this, "start_objectDesc", currentJoinDef) == Assert.FAILURE) { return; } final String lObjectClassName = (inAttributes == null) ? null : inAttributes // NOPMD .getValue(ObjectDescDef.objectClassName); currentJoinDef.setTableName(objectDef.getTableName(lObjectClassName)); }
/** * Handles the start of the <columnDef> tag. * * @param inName java.lang.String * @param inAttributes org.xml.sax.Attributes */ private void start_columnDef(final String inName, final Attributes inAttributes) { // NOPMD final DefaultNameValueList lList = createAttributesList(inAttributes); try { switch (columnDefState.getState()) { case ColumnDefState.COLUMN_DEF: objectDef.addColumnDef(lList); break; case ColumnDefState.JOIN_CONDITION: currentJoinDef.addColumnDef(retrieveColumnName(lList)); break; case ColumnDefState.OBJECT_NESTED: nestedDef.addColumnDef(lList); break; case ColumnDefState.RESULT_GROUPING: groupingDef.addColumnDef(lList); break; default: objectDef.addColumnDef(lList); break; } } catch (final BOMException | VInvalidNameException exc) { DefaultExceptionHandler.instance().handle(exc); } }
/** * Handles the start of the <hidden> tag. * * @param inName java.lang.String * @param inAttributes org.xml.sax.Attributes */ private void start_hidden(final String inName, final Attributes inAttributes) { // NOPMD by lbenno final DefaultNameValueList lList = createAttributesList(inAttributes); objectDef.addHidden(lList); }