Package com.gentlyweb.utils
Class GeneralCollector
- java.lang.Object
-
- com.gentlyweb.utils.GeneralCollector
-
public class GeneralCollector extends Object
-
-
Constructor Summary
Constructors Constructor Description GeneralCollector(Class c)
GeneralCollector(Class c, String field)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collect(Collection objects, Collection retData)
void
collect(Collection objects, List retData)
void
collect(List objects, Collection retData)
void
collect(List objects, List retData)
void
collect(Map objects, String type, Collection retData)
void
collect(Map objects, String type, List retData)
void
collect(Map objects, String type, Map retData)
String
getField()
Get a field given a field name.void
setField(String field)
Set the field that we collect if you readd the same field then the type is just updated.
-
-
-
Field Detail
-
KEYS
public static final String KEYS
- See Also:
- Constant Field Values
-
VALUES
public static final String VALUES
- See Also:
- Constant Field Values
-
-
Method Detail
-
collect
public void collect(Map objects, String type, List retData) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
-
collect
public void collect(Map objects, String type, Collection retData) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
-
collect
public void collect(Map objects, String type, Map retData) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
-
collect
public void collect(Collection objects, Collection retData) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
-
collect
public void collect(Collection objects, List retData) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
-
collect
public void collect(List objects, List retData) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
-
collect
public void collect(List objects, Collection retData) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
-
setField
public void setField(String field) throws IllegalArgumentException
Set the field that we collect if you readd the same field then the type is just updated.- Parameters:
field
- The field to sort on.- Throws:
IllegalArgumentException
- If we can't find the field in the class/class chain passed into the constructor.
-
getField
public String getField()
Get a field given a field name.- Returns:
- The field or null if the field hasn't been set yet.
-
-