Skip to content

Commit

Permalink
Document projeden kaldırıldı. Contact sınıfı yerine Person ve Organiz…
Browse files Browse the repository at this point in the history
…ation adında iki sınıf oluşturuldu. Bu iki sınıfında kendi phone sınıfları bulunuyor. Backend tamamlandı. Sıra frontend'i güncellemeye geldi. Yuppi! related #46
  • Loading branch information
KancerEzeroglu committed Jan 16, 2018
1 parent e85f959 commit 9e1819a
Show file tree
Hide file tree
Showing 88 changed files with 3,868 additions and 8,934 deletions.
14 changes: 8 additions & 6 deletions src/main/java/com/leadlet/config/CacheConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,18 @@ public JCacheManagerCustomizer cacheManagerCustomizer() {
cm.createCache(com.leadlet.domain.Pipeline.class.getName(), jcacheConfiguration);
cm.createCache(com.leadlet.domain.Pipeline.class.getName() + ".stages", jcacheConfiguration);
cm.createCache(com.leadlet.domain.Stage.class.getName(), jcacheConfiguration);
cm.createCache(com.leadlet.domain.Contact.class.getName(), jcacheConfiguration);
cm.createCache(com.leadlet.domain.Contact.class.getName() + ".phones", jcacheConfiguration);
cm.createCache(com.leadlet.domain.Contact.class.getName() + ".emails", jcacheConfiguration);
cm.createCache(com.leadlet.domain.Contact.class.getName() + ".documents", jcacheConfiguration);
cm.createCache(com.leadlet.domain.Document.class.getName(), jcacheConfiguration);
cm.createCache(com.leadlet.domain.Organization.class.getName(), jcacheConfiguration);
cm.createCache(com.leadlet.domain.Organization.class.getName() + ".phones", jcacheConfiguration);
cm.createCache(com.leadlet.domain.Organization.class.getName() + ".emails", jcacheConfiguration);
cm.createCache(com.leadlet.domain.Person.class.getName(), jcacheConfiguration);
cm.createCache(com.leadlet.domain.Person.class.getName() + ".phones", jcacheConfiguration);
cm.createCache(com.leadlet.domain.Person.class.getName() + ".emails", jcacheConfiguration);
cm.createCache(com.leadlet.domain.ContactPhone.class.getName(), jcacheConfiguration);
cm.createCache(com.leadlet.domain.Deal.class.getName(), jcacheConfiguration);
cm.createCache(com.leadlet.domain.Activity.class.getName(), jcacheConfiguration);
cm.createCache(com.leadlet.domain.Activity.class.getName() + ".documents", jcacheConfiguration);
cm.createCache(com.leadlet.domain.Note.class.getName(), jcacheConfiguration);
cm.createCache(com.leadlet.domain.OrganizationPhone.class.getName(), jcacheConfiguration);

// jhipster-needle-ehcache-add-entry
};
}
Expand Down
54 changes: 32 additions & 22 deletions src/main/java/com/leadlet/domain/Activity.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,14 @@ public class Activity extends AbstractAccountSpecificEntity implements Serializa
@NotNull
private ActivityType type;

@OneToMany(mappedBy = "activity")
@JsonIgnore
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
private Set<Document> documents = new HashSet<>();

@ManyToOne
private Deal deal;

@ManyToOne
private Contact person;
private Person person;

@ManyToOne
private Contact organization;
private Organization organization;

@ManyToOne
private User user;
Expand Down Expand Up @@ -101,8 +96,8 @@ public ZonedDateTime getEnd() {
return end;
}

public void setEnd(ZonedDateTime start) {
this.end = start;
public void setEnd(ZonedDateTime end) {
this.end = end;
}

public ActivityType getType() {
Expand All @@ -113,14 +108,6 @@ public void setType(ActivityType type) {
this.type = type;
}

public Set<Document> getDocuments() {
return documents;
}

public void setDocuments(Set<Document> documents) {
this.documents = documents;
}

public Deal getDeal() {
return deal;
}
Expand All @@ -129,19 +116,19 @@ public void setDeal(Deal deal) {
this.deal = deal;
}

public Contact getPerson() {
public Person getPerson() {
return person;
}

public void setPerson(Contact person) {
public void setPerson(Person person) {
this.person = person;
}

public Contact getOrganization() {
public Organization getOrganization() {
return organization;
}

public void setOrganization(Contact organization) {
public void setOrganization(Organization organization) {
this.organization = organization;
}

Expand All @@ -162,11 +149,34 @@ public String toString() {
", start=" + start +
", end=" + end +
", type=" + type +
", documents=" + documents +
", deal=" + deal +
", person=" + person +
", organization=" + organization +
", user=" + user +
'}';
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Activity)) return false;
Activity activity = (Activity) o;
return Objects.equals(id, activity.id) &&
Objects.equals(title, activity.title) &&
Objects.equals(memo, activity.memo) &&
Objects.equals(start, activity.start) &&
Objects.equals(end, activity.end) &&
type == activity.type &&
Objects.equals(deal, activity.deal) &&
Objects.equals(person, activity.person) &&
Objects.equals(organization, activity.organization) &&
Objects.equals(user, activity.user);
}

@Override
public int hashCode() {

return Objects.hash(id, title, memo, start, end, type, deal, person, organization, user);
}

}
257 changes: 0 additions & 257 deletions src/main/java/com/leadlet/domain/Contact.java

This file was deleted.

Loading

0 comments on commit 9e1819a

Please sign in to comment.