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

com.googlecode.objectify.test.entity.HasCollections Maven / Gradle / Ivy

Go to download

*** THIS VERSION UPLOADED FOR USE WITH CEDAR-COMMON, TO AVOID DEPENDENCIES ON GOOGLE CODE-BASED MAVEN REPOSITORIES. *** The simplest convenient interface to the Google App Engine datastore

The newest version!
/*
 * $Id: BeanMixin.java 1075 2009-05-07 06:41:19Z lhoriman $
 * $URL: https://subetha.googlecode.com/svn/branches/resin/rtest/src/org/subethamail/rtest/util/BeanMixin.java $
 */

package com.googlecode.objectify.test.entity;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;

import javax.persistence.Id;

import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Cached;

/**
 * An entity that has a variety of collection types.
 * Left off getters and setters for convenience.
 * 
 * @author Jeff Schnitzer 
 */
@Cached
public class HasCollections
{
	public @Id Long id;

	public List integerList;
	public LinkedList integerLinkedList;
	public ArrayList integerArrayList;
	
	public Set integerSet;
	public SortedSet integerSortedSet;
	public HashSet integerHashSet;
	public TreeSet integerTreeSet;
	public LinkedHashSet integerLinkedHashSet;
	
	public List initializedList = new LinkedList();
	
	public static class CustomSet extends HashSet
	{
		private static final long serialVersionUID = 1L;
		public int tenTimesSize() { return this.size() * 10; }
	}
	
	public CustomSet customSet;
	
	/** This should give the system a workout */
	public Set> typedKeySet;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy