Package com.ibatis.dao.engine.impl

Examples of com.ibatis.dao.engine.impl.StandardDaoManager


    return buildDaoManager(reader);
  }

  public DaoManager buildDaoManager(Reader reader)
      throws DaoException {
    StandardDaoManager daoManager = new StandardDaoManager();

    try {

      Document doc = getDoc(reader);
      Element root = (Element) doc.getLastChild();

      String rootname = root.getNodeName();
      if (!DAO_CONFIG_ELEMENT.equals(rootname)) {
        throw new IOException("Error while configuring DaoManager.  The root tag of the DAO configuration XML " +
            "document must be '" + DAO_CONFIG_ELEMENT + "'.");
      }

      NodeList children = root.getChildNodes();
      for (int i = 0; i < children.getLength(); i++) {
        Node child = children.item(i);
        if (child.getNodeType() == Node.ELEMENT_NODE) {
          if (CONTEXT_ELEMENT.equals(child.getNodeName())) {
            DaoContext daoContext = parseContext((Element) child, daoManager);
            daoManager.addContext(daoContext);
          } else if (PROPERTIES_ELEMENT.equals(child.getNodeName())) {
            Properties attributes = parseAttributes(child);
            if (attributes.containsKey("resource")) {
              String resource = attributes.getProperty("resource");
              if (properties == null) {
View Full Code Here


    return buildDaoManager(reader);
  }

  public DaoManager buildDaoManager(Reader reader)
      throws DaoException {
    StandardDaoManager daoManager = new StandardDaoManager();

    try {

      Document doc = getDoc(reader);
      Element root = (Element) doc.getLastChild();

      String rootname = root.getNodeName();
      if (!DAO_CONFIG_ELEMENT.equals(rootname)) {
        throw new IOException("Error while configuring DaoManager.  The root tag of the DAO configuration XML " +
            "document must be '" + DAO_CONFIG_ELEMENT + "'.");
      }

      NodeList children = root.getChildNodes();
      for (int i = 0; i < children.getLength(); i++) {
        Node child = children.item(i);
        if (child.getNodeType() == Node.ELEMENT_NODE) {
          if (CONTEXT_ELEMENT.equals(child.getNodeName())) {
            DaoContext daoContext = parseContext((Element) child, daoManager);
            daoManager.addContext(daoContext);
          } else if (PROPERTIES_ELEMENT.equals(child.getNodeName())) {
            Properties attributes = parseAttributes(child);
            if (attributes.containsKey("resource")) {
              String resource = attributes.getProperty("resource");
              if (properties == null) {
View Full Code Here

    return buildDaoManager(reader);
  }

  public DaoManager buildDaoManager(Reader reader)
      throws DaoException {
    StandardDaoManager daoManager = new StandardDaoManager();

    try {

      Document doc = getDoc(reader);
      Element root = (Element) doc.getLastChild();

      String rootname = root.getNodeName();
      if (!DAO_CONFIG_ELEMENT.equals(rootname)) {
        throw new IOException("Error while configuring DaoManager.  The root tag of the DAO configuration XML " +
            "document must be '" + DAO_CONFIG_ELEMENT + "'.");
      }

      NodeList children = root.getChildNodes();
      for (int i = 0; i < children.getLength(); i++) {
        Node child = children.item(i);
        if (child.getNodeType() == Node.ELEMENT_NODE) {
          if (CONTEXT_ELEMENT.equals(child.getNodeName())) {
            DaoContext daoContext = parseContext((Element) child, daoManager);
            daoManager.addContext(daoContext);
          } else if (PROPERTIES_ELEMENT.equals(child.getNodeName())) {
            Properties attributes = parseAttributes(child);
            if (attributes.containsKey("resource")) {
              String resource = attributes.getProperty("resource");
              if (properties == null) {
View Full Code Here

    return buildDaoManager(reader);
  }

  public DaoManager buildDaoManager(Reader reader)
      throws DaoException {
    StandardDaoManager daoManager = new StandardDaoManager();

    try {

      Document doc = getDoc(reader);
      Element root = (Element) doc.getLastChild();

      String rootname = root.getNodeName();
      if (!DAO_CONFIG_ELEMENT.equals(rootname)) {
        throw new IOException("Error while configuring DaoManager.  The root tag of the DAO configuration XML " +
            "document must be '" + DAO_CONFIG_ELEMENT + "'.");
      }

      NodeList children = root.getChildNodes();
      for (int i = 0; i < children.getLength(); i++) {
        Node child = children.item(i);
        if (child.getNodeType() == Node.ELEMENT_NODE) {
          if (CONTEXT_ELEMENT.equals(child.getNodeName())) {
            DaoContext daoContext = parseContext((Element) child, daoManager);
            daoManager.addContext(daoContext);
          } else if (PROPERTIES_ELEMENT.equals(child.getNodeName())) {
            Properties attributes = parseAttributes(child);
            if (attributes.containsKey("resource")) {
              String resource = attributes.getProperty("resource");
              if (properties == null) {
View Full Code Here

    return buildDaoManager(reader);
  }

  public DaoManager buildDaoManager(Reader reader)
      throws DaoException {
    StandardDaoManager daoManager = new StandardDaoManager();

    try {

      Document doc = getDoc(reader);
      Element root = (Element) doc.getLastChild();

      String rootname = root.getNodeName();
      if (!DAO_CONFIG_ELEMENT.equals(rootname)) {
        throw new IOException("Error while configuring DaoManager.  The root tag of the DAO configuration XML " +
            "document must be '" + DAO_CONFIG_ELEMENT + "'.");
      }

      NodeList children = root.getChildNodes();
      for (int i = 0; i < children.getLength(); i++) {
        Node child = children.item(i);
        if (child.getNodeType() == Node.ELEMENT_NODE) {
          if (CONTEXT_ELEMENT.equals(child.getNodeName())) {
            DaoContext daoContext = parseContext((Element) child, daoManager);
            daoManager.addContext(daoContext);
          } else if (PROPERTIES_ELEMENT.equals(child.getNodeName())) {
            Properties attributes = parseAttributes(child);
            if (attributes.containsKey("resource")) {
              String resource = attributes.getProperty("resource");
              if (properties == null) {
View Full Code Here

TOP

Related Classes of com.ibatis.dao.engine.impl.StandardDaoManager

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.