br.com.arsmachina.tapestrycrud.selectmodel.impl
Class SelectModelFactoryImpl

java.lang.Object
  extended by br.com.arsmachina.tapestrycrud.selectmodel.impl.SelectModelFactoryImpl
All Implemented Interfaces:
SelectModelFactory

public class SelectModelFactoryImpl
extends Object
implements SelectModelFactory

Default SelectModelFactory implementation. It delegates all its methods for SelectModelFactory instances.

Author:
Thiago H. de Paula Figueiredo
See Also:
SelectModel, SingleTypeSelectModelFactory

Constructor Summary
SelectModelFactoryImpl(Map<Class,SingleTypeSelectModelFactory> registrations)
          Single constructor.
 
Method Summary
 SelectModel create(Class<?> clasz)
          Creates a SelectModel containing all the instances of a given type.
<T> SelectModel
create(Class<T> clasz, List<T> objects)
          Creates a SelectModel containing some given instances of a given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectModelFactoryImpl

public SelectModelFactoryImpl(Map<Class,SingleTypeSelectModelFactory> registrations)
Single constructor.

Parameters:
registrations - a Map<Class, LinkSingleTypeSelectModelFactory>. It cannot be null.
controllerSource - a ControllerSource. It cannot be null.
encoderSource - an EncoderSource. It cannot be null.
Method Detail

create

public SelectModel create(Class<?> clasz)
Description copied from interface: SelectModelFactory
Creates a SelectModel containing all the instances of a given type.

Specified by:
create in interface SelectModelFactory
Parameters:
clasz - the Class that represents the wanted type. It cannot be null.
Returns:
a SelectModel.
See Also:
SelectModelFactory.create(java.lang.Class)

create

public <T> SelectModel create(Class<T> clasz,
                              List<T> objects)
Description copied from interface: SelectModelFactory
Creates a SelectModel containing some given instances of a given type.

Specified by:
create in interface SelectModelFactory
Parameters:
clasz - the Class that represents the wanted type. It cannot be null.
objects - a List containing the objects used as options.
See Also:
SelectModelFactory.create(java.lang.Class, java.util.List)


Copyright © 2008-2009 Thiago H. de Paula Figueiredo. All Rights Reserved.