it.amattioli.dominate.groups
Class GroupingFactory<I extends Serializable,T extends Entity<I>>

Show UML class diagram
java.lang.Object
  extended by it.amattioli.dominate.groups.GroupingFactory<I,T>
Type Parameters:
I -
T -
All Implemented Interfaces:
EntityGroupFactory<I,T>

public class GroupingFactory<I extends Serializable,T extends Entity<I>>
extends Object
implements EntityGroupFactory<I,T>

An EntityGroupFactory that groups a collection of entities by the value of a property.

Author:
andrea

Constructor Summary
GroupingFactory(String groupingProperty, List<T> entities)
          Create a factory given the name of a property and a collection of entities.
 
Method Summary
protected  EntityGroup<I,T> createGroup(DefaultObjectSpecification<T> spec, String description)
           
 List<EntityGroup<I,T>> createGroups()
          Create a set of group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupingFactory

public GroupingFactory(String groupingProperty,
                       List<T> entities)
Create a factory given the name of a property and a collection of entities.

Parameters:
groupingProperty -
entities -
Method Detail

createGroups

public List<EntityGroup<I,T>> createGroups()
Description copied from interface: EntityGroupFactory
Create a set of group.

Specified by:
createGroups in interface EntityGroupFactory<I extends Serializable,T extends Entity<I>>
Returns:

createGroup

protected EntityGroup<I,T> createGroup(DefaultObjectSpecification<T> spec,
                                       String description)


Copyright © 2011. All Rights Reserved.