@@ -0,0 +1,1247 @@
+package io.teiler.server.persistence.repositories;%0A%0Aimport javax.persistence.EntityManager;%0Aimport javax.transaction.Transactional;%0A%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.stereotype.Repository;%0A%0Aimport com.querydsl.jpa.impl.JPAQuery;%0A%0Aimport io.teiler.server.dto.Expense;%0Aimport io.teiler.server.persistence.entities.ExpenseEntity;%0Aimport io.teiler.server.persistence.entities.QExpenseEntity;%0A%0A/**%0A * Provides database-related operations for Expenses.%0A * %0A * @author pbaechli%0A */%0A@Repository%0Apublic class ExpenseRepository %7B%0A%0A    @Autowired%0A    private EntityManager entityManager;%0A    %0A    @Transactional%0A    public ExpenseEntity create(Expense expense) %7B%0A        ExpenseEntity expenseEntity = new ExpenseEntity(expense);%0A        entityManager.persist(expenseEntity);%0A        return expenseEntity;%0A    %7D%0A    %0A    /**%0A     * Returns a %7B@link ExpenseEntity%7D with the Id.%0A     * %0A     * @param id Id of the Expense%0A     * @return %7B@link ExpenseEntity%7D%0A     */%0A    public ExpenseEntity getById(Integer id) %7B%0A        return new JPAQuery%3CExpenseEntity%3E(entityManager).from(QExpenseEntity.expenseEntity)%0A            .where(QExpenseEntity.expenseEntity.id.eq(id))%0A            .fetchOne();%0A    %7D%0A    %0A%7D%0A

add expense repository (#173)