Package org.exolab.castor.types

Examples of org.exolab.castor.types.Time


            System.out.println();
            System.out.println("Shipping Date:");
            ShippingDate date = invoice.getShippingDate();
            Date day = date.getDate();
            Time time = date.getTime();

            System.out.println("   Date :" + day.toString());
            System.out.println("   Time :" + time.toString());
            System.out.println();

            System.out.println("----End of Invoice----");
            invoice.marshal(new FileWriter("invoice2.xml"));
View Full Code Here


      jsc = new JSourceCode();
    jsc.add("DateTimeValidator typeValidator = new DateTimeValidator();");
    if (hasMinimum()) {
      jsc.add("try {");
      jsc.indent();
      Time min = getMinExclusive();
      if (min != null) {
        jsc.add(
          "org.exolab.castor.types.Time min ="
            + "org.exolab.castor.types.Time.parseTime("
            + "\""
            + min.toString()
            + "\");");
        jsc.add("typeValidator.setMinExclusive(");
      } else {
        min = getMinInclusive();
        jsc.add(
          "org.exolab.castor.types.Time min ="
            + "org.exolab.castor.types.Time.parseTime("
            + "\""
            + min.toString()
            + "\");");
        jsc.add("typeValidator.setMinInclusive(");
      }
      jsc.append("min");
      jsc.append(");");
      jsc.unindent();
      jsc.add("} catch (java.text.ParseException e) {");
      jsc.indent();
      jsc.add("System.out.println(e);");
      jsc.add("e.printStackTrace();");
      jsc.add("return;");
      jsc.unindent();
      jsc.add("}");

    } //hasMinimum?

    if (hasMaximum()) {
      jsc.add("try {");
      jsc.indent();
      Time max = getMaxExclusive();
      if (max != null) {
        jsc.add(
          "org.exolab.castor.types.Time max ="
            + "org.exolab.castor.types.Time.parseTime("
            + "\""
            + max.toString()
            + "\");");
        jsc.add("typeValidator.setMaxExclusive(");
      } else {
        max = getMaxInclusive();
        jsc.add(
          "org.exolab.castor.types.Time max ="
            + "org.exolab.castor.types.Time.parseTime("
            + "\""
            + max.toString()
            + "\");");
        jsc.add("typeValidator.setMaxInclusive(");
      }
      jsc.append("max");
      jsc.append(");");
View Full Code Here

      jsc = new JSourceCode();
    jsc.add("DateTimeValidator typeValidator = new DateTimeValidator();");
    if (hasMinimum()) {
      jsc.add("try {");
      jsc.indent();
      Time min = getMinExclusive();
      if (min != null) {
        jsc.add(
          "org.exolab.castor.types.Time min ="
            + "org.exolab.castor.types.Time.parseTime("
            + "\""
            + min.toString()
            + "\");");
        jsc.add("typeValidator.setMinExclusive(");
      } else {
        min = getMinInclusive();
        jsc.add(
          "org.exolab.castor.types.Time min ="
            + "org.exolab.castor.types.Time.parseTime("
            + "\""
            + min.toString()
            + "\");");
        jsc.add("typeValidator.setMinInclusive(");
      }
      jsc.append("min");
      jsc.append(");");
      jsc.unindent();
      jsc.add("} catch (java.text.ParseException e) {");
      jsc.indent();
      jsc.add("System.out.println(e);");
      jsc.add("e.printStackTrace();");
      jsc.add("return;");
      jsc.unindent();
      jsc.add("}");

    } //hasMinimum?

    if (hasMaximum()) {
      jsc.add("try {");
      jsc.indent();
      Time max = getMaxExclusive();
      if (max != null) {
        jsc.add(
          "org.exolab.castor.types.Time max ="
            + "org.exolab.castor.types.Time.parseTime("
            + "\""
            + max.toString()
            + "\");");
        jsc.add("typeValidator.setMaxExclusive(");
      } else {
        max = getMaxInclusive();
        jsc.add(
          "org.exolab.castor.types.Time max ="
            + "org.exolab.castor.types.Time.parseTime("
            + "\""
            + max.toString()
            + "\");");
        jsc.add("typeValidator.setMaxInclusive(");
      }
      jsc.append("max");
      jsc.append(");");
View Full Code Here

        System.out.println();
      System.out.println("Shipping Date:");
        ShippingDate date = invoice.getShippingDate();
        Date day = date.getDate();
        Time time = date.getTime();

        System.out.println("   Date :"+day.toString());
        System.out.println("   Time :"+time.toString());
      System.out.println();

        System.out.println("----End of Invoice----");
        invoice.marshal(new FileWriter("invoice2.xml"));
View Full Code Here

TOP

Related Classes of org.exolab.castor.types.Time

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.