label validator finished
This commit is contained in:
committed by
Ezequiel Bergamaschi
parent
b19ac2c4c3
commit
72a46367d6
@@ -25,4 +25,14 @@ public class LabelManagerImpl extends HibernateDaoSupport
|
||||
public List<Label> getAllLabels(@NotNull final User user) {
|
||||
return getHibernateTemplate().find("from com.wisemapping.model.Label wisemapping where creator_id=?", user.getId());
|
||||
}
|
||||
@Nullable
|
||||
@Override
|
||||
public Label getLabelByTitle(@NotNull String title, @NotNull final User user) {
|
||||
Label result = null;
|
||||
final List<Label> labels = getHibernateTemplate().find("from com.wisemapping.model.Label wisemapping where title=? and creator=?", new Object[]{title, user});
|
||||
if (labels != null && !labels.isEmpty()) {
|
||||
result = labels.get(0);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user