Remove tags.

main
Paulo Gustavo Veiga 2022-10-03 16:14:23 -07:00
parent f0531551d7
commit 2146e2e457
5 changed files with 1 additions and 42 deletions

View File

@ -27,7 +27,6 @@ CREATE TABLE MINDMAP (
creation_date DATETIME,
edition_date DATETIME,
creator_id INTEGER NOT NULL,
tags VARCHAR(1014),
last_editor_id INTEGER NOT NULL
--FOREIGN KEY(creator_id) REFERENCES USER(colaborator_id)
);
@ -76,14 +75,6 @@ CREATE TABLE COLLABORATION (
FOREIGN KEY (properties_id) REFERENCES COLLABORATION_PROPERTIES (id)
);
CREATE TABLE TAG (
id INTEGER NOT NULL IDENTITY,
name VARCHAR(255) NOT NULL,
user_id INTEGER NOT NULL,
--FOREIGN KEY(user_id) REFERENCES USER(colaborator_id)
);
CREATE TABLE ACCESS_AUDITORY (
id INTEGER NOT NULL IDENTITY,
user_id INTEGER NOT NULL,

View File

@ -1,5 +1,4 @@
DROP TABLE IF EXISTS ACCESS_AUDITORY;
DROP TABLE IF EXISTS TAG;
DROP TABLE IF EXISTS COLLABORATION;
DROP TABLE IF EXISTS COLLABORATION_PROPERTIES;
DROP TABLE IF EXISTS MINDMAP_HISTORY;

View File

@ -148,13 +148,6 @@ public class MindmapManagerImpl
final SimpleExpression descriptionRestriction = Restrictions.like("description", "%" + criteria.getDescription() + "%");
junction.add(descriptionRestriction);
}
if (criteria.getTags().size() > 0) {
for (String tag : criteria.getTags()) {
final SimpleExpression tagRestriction = Restrictions.like("tags", "%" + tag + "%");
junction.add(tagRestriction);
}
}
hibernateCriteria.add(junction);
}
return hibernateCriteria.list();

View File

@ -24,7 +24,6 @@ import java.util.List;
public class MindMapCriteria {
private String title;
private String description;
private List<String> tags = new ArrayList<String>();
private boolean orConnector = false;
private int pageNro = 0;
@ -41,18 +40,9 @@ public class MindMapCriteria {
this.pageNro = page;
}
public List<String> getTags() {
return tags;
}
public void setTags(List<String> tags) {
this.tags = tags;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@ -78,8 +68,7 @@ public class MindMapCriteria {
}
public boolean isEmpty() {
return !(getTags() != null && !getTags().isEmpty() || getTitle() != null || getDescription() != null);
return getTitle() != null || getDescription() != null;
}
public static MindMapCriteria EMPTY_CRITERIA = new MindMapCriteria();
}

View File

@ -57,22 +57,9 @@ public class User
@Column(name = "authenticator_uri")
private String authenticatorUri;
@ElementCollection
@CollectionTable(name = "TAG", joinColumns = @JoinColumn(name = "user_id"))
@Column(name = "name")
private Set<String> tags = new HashSet<>();
public User() {
}
public void setTags(Set<String> tags) {
this.tags = tags;
}
public Set<String> getTags() {
return tags;
}
public String getFullName() {
return this.getFirstname() + " " + this.getLastname();
}