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

Public Member Functions

Long getMemberId ()
 
void setMemberId (Long memberId)
 
String getEntityId ()
 
void setEntityId (String entityId)
 
String getGrouping ()
 
void setGrouping (String grouping)
 
String getTitle ()
 
void setTitle (String title)
 
int getOrderNumber ()
 
void setOrderNumber (int orderNumber)
 
String getText ()
 
void setText (String text)
 
Object entityId ()
 
boolean isEmpty ()
 
String toJson ()
 
String toJson (Map< String, Object > properties)
 
int compareTo (AxDescriptor o)
 
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< AxDescriptorfrom (AxProject project, Dossier dossier)
 
static AxDescriptor fromJson (JsonValue value)
 

Detailed Description

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

Definition at line 43 of file AxDescriptor.java.

Member Function Documentation

◆ compareTo()

int org.turro.alliance.db.entities.AxDescriptor.compareTo ( AxDescriptor  o)

Definition at line 151 of file AxDescriptor.java.

151  {
152  return Comparison.ascendant()
153  .compare(memberId, o.memberId)
154  .compare(entityId, o.entityId)
155  .compare(grouping, o.grouping)
156  .compare(orderNumber, o.orderNumber)
157  .compare(title, o.title)
158  .get();
159  }

◆ entityId()

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

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 125 of file AxDescriptor.java.

125  {
126  return memberId + entityId + grouping + title;
127  }

◆ equals()

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

Definition at line 173 of file AxDescriptor.java.

173  {
174  if (this == obj) {
175  return true;
176  }
177  if (obj == null) {
178  return false;
179  }
180  if (getClass() != obj.getClass()) {
181  return false;
182  }
183  final AxDescriptor other = (AxDescriptor) obj;
184  if (this.orderNumber != other.orderNumber) {
185  return false;
186  }
187  if (!Objects.equals(this.entityId, other.entityId)) {
188  return false;
189  }
190  if (!Objects.equals(this.grouping, other.grouping)) {
191  return false;
192  }
193  if (!Objects.equals(this.title, other.title)) {
194  return false;
195  }
196  return Objects.equals(this.memberId, other.memberId);
197  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ from()

static Set<AxDescriptor> org.turro.alliance.db.entities.AxDescriptor.from ( AxProject  project,
Dossier  dossier 
)
static

Definition at line 104 of file AxDescriptor.java.

104  {
105  TreeSet<AxDescriptor> descriptors = new TreeSet<>();
106  dossier.getDescriptors().stream()
107  .filter(d -> DescriptorType.OPENING_DESCRIPTOR.equals(d.getDescriptorDefinition().getType()))
108  .filter(d -> d.getDescriptorDefinition().isRequired())
109  .forEach(descriptor -> {
110  AxDescriptor axDescriptor = new AxDescriptor();
111  axDescriptor.setEntityId(project.getProjectId().getEntityId());
112  axDescriptor.setMemberId(project.getProjectId().getMemberId());
113  axDescriptor.setGrouping(descriptor.getDescriptorDefinition().getGrouping());
114  axDescriptor.setOrderNumber(descriptor.getDescriptorDefinition().getOrderNumber());
115  axDescriptor.setTitle(descriptor.getDescriptorDefinition().getTitle());
116  axDescriptor.setText(descriptor.getText());
117  if(!axDescriptor.isEmpty()) descriptors.add(axDescriptor);
118  });
119  return descriptors;
120  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromJson()

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

Definition at line 146 of file AxDescriptor.java.

146  {
147  return IJSONizable.fromJson(value.toString(), AxDescriptor.class);
148  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEntityId()

String org.turro.alliance.db.entities.AxDescriptor.getEntityId ( )

Definition at line 62 of file AxDescriptor.java.

62  {
63  return entityId;
64  }

◆ getGrouping()

String org.turro.alliance.db.entities.AxDescriptor.getGrouping ( )

Definition at line 70 of file AxDescriptor.java.

70  {
71  return grouping;
72  }

◆ getMemberId()

Long org.turro.alliance.db.entities.AxDescriptor.getMemberId ( )

Definition at line 54 of file AxDescriptor.java.

54  {
55  return memberId;
56  }

◆ getOrderNumber()

int org.turro.alliance.db.entities.AxDescriptor.getOrderNumber ( )

Definition at line 86 of file AxDescriptor.java.

86  {
87  return orderNumber;
88  }

◆ getText()

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

Definition at line 94 of file AxDescriptor.java.

94  {
95  return text;
96  }

◆ getTitle()

String org.turro.alliance.db.entities.AxDescriptor.getTitle ( )

Definition at line 78 of file AxDescriptor.java.

78  {
79  return title;
80  }

◆ hashCode()

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

Definition at line 162 of file AxDescriptor.java.

162  {
163  int hash = 7;
164  hash = 59 * hash + Objects.hashCode(this.memberId);
165  hash = 59 * hash + Objects.hashCode(this.entityId);
166  hash = 59 * hash + Objects.hashCode(this.grouping);
167  hash = 59 * hash + Objects.hashCode(this.title);
168  hash = 59 * hash + this.orderNumber;
169  return hash;
170  }

◆ isEmpty()

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

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 130 of file AxDescriptor.java.

130  {
131  return memberId == null || Strings.anyBlank(entityId, grouping, title, text);
132  }
Here is the caller graph for this function:

◆ setEntityId()

void org.turro.alliance.db.entities.AxDescriptor.setEntityId ( String  entityId)

Definition at line 66 of file AxDescriptor.java.

66  {
67  this.entityId = entityId;
68  }
Here is the caller graph for this function:

◆ setGrouping()

void org.turro.alliance.db.entities.AxDescriptor.setGrouping ( String  grouping)

Definition at line 74 of file AxDescriptor.java.

74  {
75  this.grouping = grouping;
76  }
Here is the caller graph for this function:

◆ setMemberId()

void org.turro.alliance.db.entities.AxDescriptor.setMemberId ( Long  memberId)

Definition at line 58 of file AxDescriptor.java.

58  {
59  this.memberId = memberId;
60  }
Here is the caller graph for this function:

◆ setOrderNumber()

void org.turro.alliance.db.entities.AxDescriptor.setOrderNumber ( int  orderNumber)

Definition at line 90 of file AxDescriptor.java.

90  {
91  this.orderNumber = orderNumber;
92  }
Here is the caller graph for this function:

◆ setText()

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

Definition at line 98 of file AxDescriptor.java.

98  {
99  this.text = text;
100  }
Here is the caller graph for this function:

◆ setTitle()

void org.turro.alliance.db.entities.AxDescriptor.setTitle ( String  title)

Definition at line 82 of file AxDescriptor.java.

82  {
83  this.title = title;
84  }
Here is the caller graph for this function:

◆ toJson() [1/2]

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

Definition at line 137 of file AxDescriptor.java.

137  {
138  return toJsonExcluding(this, AxProject.class);
139  }

◆ toJson() [2/2]

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

Definition at line 142 of file AxDescriptor.java.

142  {
143  return toJsonExcluding(this, properties, AxProject.class);
144  }

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