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_person_group table.<br> 014 * Remarks: 用户组信息 015 * @author guyadong 016 */ 017public interface IPersonGroupManager extends TableManager<PersonGroupBean> 018{ 019 ////////////////////////////////////// 020 // PRIMARY KEY METHODS 021 ////////////////////////////////////// 022 023 //1 024 /** 025 * Loads a {@link PersonGroupBean} from the fl_person_group using primary key fields. 026 * 027 * @param id Integer - PK# 1 028 * @return a unique PersonGroupBean or {@code null} if not found 029 * @throws RuntimeDaoException 030 */ 031 public PersonGroupBean loadByPrimaryKey(Integer id)throws RuntimeDaoException; 032 033 //1.1 034 /** 035 * Loads a {@link PersonGroupBean} from the fl_person_group using primary key fields. 036 * 037 * @param id Integer - PK# 1 038 * @return a unique PersonGroupBean 039 * @throws ObjectRetrievalException if not found 040 * @throws RuntimeDaoException 041 */ 042 public PersonGroupBean loadByPrimaryKeyChecked(Integer id) throws RuntimeDaoException,ObjectRetrievalException; 043 044 //1.4 045 /** 046 * Returns true if this fl_person_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 PersonGroupBean} from the fl_person_group using primary key fields. 064 * 065 * @param keys primary keys array 066 * @return list of PersonGroupBean 067 * @throws RuntimeDaoException 068 */ 069 public java.util.List<PersonGroupBean> loadByPrimaryKey(int... keys)throws RuntimeDaoException; 070 //1.9 071 /** 072 * Loads {@link PersonGroupBean} from the fl_person_group using primary key fields. 073 * 074 * @param keys primary keys collection 075 * @return list of PersonGroupBean 076 * @throws RuntimeDaoException 077 */ 078 public java.util.List<PersonGroupBean> 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 PersonGroupBean collection wille be deleted 112 * @return the number of deleted rows 113 * @throws RuntimeDaoException 114 */ 115 public int delete(PersonGroupBean... beans)throws RuntimeDaoException; 116 //2.5 117 /** 118 * Delete beans.<br> 119 * 120 * @param beans PersonGroupBean collection wille be deleted 121 * @return the number of deleted rows 122 * @throws RuntimeDaoException 123 */ 124 public int delete(java.util.Collection<PersonGroupBean> beans)throws RuntimeDaoException; 125 126 127 ////////////////////////////////////// 128 // GET/SET IMPORTED KEY BEAN METHOD 129 ////////////////////////////////////// 130 //3.1 GET IMPORTED 131 /** 132 * Retrieves the {@link PermitBean} object from the fl_permit.person_group_id field.<BR> 133 * FK_NAME : fl_permit_ibfk_2 134 * @param bean the {@link PersonGroupBean} 135 * @return the associated {@link PermitBean} beans or {@code null} if {@code bean} is {@code null} 136 * @throws RuntimeDaoException 137 */ 138 public PermitBean[] getPermitBeansByPersonGroupId(PersonGroupBean bean)throws RuntimeDaoException; 139 140 //3.1.2 GET IMPORTED 141 /** 142 * Retrieves the {@link PermitBean} object from the fl_permit.person_group_id field.<BR> 143 * FK_NAME : fl_permit_ibfk_2 144 * @param idOfPersonGroup Integer - PK# 1 145 * @return the associated {@link PermitBean} beans or {@code null} if {@code bean} is {@code null} 146 * @throws RuntimeDaoException 147 */ 148 public PermitBean[] getPermitBeansByPersonGroupId(Integer idOfPersonGroup)throws RuntimeDaoException; 149 150 //3.2 GET IMPORTED 151 /** 152 * see also #getPermitBeansByPersonGroupIdAsList(PersonGroupBean,int,int) 153 * @param bean 154 * @return 155 * @throws RuntimeDaoException 156 */ 157 public java.util.List<PermitBean> getPermitBeansByPersonGroupIdAsList(PersonGroupBean bean)throws RuntimeDaoException; 158 159 //3.2.2 GET IMPORTED 160 /** 161 * Retrieves the {@link PermitBean} object from fl_permit.person_group_id field.<BR> 162 * FK_NAME:fl_permit_ibfk_2 163 * @param idOfPersonGroup Integer - PK# 1 164 * @return the associated {@link PermitBean} beans 165 * @throws RuntimeDaoException 166 */ 167 public java.util.List<PermitBean> getPermitBeansByPersonGroupIdAsList(Integer idOfPersonGroup)throws RuntimeDaoException; 168 //3.2.3 DELETE IMPORTED 169 /** 170 * delete the associated {@link PermitBean} objects from fl_permit.person_group_id field.<BR> 171 * FK_NAME:fl_permit_ibfk_2 172 * @param idOfPersonGroup Integer - PK# 1 173 * @return the number of deleted rows 174 * @throws RuntimeDaoException 175 */ 176 public int deletePermitBeansByPersonGroupId(Integer idOfPersonGroup)throws RuntimeDaoException; 177 //3.2.4 GET IMPORTED 178 /** 179 * Retrieves the {@link PermitBean} object from fl_permit.person_group_id field.<BR> 180 * FK_NAME:fl_permit_ibfk_2 181 * @param bean the {@link PersonGroupBean} 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 PermitBean} beans or empty list if {@code bean} is {@code null} 185 * @throws RuntimeDaoException 186 */ 187 public java.util.List<PermitBean> getPermitBeansByPersonGroupIdAsList(PersonGroupBean bean,int startRow,int numRows)throws RuntimeDaoException; 188 //3.3 SET IMPORTED 189 /** 190 * set the {@link PermitBean} object array associate to PersonGroupBean by the fl_permit.person_group_id field.<BR> 191 * FK_NAME : fl_permit_ibfk_2 192 * @param bean the referenced {@link PersonGroupBean} 193 * @param importedBeans imported beans from fl_permit 194 * @return importedBeans always 195 * @see IPermitManager#setReferencedByPersonGroupId(PermitBean, PersonGroupBean) 196 * @throws RuntimeDaoException 197 */ 198 public PermitBean[] setPermitBeansByPersonGroupId(PersonGroupBean bean , PermitBean[] importedBeans)throws RuntimeDaoException; 199 200 //3.4 SET IMPORTED 201 /** 202 * set the {@link PermitBean} object java.util.Collection associate to PersonGroupBean by the fl_permit.person_group_id field.<BR> 203 * FK_NAME:fl_permit_ibfk_2 204 * @param bean the referenced {@link PersonGroupBean} 205 * @param importedBeans imported beans from fl_permit 206 * @return importedBeans always 207 * @see IPermitManager#setReferencedByPersonGroupId(PermitBean, PersonGroupBean) 208 * @throws RuntimeDaoException 209 */ 210 public <C extends java.util.Collection<PermitBean>> C setPermitBeansByPersonGroupId(PersonGroupBean bean , C importedBeans)throws RuntimeDaoException; 211 212 //3.1 GET IMPORTED 213 /** 214 * Retrieves the {@link PersonBean} object from the fl_person.group_id field.<BR> 215 * FK_NAME : fl_person_ibfk_1 216 * @param bean the {@link PersonGroupBean} 217 * @return the associated {@link PersonBean} beans or {@code null} if {@code bean} is {@code null} 218 * @throws RuntimeDaoException 219 */ 220 public PersonBean[] getPersonBeansByGroupId(PersonGroupBean bean)throws RuntimeDaoException; 221 222 //3.1.2 GET IMPORTED 223 /** 224 * Retrieves the {@link PersonBean} object from the fl_person.group_id field.<BR> 225 * FK_NAME : fl_person_ibfk_1 226 * @param idOfPersonGroup Integer - PK# 1 227 * @return the associated {@link PersonBean} beans or {@code null} if {@code bean} is {@code null} 228 * @throws RuntimeDaoException 229 */ 230 public PersonBean[] getPersonBeansByGroupId(Integer idOfPersonGroup)throws RuntimeDaoException; 231 232 //3.2 GET IMPORTED 233 /** 234 * see also #getPersonBeansByGroupIdAsList(PersonGroupBean,int,int) 235 * @param bean 236 * @return 237 * @throws RuntimeDaoException 238 */ 239 public java.util.List<PersonBean> getPersonBeansByGroupIdAsList(PersonGroupBean bean)throws RuntimeDaoException; 240 241 //3.2.2 GET IMPORTED 242 /** 243 * Retrieves the {@link PersonBean} object from fl_person.group_id field.<BR> 244 * FK_NAME:fl_person_ibfk_1 245 * @param idOfPersonGroup Integer - PK# 1 246 * @return the associated {@link PersonBean} beans 247 * @throws RuntimeDaoException 248 */ 249 public java.util.List<PersonBean> getPersonBeansByGroupIdAsList(Integer idOfPersonGroup)throws RuntimeDaoException; 250 //3.2.3 DELETE IMPORTED 251 /** 252 * delete the associated {@link PersonBean} objects from fl_person.group_id field.<BR> 253 * FK_NAME:fl_person_ibfk_1 254 * @param idOfPersonGroup Integer - PK# 1 255 * @return the number of deleted rows 256 * @throws RuntimeDaoException 257 */ 258 public int deletePersonBeansByGroupId(Integer idOfPersonGroup)throws RuntimeDaoException; 259 //3.2.4 GET IMPORTED 260 /** 261 * Retrieves the {@link PersonBean} object from fl_person.group_id field.<BR> 262 * FK_NAME:fl_person_ibfk_1 263 * @param bean the {@link PersonGroupBean} 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 PersonBean} beans or empty list if {@code bean} is {@code null} 267 * @throws RuntimeDaoException 268 */ 269 public java.util.List<PersonBean> getPersonBeansByGroupIdAsList(PersonGroupBean bean,int startRow,int numRows)throws RuntimeDaoException; 270 //3.3 SET IMPORTED 271 /** 272 * set the {@link PersonBean} object array associate to PersonGroupBean by the fl_person.group_id field.<BR> 273 * FK_NAME : fl_person_ibfk_1 274 * @param bean the referenced {@link PersonGroupBean} 275 * @param importedBeans imported beans from fl_person 276 * @return importedBeans always 277 * @see IPersonManager#setReferencedByGroupId(PersonBean, PersonGroupBean) 278 * @throws RuntimeDaoException 279 */ 280 public PersonBean[] setPersonBeansByGroupId(PersonGroupBean bean , PersonBean[] importedBeans)throws RuntimeDaoException; 281 282 //3.4 SET IMPORTED 283 /** 284 * set the {@link PersonBean} object java.util.Collection associate to PersonGroupBean by the fl_person.group_id field.<BR> 285 * FK_NAME:fl_person_ibfk_1 286 * @param bean the referenced {@link PersonGroupBean} 287 * @param importedBeans imported beans from fl_person 288 * @return importedBeans always 289 * @see IPersonManager#setReferencedByGroupId(PersonBean, PersonGroupBean) 290 * @throws RuntimeDaoException 291 */ 292 public <C extends java.util.Collection<PersonBean>> C setPersonBeansByGroupId(PersonGroupBean bean , C importedBeans)throws RuntimeDaoException; 293 294 //3.1 GET IMPORTED 295 /** 296 * Retrieves the {@link PersonGroupBean} object from the fl_person_group.parent field.<BR> 297 * FK_NAME : fl_person_group_ibfk_1 298 * @param bean the {@link PersonGroupBean} 299 * @return the associated {@link PersonGroupBean} beans or {@code null} if {@code bean} is {@code null} 300 * @throws RuntimeDaoException 301 */ 302 public PersonGroupBean[] getPersonGroupBeansByParent(PersonGroupBean bean)throws RuntimeDaoException; 303 304 //3.1.2 GET IMPORTED 305 /** 306 * Retrieves the {@link PersonGroupBean} object from the fl_person_group.parent field.<BR> 307 * FK_NAME : fl_person_group_ibfk_1 308 * @param idOfPersonGroup Integer - PK# 1 309 * @return the associated {@link PersonGroupBean} beans or {@code null} if {@code bean} is {@code null} 310 * @throws RuntimeDaoException 311 */ 312 public PersonGroupBean[] getPersonGroupBeansByParent(Integer idOfPersonGroup)throws RuntimeDaoException; 313 314 //3.2 GET IMPORTED 315 /** 316 * see also #getPersonGroupBeansByParentAsList(PersonGroupBean,int,int) 317 * @param bean 318 * @return 319 * @throws RuntimeDaoException 320 */ 321 public java.util.List<PersonGroupBean> getPersonGroupBeansByParentAsList(PersonGroupBean bean)throws RuntimeDaoException; 322 323 //3.2.2 GET IMPORTED 324 /** 325 * Retrieves the {@link PersonGroupBean} object from fl_person_group.parent field.<BR> 326 * FK_NAME:fl_person_group_ibfk_1 327 * @param idOfPersonGroup Integer - PK# 1 328 * @return the associated {@link PersonGroupBean} beans 329 * @throws RuntimeDaoException 330 */ 331 public java.util.List<PersonGroupBean> getPersonGroupBeansByParentAsList(Integer idOfPersonGroup)throws RuntimeDaoException; 332 //3.2.3 DELETE IMPORTED 333 /** 334 * delete the associated {@link PersonGroupBean} objects from fl_person_group.parent field.<BR> 335 * FK_NAME:fl_person_group_ibfk_1 336 * @param idOfPersonGroup Integer - PK# 1 337 * @return the number of deleted rows 338 * @throws RuntimeDaoException 339 */ 340 public int deletePersonGroupBeansByParent(Integer idOfPersonGroup)throws RuntimeDaoException; 341 //3.2.4 GET IMPORTED 342 /** 343 * Retrieves the {@link PersonGroupBean} object from fl_person_group.parent field.<BR> 344 * FK_NAME:fl_person_group_ibfk_1 345 * @param bean the {@link PersonGroupBean} 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 PersonGroupBean} beans or empty list if {@code bean} is {@code null} 349 * @throws RuntimeDaoException 350 */ 351 public java.util.List<PersonGroupBean> getPersonGroupBeansByParentAsList(PersonGroupBean bean,int startRow,int numRows)throws RuntimeDaoException; 352 //3.3 SET IMPORTED 353 /** 354 * set the {@link PersonGroupBean} object array associate to PersonGroupBean by the fl_person_group.parent field.<BR> 355 * FK_NAME : fl_person_group_ibfk_1 356 * @param bean the referenced {@link PersonGroupBean} 357 * @param importedBeans imported beans from fl_person_group 358 * @return importedBeans always 359 * @see IPersonGroupManager#setReferencedByParent(PersonGroupBean, PersonGroupBean) 360 * @throws RuntimeDaoException 361 */ 362 public PersonGroupBean[] setPersonGroupBeansByParent(PersonGroupBean bean , PersonGroupBean[] importedBeans)throws RuntimeDaoException; 363 364 //3.4 SET IMPORTED 365 /** 366 * set the {@link PersonGroupBean} object java.util.Collection associate to PersonGroupBean by the fl_person_group.parent field.<BR> 367 * FK_NAME:fl_person_group_ibfk_1 368 * @param bean the referenced {@link PersonGroupBean} 369 * @param importedBeans imported beans from fl_person_group 370 * @return importedBeans always 371 * @see IPersonGroupManager#setReferencedByParent(PersonGroupBean, PersonGroupBean) 372 * @throws RuntimeDaoException 373 */ 374 public <C extends java.util.Collection<PersonGroupBean>> C setPersonGroupBeansByParent(PersonGroupBean bean , C importedBeans)throws RuntimeDaoException; 375 376 //3.5 SYNC SAVE 377 /** 378 * Save the PersonGroupBean bean and referenced beans and imported beans into the database. 379 * 380 * @param bean the {@link PersonGroupBean} bean to be saved 381 * @param refPersongroupByParent the {@link PersonGroupBean} bean referenced by {@link PersonGroupBean} 382 * @param impPermitByPersonGroupId the {@link PermitBean} bean refer to {@link PersonGroupBean} 383 * @param impPersonByGroupId the {@link PersonBean} bean refer to {@link PersonGroupBean} 384 * @param impPersongroupByParent the {@link PersonGroupBean} bean refer to {@link PersonGroupBean} 385 * @return the inserted or updated {@link PersonGroupBean} bean 386 * @throws RuntimeDaoException 387 */ 388 public PersonGroupBean save(PersonGroupBean bean 389 , PersonGroupBean refPersongroupByParent 390 , PermitBean[] impPermitByPersonGroupId , PersonBean[] impPersonByGroupId , PersonGroupBean[] impPersongroupByParent )throws RuntimeDaoException; 391 //3.6 SYNC SAVE AS TRANSACTION 392 /** 393 * Transaction version for sync save<br> 394 * see also {@link #save(PersonGroupBean , PersonGroupBean , PermitBean[] , PersonBean[] , PersonGroupBean[] )} 395 * @param bean the {@link PersonGroupBean} bean to be saved 396 * @param refPersongroupByParent the {@link PersonGroupBean} bean referenced by {@link PersonGroupBean} 397 * @param impPermitByPersonGroupId the {@link PermitBean} bean refer to {@link PersonGroupBean} 398 * @param impPersonByGroupId the {@link PersonBean} bean refer to {@link PersonGroupBean} 399 * @param impPersongroupByParent the {@link PersonGroupBean} bean refer to {@link PersonGroupBean} 400 * @return the inserted or updated {@link PersonGroupBean} bean 401 * @throws RuntimeDaoException 402 */ 403 public PersonGroupBean saveAsTransaction(final PersonGroupBean bean 404 ,final PersonGroupBean refPersongroupByParent 405 ,final PermitBean[] impPermitByPersonGroupId ,final PersonBean[] impPersonByGroupId ,final PersonGroupBean[] impPersongroupByParent )throws RuntimeDaoException; 406 //3.7 SYNC SAVE 407 /** 408 * Save the PersonGroupBean bean and referenced beans and imported beans into the database. 409 * 410 * @param bean the {@link PersonGroupBean} bean to be saved 411 * @param refPersongroupByParent the {@link PersonGroupBean} bean referenced by {@link PersonGroupBean} 412 * @param impPermitByPersonGroupId the {@link PermitBean} bean refer to {@link PersonGroupBean} 413 * @param impPersonByGroupId the {@link PersonBean} bean refer to {@link PersonGroupBean} 414 * @param impPersongroupByParent the {@link PersonGroupBean} bean refer to {@link PersonGroupBean} 415 * @return the inserted or updated {@link PersonGroupBean} bean 416 * @throws RuntimeDaoException 417 */ 418 public PersonGroupBean save(PersonGroupBean bean 419 , PersonGroupBean refPersongroupByParent 420 , java.util.Collection<PermitBean> impPermitByPersonGroupId , java.util.Collection<PersonBean> impPersonByGroupId , java.util.Collection<PersonGroupBean> impPersongroupByParent )throws RuntimeDaoException; 421 //3.8 SYNC SAVE AS TRANSACTION 422 /** 423 * Transaction version for sync save<br> 424 * see also {@link #save(PersonGroupBean , PersonGroupBean , java.util.Collection , java.util.Collection , java.util.Collection )} 425 * @param bean the {@link PersonGroupBean} bean to be saved 426 * @param refPersongroupByParent the {@link PersonGroupBean} bean referenced by {@link PersonGroupBean} 427 * @param impPermitByPersonGroupId the {@link PermitBean} bean refer to {@link PersonGroupBean} 428 * @param impPersonByGroupId the {@link PersonBean} bean refer to {@link PersonGroupBean} 429 * @param impPersongroupByParent the {@link PersonGroupBean} bean refer to {@link PersonGroupBean} 430 * @return the inserted or updated {@link PersonGroupBean} bean 431 * @throws RuntimeDaoException 432 */ 433 public PersonGroupBean saveAsTransaction(final PersonGroupBean bean 434 ,final PersonGroupBean refPersongroupByParent 435 ,final java.util.Collection<PermitBean> impPermitByPersonGroupId ,final java.util.Collection<PersonBean> impPersonByGroupId ,final java.util.Collection<PersonGroupBean> impPersongroupByParent )throws RuntimeDaoException; 436 ////////////////////////////////////// 437 // GET/SET FOREIGN KEY BEAN METHOD 438 ////////////////////////////////////// 439 //5.1 GET REFERENCED VALUE 440 /** 441 * Retrieves the {@link PersonGroupBean} object referenced by {@link PersonGroupBean#getParent}() field.<br> 442 * FK_NAME : fl_person_group_ibfk_1 443 * @param bean the {@link PersonGroupBean} 444 * @return the associated {@link PersonGroupBean} bean or {@code null} if {@code bean} is {@code null} 445 * @throws RuntimeDaoException 446 */ 447 public PersonGroupBean getReferencedByParent(PersonGroupBean bean)throws RuntimeDaoException; 448 449 //5.2 SET REFERENCED 450 /** 451 * Associates the {@link PersonGroupBean} object to the {@link PersonGroupBean} object by {@link PersonGroupBean#getParent}() field. 452 * 453 * @param bean the {@link PersonGroupBean} object to use 454 * @param beanToSet the {@link PersonGroupBean} object to associate to the {@link PersonGroupBean} 455 * @return always beanToSet saved 456 * @throws RuntimeDaoException 457 */ 458 public PersonGroupBean setReferencedByParent(PersonGroupBean bean, PersonGroupBean beanToSet)throws RuntimeDaoException; 459 //_____________________________________________________________________ 460 // 461 // USING INDICES 462 //_____________________________________________________________________ 463 464 465 /** 466 * Retrieves an array of PersonGroupBean using the parent index. 467 * 468 * @param parent the parent column's value filter. 469 * @return an array of PersonGroupBean 470 * @throws RuntimeDaoException 471 */ 472 public PersonGroupBean[] loadByIndexParent(Integer parent)throws RuntimeDaoException; 473 474 /** 475 * Retrieves a list of PersonGroupBean using the parent index. 476 * 477 * @param parent the parent column's value filter. 478 * @return a list of PersonGroupBean 479 * @throws RuntimeDaoException 480 */ 481 public java.util.List<PersonGroupBean> 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 PersonGroupBean} array 496 * @param beans 497 * @return 498 */ 499 public java.util.List<Integer> toPrimaryKeyList(PersonGroupBean... beans); 500 //46 501 /** 502 * return a primary key list from {@link PersonGroupBean} collection 503 * @param beans 504 * @return 505 */ 506 public java.util.List<Integer> toPrimaryKeyList(java.util.Collection<PersonGroupBean> 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(PersonGroupBean,int,int) 515 * @param bean 516 * @return 517 * @throws RuntimeDaoException 518 */ 519 public java.util.List<PersonGroupBean> loadViaPermitAsList(DeviceGroupBean bean)throws RuntimeDaoException; 520 521 //23 MANY TO MANY 522 /** 523 * Retrieves an list of PersonGroupBean using the junction table Permit, given a DeviceGroupBean, 524 * specifying the start row and the number of rows. 525 * 526 * @param bean the DeviceGroupBean 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 PersonGroupBean 530 * @throws RuntimeDaoException 531 */ 532 public java.util.List<PersonGroupBean> loadViaPermitAsList(DeviceGroupBean bean, int startRow, int numRows)throws RuntimeDaoException; 533 //23.2 MANY TO MANY 534 /** 535 * add junction between {@link PersonGroupBean} and {@link DeviceGroupBean} if junction not exists 536 * @param bean 537 * @param linked 538 * @throws RuntimeDaoException 539 */ 540 public void addJunction(PersonGroupBean bean,DeviceGroupBean linked)throws RuntimeDaoException; 541 //23.3 MANY TO MANY 542 /** 543 * remove junction between {@link PersonGroupBean} and {@link DeviceGroupBean} 544 * @param bean 545 * @param linked 546 * @return deleted rows count 547 * @throws RuntimeDaoException 548 */ 549 public int deleteJunction(PersonGroupBean bean,DeviceGroupBean linked)throws RuntimeDaoException; 550 //23.4 MANY TO MANY 551 /** 552 * see also {@link #addJunction(PersonGroupBean,DeviceGroupBean)} 553 * @param bean 554 * @param linkedBeans 555 * @throws RuntimeDaoException 556 */ 557 public void addJunction(PersonGroupBean bean,DeviceGroupBean... linkedBeans)throws RuntimeDaoException; 558 //23.5 MANY TO MANY 559 /** 560 * see also {@link #addJunction(PersonGroupBean,DeviceGroupBean)} 561 * @param bean 562 * @param linkedBeans 563 * @throws RuntimeDaoException 564 */ 565 public void addJunction(PersonGroupBean bean,java.util.Collection<DeviceGroupBean> linkedBeans)throws RuntimeDaoException; 566 //23.6 MANY TO MANY 567 /** 568 * see also {@link #deleteJunction(PersonGroupBean,DeviceGroupBean)} 569 * @param bean 570 * @param linkedBeans 571 * @return 572 * @throws RuntimeDaoException 573 */ 574 public int deleteJunction(PersonGroupBean bean,DeviceGroupBean... linkedBeans)throws RuntimeDaoException; 575 //23.7 MANY TO MANY 576 /** 577 * see also {@link #deleteJunction(PersonGroupBean,DeviceGroupBean)} 578 * @param bean 579 * @param linkedBeans 580 * @return 581 * @throws RuntimeDaoException 582 */ 583 public int deleteJunction(PersonGroupBean bean,java.util.Collection<DeviceGroupBean> 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_person_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<PersonGroupBean> 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<PersonGroupBean> listOfParent(PersonGroupBean bean)throws RuntimeDaoException; 607 //49 608 /** 609 * get level count on the self-reference field : {@code fl_person_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(PersonGroupBean bean)throws RuntimeDaoException; 624 //51 625 /** 626 * test whether the self-reference field is cycle : {@code fl_person_group(parent) } 627 * @param id PK# 1 628 * @throws RuntimeDaoException 629 * @see #levelOfParent(PersonGroupBean) 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_person_group(parent) } 637 * @param bean 638 * @return 639 * @throws RuntimeDaoException 640 * @see #levelOfParent(PersonGroupBean) 641 */ 642 public boolean isCycleOnParent(PersonGroupBean bean)throws RuntimeDaoException; 643 //53 644 /** 645 * return top bean that with {@code null} self-reference field : {@code fl_person_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 PersonGroupBean 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 PersonGroupBean topOfParent(PersonGroupBean bean)throws RuntimeDaoException; 665 //55 666 /** 667 * Ensures the self-reference field is not cycle : {@code fl_person_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_person_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(PersonGroupBean) 683 */ 684 public PersonGroupBean checkCycleOfParent(PersonGroupBean bean)throws RuntimeDaoException; 685 //57 686 /** 687 * return child bean list (self included) by the self-reference field : {@code fl_person_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<PersonGroupBean> 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<PersonGroupBean> childListByParent(PersonGroupBean bean)throws RuntimeDaoException; 703}