public class DbEntitySql
extends java.lang.Object
DbSqlBuilder
generators.Constructor and Description |
---|
DbEntitySql() |
DbEntitySql(DbOom dbOom) |
Modifier and Type | Method and Description |
---|---|
DbSqlBuilder |
count(java.lang.Class entityType)
Creates SELECT COUNT all query.
|
DbSqlBuilder |
count(java.lang.Object entity)
Creates SELECT COUNT criteria for the entity matched by non-null values.
|
DbSqlBuilder |
countAll(java.lang.Object entity)
Creates SELECT COUNT criteria for the entity matched by all values.
|
protected static java.lang.String |
createTableRefName(java.lang.Object entity)
Creates table reference name from entity type.
|
DbSqlBuilder |
delete(java.lang.Object entity)
Creates DELETE query that deletes entity matched by non-null values.
|
DbSqlBuilder |
deleteByAll(java.lang.Object entity)
Creates DELETE query that deletes entity matched by all values.
|
DbSqlBuilder |
deleteById(java.lang.Object entity)
Creates DELETE query that deletes entity by ID.
|
DbSqlBuilder |
deleteById(java.lang.Object entityType,
java.lang.Object id)
Creates DELETE query that deletes entity by ID.
|
DbSqlBuilder |
find(java.lang.Class target,
java.lang.Object matchEntity)
Creates SELECT criteria for the entity matched by non-null values.
|
DbSqlBuilder |
find(java.lang.Object entity)
Creates SELECT criteria for the entity matched by non-null values.
|
DbSqlBuilder |
findAll(java.lang.Object entity)
Returns all records for given type.
|
DbSqlBuilder |
findByAll(java.lang.Object entity)
Creates SELECT criteria for the entity matched by all values.
|
DbSqlBuilder |
findByColumn(java.lang.Class entity,
java.lang.String column,
java.lang.Object value)
Creates SELECT criteria for the entity matched by column name
|
DbSqlBuilder |
findById(java.lang.Object entity)
Creates SELECT criteria for the entity matched by id.
|
DbSqlBuilder |
findById(java.lang.Object entityType,
java.lang.Object id)
Creates SELECT criteria for the entity matched by id.
|
DbSqlBuilder |
findForeign(java.lang.Class entity,
java.lang.Object value)
Creates SELECT criteria for the entity matched by foreign key.
|
DbSqlBuilder |
from(java.lang.Class entityType) |
DbSqlBuilder |
from(java.lang.Class entityType,
java.lang.String tableRef) |
DbSqlBuilder |
from(java.lang.Object entity)
Creates 'SELECT all FROM entity' part of the SQL query that can be easily extended.
|
DbSqlBuilder |
from(java.lang.Object entity,
java.lang.String tableRef) |
DbSqlBuilder |
increaseColumn(java.lang.Class entity,
java.lang.Object id,
java.lang.String columnRef,
java.lang.Number delta,
boolean increase)
Creates UPDATE that increases/decreases column by some delta value.
|
DbSqlBuilder |
insert(java.lang.Object entity)
Creates INSERT query for the entity.
|
DbSqlBuilder |
truncate(java.lang.Object entity)
Creates DELETE query that truncates all table data.
|
DbSqlBuilder |
update(java.lang.Object entity)
Creates UPDATE query that updates all non-null values of an entity that is matched by id.
|
DbSqlBuilder |
updateAll(java.lang.Object entity)
Creates UPDATE query that updates all values of an entity that is matched by id.
|
DbSqlBuilder |
updateColumn(java.lang.Object entity,
java.lang.String columnRef)
Reads property value and updates the DB.
|
DbSqlBuilder |
updateColumn(java.lang.Object entity,
java.lang.String columnRef,
java.lang.Object value)
Creates UPDATE query for single column of an entity that is matched by id.
|
public DbEntitySql(DbOom dbOom)
public DbEntitySql()
public DbSqlBuilder insert(java.lang.Object entity)
public DbSqlBuilder truncate(java.lang.Object entity)
public DbSqlBuilder update(java.lang.Object entity)
public DbSqlBuilder updateAll(java.lang.Object entity)
public DbSqlBuilder updateColumn(java.lang.Object entity, java.lang.String columnRef, java.lang.Object value)
public DbSqlBuilder updateColumn(java.lang.Object entity, java.lang.String columnRef)
public DbSqlBuilder delete(java.lang.Object entity)
public DbSqlBuilder deleteByAll(java.lang.Object entity)
public DbSqlBuilder deleteById(java.lang.Object entity)
public DbSqlBuilder deleteById(java.lang.Object entityType, java.lang.Object id)
public DbSqlBuilder from(java.lang.Object entity)
public DbSqlBuilder from(java.lang.Object entity, java.lang.String tableRef)
public DbSqlBuilder from(java.lang.Class entityType)
public DbSqlBuilder from(java.lang.Class entityType, java.lang.String tableRef)
public DbSqlBuilder find(java.lang.Class target, java.lang.Object matchEntity)
public DbSqlBuilder find(java.lang.Object entity)
public DbSqlBuilder findByAll(java.lang.Object entity)
public DbSqlBuilder findByColumn(java.lang.Class entity, java.lang.String column, java.lang.Object value)
public DbSqlBuilder findForeign(java.lang.Class entity, java.lang.Object value)
public DbSqlBuilder findAll(java.lang.Object entity)
public DbSqlBuilder findById(java.lang.Object entity)
public DbSqlBuilder findById(java.lang.Object entityType, java.lang.Object id)
public DbSqlBuilder count(java.lang.Object entity)
public DbSqlBuilder count(java.lang.Class entityType)
public DbSqlBuilder countAll(java.lang.Object entity)
public DbSqlBuilder increaseColumn(java.lang.Class entity, java.lang.Object id, java.lang.String columnRef, java.lang.Number delta, boolean increase)
protected static java.lang.String createTableRefName(java.lang.Object entity)
Copyright © 2003-present Jodd Team