mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-21 13:47:57 +01:00
Remove tags.
This commit is contained in:
parent
f0531551d7
commit
2146e2e457
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user