Package org.openxri.xml

Examples of org.openxri.xml.Ref


    log.debug("hashCode()");

    if (x == null) return(0);

    Ref ref = (Ref) x;

    return(ref.hashCode());
  }
View Full Code Here


  public Object nullSafeGet(ResultSet rs, String[] names, Object owner)
  throws HibernateException, SQLException {

    log.debug("nullSafeGet()");

    Ref ref;
    String str = rs.getString(names[0]);

    try {

      if (str != null) {

        Document document = this.builder.parse(new ByteArrayInputStream(str.getBytes()));
        Element element = document.getDocumentElement();

        try {

          ref = new Ref(element);
        } catch (Exception ex) {

          log.error(ex);
          throw(ex);
        }
View Full Code Here

  public void nullSafeSet(PreparedStatement st, Object value, int index)
  throws HibernateException, SQLException {

    log.debug("nullSafeSet()");

    Ref ref = (Ref) value;

    try {

      if (ref != null) {

        Document doc = this.builder.newDocument();
        Node element;

        try {

          element = ref.toXML(doc);
        } catch (Exception ex) {

          log.error(ex);
          throw(ex);
        }
View Full Code Here

    log.debug("replace()");

    if (original == null) return(null);

    Ref ref = (Ref) original;

    try {

      return (ref.clone());
    } catch (CloneNotSupportedException e) {

      throw new HibernateException("Cannot clone ref.");
    }
  }
View Full Code Here

    log.trace("assemble()");

    if (cached == null) return(null);

    Ref ref;
    String refText = (String) cached;

    try {

      Document document = this.builder.parse(refText);
      Element element = document.getDocumentElement();
      ref = new Ref(element);
    } catch (Exception ex) {

      throw new HibernateException("Cannot assemble ref.", ex);
    }
View Full Code Here

    log.trace("disassemble()");

    if (value == null) return(null);

    Ref ref = (Ref) value;
    String refText;

    try {

      Document doc = this.builder.newDocument();
      Node element = ref.toXML(doc);
      doc.appendChild(element);
      refText = DOMUtils.toString((Element) element, true, true);
    } catch (Exception ex) {

      throw new HibernateException("Cannot disassemble ref.", ex);
View Full Code Here

    log.trace("equals()");

    if (x == null || y == null) return(false);

    Ref ref1 = (Ref) x;
    Ref ref2 = (Ref) y;

    boolean result = (ref1 == ref2)// TODO implement this with equals()

    log.trace("Done: " + result);
    return(result)
View Full Code Here

    log.trace("hashCode()");

    if (x == null) return(0);

    Ref ref = (Ref) x;

    return(ref.hashCode());
  }
View Full Code Here

  public Object nullSafeGet(ResultSet rs, String[] names, Object owner)
  throws HibernateException, SQLException {

    log.trace("nullSafeGet()");

    Ref ref;
    String str = rs.getString(names[0]);

    try {

      if (str != null) {

        Document document = this.builder.parse(new ByteArrayInputStream(str.getBytes()));
        Element element = document.getDocumentElement();

        try {

          ref = new Ref(element);
        } catch (Exception ex) {

          log.error(ex);
          throw(ex);
        }
View Full Code Here

  public void nullSafeSet(PreparedStatement st, Object value, int index)
  throws HibernateException, SQLException {

    log.trace("nullSafeSet()");

    Ref ref = (Ref) value;

    try {

      if (ref != null) {

        Document doc = this.builder.newDocument();
        Node element;

        try {

          element = ref.toXML(doc);
        } catch (Exception ex) {

          log.error(ex);
          throw(ex);
        }
View Full Code Here

TOP

Related Classes of org.openxri.xml.Ref

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.