Skip to content

Commit

Permalink
[#2_singletonfix] Repository api: getNitrite added
Browse files Browse the repository at this point in the history
Signed-off-by: FunThomas424242 (Thomas Schubert) <funthomas424242@gmail.com>
  • Loading branch information
FunThomas424242 (Thomas Schubert) committed Dec 12, 2019
1 parent ee5695a commit ded0f80
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.dizitart.no2.FindOptions;
import org.dizitart.no2.Index;
import org.dizitart.no2.IndexOptions;
import org.dizitart.no2.Nitrite;
import org.dizitart.no2.NitriteCollection;
import org.dizitart.no2.NitriteId;
import org.dizitart.no2.RemoveOptions;
Expand All @@ -48,6 +49,10 @@ public class NitriteTemplate {
@Autowired
protected NitriteInstanz nitriteInstanz;

public Nitrite getNitrite(){
return nitriteInstanz.getNitrite();
}

public <ET> NitriteRepository<ET> getRepository(Class<ET> type) {
LOG.debug("Erzeuge neues Nitrite Repository für: {}", type.getName());
final ObjectRepository<ET> tmpRepository = this.nitriteInstanz.getNitrite().getRepository(type);
Expand Down

0 comments on commit ded0f80

Please sign in to comment.