org.apache.ibatis.annotations.Delete Java Examples

The following examples show how to use org.apache.ibatis.annotations.Delete. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DeviceMapper.java    From hmdm-server with Apache License 2.0 6 votes vote down vote up
@Delete({"DELETE FROM deviceGroups " +
        "WHERE deviceId=#{deviceId} " +
        "  AND groupId IN ( " +
        "      SELECT groups.id " +
        "      FROM groups " +
        "      INNER JOIN users ON users.id = #{userId} " +
        "      WHERE groups.customerId = #{customerId} " +
        "      AND (users.allDevicesAvailable AND users.customerId = #{customerId} " +
        "           OR " +
        "           EXISTS (SELECT 1 FROM userDeviceGroupsAccess access WHERE groups.id = access.groupId AND access.userId = users.id)" +
        "      )" +
        "  )"})
void removeDeviceGroupsByDeviceId(
        @Param("userId") int userId,
        @Param("customerId") int customerId,
        @Param("deviceId") Integer deviceId);
 
Example #2
Source File: ApplicationMapper.java    From hmdm-server with Apache License 2.0 5 votes vote down vote up
@Delete("DELETE FROM configurationApplications " +
        "WHERE configurationId = #{configurationId} " +
        "AND applicationId IN ( " +
        "            SELECT id FROM applications " +
        "            WHERE pkg = (" +
        "                SELECT pkg " +
        "                FROM applications " +
        "                WHERE id=#{applicationId} " +
        "            ) AND id != #{applicationId} " +
        ")")
int deleteApplicationConfigurationLinksForSamePkg(@Param("applicationId") int applicationId,
                                                  @Param("configurationId") int configurationId);
 
Example #3
Source File: ApplicationMapper.java    From hmdm-server with Apache License 2.0 5 votes vote down vote up
@Delete({"DELETE FROM configurationApplications " +
        "WHERE applicationVersionId=#{id} " +
        "AND configurationId IN (SELECT configurations.id " +
        "                        FROM configurations " +
        "                        WHERE configurations.customerId=#{customerId})"})
void removeApplicationVersionConfigurationsById(@Param("customerId") int customerId,
                                                @Param("id") Integer applicationVersionId);
 
Example #4
Source File: TvSeriesDao.java    From tutorial with MIT License 4 votes vote down vote up
@Delete("delete from tv_series where id=#{id}")
public int delete(int id);
 
Example #5
Source File: StudentMapper.java    From SpringAll with MIT License 4 votes vote down vote up
@Delete("delete from student where sno=#{sno}")
void deleteStudentBySno(String sno);
 
Example #6
Source File: TvCharacterDao.java    From tutorial with MIT License 4 votes vote down vote up
@Delete("delete from tv_character where id=#{id}")
public int delete(int id);
 
Example #7
Source File: PersonDao.java    From tutorial with MIT License 4 votes vote down vote up
@Delete("delete from person")
public int deleteAll();
 
Example #8
Source File: PersonDao.java    From tutorial with MIT License 4 votes vote down vote up
@Delete("delete from person where id=#{id}")
public int delete(int id);
 
Example #9
Source File: UserDao.java    From springBoot-study with Apache License 2.0 4 votes vote down vote up
@Delete("delete from t_user where id=#{id}")
void deleteUser(int id);
 
Example #10
Source File: TvCharacterDao.java    From tutorial with MIT License 4 votes vote down vote up
@Delete("delete from tv_character where id=#{id}")
public int delete(int id);
 
Example #11
Source File: StudentMapper.java    From SpringAll with MIT License 4 votes vote down vote up
@Delete("delete from student where sno=#{sno}")
int deleteBysno(String sno);
 
Example #12
Source File: TvSeriesDao.java    From tutorial with MIT License 4 votes vote down vote up
@Delete("delete from tv_series where id=#{id}")
public int delete(int id);
 
Example #13
Source File: UserMapper.java    From demo-project with MIT License 4 votes vote down vote up
@Delete("delete from user where id=#{id}")
public boolean deleteById(int id);
 
Example #14
Source File: RoleBindingMapper.java    From pulsar-manager with Apache License 2.0 4 votes vote down vote up
@Delete("DELETE FROM role_binding WHERE role_id = #{roleId} and user_id = #{userId}")
void delete(@Param("roleId") long roleId, @Param("userId") long userId);
 
