Class Database.BasicMapping<T>

  • Type Parameters:
    T - the data type for mapping
    All Implemented Interfaces:
    DatabaseMapping<T>
    Enclosing class:
    Database

    private static class Database.BasicMapping<T>
    extends java.lang.Object
    implements DatabaseMapping<T>
    A generic mapping class for single type
    • Field Detail

      • sqlType

        private int sqlType
    • Constructor Detail

      • BasicMapping

        public BasicMapping​(int sqlType)
    • Method Detail

      • type

        public java.lang.reflect.Type type()
        Description copied from interface: DatabaseMapping
        Returns the data type for this mapping
        Specified by:
        type in interface DatabaseMapping<T>
        Returns:
        the data type
      • insert

        public DatabaseMapping.Binder<T> insert()
        Description copied from interface: DatabaseMapping
        The binder to bind arguments to a PreparedStatement for affecting inserts
        Specified by:
        insert in interface DatabaseMapping<T>
        Returns:
        binder to bind arguments to a PreparedStatement for affecting inserts
      • delete

        public DatabaseMapping.Binder<T> delete()
        Description copied from interface: DatabaseMapping
        The binder to bind arguments to a PreparedStatement for affecting deletes
        Specified by:
        delete in interface DatabaseMapping<T>
        Returns:
        binder to bind arguments to a PreparedStatement for affecting deletes
      • binder

        private DatabaseMapping.Binder<T> binder()
        Returns a newly created binder appropriate for type
        Returns:
        the newly created binder