Package net.sf.xbus.base.core

Examples of net.sf.xbus.base.core.XException


    {
      interfaceDescription = builder.parse(interfaceDescriptionFilename);
    }
    catch (IOException e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_PROTOCOL,
          Constants.PACKAGE_PROTOCOL_BYTEARRAYLIST, "0", e);
    }
    catch (SAXException e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_PROTOCOL,
          Constants.PACKAGE_PROTOCOL_BYTEARRAYLIST, "0", e);
    }

    /*
     * 3. Getting the position, length and list of identifiers
     */
    NodeList lines = interfaceDescription.getElementsByTagName(TAG_LINES);
    if (lines.getLength() != 1)
    {
      throw new XException(Constants.LOCATION_INTERN,
          Constants.LAYER_PROTOCOL,
          Constants.PACKAGE_PROTOCOL_BYTEARRAYLIST, "10");
    }

    Node identifierTag = lines.item(0);
View Full Code Here


    {
      identifierPos = Integer.parseInt(attribute.getNodeValue());
    }
    else
    {
      throw new XException(Constants.LOCATION_INTERN,
          Constants.LAYER_PROTOCOL,
          Constants.PACKAGE_PROTOCOL_BYTEARRAYLIST, "11");
    }
    return identifierPos;
  }
View Full Code Here

    {
      identifierLength = Integer.parseInt(attribute.getNodeValue());
    }
    else
    {
      throw new XException(Constants.LOCATION_INTERN,
          Constants.LAYER_PROTOCOL,
          Constants.PACKAGE_PROTOCOL_BYTEARRAYLIST, "12");
    }
    return identifierLength;
  }
View Full Code Here

        mConnection.setAutoCommit(config.getValueAsBoolean(
            mConfigChapter, mConfigSection, "AutoCommit"));
      }
      catch (SQLException e)
      {
        throw new XException(Constants.LOCATION_EXTERN,
            Constants.LAYER_TECHNICAL,
            Constants.PACKAGE_TECHNICAL_DATABASE, "0", e);
      }

      mIsOpen = true;
View Full Code Here

    Node attribute = null;
    NodeList recordTypes = interfaceDescription
        .getElementsByTagName("RecordType");
    if (recordTypes.getLength() < 1)
    {
      throw new XException(Constants.LOCATION_INTERN,
          Constants.LAYER_PROTOCOL,
          Constants.PACKAGE_PROTOCOL_BYTEARRAYLIST, "14");
    }
    Node recordType;
    Node nameNode;
    String identifierString;
    String identifierName;
    for (int i = 0; i < recordTypes.getLength(); i++)
    {
      recordType = recordTypes.item(i);
      attributes = recordType.getAttributes();
      attribute = attributes.getNamedItem("Identifier");
      if (attribute != null)
      {
        identifierString = attribute.getNodeValue();
      }
      else
      {
        throw new XException(Constants.LOCATION_INTERN,
            Constants.LAYER_PROTOCOL,
            Constants.PACKAGE_PROTOCOL_BYTEARRAYLIST, "15");
      }

      nameNode = recordType.getFirstChild();
View Full Code Here

      {
        mConnection.close();
      }
      catch (SQLException e)
      {
        throw new XException(Constants.LOCATION_EXTERN,
            Constants.LAYER_TECHNICAL,
            Constants.PACKAGE_TECHNICAL_DATABASE, "0", e);
      }
    }
  }
View Full Code Here

        mConnection.commit();
      }
    }
    catch (SQLException e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
          Constants.PACKAGE_TECHNICAL_DATABASE, "0", e);
    }
  }
View Full Code Here

      {
        identifierString = attribute.getNodeValue();
      }
      else
      {
        throw new XException(Constants.LOCATION_INTERN,
            Constants.LAYER_PROTOCOL,
            Constants.PACKAGE_PROTOCOL_BYTEARRAYLIST, "15");
      }

      fieldList = new Vector();
      fieldNodes = recordtype.getChildNodes();
      for (int k = 0; k < fieldNodes.getLength(); k++)
      {
        node = fieldNodes.item(k);
        if (("Field".equals(node.getNodeName()))
            && (node.getNodeType() == Node.ELEMENT_NODE))
        {
          field = new Field();
          attributes = node.getAttributes();
          name = attributes.getNamedItem("Name");
          if (name != null)
          {
            field.name = name.getNodeValue();
          }
          else
          {
            throw new XException(Constants.LOCATION_INTERN,
                Constants.LAYER_PROTOCOL,
                Constants.PACKAGE_PROTOCOL_BYTEARRAYLIST, "16");
          }
          length = attributes.getNamedItem("Length");
          if (length != null)
          {
            try
            {
              field.length = Integer.parseInt(length
                  .getNodeValue());
            }
            catch (NumberFormatException e)
            {
              throw new XException(Constants.LOCATION_EXTERN,
                  Constants.LAYER_PROTOCOL,
                  Constants.PACKAGE_PROTOCOL_BYTEARRAYLIST,
                  "17", e);
            }
          }
          else
          {
            throw new XException(Constants.LOCATION_EXTERN,
                Constants.LAYER_PROTOCOL,
                Constants.PACKAGE_PROTOCOL_BYTEARRAYLIST, "18");
          }
          fieldList.add(field);
        }
View Full Code Here

        mConnection.rollback();
      }
    }
    catch (SQLException e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
          Constants.PACKAGE_TECHNICAL_DATABASE, "0", e);
    }
  }
View Full Code Here

      ResultSet results = stmt.executeQuery(statement);
      return results;
    }
    catch (SQLException e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
          Constants.PACKAGE_TECHNICAL_DATABASE, "0", e);
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.xbus.base.core.XException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.