Example #15
Source File: UsersMapper.java    From pulsar-manager with Apache License 2.0 4 votes vote down vote up
@Delete("DELETE FROM users WHERE name=#{name}")
void delete(String name);
 
Example #16
Source File: LogMapper.java    From yshopmall with Apache License 2.0 4 votes vote down vote up
@Delete("delete from log where log_type = #{logType}")
void deleteByLogType(@Param("logType") String logType);
 
Example #17
Source File: PostgresDeviceLogMapper.java    From hmdm-server with Apache License 2.0 4 votes vote down vote up
/**
 * <p>Deletes the log records which are older than number of days configured in customer's profile.</p>
 *
 * @return a number of deleted records.
 */
@Delete("DELETE FROM plugin_devicelog_log " +
        "WHERE createTime < (SELECT EXTRACT(EPOCH FROM DATE_TRUNC('day', NOW() - (pds.logsPreservePeriod || ' day')::INTERVAL)) * 1000 " +
        "                    FROM plugin_devicelog_settings pds " +
        "                    WHERE pds.customerId = plugin_devicelog_log.customerId)")
int purgeLogRecords();
 
Example #18
Source File: RoleMapper.java    From demo-project with MIT License 4 votes vote down vote up
@Delete("delete from role where id=#{id}")
public boolean deleteOne(int id);
 
Example #19
Source File: IllustHistoryMapper.java    From Pixiv-Illustration-Collection-Backend with Apache License 2.0 4 votes vote down vote up
@Delete("delete from illust_history where create_at < (SELECT DATE_ADD(now(),INTERVAL -3 MONTH))")
void deleteIllustHistory();
 
Example #20
Source File: PostgresDeviceLogMapper.java    From hmdm-server with Apache License 2.0 4 votes vote down vote up
@Delete("DELETE FROM plugin_devicelog_settings_rules WHERE id = #{id}")
void deletePluginSettingRule(@Param("id") int id);
 
Example #21
Source File: PluginMapper.java    From hmdm-server with Apache License 2.0 4 votes vote down vote up
@Delete("DELETE FROM pluginsDisabled WHERE customerId = #{customerId}")
int cleanUpDisabledPlugins(@Param("customerId") int customerId);
 
Example #22
Source File: JurisdictionMapper.java    From demo-project with MIT License 4 votes vote down vote up
@Delete("delete from jurisdiction where id=#{id}")
public boolean deleteOne(int id);
 
Example #23
Source File: UploadedFileMapper.java    From hmdm-server with Apache License 2.0 4 votes vote down vote up
@Delete("DELETE FROM uploadedFiles WHERE id = #{id}")
void deleteFile(@Param("id") int fileId);
 
Example #24
Source File: UserMapper.java    From Spring-Boot-Book with Apache License 2.0 4 votes vote down vote up
@Delete("delete from user where id=#{id}")
void deleteById(@Param("id")String id);
 
Example #25
Source File: TvCharacterDao.java    From tutorial with MIT License 4 votes vote down vote up
@Delete("delete from tv_character where id=#{id}")
public int delete(int id);
 
Example #26
Source File: ConfigurationMapper.java    From hmdm-server with Apache License 2.0 4 votes vote down vote up
@Delete({"DELETE FROM configurationApplications WHERE configurationId=#{id}"})
void removeConfigurationApplicationsById(@Param("id") Integer id);
 
Example #27
Source File: ConfigurationMapper.java    From hmdm-server with Apache License 2.0 4 votes vote down vote up
@Delete({"DELETE FROM configurations WHERE id=#{id}"})
void removeConfigurationById(@Param("id") Integer id);
 
Example #28
Source File: DeviceMapper.java    From hmdm-server with Apache License 2.0 4 votes vote down vote up
@Delete("DELETE FROM deviceApplicationSettings WHERE extRefId = #{id}")
void deleteDeviceApplicationSettings(@Param("id") Integer deviceId);
 
Example #29
Source File: DeviceMapper.java    From hmdm-server with Apache License 2.0 4 votes vote down vote up
@Delete({"DELETE FROM groups WHERE id = #{id}"})
void removeGroupById(@Param("id") Integer id);
 
Example #30
Source File: DeviceMapper.java    From hmdm-server with Apache License 2.0 4 votes vote down vote up
@Delete({"DELETE FROM devices WHERE id = #{id}"})
void removeDevice(@Param("id") Integer id);