Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2014 Fernando Rincon Martin <frm.rincon@gmail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.abstractform.binding.vaadin;
 
 import java.util.List;
 import java.util.Map;
 
 
 
 @SuppressWarnings("serial")
 public class TableContainer extends AbstractInMemoryContainer<ObjectStringItem> {
 
 	private List<StringpropertyIds;
 	private Collection<Objectvalues;
 	private Map<ObjectItemitemMap = new HashMap<ObjectItem>();
 
 	public TableContainer(List<BFieldfieldsCollection<Objectvalues) {
 		this. = values;
 		this. = new ArrayList<String>(fields.size());
 		for (BField field : fields) {
 		}
 		for (Object value : values) {
 			internalAddItemAtEnd(valuegetUnfilteredItem(value), true);
 		}
 	}
 
 		return Collections.unmodifiableCollection();
 	}
 
 	@SuppressWarnings("rawtypes")
 	public Property getContainerProperty(Object itemIdObject propertyId) {
 		if (!.containsKey(itemId)) {
 		}
 		if (!.get(itemId).containsKey(propertyId)) {
 			.get(itemId).put((StringpropertyIdnew MethodProperty(itemId, (StringpropertyId));
 		}
 		return .get(itemId).get(propertyId);
 	}
 
 	public Class<?> getType(Object propertyId) {
 		if (.size() > 0) {
 			return getContainerProperty(.iterator().next(), propertyId).getType();
 		} else {
 			return Object.class;
 		}
 	}
 
 	protected Item getUnfilteredItem(Object itemId) {
 		if (!.containsKey(itemId)) {
 			.put(itemIdnew TableContainerItem(itemId));
 		}
 		return .get(itemId);
 	}
 
 	private class TableContainerItem implements Item {
 
 		private Object value;
 
 		private TableContainerItem(Object value) {
 			this. = value;
 		}
 
 		public Property getItemProperty(Object id) {
 			return getContainerProperty(id);
 		}
 
 		public Collection<?> getItemPropertyIds() {
		}
		public boolean addItemProperty(Object idProperty propertythrows UnsupportedOperationException {
		}
		}
	}
		return ;
	}
New to GrepCode? Check out our FAQ X