Interface CrudDaoL<T,SB extends com.landawn.abacus.util.SQLBuilder,TD extends CrudDaoL<T,SB,TD>>

Type Parameters:
T -
SB - SQLBuilder used to generate sql scripts. Only can be SQLBuilder.PSC/PAC/PLC
TD -
All Superinterfaces:
CrudDao<T,Long,SB,TD>, Dao<T,SB,TD>
All Known Subinterfaces:
NoUpdateCrudDaoL<T,SB,TD>, ReadOnlyCrudDaoL<T,SB,TD>, UncheckedCrudDaoL<T,SB,TD>, UncheckedNoUpdateCrudDaoL<T,SB,TD>, UncheckedReadOnlyCrudDaoL<T,SB,TD>

@Beta public interface CrudDaoL<T,SB extends com.landawn.abacus.util.SQLBuilder,TD extends CrudDaoL<T,SB,TD>> extends CrudDao<T,Long,SB,TD>
See Also:
  • ConditionFactory
  • ConditionFactory.CF
  • Method Details

    • queryForBoolean

      default com.landawn.abacus.util.u.OptionalBoolean queryForBoolean(String singleSelectPropName, long id) throws SQLException
      Parameters:
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForChar

      default com.landawn.abacus.util.u.OptionalChar queryForChar(String singleSelectPropName, long id) throws SQLException
      Parameters:
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForByte

      default com.landawn.abacus.util.u.OptionalByte queryForByte(String singleSelectPropName, long id) throws SQLException
      Parameters:
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForShort

      default com.landawn.abacus.util.u.OptionalShort queryForShort(String singleSelectPropName, long id) throws SQLException
      Parameters:
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForInt

      default com.landawn.abacus.util.u.OptionalInt queryForInt(String singleSelectPropName, long id) throws SQLException
      Parameters:
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForLong

      default com.landawn.abacus.util.u.OptionalLong queryForLong(String singleSelectPropName, long id) throws SQLException
      Parameters:
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForFloat

      default com.landawn.abacus.util.u.OptionalFloat queryForFloat(String singleSelectPropName, long id) throws SQLException
      Parameters:
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForDouble

      default com.landawn.abacus.util.u.OptionalDouble queryForDouble(String singleSelectPropName, long id) throws SQLException
      Parameters:
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForString

      default com.landawn.abacus.util.u.Nullable<String> queryForString(String singleSelectPropName, long id) throws SQLException
      Parameters:
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForDate

      default com.landawn.abacus.util.u.Nullable<Date> queryForDate(String singleSelectPropName, long id) throws SQLException
      Parameters:
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForTime

      default com.landawn.abacus.util.u.Nullable<Time> queryForTime(String singleSelectPropName, long id) throws SQLException
      Parameters:
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForTimestamp

      default com.landawn.abacus.util.u.Nullable<Timestamp> queryForTimestamp(String singleSelectPropName, long id) throws SQLException
      Parameters:
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForBytes

      default com.landawn.abacus.util.u.Nullable<byte[]> queryForBytes(String singleSelectPropName, long id) throws SQLException
      Parameters:
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForSingleResult

      default <V> com.landawn.abacus.util.u.Nullable<V> queryForSingleResult(Class<? extends V> targetValueClass, String singleSelectPropName, long id) throws SQLException
      Type Parameters:
      V -
      Parameters:
      targetValueClass -
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForSingleNonNull

      default <V> com.landawn.abacus.util.u.Optional<V> queryForSingleNonNull(Class<? extends V> targetValueClass, String singleSelectPropName, long id) throws SQLException
      Type Parameters:
      V -
      Parameters:
      targetValueClass -
      singleSelectPropName -
      id -
      Returns:
      Throws:
      SQLException
    • queryForSingleNonNull

      @Beta default <V> com.landawn.abacus.util.u.Optional<V> queryForSingleNonNull(String singleSelectPropName, long id, Jdbc.RowMapper<? extends V> rowMapper) throws SQLException
      Type Parameters:
      V -
      Parameters:
      singleSelectPropName -
      id -
      rowMapper -
      Returns:
      Throws:
      SQLException
    • queryForUniqueResult

      default <V> com.landawn.abacus.util.u.Nullable<V> queryForUniqueResult(Class<? extends V> targetValueClass, String singleSelectPropName, long id) throws com.landawn.abacus.exception.DuplicatedResultException, SQLException
      Type Parameters:
      V -
      Parameters:
      targetValueClass -
      singleSelectPropName -
      id -
      Returns:
      Throws:
      com.landawn.abacus.exception.DuplicatedResultException
      SQLException
    • queryForUniqueNonNull

      default <V> com.landawn.abacus.util.u.Optional<V> queryForUniqueNonNull(Class<? extends V> targetValueClass, String singleSelectPropName, long id) throws com.landawn.abacus.exception.DuplicatedResultException, SQLException
      Type Parameters:
      V -
      Parameters:
      targetValueClass -
      singleSelectPropName -
      id -
      Returns:
      Throws:
      com.landawn.abacus.exception.DuplicatedResultException
      SQLException
    • queryForUniqueNonNull

      @Beta default <V> com.landawn.abacus.util.u.Optional<V> queryForUniqueNonNull(String singleSelectPropName, long id, Jdbc.RowMapper<? extends V> rowMapper) throws com.landawn.abacus.exception.DuplicatedResultException, SQLException
      Type Parameters:
      V -
      Parameters:
      singleSelectPropName -
      id -
      rowMapper -
      Returns:
      Throws:
      com.landawn.abacus.exception.DuplicatedResultException
      SQLException
    • get

      default com.landawn.abacus.util.u.Optional<T> get(long id) throws SQLException
      Returns the record found by the specified id or an empty Optional if no record is found.
      Parameters:
      id -
      Returns:
      Throws:
      SQLException
    • get

      default com.landawn.abacus.util.u.Optional<T> get(long id, Collection<String> selectPropNames) throws SQLException
      Returns the record found by the specified id or an empty Optional if no record is found.
      Parameters:
      id -
      selectPropNames -
      Returns:
      Throws:
      SQLException
    • gett

      default T gett(long id) throws SQLException
      Returns the record found by the specified id or null if no record is found.
      Parameters:
      id -
      Returns:
      Throws:
      SQLException
    • gett

      default T gett(long id, Collection<String> selectPropNames) throws SQLException
      Returns the record found by the specified id or null if no record is found.
      Parameters:
      id -
      selectPropNames -
      Returns:
      Throws:
      SQLException
    • exists

      default boolean exists(long id) throws SQLException
      Parameters:
      id -
      Returns:
      Throws:
      SQLException
    • notExists

      @Beta default boolean notExists(long id) throws SQLException
      Parameters:
      id -
      Returns:
      Throws:
      SQLException
    • update

      default int update(String propName, Object propValue, long id) throws SQLException
      Parameters:
      propName -
      propValue -
      id -
      Returns:
      Throws:
      SQLException
    • update

      default int update(Map<String,Object> updateProps, long id) throws SQLException
      Parameters:
      updateProps -
      id -
      Returns:
      Throws:
      SQLException
    • deleteById

      default int deleteById(long id) throws SQLException
      Parameters:
      id -
      Returns:
      Throws:
      SQLException