com.extjs.gxt.ui.client.data.BeanModelReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gxt Show documentation
Show all versions of gxt Show documentation
Rich Internet Application Framework for GWT
/*
* Sencha GXT 2.3.1a - Sencha for GWT
* Copyright(c) 2007-2013, Sencha, Inc.
* [email protected]
*
* http://www.sencha.com/products/gxt/license/
*/
package com.extjs.gxt.ui.client.data;
import java.util.ArrayList;
import java.util.List;
/**
* A DataReader
for beans using a BeanModelFactory
.
* Valid return types are a list of beans or a list load result containing a
* list of beans. Beans must be of the same type and beans must implement
* {@link BeanModelTag} or have a companion {@link BeanModelMarker} marker
* class.
*/
public class BeanModelReader implements DataReader> {
private boolean factoryForEachBean;
/**
* Return if a BeanModelFactory is created for each bean or not.
*
* @return true if a BeanModelFactory is created for each bean or not
*/
public boolean isFactoryForEachBean() {
return factoryForEachBean;
}
@SuppressWarnings({"unchecked", "rawtypes"})
public ListLoadResult read(Object loadConfig, Object data) {
if (data instanceof List) {
List