All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.wizarius.orm.database.entityreader.EntityQuery Maven / Gradle / Ivy

There is a newer version: 0.0.27.6
Show newest version
package com.wizarius.orm.database.entityreader;

import com.wizarius.orm.database.actions.WizDBDelete;
import com.wizarius.orm.database.actions.WizDBInsert;
import com.wizarius.orm.database.actions.WizDBSelect;
import com.wizarius.orm.database.actions.WizDBUpdate;
import com.wizarius.orm.database.connection.DBConnectionPool;

/**
 * @author Vladyslav Shyshkin
 * Date: 23.03.2020
 * Time: 22:31
 */
public class EntityQuery {
    private final DBConnectionPool pool;
    private final DBParsedFieldsList fields;

    public EntityQuery(DBConnectionPool pool,
                       DBParsedFieldsList fields) {
        this.pool = pool;
        this.fields = fields;
    }

    /**
     * Returns select query
     *
     * @return db select query
     */
    public WizDBSelect getSelectQuery() {
        return new WizDBSelect<>(pool, fields);
    }

    /**
     * Returns insert query
     *
     * @return db insert query
     */
    public  WizDBInsert getInsertQuery() {
        return new WizDBInsert<>(pool, fields);
    }

    /**
     * Returns update query
     *
     * @return db update query
     */
    public WizDBUpdate getUpdateQuery() {
        return new WizDBUpdate<>(pool, fields);
    }

    /**
     * Returns update query
     *
     * @return db update query
     */
    public WizDBDelete getDeleteQuery() {
        return new WizDBDelete<>(pool, fields);
    }

    /**
     * Returns connection pool
     *
     * @return connection pool
     */
    public DBConnectionPool getPool() {
        return pool;
    }

    /**
     * Return parsed fields
     *
     * @return parsed fields
     */
    public DBParsedFieldsList getFields() {
        return fields;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy