BrightSide Workbench Full Report + Source Code
org.turro.alliance.db.entities.AxResponse Class Reference
Inheritance diagram for org.turro.alliance.db.entities.AxResponse:
Collaboration diagram for org.turro.alliance.db.entities.AxResponse:

Public Member Functions

RelationId getRelation ()
 
void setRelation (RelationId relation)
 
Date getCreation ()
 
void setCreation (Date creation)
 
Set< String > getStudentIds ()
 
void setStudentIds (Set< String > studentIds)
 
String getText ()
 
void setText (String text)
 
Object entityId ()
 
boolean isEmpty ()
 
String toJson ()
 
String toJson (Map< String, Object > properties)
 
int hashCode ()
 
boolean equals (Object obj)
 
- Public Member Functions inherited from org.turro.jpa.entity.IDaoEntity
default boolean isNew ()
 
default void prepareSave ()
 
default void prepareDelete ()
 
default void removeEmpties ()
 
default Collection< Collection > collections ()
 

Static Public Member Functions

static Set< AxResponsefrom (long memberId, Challenge challenge)
 
static AxResponse fromJson (JsonValue value)
 

Detailed Description

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

Definition at line 44 of file AxResponse.java.

Member Function Documentation

◆ entityId()

Object org.turro.alliance.db.entities.AxResponse.entityId ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 113 of file AxResponse.java.

113  {
114  return relation;
115  }

◆ equals()

boolean org.turro.alliance.db.entities.AxResponse.equals ( Object  obj)

Definition at line 146 of file AxResponse.java.

146  {
147  if (this == obj) {
148  return true;
149  }
150  if (obj == null) {
151  return false;
152  }
153  if (getClass() != obj.getClass()) {
154  return false;
155  }
156  final AxResponse other = (AxResponse) obj;
157  return Objects.equals(this.relation, other.relation);
158  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ from()

static Set<AxResponse> org.turro.alliance.db.entities.AxResponse.from ( long  memberId,
Challenge  challenge 
)
static

Definition at line 92 of file AxResponse.java.

92  {
93  Set<AxResponse> responses = new HashSet<>();
94  challenge.getResponses().forEach(response -> {
95  RelationId relation = new RelationId();
96  relation.setMainEntityId(Long.toString(challenge.getId()));
97  relation.setMainMemberId(memberId);
98  relation.setRelatedEntityId(response.getId());
99  relation.setRelatedMemberId(memberId);
100  AxResponse responder = new AxResponse();
101  responder.setRelation(relation);
102  responder.setCreation(response.getCreation());
103  responder.setStudentIds(response.getStudentIds());
104  responder.setText(response.getText());
105  responses.add(responder);
106  });
107  return responses;
108  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromJson()

static AxResponse org.turro.alliance.db.entities.AxResponse.fromJson ( JsonValue  value)
static

Definition at line 134 of file AxResponse.java.

134  {
135  return IJSONizable.fromJson(value.toString(), AxResponse.class);
136  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCreation()

Date org.turro.alliance.db.entities.AxResponse.getCreation ( )

Definition at line 66 of file AxResponse.java.

66  {
67  return creation;
68  }

◆ getRelation()

RelationId org.turro.alliance.db.entities.AxResponse.getRelation ( )

Definition at line 58 of file AxResponse.java.

58  {
59  return relation;
60  }

◆ getStudentIds()

Set<String> org.turro.alliance.db.entities.AxResponse.getStudentIds ( )

Definition at line 74 of file AxResponse.java.

74  {
75  return studentIds;
76  }

◆ getText()

String org.turro.alliance.db.entities.AxResponse.getText ( )

Definition at line 82 of file AxResponse.java.

82  {
83  return text;
84  }

◆ hashCode()

int org.turro.alliance.db.entities.AxResponse.hashCode ( )

Definition at line 139 of file AxResponse.java.

139  {
140  int hash = 7;
141  hash = 11 * hash + Objects.hashCode(this.relation);
142  return hash;
143  }

◆ isEmpty()

boolean org.turro.alliance.db.entities.AxResponse.isEmpty ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 118 of file AxResponse.java.

118  {
119  return relation.isEmpty();
120  }

◆ setCreation()

void org.turro.alliance.db.entities.AxResponse.setCreation ( Date  creation)

Definition at line 70 of file AxResponse.java.

70  {
71  this.creation = creation;
72  }
Here is the caller graph for this function:

◆ setRelation()

void org.turro.alliance.db.entities.AxResponse.setRelation ( RelationId  relation)

Definition at line 62 of file AxResponse.java.

62  {
63  this.relation = relation;
64  }
Here is the caller graph for this function:

◆ setStudentIds()

void org.turro.alliance.db.entities.AxResponse.setStudentIds ( Set< String >  studentIds)

Definition at line 78 of file AxResponse.java.

78  {
79  this.studentIds = studentIds;
80  }
Here is the caller graph for this function:

◆ setText()

void org.turro.alliance.db.entities.AxResponse.setText ( String  text)

Definition at line 86 of file AxResponse.java.

86  {
87  this.text = text;
88  }
Here is the caller graph for this function:

◆ toJson() [1/2]

String org.turro.alliance.db.entities.AxResponse.toJson ( )

Definition at line 125 of file AxResponse.java.

125  {
126  return toJson(this);
127  }
Here is the caller graph for this function:

◆ toJson() [2/2]

String org.turro.alliance.db.entities.AxResponse.toJson ( Map< String, Object >  properties)

Definition at line 130 of file AxResponse.java.

130  {
131  return toJson(this, properties);
132  }
Here is the call graph for this function:

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