T - The item whose persistence is managed by this Daopublic class DaoImpl<T> extends Object implements Dao<T>, DaoDescriptor<T>
Dao implementation.
 
 There is no good reason to directly construct this class yourself.
 Use a DaoBuilder.
| Constructor and Description | 
|---|
| DaoImpl(Connection connection,
       String tableName,
       Supplier<T> supplier,
       PrimaryKey<T> primaryKey,
       List<TypedColumn<T>> dataColumns,
       List<JoinColumn<T,?>> joinColumns,
       List<ChildrenDescriptor<T,?>> childrenDescriptors) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | atomicDelete(T item)Run a delete statement in the database. | 
| long | atomicInsert(T item)Insert a record into the database within a transaction that is
 managed within the Dao. | 
| void | atomicUpdate(T item)Run an update statement to change the values in the database associated
 with an existing record. | 
| List<ChildrenDescriptor<T,?>> | childrenDescriptors()The definitions of any entities that are owned by type  T | 
| List<TypedColumn<T>> | dataColumns()The columns that contain the data that make up the object | 
| void | delete(T item)Run a delete statement in the database. | 
| String | deleteSql(T item) | 
| long | insert(T item)Insert a record into the database. | 
| List<JoinColumn<T,?>> | joinColumns()The columns that contain references to foreign keys to other objects | 
| PrimaryKey<T> | primaryKey()The primary key for objects of type  T | 
| T | select(long id)Read a record from the database. | 
| List<T> | selectAll()Read all the records in the database of type T. | 
| T | selectByColumns(T item,
               String... columnNames)Select a single record from the database by some search criteria. | 
| List<T> | selectMany(List<Long> ids)Read several records from the database. | 
| List<T> | selectManyByColumns(T item,
                   String... columnNames)Select multiple records from the database by some search criteria. | 
| Supplier<T> | supplier()The mechanism to use to instantiate a new instance of type  T,
 generally a no-argument constructor of the class. | 
| String | tableName()The name of the table that is used to persist type  T | 
| void | update(T item)Run an update statement to change the values in the database associated
 with an existing record. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitallColumns, columnMappublic DaoImpl(Connection connection, String tableName, Supplier<T> supplier, PrimaryKey<T> primaryKey, List<TypedColumn<T>> dataColumns, List<JoinColumn<T,?>> joinColumns, List<ChildrenDescriptor<T,?>> childrenDescriptors)
public String tableName()
DaoDescriptorTtableName in interface DaoDescriptor<T>public List<TypedColumn<T>> dataColumns()
DaoDescriptordataColumns in interface DaoDescriptor<T>public List<JoinColumn<T,?>> joinColumns()
DaoDescriptorjoinColumns in interface DaoDescriptor<T>public Supplier<T> supplier()
DaoDescriptorT,
 generally a no-argument constructor of the class.supplier in interface DaoDescriptor<T>public PrimaryKey<T> primaryKey()
DaoDescriptorTprimaryKey in interface DaoDescriptor<T>public List<ChildrenDescriptor<T,?>> childrenDescriptors()
DaoDescriptorTchildrenDescriptors in interface DaoDescriptor<T>public long atomicInsert(T item)
DaoConnection
 when complete.atomicInsert in interface Dao<T>item - The instance to be inserted.public void atomicUpdate(T item)
DaoConnection
 when complete.atomicUpdate in interface Dao<T>item - An instance of the class with a populated primary key field
             and updated field values.public void atomicDelete(T item)
DaoConnection
 when complete.atomicDelete in interface Dao<T>item - An instance of type T with a populated primary key.public long insert(T item)
Daopublic void update(T item)
Daopublic void delete(T item)
Daopublic T select(long id)
Daopublic List<T> selectMany(List<Long> ids)
DaoselectMany in interface Dao<T>ids - The primary keys of the records desired.public List<T> selectAll()
Daopublic T selectByColumns(T item, String... columnNames)
DaoselectByColumns in interface Dao<T>item - An instance of type T with populated values corresponding to the
             column names to select by.columnNames - The names of the database columnspublic List<T> selectManyByColumns(T item, String... columnNames)
DaoselectManyByColumns in interface Dao<T>item - An instance of type T with populated values corresponding to the
             column names to select by.columnNames - The names of the database columnsCopyright © 2018. All rights reserved.