public static void importBaseTypes(final CConnection connection,final int rawModuleId,final int moduleId) throws SQLException {
  final String query="INSERT INTO " + CTableNames.BASE_TYPES_TABLE + " SELECT "+ moduleId+ ", id, name, size, pointer, signed "+ "FROM "+ String.format(CTableNames.RAW_BASE_TYPES,rawModuleId);
  connection.executeUpdate(query,true);
  final String updateSequence=String.format("SELECT setval('bn_base_types_id_seq', " + "COALESCE((SELECT MAX(id) + 1 FROM %s), 1), false) from %s",CTableNames.BASE_TYPES_TABLE,CTableNames.BASE_TYPES_TABLE);
  connection.executeQuery(updateSequence,true);
}

public static void importBaseTypes ( final CConnection connection , final int rawModuleId , final int moduleId ) throws SQLException { final String query = "INSERT INTO " + CTableNames . BASE_TYPES_TABLE + " SELECT " + moduleId + ", id, name, size, pointer, signed " + "FROM " + String . format ( CTableNames . RAW_BASE_TYPES , rawModuleId ) ; connection . executeUpdate ( query , true ) ; final String updateSequence = String . format ( "SELECT setval('bn_base_types_id_seq', " + "COALESCE((SELECT MAX(id) + 1 FROM %s), 1), false) from %s" , CTableNames . BASE_TYPES_TABLE , CTableNames . BASE_TYPES_TABLE ) ; connection . executeQuery ( updateSequence , true ) ; }
imports the base types .
