started to implement project tagging, was interrupted.
next on: saving tags for user = null
This commit is contained in:
@@ -130,8 +130,12 @@ CREATE TABLE IF NOT EXISTS "{0}" (
|
||||
public void save(Collection<Long> userIds, String module, long entityId, Collection<String> tags) {
|
||||
try {
|
||||
var query = replaceInto(TABLE_TAGS,USER_ID,MODULE,ID,TAG);
|
||||
for (var userId : userIds) {
|
||||
for (var tag : tags) query.values(userId,module,entityId,tag);
|
||||
for (var tag : tags) {
|
||||
if (userIds == null) { // tags not assigned to a user are available to all users
|
||||
query.values(null, module, entityId, tag);
|
||||
} else for (var userId : userIds) {
|
||||
query.values(userId,module,entityId,tag);
|
||||
}
|
||||
}
|
||||
query.execute(db).close();
|
||||
} catch (SQLException e){
|
||||
|
||||
Reference in New Issue
Block a user