BrightSide Workbench Full Report + Source Code
org.turro.jpa.entity.EntityCollections Class Reference
Inheritance diagram for org.turro.jpa.entity.EntityCollections:
Collaboration diagram for org.turro.jpa.entity.EntityCollections:

Public Member Functions

boolean remove (IDaoEntity entity)
 
boolean removeEmpties ()
 
boolean removeNews ()
 
boolean contains (IDaoEntity o)
 
boolean replace (IDaoEntity o)
 

Static Public Member Functions

static EntityCollections entities (Collection values)
 

Protected Member Functions

 EntityCollections (Collection< IDaoEntity > values)
 

Detailed Description

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

Definition at line 28 of file EntityCollections.java.

Constructor & Destructor Documentation

◆ EntityCollections()

org.turro.jpa.entity.EntityCollections.EntityCollections ( Collection< IDaoEntity values)
protected

Definition at line 66 of file EntityCollections.java.

66  {
67  super(values);
68  }

Member Function Documentation

◆ contains()

boolean org.turro.jpa.entity.EntityCollections.contains ( IDaoEntity  o)

Definition at line 49 of file EntityCollections.java.

49  {
50  return super.contains(e -> Objects.equals(e.entityId(), o.entityId()));
51  }
Here is the call graph for this function:

◆ entities()

static EntityCollections org.turro.jpa.entity.EntityCollections.entities ( Collection  values)
static

Definition at line 62 of file EntityCollections.java.

62  {
63  return new EntityCollections(CollectionUtil.from((Collection<Object>) values).<Collection<IDaoEntity>>cast());
64  }
EntityCollections(Collection< IDaoEntity > values)
Here is the caller graph for this function:

◆ remove()

boolean org.turro.jpa.entity.EntityCollections.remove ( IDaoEntity  entity)

Definition at line 30 of file EntityCollections.java.

30  {
31  if(entity == null) return false;
32  return super.remove(e -> {
33  return !e.isNew() && Objects.equals(e.entityId(), entity.entityId());
34  });
35  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeEmpties()

boolean org.turro.jpa.entity.EntityCollections.removeEmpties ( )

Definition at line 37 of file EntityCollections.java.

37  {
38  return super.remove(e -> {
39  return e.isEmpty();
40  });
41  }
Here is the caller graph for this function:

◆ removeNews()

boolean org.turro.jpa.entity.EntityCollections.removeNews ( )

Definition at line 43 of file EntityCollections.java.

43  {
44  return super.remove(e -> {
45  return e.isNew();
46  });
47  }
Here is the caller graph for this function:

◆ replace()

boolean org.turro.jpa.entity.EntityCollections.replace ( IDaoEntity  o)

Definition at line 53 of file EntityCollections.java.

53  {
54  if(remove(o)) {
55  return values.add(o);
56  }
57  return false;
58  }
Here is the caller graph for this function:

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