Package org.xrace.desjardins.trx

Examples of org.xrace.desjardins.trx.Template


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

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Template target = (Template) object;
          target.setContent((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);
    addFieldDescriptor(desc);

    //-- validation code for: _content
    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);
    //-- initialize attribute descriptors

    //-- _name
    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
        org.xrace.desjardins.trx.types.TemplateNameType.class, "_name",
        "name", org.exolab.castor.xml.NodeType.Attribute);
    handler = new org.exolab.castor.xml.XMLFieldHandler()
    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Template target = (Template) object;
        return target.getName();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Template target = (Template) object;
          target
              .setName((org.xrace.desjardins.trx.types.TemplateNameType) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
      }

      @Override
      public java.lang.Object newInstance(java.lang.Object parent)
      {
        return null;
      }
    };
    handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(
        org.xrace.desjardins.trx.types.TemplateNameType.class, handler);
    desc.setImmutable(true);
    desc.setSchemaType("TemplateNameType");
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    //-- validation code for: _name
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { //-- local scope
    }
    desc.setValidator(fieldValidator);
    //-- _action
    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
        org.xrace.desjardins.trx.types.TemplateActionType.class,
        "_action", "action", org.exolab.castor.xml.NodeType.Attribute);
    handler = new org.exolab.castor.xml.XMLFieldHandler()
    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Template target = (Template) object;
        return target.getAction();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Template target = (Template) object;
          target
              .setAction((org.xrace.desjardins.trx.types.TemplateActionType) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
      }

      @Override
      public java.lang.Object newInstance(java.lang.Object parent)
      {
        return null;
      }
    };
    handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(
        org.xrace.desjardins.trx.types.TemplateActionType.class,
        handler);
    desc.setImmutable(true);
    desc.setSchemaType("TemplateActionType");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    //-- validation code for: _action
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { //-- local scope
    }
    desc.setValidator(fieldValidator);
    //-- _language
    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
        org.xrace.desjardins.trx.types.TemplateLanguageType.class,
        "_language", "language",
        org.exolab.castor.xml.NodeType.Attribute);
    handler = new org.exolab.castor.xml.XMLFieldHandler()
    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Template target = (Template) object;
        return target.getLanguage();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Template target = (Template) object;
          target
              .setLanguage((org.xrace.desjardins.trx.types.TemplateLanguageType) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
      }

      @Override
      public java.lang.Object newInstance(java.lang.Object parent)
      {
        return null;
      }
    };
    handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(
        org.xrace.desjardins.trx.types.TemplateLanguageType.class,
        handler);
    desc.setImmutable(true);
    desc.setSchemaType("TemplateLanguageType");
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    //-- validation code for: _language
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { //-- local scope
    }
    desc.setValidator(fieldValidator);
    //-- _key
    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
        java.lang.String.class, "_key", "key",
        org.exolab.castor.xml.NodeType.Attribute);
    desc.setImmutable(true);
    handler = new org.exolab.castor.xml.XMLFieldHandler()
    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Template target = (Template) object;
        return target.getKey();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Template target = (Template) object;
          target.setKey((java.lang.String) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
View Full Code Here

TOP

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

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.