from empFlaskCrud.dao.daoinfo import DAOContract
from empFlaskCrud.util.dbconfig import db
from empFlaskCrud.model.Empinfo import Employee

class EmpDImpl(DAOContract):

    def persistEntity(self, entity):
        db.session.add(entity)
        self.commitAndRemove()

    def removeEntity(self, entityID):
        db.session.delete(entityID)
        self.commitAndRemove()

    def fetchEntity(self, entityId):
        return Employee.query.filter_by(id=entityId).first()

    def fetchAllEntities(self):
        return Employee.query.all()

    def modifyEntity(self, entity):
        self.commitAndRemove()

    def commitAndRemove(self):
            db.session.commit()
            db.session.remove()
6cb7647dbd3c948cc85bcacbf58086acbcd91bc9
<mask token>


class EmpDImpl(DAOContract):
    <mask token>
    <mask token>

    def fetchEntity(self, entityId):
        return Employee.query.filter_by(id=entityId).first()

    def fetchAllEntities(self):
        return Employee.query.all()
    <mask token>
    <mask token>

<mask token>


class EmpDImpl(DAOContract):

    def persistEntity(self, entity):
        db.session.add(entity)
        self.commitAndRemove()
    <mask token>

    def fetchEntity(self, entityId):
        return Employee.query.filter_by(id=entityId).first()

    def fetchAllEntities(self):
        return Employee.query.all()
    <mask token>
    <mask token>

<mask token>


class EmpDImpl(DAOContract):

    def persistEntity(self, entity):
        db.session.add(entity)
        self.commitAndRemove()

    def removeEntity(self, entityID):
        db.session.delete(entityID)
        self.commitAndRemove()

    def fetchEntity(self, entityId):
        return Employee.query.filter_by(id=entityId).first()

    def fetchAllEntities(self):
        return Employee.query.all()
    <mask token>

    def commitAndRemove(self):
        db.session.commit()
        db.session.remove()

<mask token>


class EmpDImpl(DAOContract):

    def persistEntity(self, entity):
        db.session.add(entity)
        self.commitAndRemove()

    def removeEntity(self, entityID):
        db.session.delete(entityID)
        self.commitAndRemove()

    def fetchEntity(self, entityId):
        return Employee.query.filter_by(id=entityId).first()

    def fetchAllEntities(self):
        return Employee.query.all()

    def modifyEntity(self, entity):
        self.commitAndRemove()

    def commitAndRemove(self):
        db.session.commit()
        db.session.remove()

from empFlaskCrud.dao.daoinfo import DAOContract
from empFlaskCrud.util.dbconfig import db
from empFlaskCrud.model.Empinfo import Employee

class EmpDImpl(DAOContract):

    def persistEntity(self, entity):
        db.session.add(entity)
        self.commitAndRemove()

    def removeEntity(self, entityID):
        db.session.delete(entityID)
        self.commitAndRemove()

    def fetchEntity(self, entityId):
        return Employee.query.filter_by(id=entityId).first()

    def fetchAllEntities(self):
        return Employee.query.all()

    def modifyEntity(self, entity):
        self.commitAndRemove()

    def commitAndRemove(self):
            db.session.commit()
            db.session.remove()