All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.beangle.commons.transfer.TransferMessage Maven / Gradle / Ivy

The newest version!
/*
 * Beangle, Agile Development Scaffold and Toolkits.
 *
 * Copyright © 2005, The Beangle Software.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see .
 */
package org.beangle.commons.transfer;

import java.util.ArrayList;
import java.util.List;

import org.beangle.commons.lang.Objects;

/**
 * 转换消息
 *
 * @author chaostone
 * @version $Id: $
 */
public class TransferMessage {

  /** Constant ERROR_ATTRS="error.transfer.attrs" */
  public static final String ERROR_ATTRS = "error.transfer.attrs";

  /** Constant ERROR_ATTRS_EXPORT="error.transfer.attrs.export" */
  public static final String ERROR_ATTRS_EXPORT = "error.transfer.attrs.export";

  /**
   * 转换数据的序号
   */
  int index;

  /**
   * 消息内容
   */
  String message;

  /**
   * 消息中使用的对应值
   */
  List values = new ArrayList();

  /**
   * 

* Constructor for TransferMessage. *

* * @param index a int. * @param message a {@link java.lang.String} object. * @param value a {@link java.lang.Object} object. */ public TransferMessage(int index, String message, Object value) { this.index = index; this.message = message; this.values.add(value); } /** *

* Getter for the field index. *

* * @return a int. */ public int getIndex() { return index; } /** *

* Setter for the field index. *

* * @param index a int. */ public void setIndex(int index) { this.index = index; } /** *

* Getter for the field message. *

* * @return a {@link java.lang.String} object. */ public String getMessage() { return message; } /** *

* Setter for the field message. *

* * @param message a {@link java.lang.String} object. */ public void setMessage(String message) { this.message = message; } /** *

* Getter for the field values. *

* * @return a {@link java.util.List} object. */ public List getValues() { return values; } /** *

* Setter for the field values. *

* * @param values a {@link java.util.List} object. */ public void setValues(List values) { this.values = values; } /** *

* toString. *

* * @see java.lang.Object#toString() * @return a {@link java.lang.String} object. */ public String toString() { return Objects.toStringBuilder(this).add("index", this.index).add("message", this.message) .add("values", this.values).toString(); } }