| 1 | |
package org.apache.turbine.services.security.torque.om; |
| 2 | |
|
| 3 | |
|
| 4 | |
import java.math.BigDecimal; |
| 5 | |
import java.sql.Connection; |
| 6 | |
import java.util.ArrayList; |
| 7 | |
import java.util.Collections; |
| 8 | |
import java.util.Date; |
| 9 | |
import java.util.List; |
| 10 | |
|
| 11 | |
import org.apache.commons.lang.ObjectUtils; |
| 12 | |
import org.apache.torque.TorqueException; |
| 13 | |
import org.apache.torque.map.TableMap; |
| 14 | |
import org.apache.torque.om.BaseObject; |
| 15 | |
import org.apache.torque.om.ComboKey; |
| 16 | |
import org.apache.torque.om.DateKey; |
| 17 | |
import org.apache.torque.om.NumberKey; |
| 18 | |
import org.apache.torque.om.ObjectKey; |
| 19 | |
import org.apache.torque.om.SimpleKey; |
| 20 | |
import org.apache.torque.om.StringKey; |
| 21 | |
import org.apache.torque.om.Persistent; |
| 22 | |
import org.apache.torque.util.Criteria; |
| 23 | |
import org.apache.torque.util.Transaction; |
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | 0 | public abstract class BaseTurbineUserGroupRole extends BaseObject |
| 38 | |
{ |
| 39 | |
|
| 40 | |
private static final long serialVersionUID = 1308842746584L; |
| 41 | |
|
| 42 | |
|
| 43 | 0 | private static final TurbineUserGroupRolePeer peer = |
| 44 | |
new TurbineUserGroupRolePeer(); |
| 45 | |
|
| 46 | |
|
| 47 | |
|
| 48 | |
private int userId; |
| 49 | |
|
| 50 | |
|
| 51 | |
private int groupId; |
| 52 | |
|
| 53 | |
|
| 54 | |
private int roleId; |
| 55 | |
|
| 56 | |
|
| 57 | |
|
| 58 | |
|
| 59 | |
|
| 60 | |
|
| 61 | |
|
| 62 | |
public int getUserId() |
| 63 | |
{ |
| 64 | 0 | return userId; |
| 65 | |
} |
| 66 | |
|
| 67 | |
|
| 68 | |
|
| 69 | |
|
| 70 | |
|
| 71 | |
|
| 72 | |
|
| 73 | |
public void setUserId(int v) throws TorqueException |
| 74 | |
{ |
| 75 | |
|
| 76 | 0 | if (this.userId != v) |
| 77 | |
{ |
| 78 | 0 | this.userId = v; |
| 79 | 0 | setModified(true); |
| 80 | |
} |
| 81 | |
|
| 82 | |
|
| 83 | 0 | if (aTurbineUser != null && !(aTurbineUser.getUserId() == v)) |
| 84 | |
{ |
| 85 | 0 | aTurbineUser = null; |
| 86 | |
} |
| 87 | |
|
| 88 | 0 | } |
| 89 | |
|
| 90 | |
|
| 91 | |
|
| 92 | |
|
| 93 | |
|
| 94 | |
|
| 95 | |
public int getGroupId() |
| 96 | |
{ |
| 97 | 0 | return groupId; |
| 98 | |
} |
| 99 | |
|
| 100 | |
|
| 101 | |
|
| 102 | |
|
| 103 | |
|
| 104 | |
|
| 105 | |
|
| 106 | |
public void setGroupId(int v) throws TorqueException |
| 107 | |
{ |
| 108 | |
|
| 109 | 0 | if (this.groupId != v) |
| 110 | |
{ |
| 111 | 0 | this.groupId = v; |
| 112 | 0 | setModified(true); |
| 113 | |
} |
| 114 | |
|
| 115 | |
|
| 116 | 0 | if (aTurbineGroup != null && !(aTurbineGroup.getGroupId() == v)) |
| 117 | |
{ |
| 118 | 0 | aTurbineGroup = null; |
| 119 | |
} |
| 120 | |
|
| 121 | 0 | } |
| 122 | |
|
| 123 | |
|
| 124 | |
|
| 125 | |
|
| 126 | |
|
| 127 | |
|
| 128 | |
public int getRoleId() |
| 129 | |
{ |
| 130 | 0 | return roleId; |
| 131 | |
} |
| 132 | |
|
| 133 | |
|
| 134 | |
|
| 135 | |
|
| 136 | |
|
| 137 | |
|
| 138 | |
|
| 139 | |
public void setRoleId(int v) throws TorqueException |
| 140 | |
{ |
| 141 | |
|
| 142 | 0 | if (this.roleId != v) |
| 143 | |
{ |
| 144 | 0 | this.roleId = v; |
| 145 | 0 | setModified(true); |
| 146 | |
} |
| 147 | |
|
| 148 | |
|
| 149 | 0 | if (aTurbineRole != null && !(aTurbineRole.getRoleId() == v)) |
| 150 | |
{ |
| 151 | 0 | aTurbineRole = null; |
| 152 | |
} |
| 153 | |
|
| 154 | 0 | } |
| 155 | |
|
| 156 | |
|
| 157 | |
|
| 158 | |
|
| 159 | |
|
| 160 | |
private TurbineUser aTurbineUser; |
| 161 | |
|
| 162 | |
|
| 163 | |
|
| 164 | |
|
| 165 | |
|
| 166 | |
|
| 167 | |
|
| 168 | |
public void setTurbineUser(TurbineUser v) throws TorqueException |
| 169 | |
{ |
| 170 | 0 | if (v == null) |
| 171 | |
{ |
| 172 | 0 | setUserId( 0); |
| 173 | |
} |
| 174 | |
else |
| 175 | |
{ |
| 176 | 0 | setUserId(v.getUserId()); |
| 177 | |
} |
| 178 | 0 | aTurbineUser = v; |
| 179 | 0 | } |
| 180 | |
|
| 181 | |
|
| 182 | |
|
| 183 | |
|
| 184 | |
|
| 185 | |
|
| 186 | |
|
| 187 | |
|
| 188 | |
|
| 189 | |
|
| 190 | |
public TurbineUser getTurbineUser() |
| 191 | |
throws TorqueException |
| 192 | |
{ |
| 193 | 0 | if (aTurbineUser == null && (this.userId != 0)) |
| 194 | |
{ |
| 195 | 0 | aTurbineUser = TurbineUserPeer.retrieveByPK(SimpleKey.keyFor(this.userId)); |
| 196 | |
} |
| 197 | 0 | return aTurbineUser; |
| 198 | |
} |
| 199 | |
|
| 200 | |
|
| 201 | |
|
| 202 | |
|
| 203 | |
|
| 204 | |
|
| 205 | |
|
| 206 | |
|
| 207 | |
|
| 208 | |
|
| 209 | |
|
| 210 | |
public TurbineUser getTurbineUser(Connection connection) |
| 211 | |
throws TorqueException |
| 212 | |
{ |
| 213 | 0 | if (aTurbineUser == null && (this.userId != 0)) |
| 214 | |
{ |
| 215 | 0 | aTurbineUser = TurbineUserPeer.retrieveByPK(SimpleKey.keyFor(this.userId), connection); |
| 216 | |
} |
| 217 | 0 | return aTurbineUser; |
| 218 | |
} |
| 219 | |
|
| 220 | |
|
| 221 | |
|
| 222 | |
|
| 223 | |
|
| 224 | |
|
| 225 | |
|
| 226 | |
public void setTurbineUserKey(ObjectKey key) throws TorqueException |
| 227 | |
{ |
| 228 | |
|
| 229 | 0 | setUserId(((NumberKey) key).intValue()); |
| 230 | 0 | } |
| 231 | |
|
| 232 | |
|
| 233 | |
|
| 234 | |
|
| 235 | |
private TurbineGroup aTurbineGroup; |
| 236 | |
|
| 237 | |
|
| 238 | |
|
| 239 | |
|
| 240 | |
|
| 241 | |
|
| 242 | |
|
| 243 | |
public void setTurbineGroup(TurbineGroup v) throws TorqueException |
| 244 | |
{ |
| 245 | 0 | if (v == null) |
| 246 | |
{ |
| 247 | 0 | setGroupId( 0); |
| 248 | |
} |
| 249 | |
else |
| 250 | |
{ |
| 251 | 0 | setGroupId(v.getGroupId()); |
| 252 | |
} |
| 253 | 0 | aTurbineGroup = v; |
| 254 | 0 | } |
| 255 | |
|
| 256 | |
|
| 257 | |
|
| 258 | |
|
| 259 | |
|
| 260 | |
|
| 261 | |
|
| 262 | |
|
| 263 | |
|
| 264 | |
|
| 265 | |
public TurbineGroup getTurbineGroup() |
| 266 | |
throws TorqueException |
| 267 | |
{ |
| 268 | 0 | if (aTurbineGroup == null && (this.groupId != 0)) |
| 269 | |
{ |
| 270 | 0 | aTurbineGroup = TurbineGroupPeer.retrieveByPK(SimpleKey.keyFor(this.groupId)); |
| 271 | |
} |
| 272 | 0 | return aTurbineGroup; |
| 273 | |
} |
| 274 | |
|
| 275 | |
|
| 276 | |
|
| 277 | |
|
| 278 | |
|
| 279 | |
|
| 280 | |
|
| 281 | |
|
| 282 | |
|
| 283 | |
|
| 284 | |
|
| 285 | |
public TurbineGroup getTurbineGroup(Connection connection) |
| 286 | |
throws TorqueException |
| 287 | |
{ |
| 288 | 0 | if (aTurbineGroup == null && (this.groupId != 0)) |
| 289 | |
{ |
| 290 | 0 | aTurbineGroup = TurbineGroupPeer.retrieveByPK(SimpleKey.keyFor(this.groupId), connection); |
| 291 | |
} |
| 292 | 0 | return aTurbineGroup; |
| 293 | |
} |
| 294 | |
|
| 295 | |
|
| 296 | |
|
| 297 | |
|
| 298 | |
|
| 299 | |
|
| 300 | |
|
| 301 | |
public void setTurbineGroupKey(ObjectKey key) throws TorqueException |
| 302 | |
{ |
| 303 | |
|
| 304 | 0 | setGroupId(((NumberKey) key).intValue()); |
| 305 | 0 | } |
| 306 | |
|
| 307 | |
|
| 308 | |
|
| 309 | |
|
| 310 | |
private TurbineRole aTurbineRole; |
| 311 | |
|
| 312 | |
|
| 313 | |
|
| 314 | |
|
| 315 | |
|
| 316 | |
|
| 317 | |
|
| 318 | |
public void setTurbineRole(TurbineRole v) throws TorqueException |
| 319 | |
{ |
| 320 | 0 | if (v == null) |
| 321 | |
{ |
| 322 | 0 | setRoleId( 0); |
| 323 | |
} |
| 324 | |
else |
| 325 | |
{ |
| 326 | 0 | setRoleId(v.getRoleId()); |
| 327 | |
} |
| 328 | 0 | aTurbineRole = v; |
| 329 | 0 | } |
| 330 | |
|
| 331 | |
|
| 332 | |
|
| 333 | |
|
| 334 | |
|
| 335 | |
|
| 336 | |
|
| 337 | |
|
| 338 | |
|
| 339 | |
|
| 340 | |
public TurbineRole getTurbineRole() |
| 341 | |
throws TorqueException |
| 342 | |
{ |
| 343 | 0 | if (aTurbineRole == null && (this.roleId != 0)) |
| 344 | |
{ |
| 345 | 0 | aTurbineRole = TurbineRolePeer.retrieveByPK(SimpleKey.keyFor(this.roleId)); |
| 346 | |
} |
| 347 | 0 | return aTurbineRole; |
| 348 | |
} |
| 349 | |
|
| 350 | |
|
| 351 | |
|
| 352 | |
|
| 353 | |
|
| 354 | |
|
| 355 | |
|
| 356 | |
|
| 357 | |
|
| 358 | |
|
| 359 | |
|
| 360 | |
public TurbineRole getTurbineRole(Connection connection) |
| 361 | |
throws TorqueException |
| 362 | |
{ |
| 363 | 0 | if (aTurbineRole == null && (this.roleId != 0)) |
| 364 | |
{ |
| 365 | 0 | aTurbineRole = TurbineRolePeer.retrieveByPK(SimpleKey.keyFor(this.roleId), connection); |
| 366 | |
} |
| 367 | 0 | return aTurbineRole; |
| 368 | |
} |
| 369 | |
|
| 370 | |
|
| 371 | |
|
| 372 | |
|
| 373 | |
|
| 374 | |
|
| 375 | |
|
| 376 | |
public void setTurbineRoleKey(ObjectKey key) throws TorqueException |
| 377 | |
{ |
| 378 | |
|
| 379 | 0 | setRoleId(((NumberKey) key).intValue()); |
| 380 | 0 | } |
| 381 | |
|
| 382 | |
|
| 383 | 0 | private static List<String> fieldNames = null; |
| 384 | |
|
| 385 | |
|
| 386 | |
|
| 387 | |
|
| 388 | |
|
| 389 | |
|
| 390 | |
public static synchronized List<String> getFieldNames() |
| 391 | |
{ |
| 392 | 0 | if (fieldNames == null) |
| 393 | |
{ |
| 394 | 0 | fieldNames = new ArrayList<String>(); |
| 395 | 0 | fieldNames.add("UserId"); |
| 396 | 0 | fieldNames.add("GroupId"); |
| 397 | 0 | fieldNames.add("RoleId"); |
| 398 | 0 | fieldNames = Collections.unmodifiableList(fieldNames); |
| 399 | |
} |
| 400 | 0 | return fieldNames; |
| 401 | |
} |
| 402 | |
|
| 403 | |
|
| 404 | |
|
| 405 | |
|
| 406 | |
|
| 407 | |
|
| 408 | |
|
| 409 | |
public Object getByName(String name) |
| 410 | |
{ |
| 411 | 0 | if (name.equals("UserId")) |
| 412 | |
{ |
| 413 | 0 | return new Integer(getUserId()); |
| 414 | |
} |
| 415 | 0 | if (name.equals("GroupId")) |
| 416 | |
{ |
| 417 | 0 | return new Integer(getGroupId()); |
| 418 | |
} |
| 419 | 0 | if (name.equals("RoleId")) |
| 420 | |
{ |
| 421 | 0 | return new Integer(getRoleId()); |
| 422 | |
} |
| 423 | 0 | return null; |
| 424 | |
} |
| 425 | |
|
| 426 | |
|
| 427 | |
|
| 428 | |
|
| 429 | |
|
| 430 | |
|
| 431 | |
|
| 432 | |
|
| 433 | |
|
| 434 | |
|
| 435 | |
public boolean setByName(String name, Object value ) |
| 436 | |
throws TorqueException, IllegalArgumentException |
| 437 | |
{ |
| 438 | 0 | if (name.equals("UserId")) |
| 439 | |
{ |
| 440 | 0 | if (value == null || ! (Integer.class.isInstance(value))) |
| 441 | |
{ |
| 442 | 0 | throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object."); |
| 443 | |
} |
| 444 | 0 | setUserId(((Integer) value).intValue()); |
| 445 | 0 | return true; |
| 446 | |
} |
| 447 | 0 | if (name.equals("GroupId")) |
| 448 | |
{ |
| 449 | 0 | if (value == null || ! (Integer.class.isInstance(value))) |
| 450 | |
{ |
| 451 | 0 | throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object."); |
| 452 | |
} |
| 453 | 0 | setGroupId(((Integer) value).intValue()); |
| 454 | 0 | return true; |
| 455 | |
} |
| 456 | 0 | if (name.equals("RoleId")) |
| 457 | |
{ |
| 458 | 0 | if (value == null || ! (Integer.class.isInstance(value))) |
| 459 | |
{ |
| 460 | 0 | throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object."); |
| 461 | |
} |
| 462 | 0 | setRoleId(((Integer) value).intValue()); |
| 463 | 0 | return true; |
| 464 | |
} |
| 465 | 0 | return false; |
| 466 | |
} |
| 467 | |
|
| 468 | |
|
| 469 | |
|
| 470 | |
|
| 471 | |
|
| 472 | |
|
| 473 | |
|
| 474 | |
|
| 475 | |
|
| 476 | |
public Object getByPeerName(String name) |
| 477 | |
{ |
| 478 | 0 | if (name.equals(TurbineUserGroupRolePeer.USER_ID)) |
| 479 | |
{ |
| 480 | 0 | return new Integer(getUserId()); |
| 481 | |
} |
| 482 | 0 | if (name.equals(TurbineUserGroupRolePeer.GROUP_ID)) |
| 483 | |
{ |
| 484 | 0 | return new Integer(getGroupId()); |
| 485 | |
} |
| 486 | 0 | if (name.equals(TurbineUserGroupRolePeer.ROLE_ID)) |
| 487 | |
{ |
| 488 | 0 | return new Integer(getRoleId()); |
| 489 | |
} |
| 490 | 0 | return null; |
| 491 | |
} |
| 492 | |
|
| 493 | |
|
| 494 | |
|
| 495 | |
|
| 496 | |
|
| 497 | |
|
| 498 | |
|
| 499 | |
|
| 500 | |
|
| 501 | |
|
| 502 | |
public boolean setByPeerName(String name, Object value) |
| 503 | |
throws TorqueException, IllegalArgumentException |
| 504 | |
{ |
| 505 | 0 | if (TurbineUserGroupRolePeer.USER_ID.equals(name)) |
| 506 | |
{ |
| 507 | 0 | return setByName("UserId", value); |
| 508 | |
} |
| 509 | 0 | if (TurbineUserGroupRolePeer.GROUP_ID.equals(name)) |
| 510 | |
{ |
| 511 | 0 | return setByName("GroupId", value); |
| 512 | |
} |
| 513 | 0 | if (TurbineUserGroupRolePeer.ROLE_ID.equals(name)) |
| 514 | |
{ |
| 515 | 0 | return setByName("RoleId", value); |
| 516 | |
} |
| 517 | 0 | return false; |
| 518 | |
} |
| 519 | |
|
| 520 | |
|
| 521 | |
|
| 522 | |
|
| 523 | |
|
| 524 | |
|
| 525 | |
|
| 526 | |
|
| 527 | |
public Object getByPosition(int pos) |
| 528 | |
{ |
| 529 | 0 | if (pos == 0) |
| 530 | |
{ |
| 531 | 0 | return new Integer(getUserId()); |
| 532 | |
} |
| 533 | 0 | if (pos == 1) |
| 534 | |
{ |
| 535 | 0 | return new Integer(getGroupId()); |
| 536 | |
} |
| 537 | 0 | if (pos == 2) |
| 538 | |
{ |
| 539 | 0 | return new Integer(getRoleId()); |
| 540 | |
} |
| 541 | 0 | return null; |
| 542 | |
} |
| 543 | |
|
| 544 | |
|
| 545 | |
|
| 546 | |
|
| 547 | |
|
| 548 | |
|
| 549 | |
|
| 550 | |
|
| 551 | |
|
| 552 | |
|
| 553 | |
public boolean setByPosition(int position, Object value) |
| 554 | |
throws TorqueException, IllegalArgumentException |
| 555 | |
{ |
| 556 | 0 | if (position == 0) |
| 557 | |
{ |
| 558 | 0 | return setByName("UserId", value); |
| 559 | |
} |
| 560 | 0 | if (position == 1) |
| 561 | |
{ |
| 562 | 0 | return setByName("GroupId", value); |
| 563 | |
} |
| 564 | 0 | if (position == 2) |
| 565 | |
{ |
| 566 | 0 | return setByName("RoleId", value); |
| 567 | |
} |
| 568 | 0 | return false; |
| 569 | |
} |
| 570 | |
|
| 571 | |
|
| 572 | |
|
| 573 | |
|
| 574 | |
|
| 575 | |
|
| 576 | |
|
| 577 | |
public void save() throws Exception |
| 578 | |
{ |
| 579 | 0 | save(TurbineUserGroupRolePeer.DATABASE_NAME); |
| 580 | 0 | } |
| 581 | |
|
| 582 | |
|
| 583 | |
|
| 584 | |
|
| 585 | |
|
| 586 | |
|
| 587 | |
|
| 588 | |
|
| 589 | |
|
| 590 | |
|
| 591 | |
|
| 592 | |
public void save(String dbName) throws TorqueException |
| 593 | |
{ |
| 594 | 0 | Connection con = null; |
| 595 | |
try |
| 596 | |
{ |
| 597 | 0 | con = Transaction.begin(dbName); |
| 598 | 0 | save(con); |
| 599 | 0 | Transaction.commit(con); |
| 600 | |
} |
| 601 | 0 | catch(TorqueException e) |
| 602 | |
{ |
| 603 | 0 | Transaction.safeRollback(con); |
| 604 | 0 | throw e; |
| 605 | 0 | } |
| 606 | 0 | } |
| 607 | |
|
| 608 | |
|
| 609 | |
|
| 610 | 0 | private boolean alreadyInSave = false; |
| 611 | |
|
| 612 | |
|
| 613 | |
|
| 614 | |
|
| 615 | |
|
| 616 | |
|
| 617 | |
|
| 618 | |
|
| 619 | |
|
| 620 | |
|
| 621 | |
public void save(Connection con) throws TorqueException |
| 622 | |
{ |
| 623 | 0 | if (!alreadyInSave) |
| 624 | |
{ |
| 625 | 0 | alreadyInSave = true; |
| 626 | |
|
| 627 | |
|
| 628 | |
|
| 629 | |
|
| 630 | 0 | if (isModified()) |
| 631 | |
{ |
| 632 | 0 | if (isNew()) |
| 633 | |
{ |
| 634 | 0 | TurbineUserGroupRolePeer.doInsert((TurbineUserGroupRole) this, con); |
| 635 | 0 | setNew(false); |
| 636 | |
} |
| 637 | |
else |
| 638 | |
{ |
| 639 | 0 | TurbineUserGroupRolePeer.doUpdate((TurbineUserGroupRole) this, con); |
| 640 | |
} |
| 641 | |
} |
| 642 | |
|
| 643 | 0 | alreadyInSave = false; |
| 644 | |
} |
| 645 | 0 | } |
| 646 | |
|
| 647 | |
|
| 648 | |
|
| 649 | 0 | private final SimpleKey[] pks = new SimpleKey[3]; |
| 650 | 0 | private final ComboKey comboPK = new ComboKey(pks); |
| 651 | |
|
| 652 | |
|
| 653 | |
|
| 654 | |
|
| 655 | |
|
| 656 | |
|
| 657 | |
public void setPrimaryKey(ObjectKey key) throws TorqueException |
| 658 | |
{ |
| 659 | 0 | SimpleKey[] keys = (SimpleKey[]) key.getValue(); |
| 660 | 0 | setUserId(((NumberKey)keys[0]).intValue()); |
| 661 | 0 | setGroupId(((NumberKey)keys[1]).intValue()); |
| 662 | 0 | setRoleId(((NumberKey)keys[2]).intValue()); |
| 663 | 0 | } |
| 664 | |
|
| 665 | |
|
| 666 | |
|
| 667 | |
|
| 668 | |
|
| 669 | |
|
| 670 | |
|
| 671 | |
|
| 672 | |
public void setPrimaryKey( int userId, int groupId, int roleId) |
| 673 | |
throws TorqueException |
| 674 | |
{ |
| 675 | 0 | setUserId(userId); |
| 676 | 0 | setGroupId(groupId); |
| 677 | 0 | setRoleId(roleId); |
| 678 | 0 | } |
| 679 | |
|
| 680 | |
|
| 681 | |
|
| 682 | |
|
| 683 | |
public void setPrimaryKey(String key) throws TorqueException |
| 684 | |
{ |
| 685 | 0 | setPrimaryKey(new ComboKey(key)); |
| 686 | 0 | } |
| 687 | |
|
| 688 | |
|
| 689 | |
|
| 690 | |
|
| 691 | |
|
| 692 | |
public ObjectKey getPrimaryKey() |
| 693 | |
{ |
| 694 | 0 | pks[0] = SimpleKey.keyFor(getUserId()); |
| 695 | 0 | pks[1] = SimpleKey.keyFor(getGroupId()); |
| 696 | 0 | pks[2] = SimpleKey.keyFor(getRoleId()); |
| 697 | 0 | return comboPK; |
| 698 | |
} |
| 699 | |
|
| 700 | |
|
| 701 | |
|
| 702 | |
|
| 703 | |
|
| 704 | |
|
| 705 | |
|
| 706 | |
|
| 707 | |
public TurbineUserGroupRole copy() throws TorqueException |
| 708 | |
{ |
| 709 | 0 | return copy(true); |
| 710 | |
} |
| 711 | |
|
| 712 | |
|
| 713 | |
|
| 714 | |
|
| 715 | |
|
| 716 | |
|
| 717 | |
|
| 718 | |
|
| 719 | |
|
| 720 | |
public TurbineUserGroupRole copy(Connection con) throws TorqueException |
| 721 | |
{ |
| 722 | 0 | return copy(true, con); |
| 723 | |
} |
| 724 | |
|
| 725 | |
|
| 726 | |
|
| 727 | |
|
| 728 | |
|
| 729 | |
|
| 730 | |
|
| 731 | |
|
| 732 | |
|
| 733 | |
|
| 734 | |
public TurbineUserGroupRole copy(boolean deepcopy) throws TorqueException |
| 735 | |
{ |
| 736 | 0 | return copyInto(new TurbineUserGroupRole(), deepcopy); |
| 737 | |
} |
| 738 | |
|
| 739 | |
|
| 740 | |
|
| 741 | |
|
| 742 | |
|
| 743 | |
|
| 744 | |
|
| 745 | |
|
| 746 | |
|
| 747 | |
|
| 748 | |
|
| 749 | |
public TurbineUserGroupRole copy(boolean deepcopy, Connection con) throws TorqueException |
| 750 | |
{ |
| 751 | 0 | return copyInto(new TurbineUserGroupRole(), deepcopy, con); |
| 752 | |
} |
| 753 | |
|
| 754 | |
|
| 755 | |
|
| 756 | |
|
| 757 | |
|
| 758 | |
|
| 759 | |
|
| 760 | |
protected TurbineUserGroupRole copyInto(TurbineUserGroupRole copyObj) throws TorqueException |
| 761 | |
{ |
| 762 | 0 | return copyInto(copyObj, true); |
| 763 | |
} |
| 764 | |
|
| 765 | |
|
| 766 | |
|
| 767 | |
|
| 768 | |
|
| 769 | |
|
| 770 | |
|
| 771 | |
|
| 772 | |
|
| 773 | |
protected TurbineUserGroupRole copyInto(TurbineUserGroupRole copyObj, Connection con) throws TorqueException |
| 774 | |
{ |
| 775 | 0 | return copyInto(copyObj, true, con); |
| 776 | |
} |
| 777 | |
|
| 778 | |
|
| 779 | |
|
| 780 | |
|
| 781 | |
|
| 782 | |
|
| 783 | |
|
| 784 | |
|
| 785 | |
|
| 786 | |
protected TurbineUserGroupRole copyInto(TurbineUserGroupRole copyObj, boolean deepcopy) throws TorqueException |
| 787 | |
{ |
| 788 | 0 | copyObj.setUserId(userId); |
| 789 | 0 | copyObj.setGroupId(groupId); |
| 790 | 0 | copyObj.setRoleId(roleId); |
| 791 | |
|
| 792 | 0 | copyObj.setUserId( 0); |
| 793 | 0 | copyObj.setGroupId( 0); |
| 794 | 0 | copyObj.setRoleId( 0); |
| 795 | |
|
| 796 | 0 | if (deepcopy) |
| 797 | |
{ |
| 798 | |
} |
| 799 | 0 | return copyObj; |
| 800 | |
} |
| 801 | |
|
| 802 | |
|
| 803 | |
|
| 804 | |
|
| 805 | |
|
| 806 | |
|
| 807 | |
|
| 808 | |
|
| 809 | |
|
| 810 | |
|
| 811 | |
|
| 812 | |
protected TurbineUserGroupRole copyInto(TurbineUserGroupRole copyObj, boolean deepcopy, Connection con) throws TorqueException |
| 813 | |
{ |
| 814 | 0 | copyObj.setUserId(userId); |
| 815 | 0 | copyObj.setGroupId(groupId); |
| 816 | 0 | copyObj.setRoleId(roleId); |
| 817 | |
|
| 818 | 0 | copyObj.setUserId( 0); |
| 819 | 0 | copyObj.setGroupId( 0); |
| 820 | 0 | copyObj.setRoleId( 0); |
| 821 | |
|
| 822 | 0 | if (deepcopy) |
| 823 | |
{ |
| 824 | |
} |
| 825 | 0 | return copyObj; |
| 826 | |
} |
| 827 | |
|
| 828 | |
|
| 829 | |
|
| 830 | |
|
| 831 | |
|
| 832 | |
|
| 833 | |
|
| 834 | |
|
| 835 | |
|
| 836 | |
public TurbineUserGroupRolePeer getPeer() |
| 837 | |
{ |
| 838 | 0 | return peer; |
| 839 | |
} |
| 840 | |
|
| 841 | |
|
| 842 | |
|
| 843 | |
|
| 844 | |
|
| 845 | |
|
| 846 | |
|
| 847 | |
public TableMap getTableMap() throws TorqueException |
| 848 | |
{ |
| 849 | 0 | return TurbineUserGroupRolePeer.getTableMap(); |
| 850 | |
} |
| 851 | |
|
| 852 | |
|
| 853 | |
public String toString() |
| 854 | |
{ |
| 855 | 0 | StringBuffer str = new StringBuffer(); |
| 856 | 0 | str.append("TurbineUserGroupRole:\n"); |
| 857 | 0 | str.append("UserId = ") |
| 858 | |
.append(getUserId()) |
| 859 | |
.append("\n"); |
| 860 | 0 | str.append("GroupId = ") |
| 861 | |
.append(getGroupId()) |
| 862 | |
.append("\n"); |
| 863 | 0 | str.append("RoleId = ") |
| 864 | |
.append(getRoleId()) |
| 865 | |
.append("\n"); |
| 866 | 0 | return(str.toString()); |
| 867 | |
} |
| 868 | |
} |