Package org.xrace.desjardins.trx

Examples of org.xrace.desjardins.trx.Card


    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Card target = (Card) object;
        return target.getNumber();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Card target = (Card) object;
          target.setNumber((java.lang.String) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
      }

      @Override
      public java.lang.Object newInstance(java.lang.Object parent)
      {
        return null;
      }
    };
    desc.setSchemaType("string");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    //-- validation code for: _number
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { //-- local scope
      org.exolab.castor.xml.validators.StringValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.addPattern("\\d{10,24}");
      typeValidator.setWhiteSpace("preserve");
    }
    desc.setValidator(fieldValidator);
    //-- _holder_name
    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
        java.lang.String.class, "_holder_name", "holder_name",
        org.exolab.castor.xml.NodeType.Element);
    desc.setImmutable(true);
    handler = new org.exolab.castor.xml.XMLFieldHandler()
    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Card target = (Card) object;
        return target.getHolder_name();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Card target = (Card) object;
          target.setHolder_name((java.lang.String) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
      }

      @Override
      public java.lang.Object newInstance(java.lang.Object parent)
      {
        return null;
      }
    };
    desc.setSchemaType("string");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    //-- validation code for: _holder_name
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { //-- local scope
      org.exolab.castor.xml.validators.StringValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setWhiteSpace("preserve");
    }
    desc.setValidator(fieldValidator);
    //-- _expiry
    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
        org.xrace.desjardins.trx.Expiry.class, "_expiry", "expiry",
        org.exolab.castor.xml.NodeType.Element);
    handler = new org.exolab.castor.xml.XMLFieldHandler()
    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Card target = (Card) object;
        return target.getExpiry();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Card target = (Card) object;
          target.setExpiry((org.xrace.desjardins.trx.Expiry) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
View Full Code Here

TOP

Related Classes of org.xrace.desjardins.trx.Card

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.