package com.smartgwt.sample.server;

import java.util.Arrays;

/**
 *  ArrayOfItem bean class
 */

public class ArrayOfItem {
	
    protected Item[] localItem;

    protected boolean localItemTracker = false;

    public boolean isItemSpecified() {
        return localItemTracker;
    }

    /**
     * Auto generated getter method
     * @return com.sgwt.test.server.dto.Item[]
     */
    public Item[] getItem() {
        return localItem;
    }

    /**
     * validate the array for Item
     */
    protected void validateItem(
        Item[] param) {
    }

    /**
     * Auto generated setter method
     * @param param Item
     */
    public void setItem(Item[] param) {
        validateItem(param);

        localItemTracker = true;

        this.localItem = param;
    }

    /**
     * Auto generated add method for the array for convenience
     * @param param com.sgwt.test.server.dto.Item
     */
    public void addItem(Item param) {
        if (localItem == null) {
            localItem = new Item[] {  };
        }

        //update the setting tracker
        localItemTracker = true;

      java.util.List list = Arrays.asList(localItem);
        list.add(param);
        this.localItem = (Item[]) list.toArray(new Item[list.size()]);
    }

    

}
