BrightSide Workbench Full Report + Source Code
org.turro.groupit.GroupItUtil Class Reference

Static Public Member Functions

static void saveValues (Collection< Grouped > values)
 
static void setSelectedGroup (IConstructor constructor, String pathOrigin, String value)
 
static String getSelectedGroup (IConstructor constructor, String pathOrigin)
 
static void setCategory (IConstructor constructor, String pathOrigin, String value)
 
static String getCategory (IConstructor constructor, String pathOrigin)
 
static Collection< String > getPathsFromGroup (String path, String selectedGroup, String selectedCategory)
 
static Collection< String > getPathsFromGroup (String path, String selectedGroup, String selectedCategory, boolean exact)
 
static Collection< String > getPathsFromCategory (String path, String category)
 
static FieldItSet getFields (String entityPath)
 
static ValueItSet getValues (String entityPath)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 36 of file GroupItUtil.java.

Member Function Documentation

◆ getCategory()

static String org.turro.groupit.GroupItUtil.getCategory ( IConstructor  constructor,
String  pathOrigin 
)
static

Definition at line 65 of file GroupItUtil.java.

65  {
66  return (String) constructor.getSessionAttribute(pathOrigin + "-selected-category");
67  }
Here is the call graph for this function:

◆ getFields()

static FieldItSet org.turro.groupit.GroupItUtil.getFields ( String  entityPath)
static

Definition at line 81 of file GroupItUtil.java.

81  {
82  Collection<Grouped> groups = Grouped.groups(entityPath);
83  FieldItSet fis = new FieldItSet();
84  for(Grouped g : groups) {
85  fis.addAll(g.getParent().fields());
86  }
87  return fis;
88  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPathsFromCategory()

static Collection<String> org.turro.groupit.GroupItUtil.getPathsFromCategory ( String  path,
String  category 
)
static

Definition at line 77 of file GroupItUtil.java.

77  {
78  return Grouped.pathsFromCategory(path, category);
79  }
Here is the call graph for this function:

◆ getPathsFromGroup() [1/2]

static Collection<String> org.turro.groupit.GroupItUtil.getPathsFromGroup ( String  path,
String  selectedGroup,
String  selectedCategory 
)
static

Definition at line 69 of file GroupItUtil.java.

69  {
70  return getPathsFromGroup(path, selectedGroup, selectedCategory, false);
71  }
static Collection< String > getPathsFromGroup(String path, String selectedGroup, String selectedCategory)

◆ getPathsFromGroup() [2/2]

static Collection<String> org.turro.groupit.GroupItUtil.getPathsFromGroup ( String  path,
String  selectedGroup,
String  selectedCategory,
boolean  exact 
)
static

Definition at line 73 of file GroupItUtil.java.

73  {
74  return Grouped.paths(path, selectedGroup, selectedCategory, exact);
75  }
Here is the call graph for this function:

◆ getSelectedGroup()

static String org.turro.groupit.GroupItUtil.getSelectedGroup ( IConstructor  constructor,
String  pathOrigin 
)
static

Definition at line 55 of file GroupItUtil.java.

55  {
56  return (String) constructor.getSessionAttribute(pathOrigin + "-selected-group");
57  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getValues()

static ValueItSet org.turro.groupit.GroupItUtil.getValues ( String  entityPath)
static

Definition at line 90 of file GroupItUtil.java.

90  {
91  ValueItSet vis = new ValueItSet();
92  for(FieldIt fi : getFields(entityPath)) {
93  vis.add(FieldItUtil.value(fi, entityPath));
94  }
95  return vis;
96  }
static FieldItSet getFields(String entityPath)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveValues()

static void org.turro.groupit.GroupItUtil.saveValues ( Collection< Grouped values)
static

Definition at line 38 of file GroupItUtil.java.

38  {
39  Dao dao = new ContactsPU();
40  for(Grouped v : values) {
41  if(v.isValid()) {
42  dao.saveObject(v);
43  } else if(!Strings.isBlank(v.getId())) {
44  dao.deleteObject(v);
45  }
46  }
47  }
Here is the caller graph for this function:

◆ setCategory()

static void org.turro.groupit.GroupItUtil.setCategory ( IConstructor  constructor,
String  pathOrigin,
String  value 
)
static

Definition at line 59 of file GroupItUtil.java.

59  {
60  if(value != null) {
61  constructor.setSessionAttribute(pathOrigin + "-selected-category", value);
62  }
63  }
Here is the call graph for this function:

◆ setSelectedGroup()

static void org.turro.groupit.GroupItUtil.setSelectedGroup ( IConstructor  constructor,
String  pathOrigin,
String  value 
)
static

Definition at line 49 of file GroupItUtil.java.

49  {
50  if(value != null) {
51  constructor.setSessionAttribute(pathOrigin + "-selected-group", value);
52  }
53  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: