Ejemplo n.º 1
0
  /**
   * 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;
  }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
  /**
   * 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();
  }
Ejemplo n.º 4
0
  /**
   * 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);
      }
    }
  }
Ejemplo n.º 5
0
  /**
   * 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));
  }
Ejemplo n.º 6
0
 /**
  * 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);
   }
 }
Ejemplo n.º 7
0
 /**
  * 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);
 }