org.springframework.data.jpa.repository.Modifying Java Examples
The following examples show how to use
org.springframework.data.jpa.repository.Modifying.
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: ModuleInfoRepository.java From jvm-sandbox-repeater with Apache License 2.0 | 5 votes |
@Modifying @Query( "update ModuleInfo set gmtModified = :#{#moduleInfo.gmtModified}" + " where appName = :#{#moduleInfo.appName}" + " and ip = :#{#moduleInfo.ip}" ) int updateByAppNameAndIp(@Param("moduleInfo") ModuleInfo moduleInfo);
Example #2
Source File: AdminRoleMenuService.java From White-Jotter with MIT License | 5 votes |
@Modifying @Transactional public void updateRoleMenu(int rid, Map<String, List<Integer>> menusIds) { adminRoleMenuDAO.deleteAllByRid(rid); List<AdminRoleMenu> rms = new ArrayList<>(); for (Integer mid : menusIds.get("menusIds")) { AdminRoleMenu rm = new AdminRoleMenu(); rm.setMid(mid); rm.setRid(rid); rms.add(rm); } adminRoleMenuDAO.saveAll(rms); }
Example #3
Source File: RssFeedRepository.java From torrssen2 with MIT License | 5 votes |
@Transactional @Modifying @Query( value = "UPDATE RSS_FEED " + "SET RSS_SITE = ?2 " + "WHERE RSS_SITE = ?1 " , nativeQuery = true) public void updateByRssSite(String oriRssSite, String trgRssSite);
Example #4
Source File: TxTimeoutEntityRepository.java From txle with Apache License 2.0 | 5 votes |
@Transactional @Modifying(clearAutomatically = true) @Query("UPDATE org.apache.servicecomb.saga.alpha.core.TxTimeout t " + "SET t.status = :status " + "WHERE t.globalTxId = :globalTxId " + " AND t.localTxId = :localTxId") void updateStatusByGlobalTxIdAndLocalTxId( @Param("status") String status, @Param("globalTxId") String globalTxId, @Param("localTxId") String localTxId);
Example #5
Source File: CommandEntityRepository.java From txle with Apache License 2.0 | 5 votes |
@Transactional @Modifying(clearAutomatically = true) @Query("UPDATE org.apache.servicecomb.saga.alpha.core.Command c " + "SET c.status = :toStatus " + "WHERE c.globalTxId = :globalTxId " + " AND c.localTxId = :localTxId " + " AND c.status = :fromStatus") void updateStatusByGlobalTxIdAndLocalTxId( @Param("fromStatus") String fromStatus, @Param("toStatus") String toStatus, @Param("globalTxId") String globalTxId, @Param("localTxId") String localTxId);
Example #6
Source File: TxEventAdditionRepository.java From txle with Apache License 2.0 | 5 votes |
@Transactional @Modifying @Query("UPDATE TxEventAddition T SET T.compensateStatus = 1 WHERE T.instanceId = ?1 AND T.globalTxId = ?2 AND T.localTxId = ?3 AND T.compensateStatus = 0") int updateCompensateStatus(String instanceId, String globalTxId, String localTxId);
Example #7
Source File: TxGasDataRepository.java From WeBASE-Front with Apache License 2.0 | 4 votes |
@Modifying @Transactional @Query(value = "delete from t_tx_gas_data t where t.group_id = ?1 and t.timestamp < ?2", nativeQuery = true) public int deleteTimeAgo(int groupId, Long time);
Example #8
Source File: NoteRepository.java From code-examples with MIT License | 4 votes |
@Modifying @Query("DELETE FROM Note n WHERE n.featured = ?1 AND n.id IN ?2") void bulkDeleteByFeatured(boolean featured, Set<Long> id);
Example #9
Source File: MonitorRepository.java From WeBASE-Front with Apache License 2.0 | 4 votes |
@Modifying @Transactional @Query(value = "delete from Monitor m where m.timestamp< ?1", nativeQuery = true) public int deleteTimeAgo(Long time);
Example #10
Source File: MemberWalletDao.java From ZTuoExchange_framework with MIT License | 4 votes |
@Transactional @Modifying @Query(value="UPDATE member_wallet SET balance=balance-:normalBalance,frozen_balance=frozen_balance+:normalBalance where coin_id=:coinId AND member_id=:memberId",nativeQuery = true) int updateMemberWalletByMemberIdAndCoinId(@Param("normalBalance")BigDecimal normalBalance,@Param("coinId")String coinId,@Param("memberId")long memberId);
Example #11
Source File: SysAttachFileSliceRepository.java From mPaaS with Apache License 2.0 | 4 votes |
@Modifying @Query("delete from SysAttachFileSlice where fdSliceSummaryId = ?1") void deleteBySummaryId(String summaryId);
Example #12
Source File: NoteRepository.java From code-examples with MIT License | 4 votes |
@Modifying @Query("UPDATE Note n SET n.title = ?1 WHERE n.id IN ?2") int bulkUpdateTitle(String title, Set<Long> id);
Example #13
Source File: CallOutNamesRepository.java From youkefu with Apache License 2.0 | 4 votes |
@Modifying @Transactional @Query(value = "delete from CallOutNames where orgi = ?1 and batid = ?2") public abstract void deleteByOrgiAndBatid(String orgi , String batid ) ;
Example #14
Source File: AdvertiseDao.java From ZTuoExchange_framework with MIT License | 4 votes |
@Modifying @Query("update Advertise a set a.status=?1 where a.id=?2 and a.member.id=?3 and a.status<>?4") int updateAdvertiseStatus(AdvertiseControlStatus status, Long id, Long mid, AdvertiseControlStatus advertiseControlStatus);
Example #15
Source File: RelationRepository.java From web-flash with MIT License | 4 votes |
@Transactional @Modifying @Query(nativeQuery = true,value = "delete from t_sys_relation where roleid=?1") int deleteByRoleId(Long roleId);
Example #16
Source File: ExchangeOrderRepository.java From ZTuoExchange_framework with MIT License | 4 votes |
@Modifying @Query("update ExchangeOrder exchange set exchange.status = :status where exchange.orderId = :orderId") int updateStatus(@Param("orderId") String orderId, @Param("status") ExchangeOrderStatus status);
Example #17
Source File: BusinessDBLatestDetailRepository.java From txle with Apache License 2.0 | 4 votes |
@Transactional @Modifying @Query("DELETE FROM BusinessDBLatestDetail T WHERE T.timestamp < ?1 AND T.node = ?2 AND T.dbschema = ?3") int deleteHistoryInfo(long timestamp, String node, String dbSchema);
Example #18
Source File: CallOutNamesRepository.java From youkefu with Apache License 2.0 | 4 votes |
@Modifying @Transactional @Query(value = "delete from CallOutNames where orgi = ?1 and dataid = ?2") public abstract void deleteByOrgiAndDataid(String orgi , String dataid ) ;
Example #19
Source File: MemberWalletDao.java From ZTuoExchange_framework with MIT License | 4 votes |
@Transactional @Modifying @Query(value = "insert INTO member_wallet_:weekDay SELECT * FROM member_wallet",nativeQuery = true) int createWeekTable(@Param("weekDay")int weekDay);
Example #20
Source File: LoginLogRepository.java From web-flash with MIT License | 4 votes |
@Modifying @Transactional @Query(nativeQuery = true,value = "delete from t_sys_login_log") int clear();
Example #21
Source File: PermissionRepository.java From WeEvent with Apache License 2.0 | 4 votes |
@Transactional @Modifying @Query(value = "delete from t_permission where broker_id =:brokerId", nativeQuery = true) void deletePermissionByBrokerId(@Param("brokerId") Integer brokerId);
Example #22
Source File: MemberWalletDao.java From ZTuoExchange_framework with MIT License | 4 votes |
@Transactional @Modifying @Query(value="UPDATE member_wallet SET balance=balance+:teamBalance where coin_id = 'BHB' AND member_id=:teamId",nativeQuery = true) int updateTeamWallet(@Param("teamBalance")BigDecimal teamBalance,@Param("teamId")long teamId);
Example #23
Source File: RelationRepository.java From flash-waimai with MIT License | 4 votes |
@Transactional @Modifying @Query(nativeQuery = true,value = "delete from t_sys_relation where roleid=?1") int deleteByRoleId(Long roleId);
Example #24
Source File: MenuRepository.java From web-flash with MIT License | 4 votes |
@Modifying @Transactional @Query(nativeQuery = true,value = "delete from t_sys_relation where menuid=?1") void deleteRelationByMenu(Long menuId);
Example #25
Source File: AccountRepo.java From staffjoy with MIT License | 4 votes |
@Modifying(clearAutomatically = true) @Query("update Account account set account.email = :email, account.confirmedAndActive = true where account.id = :id") @Transactional int updateEmailAndActivateById(@Param("email") String email, @Param("id") String id);
Example #26
Source File: TopicRepository.java From WeEvent with Apache License 2.0 | 4 votes |
@Transactional @Modifying @Query(value = "update t_topic set delete_at=:deleteAt where broker_id =:brokerId", nativeQuery = true) void deleteByBrokerId(@Param("brokerId") Integer brokerId, @Param("deleteAt") Long deleteAt);
Example #27
Source File: MerchantRepository.java From txle with Apache License 2.0 | 4 votes |
@Transactional @Modifying(clearAutomatically = true) @Query(value = "DELETE FROM txle_sample_merchant WHERE id = ?1", nativeQuery = true) int deleteById(@Param("merchantid") long merchantid);
Example #28
Source File: AdvertiseDao.java From ZTuoExchange_framework with MIT License | 4 votes |
@Modifying @Query("update Advertise a set a.status = :status,a.updateTime=:updateTime where a.id in :ids") int alterStatusBatch(@Param("status")AdvertiseControlStatus status,@Param("updateTime")Date updateTime,@Param("ids")Long[] ids) ;
Example #29
Source File: RuleEngineRepository.java From WeEvent with Apache License 2.0 | 4 votes |
@Transactional @Modifying @Query(value = "update t_rule_engine set status=2 , delete_at=:deleteAt where id =:id", nativeQuery = true) void deleteRuleEngine(@Param("id") Integer id, @Param("deleteAt") Long deleteAt);
Example #30
Source File: BlockTxDetailInfoRepository.java From WeBASE-Collect-Bee with Apache License 2.0 | 4 votes |
@Transactional @Modifying @Query(value = "delete from #{#entityName} where block_height >= ?1 and block_height< ?2", nativeQuery = true) public void rollback(long startBlockHeight, long endBlockHeight);