クラス TableMapping<T>


  • public final class TableMapping<T>
    extends Object
    Holds mapping data from a given class and a table
    • メソッドの詳細

      • getTableName

        public String getTableName()
      • getAllColumns

        public List<String> getAllColumns()
      • notAutoGeneratedColumns

        public List<String> notAutoGeneratedColumns()
      • getPrimaryKeys

        public List<String> getPrimaryKeys()
      • update

        public int update​(Connection connection,
                          T object)
        Updates an object in the database. The object will be identified using its mapped table's primary key. If no primary keys are defined in the mapped table, a RuntimeException will be thrown.
        導入されたバージョン:
        1.0
      • update

        public int[] update​(Connection connection,
                            T... objects)
        Updates a batch of objects in the database. The objects will be identified using their mapped table's primary keys. If no primary keys are defined in the mapped table, a RuntimeException will be thrown.
        導入されたバージョン:
        1.0
      • delete

        public int delete​(Connection connection,
                          T object)
        Deletes an object in the database. The object will be identified using its mapped table's primary key.
        導入されたバージョン:
        1.0
      • delete

        public int[] delete​(Connection connection,
                            T... objects)
        Updates a batch of objects in the database. The objects will be identified using their matched table's primary keys. If no primary keys are defined in a given object, a RuntimeException will be thrown.
        導入されたバージョン:
        1.0
      • deleteAll

        public int deleteAll​(Connection connection)
      • insert

        public int insert​(Connection connection,
                          T object)
      • merge

        public int merge​(Connection connection,
                         T object)
      • merge

        public int[] merge​(Connection con,
                           T... objects)
      • toString

        public String toString()
      • getFormattedString

        public String getFormattedString()
      • getColumnToAccessorString

        protected String getColumnToAccessorString()