BrightSide Workbench Full Report + Source Code
org.turro.contacts.RelationValidation Class Reference
Inheritance diagram for org.turro.contacts.RelationValidation:
Collaboration diagram for org.turro.contacts.RelationValidation:

Public Member Functions

String getId ()
 
void setId (String id)
 
String getProvidedEmail ()
 
void setProvidedEmail (String providedEmail)
 
boolean isValidated ()
 
void setValidated (boolean validated)
 
ValidationRule getRule ()
 
void setRule (ValidationRule rule)
 
Object entityId ()
 
boolean isEmpty ()
 
boolean isBad ()
 
BusinessRelation getRelation ()
 
- 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 RelationValidation getFrom (BusinessRelation relation)
 

Detailed Description

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

Definition at line 37 of file RelationValidation.java.

Member Function Documentation

◆ entityId()

Object org.turro.contacts.RelationValidation.entityId ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 84 of file RelationValidation.java.

84  {
85  return id;
86  }

◆ getFrom()

static RelationValidation org.turro.contacts.RelationValidation.getFrom ( BusinessRelation  relation)
static

Definition at line 103 of file RelationValidation.java.

103  {
104  RelationValidation rv = new ContactsPU().find(RelationValidation.class, relation.getId());
105  if(rv == null) {
106  rv = new RelationValidation();
107  rv.id = relation.getId();
108  Connector email = relation.getContact().getConnectorMap().get(IUser.CONNECTOR_EMAIL);
109  rv.providedEmail = email != null ? email.getValue() : null;
110  }
111  return rv;
112  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getId()

String org.turro.contacts.RelationValidation.getId ( )

Definition at line 49 of file RelationValidation.java.

49  {
50  return id;
51  }

◆ getProvidedEmail()

String org.turro.contacts.RelationValidation.getProvidedEmail ( )

Definition at line 57 of file RelationValidation.java.

57  {
58  return providedEmail;
59  }

◆ getRelation()

BusinessRelation org.turro.contacts.RelationValidation.getRelation ( )

Definition at line 99 of file RelationValidation.java.

99  {
100  return new ContactsPU().find(BusinessRelation.class, id);
101  }

◆ getRule()

ValidationRule org.turro.contacts.RelationValidation.getRule ( )

Definition at line 73 of file RelationValidation.java.

73  {
74  return rule;
75  }
Here is the caller graph for this function:

◆ isBad()

boolean org.turro.contacts.RelationValidation.isBad ( )

Definition at line 95 of file RelationValidation.java.

95  {
96  return !Strings.isBlank(providedEmail) && !MailValidator.single().silently(providedEmail);
97  }

◆ isEmpty()

boolean org.turro.contacts.RelationValidation.isEmpty ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 89 of file RelationValidation.java.

89  {
90  return false;
91  }

◆ isValidated()

boolean org.turro.contacts.RelationValidation.isValidated ( )

Definition at line 65 of file RelationValidation.java.

65  {
66  return validated;
67  }
Here is the caller graph for this function:

◆ setId()

void org.turro.contacts.RelationValidation.setId ( String  id)

Definition at line 53 of file RelationValidation.java.

53  {
54  this.id = id;
55  }

◆ setProvidedEmail()

void org.turro.contacts.RelationValidation.setProvidedEmail ( String  providedEmail)

Definition at line 61 of file RelationValidation.java.

61  {
62  this.providedEmail = providedEmail;
63  }

◆ setRule()

void org.turro.contacts.RelationValidation.setRule ( ValidationRule  rule)

Definition at line 77 of file RelationValidation.java.

77  {
78  this.rule = rule;
79  }

◆ setValidated()

void org.turro.contacts.RelationValidation.setValidated ( boolean  validated)

Definition at line 69 of file RelationValidation.java.

69  {
70  this.validated = validated;
71  }

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