rest api for label and hibernate mapping
This commit is contained in:
committed by
Ezequiel Bergamaschi
parent
504e3e18e6
commit
1b480b566a
@@ -0,0 +1,10 @@
|
||||
package com.wisemapping.dao;
|
||||
|
||||
import com.wisemapping.model.Label;
|
||||
|
||||
public interface LabelManager {
|
||||
|
||||
void addLabel(Label label);
|
||||
|
||||
void saveLabel(Label label);
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
package com.wisemapping.dao;
|
||||
|
||||
import com.wisemapping.model.Label;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||
|
||||
public class LabelManagerImpl extends HibernateDaoSupport
|
||||
implements LabelManager {
|
||||
|
||||
@Override
|
||||
public void addLabel(Label label) {
|
||||
saveLabel(label);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveLabel(@NotNull Label label) {
|
||||
getSession().save(label);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user