DataField.java :  » Ajax » MyGWT » net » mygwt » ui » client » data » Java Open Source

Java Open Source » Ajax » MyGWT 
MyGWT » net » mygwt » ui » client » data » DataField.java
/*
 * MyGWT Widget Library
 * Copyright(c) 2007, MyGWT.
 * licensing@mygwt.net
 * 
 * http://mygwt.net/license
 */
package net.mygwt.ui.client.data;

/**
 * Describes a field in a <code>Model</code>. Used when mapping raw data to a
 * model's properties.
 */
public class DataField {

  /**
   * Field type constant for dates.
   */
  public static final String DATE_TYPE = "date";

  /**
   * The name of the field.
   */
  public String name;

  /**
   * An optional field used when the property name of the model is different
   * than the property name of the raw data.
   */
  public String map;

  /**
   * The data type of the field.
   */
  public String type;

  /**
   * Format is used when converting raw data to object instances.
   */
  public String format;

  /**
   * Creates a new field.
   * 
   * @param name the name
   */
  public DataField(String name) {
    this.name = name;
  }

  /**
   * Creates a new field instance.
   * 
   * @param name the field name
   * @param map the map name
   */
  public DataField(String name, String map) {
    this.name = name;
    this.map = map;
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.