Package in.partake.model.dao.postgres9

Examples of in.partake.model.dao.postgres9.Postgres9Connection


    private PartakeConnectionPool pool;
    private PartakeDAOFactory factory;

    public Postgres9DBService() {
        pool = new Postgres9ConnectionPool();
        factory = new Postgres9DAOFactory();
    }
View Full Code Here


    @Override
    public void put(PartakeConnection con, TwitterMessage t) throws DAOException {
        Postgres9Connection pcon = (Postgres9Connection) con;

        Postgres9Entity entity = new Postgres9Entity(t.getId(), CURRENT_VERSION, t.toJSON().toString().getBytes(UTF8), null, TimeUtil.getCurrentDateTime());
        if (entityDao.exists(pcon, t.getId()))
            entityDao.update(pcon, entity);
        else
            entityDao.insert(pcon, entity);
        indexDao.put(pcon, new String[] { "id", "userId", "createdAt" }, new Object[] { t.getId(), t.getUserId(), t.getCreatedAt() } );
View Full Code Here

    @Override
    public void put(PartakeConnection con, UserSentMessage t) throws DAOException {
        Postgres9Connection pcon = (Postgres9Connection) con;

        // TODO: Why User does not have createdAt and modifiedAt?
        Postgres9Entity entity = new Postgres9Entity(t.getId(), CURRENT_VERSION, t.toJSON().toString().getBytes(UTF8), null, TimeUtil.getCurrentDateTime());
        if (entityDao.exists(pcon, t.getId()))
            entityDao.update(pcon, entity);
        else
            entityDao.insert(pcon, entity);
        indexDao.put(pcon, new String[] { "id", "senderId", "createdAt" }, new Object[] { t.getId().toString(), t.getSenderId(), t.getCreatedAt() } );
View Full Code Here

    @Override
    public void put(PartakeConnection con, Event event) throws DAOException {
        Postgres9Connection pcon = (Postgres9Connection) con;

        Postgres9Entity entity = new Postgres9Entity(event.getId(), CURRENT_VERSION, event.toJSON().toString().getBytes(UTF8), null, TimeUtil.getCurrentDateTime());
        if (entityDao.exists(pcon, event.getId()))
            entityDao.update(pcon, entity);
        else
            entityDao.insert(pcon, entity);
View Full Code Here

    @Override
    public void put(PartakeConnection con, EventTicketNotification t) throws DAOException {
        Postgres9Connection pcon = (Postgres9Connection) con;

        // TODO: Why User does not have createdAt and modifiedAt?
        Postgres9Entity entity = new Postgres9Entity(t.getId(), CURRENT_VERSION, t.toJSON().toString().getBytes(UTF8), null, TimeUtil.getCurrentDateTime());
        if (entityDao.exists(pcon, t.getId()))
            entityDao.update(pcon, entity);
        else
            entityDao.insert(pcon, entity);
View Full Code Here

    private final Postgres9EntityDao entityDao;
    private final Postgres9IndexDao indexDao;
    private final EntityTwitterMessageMapper mapper;

    public Postgres9TwitterMessageDao() {
        this.entityDao = new Postgres9EntityDao(ENTITY_TABLE_NAME);
        this.indexDao = new Postgres9IndexDao(INDEX_TABLE_NAME);
        this.mapper = new EntityTwitterMessageMapper();
    }
View Full Code Here

    private final Postgres9EntityDao entityDao;
    private final Postgres9IndexDao indexDao;
    private final EntityUserSentMessageMapper mapper;

    public Postgres9UserSentMessageDao() {
        this.entityDao = new Postgres9EntityDao(ENTITY_TABLE_NAME);
        this.indexDao = new Postgres9IndexDao(INDEX_TABLE_NAME);
        this.mapper = new EntityUserSentMessageMapper();
    }
View Full Code Here

    private final Postgres9IndexDao indexDao;
    private final Postgres9IndexDao editorIndexDao;
    private final EntityEventMapper mapper;

    public Postgres9EventDao() {
        this.entityDao = new Postgres9EntityDao(ENTITY_TABLE_NAME);
        this.indexDao = new Postgres9IndexDao(INDEX_TABLE_NAME);
        this.editorIndexDao = new Postgres9IndexDao(EDITOR_INDEX_TABLE_NAME);
        this.mapper = new EntityEventMapper();
    }
View Full Code Here

    private final Postgres9EntityDao entityDao;
    private final Postgres9IndexDao indexDao;
    private final EntityEventNotificationMapper mapper;

    public Postgres9EventNotificationDao() {
        this.entityDao = new Postgres9EntityDao(ENTITY_TABLE_NAME);
        this.indexDao = new Postgres9IndexDao(INDEX_TABLE_NAME);
        this.mapper = new EntityEventNotificationMapper();
    }
View Full Code Here

    private final Postgres9IndexDao indexDao;
    private final EntityTwitterMessageMapper mapper;

    public Postgres9TwitterMessageDao() {
        this.entityDao = new Postgres9EntityDao(ENTITY_TABLE_NAME);
        this.indexDao = new Postgres9IndexDao(INDEX_TABLE_NAME);
        this.mapper = new EntityTwitterMessageMapper();
    }
View Full Code Here

TOP

Related Classes of in.partake.model.dao.postgres9.Postgres9Connection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.