com.wizarius.orm.database.entityreader.EntityQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wizarius-orm Show documentation
Show all versions of wizarius-orm Show documentation
Java orm for Postgres or Mysql with migration system and connection pool
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