001// ______________________________________________________ 002// Generated by sql2java - https://github.com/10km/sql2java-2-6-7 (custom branch) 003// modified by guyadong from 004// sql2java original version https://sourceforge.net/projects/sql2java/ 005// JDBC driver used at code generation time: com.mysql.jdbc.Driver 006// template: manager.interface.java.vm 007// ______________________________________________________ 008package net.gdface.facelog.db; 009import net.gdface.facelog.db.exception.ObjectRetrievalException; 010import net.gdface.facelog.db.exception.RuntimeDaoException; 011 012/** 013 * Interface to handle database calls (save, load, count, etc...) for the fl_device_group table.<br> 014 * Remarks: 设备组信息 015 * @author guyadong 016 */ 017public interface IDeviceGroupManager extends TableManager<DeviceGroupBean> 018{ 019 ////////////////////////////////////// 020 // PRIMARY KEY METHODS 021 ////////////////////////////////////// 022 023 //1 024 /** 025 * Loads a {@link DeviceGroupBean} from the fl_device_group using primary key fields. 026 * 027 * @param id Integer - PK# 1 028 * @return a unique DeviceGroupBean or {@code null} if not found 029 * @throws RuntimeDaoException 030 */ 031 public DeviceGroupBean loadByPrimaryKey(Integer id)throws RuntimeDaoException; 032 033 //1.1 034 /** 035 * Loads a {@link DeviceGroupBean} from the fl_device_group using primary key fields. 036 * 037 * @param id Integer - PK# 1 038 * @return a unique DeviceGroupBean 039 * @throws ObjectRetrievalException if not found 040 * @throws RuntimeDaoException 041 */ 042 public DeviceGroupBean loadByPrimaryKeyChecked(Integer id) throws RuntimeDaoException,ObjectRetrievalException; 043 044 //1.4 045 /** 046 * Returns true if this fl_device_group contains row with primary key fields. 047 * @param id Integer - PK# 1 048 * @return 049 * @throws RuntimeDaoException 050 */ 051 public boolean existsPrimaryKey(Integer id)throws RuntimeDaoException; 052 //1.4.1 053 /** 054 * Check duplicated row by primary keys,if row exists throw exception 055 * @param id Integer 056 * @return 057 * @throws RuntimeDaoException 058 * @throws ObjectRetrievalException 059 */ 060 public Integer checkDuplicate(Integer id)throws RuntimeDaoException,ObjectRetrievalException; 061 //1.8 062 /** 063 * Loads {@link DeviceGroupBean} from the fl_device_group using primary key fields. 064 * 065 * @param keys primary keys array 066 * @return list of DeviceGroupBean 067 * @throws RuntimeDaoException 068 */ 069 public java.util.List<DeviceGroupBean> loadByPrimaryKey(int... keys)throws RuntimeDaoException; 070 //1.9 071 /** 072 * Loads {@link DeviceGroupBean} from the fl_device_group using primary key fields. 073 * 074 * @param keys primary keys collection 075 * @return list of DeviceGroupBean 076 * @throws RuntimeDaoException 077 */ 078 public java.util.List<DeviceGroupBean> loadByPrimaryKey(java.util.Collection<Integer> keys)throws RuntimeDaoException; 079 //2 080 /** 081 * Delete row according to its primary keys.<br> 082 * all keys must not be null 083 * 084 * @param id Integer - PK# 1 085 * @return the number of deleted rows 086 * @throws RuntimeDaoException 087 */ 088 public int deleteByPrimaryKey(Integer id)throws RuntimeDaoException; 089 //2.2 090 /** 091 * Delete rows according to primary key.<br> 092 * 093 * @param keys primary keys array 094 * @return the number of deleted rows 095 * @throws RuntimeDaoException 096 */ 097 public int deleteByPrimaryKey(int... keys)throws RuntimeDaoException; 098 //2.3 099 /** 100 * Delete rows according to primary key.<br> 101 * 102 * @param keys primary keys collection 103 * @return the number of deleted rows 104 * @throws RuntimeDaoException 105 */ 106 public int deleteByPrimaryKey(java.util.Collection<Integer> keys)throws RuntimeDaoException; 107 //2.4 108 /** 109 * Delete beans.<br> 110 * 111 * @param beans DeviceGroupBean collection wille be deleted 112 * @return the number of deleted rows 113 * @throws RuntimeDaoException 114 */ 115 public int delete(DeviceGroupBean... beans)throws RuntimeDaoException; 116 //2.5 117 /** 118 * Delete beans.<br> 119 * 120 * @param beans DeviceGroupBean collection wille be deleted 121 * @return the number of deleted rows 122 * @throws RuntimeDaoException 123 */ 124 public int delete(java.util.Collection<DeviceGroupBean> beans)throws RuntimeDaoException; 125 126 127 ////////////////////////////////////// 128 // GET/SET IMPORTED KEY BEAN METHOD 129 ////////////////////////////////////// 130 //3.1 GET IMPORTED 131 /** 132 * Retrieves the {@link DeviceBean} object from the fl_device.group_id field.<BR> 133 * FK_NAME : fl_device_ibfk_1 134 * @param bean the {@link DeviceGroupBean} 135 * @return the associated {@link DeviceBean} beans or {@code null} if {@code bean} is {@code null} 136 * @throws RuntimeDaoException 137 */ 138 public DeviceBean[] getDeviceBeansByGroupId(DeviceGroupBean bean)throws RuntimeDaoException; 139 140 //3.1.2 GET IMPORTED 141 /** 142 * Retrieves the {@link DeviceBean} object from the fl_device.group_id field.<BR> 143 * FK_NAME : fl_device_ibfk_1 144 * @param idOfDeviceGroup Integer - PK# 1 145 * @return the associated {@link DeviceBean} beans or {@code null} if {@code bean} is {@code null} 146 * @throws RuntimeDaoException 147 */ 148 public DeviceBean[] getDeviceBeansByGroupId(Integer idOfDeviceGroup)throws RuntimeDaoException; 149 150 //3.2 GET IMPORTED 151 /** 152 * see also #getDeviceBeansByGroupIdAsList(DeviceGroupBean,int,int) 153 * @param bean 154 * @return 155 * @throws RuntimeDaoException 156 */ 157 public java.util.List<DeviceBean> getDeviceBeansByGroupIdAsList(DeviceGroupBean bean)throws RuntimeDaoException; 158 159 //3.2.2 GET IMPORTED 160 /** 161 * Retrieves the {@link DeviceBean} object from fl_device.group_id field.<BR> 162 * FK_NAME:fl_device_ibfk_1 163 * @param idOfDeviceGroup Integer - PK# 1 164 * @return the associated {@link DeviceBean} beans 165 * @throws RuntimeDaoException 166 */ 167 public java.util.List<DeviceBean> getDeviceBeansByGroupIdAsList(Integer idOfDeviceGroup)throws RuntimeDaoException; 168 //3.2.3 DELETE IMPORTED 169 /** 170 * delete the associated {@link DeviceBean} objects from fl_device.group_id field.<BR> 171 * FK_NAME:fl_device_ibfk_1 172 * @param idOfDeviceGroup Integer - PK# 1 173 * @return the number of deleted rows 174 * @throws RuntimeDaoException 175 */ 176 public int deleteDeviceBeansByGroupId(Integer idOfDeviceGroup)throws RuntimeDaoException; 177 //3.2.4 GET IMPORTED 178 /** 179 * Retrieves the {@link DeviceBean} object from fl_device.group_id field.<BR> 180 * FK_NAME:fl_device_ibfk_1 181 * @param bean the {@link DeviceGroupBean} 182 * @param startRow the start row to be used (first row = 1, last row=-1) 183 * @param numRows the number of rows to be retrieved (all rows = a negative number) 184 * @return the associated {@link DeviceBean} beans or empty list if {@code bean} is {@code null} 185 * @throws RuntimeDaoException 186 */ 187 public java.util.List<DeviceBean> getDeviceBeansByGroupIdAsList(DeviceGroupBean bean,int startRow,int numRows)throws RuntimeDaoException; 188 //3.3 SET IMPORTED 189 /** 190 * set the {@link DeviceBean} object array associate to DeviceGroupBean by the fl_device.group_id field.<BR> 191 * FK_NAME : fl_device_ibfk_1 192 * @param bean the referenced {@link DeviceGroupBean} 193 * @param importedBeans imported beans from fl_device 194 * @return importedBeans always 195 * @see IDeviceManager#setReferencedByGroupId(DeviceBean, DeviceGroupBean) 196 * @throws RuntimeDaoException 197 */ 198 public DeviceBean[] setDeviceBeansByGroupId(DeviceGroupBean bean , DeviceBean[] importedBeans)throws RuntimeDaoException; 199 200 //3.4 SET IMPORTED 201 /** 202 * set the {@link DeviceBean} object java.util.Collection associate to DeviceGroupBean by the fl_device.group_id field.<BR> 203 * FK_NAME:fl_device_ibfk_1 204 * @param bean the referenced {@link DeviceGroupBean} 205 * @param importedBeans imported beans from fl_device 206 * @return importedBeans always 207 * @see IDeviceManager#setReferencedByGroupId(DeviceBean, DeviceGroupBean) 208 * @throws RuntimeDaoException 209 */ 210 public <C extends java.util.Collection<DeviceBean>> C setDeviceBeansByGroupId(DeviceGroupBean bean , C importedBeans)throws RuntimeDaoException; 211 212 //3.1 GET IMPORTED 213 /** 214 * Retrieves the {@link DeviceGroupBean} object from the fl_device_group.parent field.<BR> 215 * FK_NAME : fl_device_group_ibfk_1 216 * @param bean the {@link DeviceGroupBean} 217 * @return the associated {@link DeviceGroupBean} beans or {@code null} if {@code bean} is {@code null} 218 * @throws RuntimeDaoException 219 */ 220 public DeviceGroupBean[] getDeviceGroupBeansByParent(DeviceGroupBean bean)throws RuntimeDaoException; 221 222 //3.1.2 GET IMPORTED 223 /** 224 * Retrieves the {@link DeviceGroupBean} object from the fl_device_group.parent field.<BR> 225 * FK_NAME : fl_device_group_ibfk_1 226 * @param idOfDeviceGroup Integer - PK# 1 227 * @return the associated {@link DeviceGroupBean} beans or {@code null} if {@code bean} is {@code null} 228 * @throws RuntimeDaoException 229 */ 230 public DeviceGroupBean[] getDeviceGroupBeansByParent(Integer idOfDeviceGroup)throws RuntimeDaoException; 231 232 //3.2 GET IMPORTED 233 /** 234 * see also #getDeviceGroupBeansByParentAsList(DeviceGroupBean,int,int) 235 * @param bean 236 * @return 237 * @throws RuntimeDaoException 238 */ 239 public java.util.List<DeviceGroupBean> getDeviceGroupBeansByParentAsList(DeviceGroupBean bean)throws RuntimeDaoException; 240 241 //3.2.2 GET IMPORTED 242 /** 243 * Retrieves the {@link DeviceGroupBean} object from fl_device_group.parent field.<BR> 244 * FK_NAME:fl_device_group_ibfk_1 245 * @param idOfDeviceGroup Integer - PK# 1 246 * @return the associated {@link DeviceGroupBean} beans 247 * @throws RuntimeDaoException 248 */ 249 public java.util.List<DeviceGroupBean> getDeviceGroupBeansByParentAsList(Integer idOfDeviceGroup)throws RuntimeDaoException; 250 //3.2.3 DELETE IMPORTED 251 /** 252 * delete the associated {@link DeviceGroupBean} objects from fl_device_group.parent field.<BR> 253 * FK_NAME:fl_device_group_ibfk_1 254 * @param idOfDeviceGroup Integer - PK# 1 255 * @return the number of deleted rows 256 * @throws RuntimeDaoException 257 */ 258 public int deleteDeviceGroupBeansByParent(Integer idOfDeviceGroup)throws RuntimeDaoException; 259 //3.2.4 GET IMPORTED 260 /** 261 * Retrieves the {@link DeviceGroupBean} object from fl_device_group.parent field.<BR> 262 * FK_NAME:fl_device_group_ibfk_1 263 * @param bean the {@link DeviceGroupBean} 264 * @param startRow the start row to be used (first row = 1, last row=-1) 265 * @param numRows the number of rows to be retrieved (all rows = a negative number) 266 * @return the associated {@link DeviceGroupBean} beans or empty list if {@code bean} is {@code null} 267 * @throws RuntimeDaoException 268 */ 269 public java.util.List<DeviceGroupBean> getDeviceGroupBeansByParentAsList(DeviceGroupBean bean,int startRow,int numRows)throws RuntimeDaoException; 270 //3.3 SET IMPORTED 271 /** 272 * set the {@link DeviceGroupBean} object array associate to DeviceGroupBean by the fl_device_group.parent field.<BR> 273 * FK_NAME : fl_device_group_ibfk_1 274 * @param bean the referenced {@link DeviceGroupBean} 275 * @param importedBeans imported beans from fl_device_group 276 * @return importedBeans always 277 * @see IDeviceGroupManager#setReferencedByParent(DeviceGroupBean, DeviceGroupBean) 278 * @throws RuntimeDaoException 279 */ 280 public DeviceGroupBean[] setDeviceGroupBeansByParent(DeviceGroupBean bean , DeviceGroupBean[] importedBeans)throws RuntimeDaoException; 281 282 //3.4 SET IMPORTED 283 /** 284 * set the {@link DeviceGroupBean} object java.util.Collection associate to DeviceGroupBean by the fl_device_group.parent field.<BR> 285 * FK_NAME:fl_device_group_ibfk_1 286 * @param bean the referenced {@link DeviceGroupBean} 287 * @param importedBeans imported beans from fl_device_group 288 * @return importedBeans always 289 * @see IDeviceGroupManager#setReferencedByParent(DeviceGroupBean, DeviceGroupBean) 290 * @throws RuntimeDaoException 291 */ 292 public <C extends java.util.Collection<DeviceGroupBean>> C setDeviceGroupBeansByParent(DeviceGroupBean bean , C importedBeans)throws RuntimeDaoException; 293 294 //3.1 GET IMPORTED 295 /** 296 * Retrieves the {@link PermitBean} object from the fl_permit.device_group_id field.<BR> 297 * FK_NAME : fl_permit_ibfk_1 298 * @param bean the {@link DeviceGroupBean} 299 * @return the associated {@link PermitBean} beans or {@code null} if {@code bean} is {@code null} 300 * @throws RuntimeDaoException 301 */ 302 public PermitBean[] getPermitBeansByDeviceGroupId(DeviceGroupBean bean)throws RuntimeDaoException; 303 304 //3.1.2 GET IMPORTED 305 /** 306 * Retrieves the {@link PermitBean} object from the fl_permit.device_group_id field.<BR> 307 * FK_NAME : fl_permit_ibfk_1 308 * @param idOfDeviceGroup Integer - PK# 1 309 * @return the associated {@link PermitBean} beans or {@code null} if {@code bean} is {@code null} 310 * @throws RuntimeDaoException 311 */ 312 public PermitBean[] getPermitBeansByDeviceGroupId(Integer idOfDeviceGroup)throws RuntimeDaoException; 313 314 //3.2 GET IMPORTED 315 /** 316 * see also #getPermitBeansByDeviceGroupIdAsList(DeviceGroupBean,int,int) 317 * @param bean 318 * @return 319 * @throws RuntimeDaoException 320 */ 321 public java.util.List<PermitBean> getPermitBeansByDeviceGroupIdAsList(DeviceGroupBean bean)throws RuntimeDaoException; 322 323 //3.2.2 GET IMPORTED 324 /** 325 * Retrieves the {@link PermitBean} object from fl_permit.device_group_id field.<BR> 326 * FK_NAME:fl_permit_ibfk_1 327 * @param idOfDeviceGroup Integer - PK# 1 328 * @return the associated {@link PermitBean} beans 329 * @throws RuntimeDaoException 330 */ 331 public java.util.List<PermitBean> getPermitBeansByDeviceGroupIdAsList(Integer idOfDeviceGroup)throws RuntimeDaoException; 332 //3.2.3 DELETE IMPORTED 333 /** 334 * delete the associated {@link PermitBean} objects from fl_permit.device_group_id field.<BR> 335 * FK_NAME:fl_permit_ibfk_1 336 * @param idOfDeviceGroup Integer - PK# 1 337 * @return the number of deleted rows 338 * @throws RuntimeDaoException 339 */ 340 public int deletePermitBeansByDeviceGroupId(Integer idOfDeviceGroup)throws RuntimeDaoException; 341 //3.2.4 GET IMPORTED 342 /** 343 * Retrieves the {@link PermitBean} object from fl_permit.device_group_id field.<BR> 344 * FK_NAME:fl_permit_ibfk_1 345 * @param bean the {@link DeviceGroupBean} 346 * @param startRow the start row to be used (first row = 1, last row=-1) 347 * @param numRows the number of rows to be retrieved (all rows = a negative number) 348 * @return the associated {@link PermitBean} beans or empty list if {@code bean} is {@code null} 349 * @throws RuntimeDaoException 350 */ 351 public java.util.List<PermitBean> getPermitBeansByDeviceGroupIdAsList(DeviceGroupBean bean,int startRow,int numRows)throws RuntimeDaoException; 352 //3.3 SET IMPORTED 353 /** 354 * set the {@link PermitBean} object array associate to DeviceGroupBean by the fl_permit.device_group_id field.<BR> 355 * FK_NAME : fl_permit_ibfk_1 356 * @param bean the referenced {@link DeviceGroupBean} 357 * @param importedBeans imported beans from fl_permit 358 * @return importedBeans always 359 * @see IPermitManager#setReferencedByDeviceGroupId(PermitBean, DeviceGroupBean) 360 * @throws RuntimeDaoException 361 */ 362 public PermitBean[] setPermitBeansByDeviceGroupId(DeviceGroupBean bean , PermitBean[] importedBeans)throws RuntimeDaoException; 363 364 //3.4 SET IMPORTED 365 /** 366 * set the {@link PermitBean} object java.util.Collection associate to DeviceGroupBean by the fl_permit.device_group_id field.<BR> 367 * FK_NAME:fl_permit_ibfk_1 368 * @param bean the referenced {@link DeviceGroupBean} 369 * @param importedBeans imported beans from fl_permit 370 * @return importedBeans always 371 * @see IPermitManager#setReferencedByDeviceGroupId(PermitBean, DeviceGroupBean) 372 * @throws RuntimeDaoException 373 */ 374 public <C extends java.util.Collection<PermitBean>> C setPermitBeansByDeviceGroupId(DeviceGroupBean bean , C importedBeans)throws RuntimeDaoException; 375 376 //3.5 SYNC SAVE 377 /** 378 * Save the DeviceGroupBean bean and referenced beans and imported beans into the database. 379 * 380 * @param bean the {@link DeviceGroupBean} bean to be saved 381 * @param refDevicegroupByParent the {@link DeviceGroupBean} bean referenced by {@link DeviceGroupBean} 382 * @param impDeviceByGroupId the {@link DeviceBean} bean refer to {@link DeviceGroupBean} 383 * @param impDevicegroupByParent the {@link DeviceGroupBean} bean refer to {@link DeviceGroupBean} 384 * @param impPermitByDeviceGroupId the {@link PermitBean} bean refer to {@link DeviceGroupBean} 385 * @return the inserted or updated {@link DeviceGroupBean} bean 386 * @throws RuntimeDaoException 387 */ 388 public DeviceGroupBean save(DeviceGroupBean bean 389 , DeviceGroupBean refDevicegroupByParent 390 , DeviceBean[] impDeviceByGroupId , DeviceGroupBean[] impDevicegroupByParent , PermitBean[] impPermitByDeviceGroupId )throws RuntimeDaoException; 391 //3.6 SYNC SAVE AS TRANSACTION 392 /** 393 * Transaction version for sync save<br> 394 * see also {@link #save(DeviceGroupBean , DeviceGroupBean , DeviceBean[] , DeviceGroupBean[] , PermitBean[] )} 395 * @param bean the {@link DeviceGroupBean} bean to be saved 396 * @param refDevicegroupByParent the {@link DeviceGroupBean} bean referenced by {@link DeviceGroupBean} 397 * @param impDeviceByGroupId the {@link DeviceBean} bean refer to {@link DeviceGroupBean} 398 * @param impDevicegroupByParent the {@link DeviceGroupBean} bean refer to {@link DeviceGroupBean} 399 * @param impPermitByDeviceGroupId the {@link PermitBean} bean refer to {@link DeviceGroupBean} 400 * @return the inserted or updated {@link DeviceGroupBean} bean 401 * @throws RuntimeDaoException 402 */ 403 public DeviceGroupBean saveAsTransaction(final DeviceGroupBean bean 404 ,final DeviceGroupBean refDevicegroupByParent 405 ,final DeviceBean[] impDeviceByGroupId ,final DeviceGroupBean[] impDevicegroupByParent ,final PermitBean[] impPermitByDeviceGroupId )throws RuntimeDaoException; 406 //3.7 SYNC SAVE 407 /** 408 * Save the DeviceGroupBean bean and referenced beans and imported beans into the database. 409 * 410 * @param bean the {@link DeviceGroupBean} bean to be saved 411 * @param refDevicegroupByParent the {@link DeviceGroupBean} bean referenced by {@link DeviceGroupBean} 412 * @param impDeviceByGroupId the {@link DeviceBean} bean refer to {@link DeviceGroupBean} 413 * @param impDevicegroupByParent the {@link DeviceGroupBean} bean refer to {@link DeviceGroupBean} 414 * @param impPermitByDeviceGroupId the {@link PermitBean} bean refer to {@link DeviceGroupBean} 415 * @return the inserted or updated {@link DeviceGroupBean} bean 416 * @throws RuntimeDaoException 417 */ 418 public DeviceGroupBean save(DeviceGroupBean bean 419 , DeviceGroupBean refDevicegroupByParent 420 , java.util.Collection<DeviceBean> impDeviceByGroupId , java.util.Collection<DeviceGroupBean> impDevicegroupByParent , java.util.Collection<PermitBean> impPermitByDeviceGroupId )throws RuntimeDaoException; 421 //3.8 SYNC SAVE AS TRANSACTION 422 /** 423 * Transaction version for sync save<br> 424 * see also {@link #save(DeviceGroupBean , DeviceGroupBean , java.util.Collection , java.util.Collection , java.util.Collection )} 425 * @param bean the {@link DeviceGroupBean} bean to be saved 426 * @param refDevicegroupByParent the {@link DeviceGroupBean} bean referenced by {@link DeviceGroupBean} 427 * @param impDeviceByGroupId the {@link DeviceBean} bean refer to {@link DeviceGroupBean} 428 * @param impDevicegroupByParent the {@link DeviceGroupBean} bean refer to {@link DeviceGroupBean} 429 * @param impPermitByDeviceGroupId the {@link PermitBean} bean refer to {@link DeviceGroupBean} 430 * @return the inserted or updated {@link DeviceGroupBean} bean 431 * @throws RuntimeDaoException 432 */ 433 public DeviceGroupBean saveAsTransaction(final DeviceGroupBean bean 434 ,final DeviceGroupBean refDevicegroupByParent 435 ,final java.util.Collection<DeviceBean> impDeviceByGroupId ,final java.util.Collection<DeviceGroupBean> impDevicegroupByParent ,final java.util.Collection<PermitBean> impPermitByDeviceGroupId )throws RuntimeDaoException; 436 ////////////////////////////////////// 437 // GET/SET FOREIGN KEY BEAN METHOD 438 ////////////////////////////////////// 439 //5.1 GET REFERENCED VALUE 440 /** 441 * Retrieves the {@link DeviceGroupBean} object referenced by {@link DeviceGroupBean#getParent}() field.<br> 442 * FK_NAME : fl_device_group_ibfk_1 443 * @param bean the {@link DeviceGroupBean} 444 * @return the associated {@link DeviceGroupBean} bean or {@code null} if {@code bean} is {@code null} 445 * @throws RuntimeDaoException 446 */ 447 public DeviceGroupBean getReferencedByParent(DeviceGroupBean bean)throws RuntimeDaoException; 448 449 //5.2 SET REFERENCED 450 /** 451 * Associates the {@link DeviceGroupBean} object to the {@link DeviceGroupBean} object by {@link DeviceGroupBean#getParent}() field. 452 * 453 * @param bean the {@link DeviceGroupBean} object to use 454 * @param beanToSet the {@link DeviceGroupBean} object to associate to the {@link DeviceGroupBean} 455 * @return always beanToSet saved 456 * @throws RuntimeDaoException 457 */ 458 public DeviceGroupBean setReferencedByParent(DeviceGroupBean bean, DeviceGroupBean beanToSet)throws RuntimeDaoException; 459 //_____________________________________________________________________ 460 // 461 // USING INDICES 462 //_____________________________________________________________________ 463 464 465 /** 466 * Retrieves an array of DeviceGroupBean using the parent index. 467 * 468 * @param parent the parent column's value filter. 469 * @return an array of DeviceGroupBean 470 * @throws RuntimeDaoException 471 */ 472 public DeviceGroupBean[] loadByIndexParent(Integer parent)throws RuntimeDaoException; 473 474 /** 475 * Retrieves a list of DeviceGroupBean using the parent index. 476 * 477 * @param parent the parent column's value filter. 478 * @return a list of DeviceGroupBean 479 * @throws RuntimeDaoException 480 */ 481 public java.util.List<DeviceGroupBean> loadByIndexParentAsList(Integer parent)throws RuntimeDaoException; 482 483 /** 484 * Deletes rows using the parent index. 485 * 486 * @param parent the parent column's value filter. 487 * @return the number of deleted objects 488 * @throws RuntimeDaoException 489 */ 490 public int deleteByIndexParent(Integer parent)throws RuntimeDaoException; 491 492 493 //45 494 /** 495 * return a primary key list from {@link DeviceGroupBean} array 496 * @param beans 497 * @return 498 */ 499 public java.util.List<Integer> toPrimaryKeyList(DeviceGroupBean... beans); 500 //46 501 /** 502 * return a primary key list from {@link DeviceGroupBean} collection 503 * @param beans 504 * @return 505 */ 506 public java.util.List<Integer> toPrimaryKeyList(java.util.Collection<DeviceGroupBean> beans); 507 508 //_____________________________________________________________________ 509 // 510 // MANY TO MANY: LOAD OTHER BEAN VIA JUNCTION TABLE 511 //_____________________________________________________________________ 512 //22 MANY TO MANY 513 /** 514 * see also #loadViaPermitAsList(DeviceGroupBean,int,int) 515 * @param bean 516 * @return 517 * @throws RuntimeDaoException 518 */ 519 public java.util.List<DeviceGroupBean> loadViaPermitAsList(PersonGroupBean bean)throws RuntimeDaoException; 520 521 //23 MANY TO MANY 522 /** 523 * Retrieves an list of DeviceGroupBean using the junction table Permit, given a PersonGroupBean, 524 * specifying the start row and the number of rows. 525 * 526 * @param bean the PersonGroupBean bean to be used 527 * @param startRow the start row to be used (first row = 1, last row = -1) 528 * @param numRows the number of rows to be retrieved (all rows = a negative number) 529 * @return a list of DeviceGroupBean 530 * @throws RuntimeDaoException 531 */ 532 public java.util.List<DeviceGroupBean> loadViaPermitAsList(PersonGroupBean bean, int startRow, int numRows)throws RuntimeDaoException; 533 //23.2 MANY TO MANY 534 /** 535 * add junction between {@link DeviceGroupBean} and {@link PersonGroupBean} if junction not exists 536 * @param bean 537 * @param linked 538 * @throws RuntimeDaoException 539 */ 540 public void addJunction(DeviceGroupBean bean,PersonGroupBean linked)throws RuntimeDaoException; 541 //23.3 MANY TO MANY 542 /** 543 * remove junction between {@link DeviceGroupBean} and {@link PersonGroupBean} 544 * @param bean 545 * @param linked 546 * @return deleted rows count 547 * @throws RuntimeDaoException 548 */ 549 public int deleteJunction(DeviceGroupBean bean,PersonGroupBean linked)throws RuntimeDaoException; 550 //23.4 MANY TO MANY 551 /** 552 * see also {@link #addJunction(DeviceGroupBean,PersonGroupBean)} 553 * @param bean 554 * @param linkedBeans 555 * @throws RuntimeDaoException 556 */ 557 public void addJunction(DeviceGroupBean bean,PersonGroupBean... linkedBeans)throws RuntimeDaoException; 558 //23.5 MANY TO MANY 559 /** 560 * see also {@link #addJunction(DeviceGroupBean,PersonGroupBean)} 561 * @param bean 562 * @param linkedBeans 563 * @throws RuntimeDaoException 564 */ 565 public void addJunction(DeviceGroupBean bean,java.util.Collection<PersonGroupBean> linkedBeans)throws RuntimeDaoException; 566 //23.6 MANY TO MANY 567 /** 568 * see also {@link #deleteJunction(DeviceGroupBean,PersonGroupBean)} 569 * @param bean 570 * @param linkedBeans 571 * @return 572 * @throws RuntimeDaoException 573 */ 574 public int deleteJunction(DeviceGroupBean bean,PersonGroupBean... linkedBeans)throws RuntimeDaoException; 575 //23.7 MANY TO MANY 576 /** 577 * see also {@link #deleteJunction(DeviceGroupBean,PersonGroupBean)} 578 * @param bean 579 * @param linkedBeans 580 * @return 581 * @throws RuntimeDaoException 582 */ 583 public int deleteJunction(DeviceGroupBean bean,java.util.Collection<PersonGroupBean> linkedBeans)throws RuntimeDaoException; 584 585 //_____________________________________________________________________ 586 // 587 // SELF-REFERENCE 588 //_____________________________________________________________________ 589 //47 590 /** 591 * return bean list ( include {@code bean}) by the self-reference field : {@code fl_device_group(parent) }<br> 592 * first element is top bean 593 * @param id PK# 1 594 * @return empty list if input primary key is {@code null}<br> 595 * first element equal last if self-reference field is cycle 596 * @throws RuntimeDaoException 597 */ 598 public java.util.List<DeviceGroupBean> listOfParent(Integer id)throws RuntimeDaoException; 599 //48 600 /** 601 * see also {@link #listOfParent(Integer)} 602 * @param bean 603 * @return 604 * @throws RuntimeDaoException 605 */ 606 public java.util.List<DeviceGroupBean> listOfParent(DeviceGroupBean bean)throws RuntimeDaoException; 607 //49 608 /** 609 * get level count on the self-reference field : {@code fl_device_group(parent) } 610 * @param id PK# 1 611 * @return 0 if input primary key is {@code null}<br> 612 * -1 if self-reference field is cycle 613 * @throws RuntimeDaoException 614 */ 615 public int levelOfParent(Integer id)throws RuntimeDaoException; 616 //50 617 /** 618 * see also {@link #levelOfParent(Integer)} 619 * @param bean 620 * @return 621 * @throws RuntimeDaoException 622 */ 623 public int levelOfParent(DeviceGroupBean bean)throws RuntimeDaoException; 624 //51 625 /** 626 * test whether the self-reference field is cycle : {@code fl_device_group(parent) } 627 * @param id PK# 1 628 * @throws RuntimeDaoException 629 * @see #levelOfParent(DeviceGroupBean) 630 * @return 631 * @throws RuntimeDaoException 632 */ 633 public boolean isCycleOnParent(Integer id)throws RuntimeDaoException; 634 //52 635 /** 636 * test whether the self-reference field is cycle : {@code fl_device_group(parent) } 637 * @param bean 638 * @return 639 * @throws RuntimeDaoException 640 * @see #levelOfParent(DeviceGroupBean) 641 */ 642 public boolean isCycleOnParent(DeviceGroupBean bean)throws RuntimeDaoException; 643 //53 644 /** 645 * return top bean that with {@code null} self-reference field : {@code fl_device_group(parent) } 646 * @param id PK# 1 647 * @return top bean 648 * @throws NullPointerException if input primary key is {@code null} 649 * @throws IllegalStateException if self-reference field is cycle 650 * @throws ObjectRetrievalException not found record by primary key 651 * @throws RuntimeDaoException 652 */ 653 public DeviceGroupBean topOfParent(Integer id)throws RuntimeDaoException; 654 //54 655 /** 656 * see also {@link #topOfParent(Integer)} 657 * @param bean 658 * @return 659 * @throws NullPointerException if input primary key is {@code null} 660 * @throws IllegalStateException if self-reference field is cycle 661 * @throws ObjectRetrievalException not found record by primary key 662 * @throws RuntimeDaoException 663 */ 664 public DeviceGroupBean topOfParent(DeviceGroupBean bean)throws RuntimeDaoException; 665 //55 666 /** 667 * Ensures the self-reference field is not cycle : {@code fl_device_group(parent) } 668 * @param id PK# 1 669 * @return always {@code id} 670 * @throws IllegalStateException if self-reference field is cycle 671 * @throws RuntimeDaoException 672 * @see #isCycleOnParent(Integer) 673 */ 674 public Integer checkCycleOfParent(Integer id)throws RuntimeDaoException; 675 //56 676 /** 677 * Ensures the self-reference field is not cycle : {@code fl_device_group(parent) }<br> 678 * @param bean 679 * @return always {@code bean} 680 * @throws IllegalStateException if self-reference field is cycle 681 * @throws RuntimeDaoException 682 * @see #isCycleOnParent(DeviceGroupBean) 683 */ 684 public DeviceGroupBean checkCycleOfParent(DeviceGroupBean bean)throws RuntimeDaoException; 685 //57 686 /** 687 * return child bean list (self included) by the self-reference field : {@code fl_device_group(parent) }<br> 688 * throw {@link RuntimeDaoException} if self-reference field is cycle 689 * @param id PK# 1 690 * @return child bean list,{@code null} if not found record 691 * @throws IllegalStateException if self-reference field is cycle 692 * @throws RuntimeDaoException 693 */ 694 public java.util.List<DeviceGroupBean> childListByParent(Integer id)throws RuntimeDaoException; 695 //58 696 /** 697 * see also {@link #childListByParent(Integer)} 698 * @param bean 699 * @return 700 * @throws RuntimeDaoException 701 */ 702 public java.util.List<DeviceGroupBean> childListByParent(DeviceGroupBean bean)throws RuntimeDaoException; 703}