0001: package org.tigris.scarab.om;
0002:
0003: import java.math.BigDecimal;
0004: import java.sql.Connection;
0005: import java.util.ArrayList;
0006: import java.util.Collections;
0007: import java.util.Date;
0008: import java.util.List;
0009:
0010: import org.apache.commons.lang.ObjectUtils;
0011: import org.apache.fulcrum.intake.Retrievable;
0012: import org.apache.torque.TorqueException;
0013: import org.apache.torque.om.BaseObject;
0014: import org.apache.torque.om.ComboKey;
0015: import org.apache.torque.om.DateKey;
0016: import org.apache.torque.om.NumberKey;
0017: import org.apache.torque.om.ObjectKey;
0018: import org.apache.torque.om.SimpleKey;
0019: import org.apache.torque.om.StringKey;
0020: import org.apache.torque.om.Persistent;
0021: import org.apache.torque.util.Criteria;
0022: import org.apache.torque.util.Transaction;
0023:
0024: /**
0025: * You should not use this class directly. It should not even be
0026: * extended all references should be to ScarabModule
0027: */
0028: public abstract class BaseScarabModule extends
0029: org.tigris.scarab.om.AbstractScarabModule implements
0030: org.apache.fulcrum.intake.Retrievable {
0031: /** The Peer class */
0032: private static final ScarabModulePeer peer = new ScarabModulePeer();
0033:
0034: /** The value for the moduleId field */
0035: private Integer moduleId;
0036:
0037: /** The value for the realName field */
0038: private String realName;
0039:
0040: /** The value for the domain field */
0041: private String domain;
0042:
0043: /** The value for the code field */
0044: private String code;
0045:
0046: /** The value for the description field */
0047: private String description;
0048:
0049: /** The value for the url field */
0050: private String url;
0051:
0052: /** The value for the archiveEmail field */
0053: private String archiveEmail;
0054:
0055: /** The value for the parentId field */
0056: private Integer parentId;
0057:
0058: /** The value for the ownerId field */
0059: private Integer ownerId;
0060:
0061: /** The value for the qaContactId field */
0062: private Integer qaContactId;
0063:
0064: /** The value for the deleted field */
0065: private boolean deleted = false;
0066:
0067: /** The value for the locked field */
0068: private boolean locked = false;
0069:
0070: /** The value for the classKey field */
0071: private int classKey;
0072:
0073: /**
0074: * Get the ModuleId
0075: *
0076: * @return Integer
0077: */
0078: public Integer getModuleId() {
0079: return moduleId;
0080: }
0081:
0082: /**
0083: * Set the value of ModuleId
0084: *
0085: * @param v new value
0086: */
0087: public void setModuleId(Integer v) throws TorqueException {
0088:
0089: if (!ObjectUtils.equals(this .moduleId, v)) {
0090: this .moduleId = v;
0091: setModified(true);
0092: }
0093:
0094: // update associated AttributeGroup
0095: if (collAttributeGroups != null) {
0096: for (int i = 0; i < collAttributeGroups.size(); i++) {
0097: ((AttributeGroup) collAttributeGroups.get(i))
0098: .setModuleId(v);
0099: }
0100: }
0101:
0102: // update associated Issue
0103: if (collIssues != null) {
0104: for (int i = 0; i < collIssues.size(); i++) {
0105: ((Issue) collIssues.get(i)).setModuleId(v);
0106: }
0107: }
0108:
0109: // update associated RModuleIssueType
0110: if (collRModuleIssueTypes != null) {
0111: for (int i = 0; i < collRModuleIssueTypes.size(); i++) {
0112: ((RModuleIssueType) collRModuleIssueTypes.get(i))
0113: .setModuleId(v);
0114: }
0115: }
0116:
0117: // update associated MITListItem
0118: if (collMITListItems != null) {
0119: for (int i = 0; i < collMITListItems.size(); i++) {
0120: ((MITListItem) collMITListItems.get(i)).setModuleId(v);
0121: }
0122: }
0123:
0124: // update associated RModuleAttribute
0125: if (collRModuleAttributes != null) {
0126: for (int i = 0; i < collRModuleAttributes.size(); i++) {
0127: ((RModuleAttribute) collRModuleAttributes.get(i))
0128: .setModuleId(v);
0129: }
0130: }
0131:
0132: // update associated RModuleOption
0133: if (collRModuleOptions != null) {
0134: for (int i = 0; i < collRModuleOptions.size(); i++) {
0135: ((RModuleOption) collRModuleOptions.get(i))
0136: .setModuleId(v);
0137: }
0138: }
0139:
0140: // update associated RModuleUserAttribute
0141: if (collRModuleUserAttributes != null) {
0142: for (int i = 0; i < collRModuleUserAttributes.size(); i++) {
0143: ((RModuleUserAttribute) collRModuleUserAttributes
0144: .get(i)).setModuleId(v);
0145: }
0146: }
0147:
0148: // update associated UserVote
0149: if (collUserVotes != null) {
0150: for (int i = 0; i < collUserVotes.size(); i++) {
0151: ((UserVote) collUserVotes.get(i)).setModuleId(v);
0152: }
0153: }
0154:
0155: // update associated Query
0156: if (collQuerys != null) {
0157: for (int i = 0; i < collQuerys.size(); i++) {
0158: ((Query) collQuerys.get(i)).setModuleId(v);
0159: }
0160: }
0161:
0162: // update associated Report
0163: if (collReports != null) {
0164: for (int i = 0; i < collReports.size(); i++) {
0165: ((Report) collReports.get(i)).setModuleId(v);
0166: }
0167: }
0168:
0169: // update associated PendingGroupUserRole
0170: if (collPendingGroupUserRoles != null) {
0171: for (int i = 0; i < collPendingGroupUserRoles.size(); i++) {
0172: ((PendingGroupUserRole) collPendingGroupUserRoles
0173: .get(i)).setGroupId(v);
0174: }
0175: }
0176:
0177: // update associated GlobalParameter
0178: if (collGlobalParameters != null) {
0179: for (int i = 0; i < collGlobalParameters.size(); i++) {
0180: ((GlobalParameter) collGlobalParameters.get(i))
0181: .setModuleId(v);
0182: }
0183: }
0184:
0185: // update associated NotificationFilter
0186: if (collNotificationFilters != null) {
0187: for (int i = 0; i < collNotificationFilters.size(); i++) {
0188: ((NotificationFilter) collNotificationFilters.get(i))
0189: .setModuleId(v);
0190: }
0191: }
0192:
0193: // update associated NotificationDefaultFilter
0194: if (collNotificationDefaultFilters != null) {
0195: for (int i = 0; i < collNotificationDefaultFilters.size(); i++) {
0196: ((NotificationDefaultFilter) collNotificationDefaultFilters
0197: .get(i)).setModuleId(v);
0198: }
0199: }
0200: }
0201:
0202: /**
0203: * Get the RealName
0204: *
0205: * @return String
0206: */
0207: public String getRealName() {
0208: return realName;
0209: }
0210:
0211: /**
0212: * Set the value of RealName
0213: *
0214: * @param v new value
0215: */
0216: public void setRealName(String v) {
0217:
0218: if (!ObjectUtils.equals(this .realName, v)) {
0219: this .realName = v;
0220: setModified(true);
0221: }
0222:
0223: }
0224:
0225: /**
0226: * Get the Domain
0227: *
0228: * @return String
0229: */
0230: public String getDomain() {
0231: return domain;
0232: }
0233:
0234: /**
0235: * Set the value of Domain
0236: *
0237: * @param v new value
0238: */
0239: public void setDomain(String v) {
0240:
0241: if (!ObjectUtils.equals(this .domain, v)) {
0242: this .domain = v;
0243: setModified(true);
0244: }
0245:
0246: }
0247:
0248: /**
0249: * Get the Code
0250: *
0251: * @return String
0252: */
0253: public String getCode() {
0254: return code;
0255: }
0256:
0257: /**
0258: * Set the value of Code
0259: *
0260: * @param v new value
0261: */
0262: public void setCode(String v) {
0263:
0264: if (!ObjectUtils.equals(this .code, v)) {
0265: this .code = v;
0266: setModified(true);
0267: }
0268:
0269: }
0270:
0271: /**
0272: * Get the Description
0273: *
0274: * @return String
0275: */
0276: public String getDescription() {
0277: return description;
0278: }
0279:
0280: /**
0281: * Set the value of Description
0282: *
0283: * @param v new value
0284: */
0285: public void setDescription(String v) {
0286:
0287: if (!ObjectUtils.equals(this .description, v)) {
0288: this .description = v;
0289: setModified(true);
0290: }
0291:
0292: }
0293:
0294: /**
0295: * Get the Url
0296: *
0297: * @return String
0298: */
0299: public String getUrl() {
0300: return url;
0301: }
0302:
0303: /**
0304: * Set the value of Url
0305: *
0306: * @param v new value
0307: */
0308: public void setUrl(String v) {
0309:
0310: if (!ObjectUtils.equals(this .url, v)) {
0311: this .url = v;
0312: setModified(true);
0313: }
0314:
0315: }
0316:
0317: /**
0318: * Get the ArchiveEmail
0319: *
0320: * @return String
0321: */
0322: public String getArchiveEmail() {
0323: return archiveEmail;
0324: }
0325:
0326: /**
0327: * Set the value of ArchiveEmail
0328: *
0329: * @param v new value
0330: */
0331: public void setArchiveEmail(String v) {
0332:
0333: if (!ObjectUtils.equals(this .archiveEmail, v)) {
0334: this .archiveEmail = v;
0335: setModified(true);
0336: }
0337:
0338: }
0339:
0340: /**
0341: * Get the ParentId
0342: *
0343: * @return Integer
0344: */
0345: public Integer getParentId() {
0346: return parentId;
0347: }
0348:
0349: /**
0350: * Set the value of ParentId
0351: *
0352: * @param v new value
0353: */
0354: public void setParentId(Integer v) throws TorqueException {
0355:
0356: if (!ObjectUtils.equals(this .parentId, v)) {
0357: this .parentId = v;
0358: setModified(true);
0359: }
0360:
0361: if (aModuleRelatedByParentId != null
0362: && !ObjectUtils.equals(aModuleRelatedByParentId
0363: .getModuleId(), v)) {
0364: aModuleRelatedByParentId = null;
0365: }
0366:
0367: }
0368:
0369: /**
0370: * Get the OwnerId
0371: *
0372: * @return Integer
0373: */
0374: public Integer getOwnerId() {
0375: return ownerId;
0376: }
0377:
0378: /**
0379: * Set the value of OwnerId
0380: *
0381: * @param v new value
0382: */
0383: public void setOwnerId(Integer v) throws TorqueException {
0384:
0385: if (!ObjectUtils.equals(this .ownerId, v)) {
0386: this .ownerId = v;
0387: setModified(true);
0388: }
0389:
0390: if (aScarabUserRelatedByOwnerId != null
0391: && !ObjectUtils.equals(aScarabUserRelatedByOwnerId
0392: .getUserId(), v)) {
0393: aScarabUserRelatedByOwnerId = null;
0394: }
0395:
0396: }
0397:
0398: /**
0399: * Get the QaContactId
0400: *
0401: * @return Integer
0402: */
0403: public Integer getQaContactId() {
0404: return qaContactId;
0405: }
0406:
0407: /**
0408: * Set the value of QaContactId
0409: *
0410: * @param v new value
0411: */
0412: public void setQaContactId(Integer v) throws TorqueException {
0413:
0414: if (!ObjectUtils.equals(this .qaContactId, v)) {
0415: this .qaContactId = v;
0416: setModified(true);
0417: }
0418:
0419: if (aScarabUserRelatedByQaContactId != null
0420: && !ObjectUtils.equals(aScarabUserRelatedByQaContactId
0421: .getUserId(), v)) {
0422: aScarabUserRelatedByQaContactId = null;
0423: }
0424:
0425: }
0426:
0427: /**
0428: * Get the Deleted
0429: *
0430: * @return boolean
0431: */
0432: public boolean getDeleted() {
0433: return deleted;
0434: }
0435:
0436: /**
0437: * Set the value of Deleted
0438: *
0439: * @param v new value
0440: */
0441: public void setDeleted(boolean v) {
0442:
0443: if (this .deleted != v) {
0444: this .deleted = v;
0445: setModified(true);
0446: }
0447:
0448: }
0449:
0450: /**
0451: * Get the Locked
0452: *
0453: * @return boolean
0454: */
0455: public boolean getLocked() {
0456: return locked;
0457: }
0458:
0459: /**
0460: * Set the value of Locked
0461: *
0462: * @param v new value
0463: */
0464: public void setLocked(boolean v) {
0465:
0466: if (this .locked != v) {
0467: this .locked = v;
0468: setModified(true);
0469: }
0470:
0471: }
0472:
0473: /**
0474: * Get the ClassKey
0475: *
0476: * @return int
0477: */
0478: public int getClassKey() {
0479: return classKey;
0480: }
0481:
0482: /**
0483: * Set the value of ClassKey
0484: *
0485: * @param v new value
0486: */
0487: public void setClassKey(int v) {
0488:
0489: if (this .classKey != v) {
0490: this .classKey = v;
0491: setModified(true);
0492: }
0493:
0494: }
0495:
0496: private Module aModuleRelatedByParentId;
0497:
0498: /**
0499: * Declares an association between this object and a Module object
0500: *
0501: * @param v Module
0502: * @throws TorqueException
0503: */
0504: public void setModuleRelatedByParentId(Module v)
0505: throws TorqueException {
0506: if (v == null) {
0507: setParentId((Integer) null);
0508: } else {
0509: setParentId(v.getModuleId());
0510: }
0511: aModuleRelatedByParentId = v;
0512: }
0513:
0514: /**
0515: * Returns the associated Module object.
0516: * If it was not retrieved before, the object is retrieved from
0517: * the database
0518: *
0519: * @return the associated Module object
0520: * @throws TorqueException
0521: */
0522: public Module getModuleRelatedByParentId() throws TorqueException {
0523: if (aModuleRelatedByParentId == null
0524: && (!ObjectUtils.equals(this .parentId, null))) {
0525: aModuleRelatedByParentId = ModuleManager
0526: .getInstance(SimpleKey.keyFor(this .parentId));
0527: }
0528: return aModuleRelatedByParentId;
0529: }
0530:
0531: /**
0532: * Return the associated Module object
0533: * If it was not retrieved before, the object is retrieved from
0534: * the database using the passed connection
0535: *
0536: * @param connection the connection used to retrieve the associated object
0537: * from the database, if it was not retrieved before
0538: * @return the associated Module object
0539: * @throws TorqueException
0540: */
0541: public Module getModuleRelatedByParentId(Connection connection)
0542: throws TorqueException {
0543: if (aModuleRelatedByParentId == null
0544: && (!ObjectUtils.equals(this .parentId, null))) {
0545: aModuleRelatedByParentId = ModuleManager
0546: .getCachedInstance(SimpleKey.keyFor(this .parentId));
0547: if (aModuleRelatedByParentId == null) {
0548: aModuleRelatedByParentId = ScarabModulePeer
0549: .retrieveByPK(SimpleKey.keyFor(this .parentId),
0550: connection);
0551: ModuleManager.putInstance(aModuleRelatedByParentId);
0552: }
0553: }
0554: return aModuleRelatedByParentId;
0555: }
0556:
0557: /**
0558: * Provides convenient way to set a relationship based on a
0559: * ObjectKey, for example
0560: * <code>bar.setFooKey(foo.getPrimaryKey())</code>
0561: *
0562: */
0563: public void setModuleRelatedByParentIdKey(ObjectKey key)
0564: throws TorqueException {
0565:
0566: setParentId(new Integer(((NumberKey) key).intValue()));
0567: }
0568:
0569: private ScarabUser aScarabUserRelatedByOwnerId;
0570:
0571: /**
0572: * Declares an association between this object and a ScarabUser object
0573: *
0574: * @param v ScarabUser
0575: * @throws TorqueException
0576: */
0577: public void setScarabUserRelatedByOwnerId(ScarabUser v)
0578: throws TorqueException {
0579: if (v == null) {
0580: setOwnerId((Integer) null);
0581: } else {
0582: setOwnerId(v.getUserId());
0583: }
0584: aScarabUserRelatedByOwnerId = v;
0585: }
0586:
0587: /**
0588: * Returns the associated ScarabUser object.
0589: * If it was not retrieved before, the object is retrieved from
0590: * the database
0591: *
0592: * @return the associated ScarabUser object
0593: * @throws TorqueException
0594: */
0595: public ScarabUser getScarabUserRelatedByOwnerId()
0596: throws TorqueException {
0597: if (aScarabUserRelatedByOwnerId == null
0598: && (!ObjectUtils.equals(this .ownerId, null))) {
0599: aScarabUserRelatedByOwnerId = ScarabUserManager
0600: .getInstance(SimpleKey.keyFor(this .ownerId));
0601: }
0602: return aScarabUserRelatedByOwnerId;
0603: }
0604:
0605: /**
0606: * Return the associated ScarabUser object
0607: * If it was not retrieved before, the object is retrieved from
0608: * the database using the passed connection
0609: *
0610: * @param connection the connection used to retrieve the associated object
0611: * from the database, if it was not retrieved before
0612: * @return the associated ScarabUser object
0613: * @throws TorqueException
0614: */
0615: public ScarabUser getScarabUserRelatedByOwnerId(
0616: Connection connection) throws TorqueException {
0617: if (aScarabUserRelatedByOwnerId == null
0618: && (!ObjectUtils.equals(this .ownerId, null))) {
0619: aScarabUserRelatedByOwnerId = ScarabUserManager
0620: .getCachedInstance(SimpleKey.keyFor(this .ownerId));
0621: if (aScarabUserRelatedByOwnerId == null) {
0622: aScarabUserRelatedByOwnerId = ScarabUserImplPeer
0623: .retrieveScarabUserImplByPK(SimpleKey
0624: .keyFor(this .ownerId), connection);
0625: ScarabUserManager
0626: .putInstance(aScarabUserRelatedByOwnerId);
0627: }
0628: }
0629: return aScarabUserRelatedByOwnerId;
0630: }
0631:
0632: /**
0633: * Provides convenient way to set a relationship based on a
0634: * ObjectKey, for example
0635: * <code>bar.setFooKey(foo.getPrimaryKey())</code>
0636: *
0637: */
0638: public void setScarabUserRelatedByOwnerIdKey(ObjectKey key)
0639: throws TorqueException {
0640:
0641: setOwnerId(new Integer(((NumberKey) key).intValue()));
0642: }
0643:
0644: private ScarabUser aScarabUserRelatedByQaContactId;
0645:
0646: /**
0647: * Declares an association between this object and a ScarabUser object
0648: *
0649: * @param v ScarabUser
0650: * @throws TorqueException
0651: */
0652: public void setScarabUserRelatedByQaContactId(ScarabUser v)
0653: throws TorqueException {
0654: if (v == null) {
0655: setQaContactId((Integer) null);
0656: } else {
0657: setQaContactId(v.getUserId());
0658: }
0659: aScarabUserRelatedByQaContactId = v;
0660: }
0661:
0662: /**
0663: * Returns the associated ScarabUser object.
0664: * If it was not retrieved before, the object is retrieved from
0665: * the database
0666: *
0667: * @return the associated ScarabUser object
0668: * @throws TorqueException
0669: */
0670: public ScarabUser getScarabUserRelatedByQaContactId()
0671: throws TorqueException {
0672: if (aScarabUserRelatedByQaContactId == null
0673: && (!ObjectUtils.equals(this .qaContactId, null))) {
0674: aScarabUserRelatedByQaContactId = ScarabUserManager
0675: .getInstance(SimpleKey.keyFor(this .qaContactId));
0676: }
0677: return aScarabUserRelatedByQaContactId;
0678: }
0679:
0680: /**
0681: * Return the associated ScarabUser object
0682: * If it was not retrieved before, the object is retrieved from
0683: * the database using the passed connection
0684: *
0685: * @param connection the connection used to retrieve the associated object
0686: * from the database, if it was not retrieved before
0687: * @return the associated ScarabUser object
0688: * @throws TorqueException
0689: */
0690: public ScarabUser getScarabUserRelatedByQaContactId(
0691: Connection connection) throws TorqueException {
0692: if (aScarabUserRelatedByQaContactId == null
0693: && (!ObjectUtils.equals(this .qaContactId, null))) {
0694: aScarabUserRelatedByQaContactId = ScarabUserManager
0695: .getCachedInstance(SimpleKey
0696: .keyFor(this .qaContactId));
0697: if (aScarabUserRelatedByQaContactId == null) {
0698: aScarabUserRelatedByQaContactId = ScarabUserImplPeer
0699: .retrieveScarabUserImplByPK(SimpleKey
0700: .keyFor(this .qaContactId), connection);
0701: ScarabUserManager
0702: .putInstance(aScarabUserRelatedByQaContactId);
0703: }
0704: }
0705: return aScarabUserRelatedByQaContactId;
0706: }
0707:
0708: /**
0709: * Provides convenient way to set a relationship based on a
0710: * ObjectKey, for example
0711: * <code>bar.setFooKey(foo.getPrimaryKey())</code>
0712: *
0713: */
0714: public void setScarabUserRelatedByQaContactIdKey(ObjectKey key)
0715: throws TorqueException {
0716:
0717: setQaContactId(new Integer(((NumberKey) key).intValue()));
0718: }
0719:
0720: /**
0721: * Collection to store aggregation of collAttributeGroups
0722: */
0723: protected List collAttributeGroups;
0724:
0725: /**
0726: * Temporary storage of collAttributeGroups to save a possible db hit in
0727: * the event objects are add to the collection, but the
0728: * complete collection is never requested.
0729: */
0730: protected void initAttributeGroups() {
0731: if (collAttributeGroups == null) {
0732: collAttributeGroups = new ArrayList();
0733: }
0734: }
0735:
0736: /**
0737: * Method called to associate a AttributeGroup object to this object
0738: * through the AttributeGroup foreign key attribute
0739: *
0740: * @param l AttributeGroup
0741: * @throws TorqueException
0742: */
0743: public void addAttributeGroup(AttributeGroup l)
0744: throws TorqueException {
0745: getAttributeGroups().add(l);
0746: l.setModule((ScarabModule) this );
0747: }
0748:
0749: /**
0750: * The criteria used to select the current contents of collAttributeGroups
0751: */
0752: private Criteria lastAttributeGroupsCriteria = null;
0753:
0754: /**
0755: * If this collection has already been initialized, returns
0756: * the collection. Otherwise returns the results of
0757: * getAttributeGroups(new Criteria())
0758: *
0759: * @return the collection of associated objects
0760: * @throws TorqueException
0761: */
0762: public List getAttributeGroups() throws TorqueException {
0763: if (collAttributeGroups == null) {
0764: collAttributeGroups = getAttributeGroups(new Criteria(10));
0765: }
0766: return collAttributeGroups;
0767: }
0768:
0769: /**
0770: * If this collection has already been initialized with
0771: * an identical criteria, it returns the collection.
0772: * Otherwise if this ScarabModule has previously
0773: * been saved, it will retrieve related AttributeGroups from storage.
0774: * If this ScarabModule is new, it will return
0775: * an empty collection or the current collection, the criteria
0776: * is ignored on a new object.
0777: *
0778: * @throws TorqueException
0779: */
0780: public List getAttributeGroups(Criteria criteria)
0781: throws TorqueException {
0782: if (collAttributeGroups == null) {
0783: if (isNew()) {
0784: collAttributeGroups = new ArrayList();
0785: } else {
0786: criteria.add(AttributeGroupPeer.MODULE_ID,
0787: getModuleId());
0788: collAttributeGroups = AttributeGroupPeer
0789: .doSelect(criteria);
0790: }
0791: } else {
0792: // criteria has no effect for a new object
0793: if (!isNew()) {
0794: // the following code is to determine if a new query is
0795: // called for. If the criteria is the same as the last
0796: // one, just return the collection.
0797: criteria.add(AttributeGroupPeer.MODULE_ID,
0798: getModuleId());
0799: if (!lastAttributeGroupsCriteria.equals(criteria)) {
0800: collAttributeGroups = AttributeGroupPeer
0801: .doSelect(criteria);
0802: }
0803: }
0804: }
0805: lastAttributeGroupsCriteria = criteria;
0806:
0807: return collAttributeGroups;
0808: }
0809:
0810: /**
0811: * If this collection has already been initialized, returns
0812: * the collection. Otherwise returns the results of
0813: * getAttributeGroups(new Criteria(),Connection)
0814: * This method takes in the Connection also as input so that
0815: * referenced objects can also be obtained using a Connection
0816: * that is taken as input
0817: */
0818: public List getAttributeGroups(Connection con)
0819: throws TorqueException {
0820: if (collAttributeGroups == null) {
0821: collAttributeGroups = getAttributeGroups(new Criteria(10),
0822: con);
0823: }
0824: return collAttributeGroups;
0825: }
0826:
0827: /**
0828: * If this collection has already been initialized with
0829: * an identical criteria, it returns the collection.
0830: * Otherwise if this ScarabModule has previously
0831: * been saved, it will retrieve related AttributeGroups from storage.
0832: * If this ScarabModule is new, it will return
0833: * an empty collection or the current collection, the criteria
0834: * is ignored on a new object.
0835: * This method takes in the Connection also as input so that
0836: * referenced objects can also be obtained using a Connection
0837: * that is taken as input
0838: */
0839: public List getAttributeGroups(Criteria criteria, Connection con)
0840: throws TorqueException {
0841: if (collAttributeGroups == null) {
0842: if (isNew()) {
0843: collAttributeGroups = new ArrayList();
0844: } else {
0845: criteria.add(AttributeGroupPeer.MODULE_ID,
0846: getModuleId());
0847: collAttributeGroups = AttributeGroupPeer.doSelect(
0848: criteria, con);
0849: }
0850: } else {
0851: // criteria has no effect for a new object
0852: if (!isNew()) {
0853: // the following code is to determine if a new query is
0854: // called for. If the criteria is the same as the last
0855: // one, just return the collection.
0856: criteria.add(AttributeGroupPeer.MODULE_ID,
0857: getModuleId());
0858: if (!lastAttributeGroupsCriteria.equals(criteria)) {
0859: collAttributeGroups = AttributeGroupPeer.doSelect(
0860: criteria, con);
0861: }
0862: }
0863: }
0864: lastAttributeGroupsCriteria = criteria;
0865:
0866: return collAttributeGroups;
0867: }
0868:
0869: /**
0870: * If this collection has already been initialized with
0871: * an identical criteria, it returns the collection.
0872: * Otherwise if this ScarabModule is new, it will return
0873: * an empty collection; or if this ScarabModule has previously
0874: * been saved, it will retrieve related AttributeGroups from storage.
0875: *
0876: * This method is protected by default in order to keep the public
0877: * api reasonable. You can provide public methods for those you
0878: * actually need in ScarabModule.
0879: */
0880: protected List getAttributeGroupsJoinScarabModule(Criteria criteria)
0881: throws TorqueException {
0882: if (collAttributeGroups == null) {
0883: if (isNew()) {
0884: collAttributeGroups = new ArrayList();
0885: } else {
0886: criteria.add(AttributeGroupPeer.MODULE_ID,
0887: getModuleId());
0888: collAttributeGroups = AttributeGroupPeer
0889: .doSelectJoinScarabModule(criteria);
0890: }
0891: } else {
0892: // the following code is to determine if a new query is
0893: // called for. If the criteria is the same as the last
0894: // one, just return the collection.
0895: criteria.add(AttributeGroupPeer.MODULE_ID, getModuleId());
0896: if (!lastAttributeGroupsCriteria.equals(criteria)) {
0897: collAttributeGroups = AttributeGroupPeer
0898: .doSelectJoinScarabModule(criteria);
0899: }
0900: }
0901: lastAttributeGroupsCriteria = criteria;
0902:
0903: return collAttributeGroups;
0904: }
0905:
0906: /**
0907: * If this collection has already been initialized with
0908: * an identical criteria, it returns the collection.
0909: * Otherwise if this ScarabModule is new, it will return
0910: * an empty collection; or if this ScarabModule has previously
0911: * been saved, it will retrieve related AttributeGroups from storage.
0912: *
0913: * This method is protected by default in order to keep the public
0914: * api reasonable. You can provide public methods for those you
0915: * actually need in ScarabModule.
0916: */
0917: protected List getAttributeGroupsJoinIssueType(Criteria criteria)
0918: throws TorqueException {
0919: if (collAttributeGroups == null) {
0920: if (isNew()) {
0921: collAttributeGroups = new ArrayList();
0922: } else {
0923: criteria.add(AttributeGroupPeer.MODULE_ID,
0924: getModuleId());
0925: collAttributeGroups = AttributeGroupPeer
0926: .doSelectJoinIssueType(criteria);
0927: }
0928: } else {
0929: // the following code is to determine if a new query is
0930: // called for. If the criteria is the same as the last
0931: // one, just return the collection.
0932: criteria.add(AttributeGroupPeer.MODULE_ID, getModuleId());
0933: if (!lastAttributeGroupsCriteria.equals(criteria)) {
0934: collAttributeGroups = AttributeGroupPeer
0935: .doSelectJoinIssueType(criteria);
0936: }
0937: }
0938: lastAttributeGroupsCriteria = criteria;
0939:
0940: return collAttributeGroups;
0941: }
0942:
0943: /**
0944: * Collection to store aggregation of collIssues
0945: */
0946: protected List collIssues;
0947:
0948: /**
0949: * Temporary storage of collIssues to save a possible db hit in
0950: * the event objects are add to the collection, but the
0951: * complete collection is never requested.
0952: */
0953: protected void initIssues() {
0954: if (collIssues == null) {
0955: collIssues = new ArrayList();
0956: }
0957: }
0958:
0959: /**
0960: * Method called to associate a Issue object to this object
0961: * through the Issue foreign key attribute
0962: *
0963: * @param l Issue
0964: * @throws TorqueException
0965: */
0966: public void addIssue(Issue l) throws TorqueException {
0967: getIssues().add(l);
0968: l.setModule((ScarabModule) this );
0969: }
0970:
0971: /**
0972: * The criteria used to select the current contents of collIssues
0973: */
0974: private Criteria lastIssuesCriteria = null;
0975:
0976: /**
0977: * If this collection has already been initialized, returns
0978: * the collection. Otherwise returns the results of
0979: * getIssues(new Criteria())
0980: *
0981: * @return the collection of associated objects
0982: * @throws TorqueException
0983: */
0984: public List getIssues() throws TorqueException {
0985: if (collIssues == null) {
0986: collIssues = getIssues(new Criteria(10));
0987: }
0988: return collIssues;
0989: }
0990:
0991: /**
0992: * If this collection has already been initialized with
0993: * an identical criteria, it returns the collection.
0994: * Otherwise if this ScarabModule has previously
0995: * been saved, it will retrieve related Issues from storage.
0996: * If this ScarabModule is new, it will return
0997: * an empty collection or the current collection, the criteria
0998: * is ignored on a new object.
0999: *
1000: * @throws TorqueException
1001: */
1002: public List getIssues(Criteria criteria) throws TorqueException {
1003: if (collIssues == null) {
1004: if (isNew()) {
1005: collIssues = new ArrayList();
1006: } else {
1007: criteria.add(IssuePeer.MODULE_ID, getModuleId());
1008: collIssues = IssuePeer.doSelect(criteria);
1009: }
1010: } else {
1011: // criteria has no effect for a new object
1012: if (!isNew()) {
1013: // the following code is to determine if a new query is
1014: // called for. If the criteria is the same as the last
1015: // one, just return the collection.
1016: criteria.add(IssuePeer.MODULE_ID, getModuleId());
1017: if (!lastIssuesCriteria.equals(criteria)) {
1018: collIssues = IssuePeer.doSelect(criteria);
1019: }
1020: }
1021: }
1022: lastIssuesCriteria = criteria;
1023:
1024: return collIssues;
1025: }
1026:
1027: /**
1028: * If this collection has already been initialized, returns
1029: * the collection. Otherwise returns the results of
1030: * getIssues(new Criteria(),Connection)
1031: * This method takes in the Connection also as input so that
1032: * referenced objects can also be obtained using a Connection
1033: * that is taken as input
1034: */
1035: public List getIssues(Connection con) throws TorqueException {
1036: if (collIssues == null) {
1037: collIssues = getIssues(new Criteria(10), con);
1038: }
1039: return collIssues;
1040: }
1041:
1042: /**
1043: * If this collection has already been initialized with
1044: * an identical criteria, it returns the collection.
1045: * Otherwise if this ScarabModule has previously
1046: * been saved, it will retrieve related Issues from storage.
1047: * If this ScarabModule is new, it will return
1048: * an empty collection or the current collection, the criteria
1049: * is ignored on a new object.
1050: * This method takes in the Connection also as input so that
1051: * referenced objects can also be obtained using a Connection
1052: * that is taken as input
1053: */
1054: public List getIssues(Criteria criteria, Connection con)
1055: throws TorqueException {
1056: if (collIssues == null) {
1057: if (isNew()) {
1058: collIssues = new ArrayList();
1059: } else {
1060: criteria.add(IssuePeer.MODULE_ID, getModuleId());
1061: collIssues = IssuePeer.doSelect(criteria, con);
1062: }
1063: } else {
1064: // criteria has no effect for a new object
1065: if (!isNew()) {
1066: // the following code is to determine if a new query is
1067: // called for. If the criteria is the same as the last
1068: // one, just return the collection.
1069: criteria.add(IssuePeer.MODULE_ID, getModuleId());
1070: if (!lastIssuesCriteria.equals(criteria)) {
1071: collIssues = IssuePeer.doSelect(criteria, con);
1072: }
1073: }
1074: }
1075: lastIssuesCriteria = criteria;
1076:
1077: return collIssues;
1078: }
1079:
1080: /**
1081: * If this collection has already been initialized with
1082: * an identical criteria, it returns the collection.
1083: * Otherwise if this ScarabModule is new, it will return
1084: * an empty collection; or if this ScarabModule has previously
1085: * been saved, it will retrieve related Issues from storage.
1086: *
1087: * This method is protected by default in order to keep the public
1088: * api reasonable. You can provide public methods for those you
1089: * actually need in ScarabModule.
1090: */
1091: protected List getIssuesJoinScarabModule(Criteria criteria)
1092: throws TorqueException {
1093: if (collIssues == null) {
1094: if (isNew()) {
1095: collIssues = new ArrayList();
1096: } else {
1097: criteria.add(IssuePeer.MODULE_ID, getModuleId());
1098: collIssues = IssuePeer
1099: .doSelectJoinScarabModule(criteria);
1100: }
1101: } else {
1102: // the following code is to determine if a new query is
1103: // called for. If the criteria is the same as the last
1104: // one, just return the collection.
1105: criteria.add(IssuePeer.MODULE_ID, getModuleId());
1106: if (!lastIssuesCriteria.equals(criteria)) {
1107: collIssues = IssuePeer
1108: .doSelectJoinScarabModule(criteria);
1109: }
1110: }
1111: lastIssuesCriteria = criteria;
1112:
1113: return collIssues;
1114: }
1115:
1116: /**
1117: * If this collection has already been initialized with
1118: * an identical criteria, it returns the collection.
1119: * Otherwise if this ScarabModule is new, it will return
1120: * an empty collection; or if this ScarabModule has previously
1121: * been saved, it will retrieve related Issues from storage.
1122: *
1123: * This method is protected by default in order to keep the public
1124: * api reasonable. You can provide public methods for those you
1125: * actually need in ScarabModule.
1126: */
1127: protected List getIssuesJoinIssueType(Criteria criteria)
1128: throws TorqueException {
1129: if (collIssues == null) {
1130: if (isNew()) {
1131: collIssues = new ArrayList();
1132: } else {
1133: criteria.add(IssuePeer.MODULE_ID, getModuleId());
1134: collIssues = IssuePeer.doSelectJoinIssueType(criteria);
1135: }
1136: } else {
1137: // the following code is to determine if a new query is
1138: // called for. If the criteria is the same as the last
1139: // one, just return the collection.
1140: criteria.add(IssuePeer.MODULE_ID, getModuleId());
1141: if (!lastIssuesCriteria.equals(criteria)) {
1142: collIssues = IssuePeer.doSelectJoinIssueType(criteria);
1143: }
1144: }
1145: lastIssuesCriteria = criteria;
1146:
1147: return collIssues;
1148: }
1149:
1150: /**
1151: * If this collection has already been initialized with
1152: * an identical criteria, it returns the collection.
1153: * Otherwise if this ScarabModule is new, it will return
1154: * an empty collection; or if this ScarabModule has previously
1155: * been saved, it will retrieve related Issues from storage.
1156: *
1157: * This method is protected by default in order to keep the public
1158: * api reasonable. You can provide public methods for those you
1159: * actually need in ScarabModule.
1160: */
1161: protected List getIssuesJoinActivitySetRelatedByCreatedTransId(
1162: Criteria criteria) throws TorqueException {
1163: if (collIssues == null) {
1164: if (isNew()) {
1165: collIssues = new ArrayList();
1166: } else {
1167: criteria.add(IssuePeer.MODULE_ID, getModuleId());
1168: collIssues = IssuePeer
1169: .doSelectJoinActivitySetRelatedByCreatedTransId(criteria);
1170: }
1171: } else {
1172: // the following code is to determine if a new query is
1173: // called for. If the criteria is the same as the last
1174: // one, just return the collection.
1175: criteria.add(IssuePeer.MODULE_ID, getModuleId());
1176: if (!lastIssuesCriteria.equals(criteria)) {
1177: collIssues = IssuePeer
1178: .doSelectJoinActivitySetRelatedByCreatedTransId(criteria);
1179: }
1180: }
1181: lastIssuesCriteria = criteria;
1182:
1183: return collIssues;
1184: }
1185:
1186: /**
1187: * If this collection has already been initialized with
1188: * an identical criteria, it returns the collection.
1189: * Otherwise if this ScarabModule is new, it will return
1190: * an empty collection; or if this ScarabModule has previously
1191: * been saved, it will retrieve related Issues from storage.
1192: *
1193: * This method is protected by default in order to keep the public
1194: * api reasonable. You can provide public methods for those you
1195: * actually need in ScarabModule.
1196: */
1197: protected List getIssuesJoinActivitySetRelatedByLastTransId(
1198: Criteria criteria) throws TorqueException {
1199: if (collIssues == null) {
1200: if (isNew()) {
1201: collIssues = new ArrayList();
1202: } else {
1203: criteria.add(IssuePeer.MODULE_ID, getModuleId());
1204: collIssues = IssuePeer
1205: .doSelectJoinActivitySetRelatedByLastTransId(criteria);
1206: }
1207: } else {
1208: // the following code is to determine if a new query is
1209: // called for. If the criteria is the same as the last
1210: // one, just return the collection.
1211: criteria.add(IssuePeer.MODULE_ID, getModuleId());
1212: if (!lastIssuesCriteria.equals(criteria)) {
1213: collIssues = IssuePeer
1214: .doSelectJoinActivitySetRelatedByLastTransId(criteria);
1215: }
1216: }
1217: lastIssuesCriteria = criteria;
1218:
1219: return collIssues;
1220: }
1221:
1222: /**
1223: * Collection to store aggregation of collRModuleIssueTypes
1224: */
1225: protected List collRModuleIssueTypes;
1226:
1227: /**
1228: * Temporary storage of collRModuleIssueTypes to save a possible db hit in
1229: * the event objects are add to the collection, but the
1230: * complete collection is never requested.
1231: */
1232: protected void initRModuleIssueTypes() {
1233: if (collRModuleIssueTypes == null) {
1234: collRModuleIssueTypes = new ArrayList();
1235: }
1236: }
1237:
1238: /**
1239: * Method called to associate a RModuleIssueType object to this object
1240: * through the RModuleIssueType foreign key attribute
1241: *
1242: * @param l RModuleIssueType
1243: * @throws TorqueException
1244: */
1245: public void addRModuleIssueType(RModuleIssueType l)
1246: throws TorqueException {
1247: getRModuleIssueTypes().add(l);
1248: l.setModule((ScarabModule) this );
1249: }
1250:
1251: /**
1252: * The criteria used to select the current contents of collRModuleIssueTypes
1253: */
1254: private Criteria lastRModuleIssueTypesCriteria = null;
1255:
1256: /**
1257: * If this collection has already been initialized, returns
1258: * the collection. Otherwise returns the results of
1259: * getRModuleIssueTypes(new Criteria())
1260: *
1261: * @return the collection of associated objects
1262: * @throws TorqueException
1263: */
1264: public List getRModuleIssueTypes() throws TorqueException {
1265: if (collRModuleIssueTypes == null) {
1266: collRModuleIssueTypes = getRModuleIssueTypes(new Criteria(
1267: 10));
1268: }
1269: return collRModuleIssueTypes;
1270: }
1271:
1272: /**
1273: * If this collection has already been initialized with
1274: * an identical criteria, it returns the collection.
1275: * Otherwise if this ScarabModule has previously
1276: * been saved, it will retrieve related RModuleIssueTypes from storage.
1277: * If this ScarabModule is new, it will return
1278: * an empty collection or the current collection, the criteria
1279: * is ignored on a new object.
1280: *
1281: * @throws TorqueException
1282: */
1283: public List getRModuleIssueTypes(Criteria criteria)
1284: throws TorqueException {
1285: if (collRModuleIssueTypes == null) {
1286: if (isNew()) {
1287: collRModuleIssueTypes = new ArrayList();
1288: } else {
1289: criteria.add(RModuleIssueTypePeer.MODULE_ID,
1290: getModuleId());
1291: collRModuleIssueTypes = RModuleIssueTypePeer
1292: .doSelect(criteria);
1293: }
1294: } else {
1295: // criteria has no effect for a new object
1296: if (!isNew()) {
1297: // the following code is to determine if a new query is
1298: // called for. If the criteria is the same as the last
1299: // one, just return the collection.
1300: criteria.add(RModuleIssueTypePeer.MODULE_ID,
1301: getModuleId());
1302: if (!lastRModuleIssueTypesCriteria.equals(criteria)) {
1303: collRModuleIssueTypes = RModuleIssueTypePeer
1304: .doSelect(criteria);
1305: }
1306: }
1307: }
1308: lastRModuleIssueTypesCriteria = criteria;
1309:
1310: return collRModuleIssueTypes;
1311: }
1312:
1313: /**
1314: * If this collection has already been initialized, returns
1315: * the collection. Otherwise returns the results of
1316: * getRModuleIssueTypes(new Criteria(),Connection)
1317: * This method takes in the Connection also as input so that
1318: * referenced objects can also be obtained using a Connection
1319: * that is taken as input
1320: */
1321: public List getRModuleIssueTypes(Connection con)
1322: throws TorqueException {
1323: if (collRModuleIssueTypes == null) {
1324: collRModuleIssueTypes = getRModuleIssueTypes(new Criteria(
1325: 10), con);
1326: }
1327: return collRModuleIssueTypes;
1328: }
1329:
1330: /**
1331: * If this collection has already been initialized with
1332: * an identical criteria, it returns the collection.
1333: * Otherwise if this ScarabModule has previously
1334: * been saved, it will retrieve related RModuleIssueTypes from storage.
1335: * If this ScarabModule is new, it will return
1336: * an empty collection or the current collection, the criteria
1337: * is ignored on a new object.
1338: * This method takes in the Connection also as input so that
1339: * referenced objects can also be obtained using a Connection
1340: * that is taken as input
1341: */
1342: public List getRModuleIssueTypes(Criteria criteria, Connection con)
1343: throws TorqueException {
1344: if (collRModuleIssueTypes == null) {
1345: if (isNew()) {
1346: collRModuleIssueTypes = new ArrayList();
1347: } else {
1348: criteria.add(RModuleIssueTypePeer.MODULE_ID,
1349: getModuleId());
1350: collRModuleIssueTypes = RModuleIssueTypePeer.doSelect(
1351: criteria, con);
1352: }
1353: } else {
1354: // criteria has no effect for a new object
1355: if (!isNew()) {
1356: // the following code is to determine if a new query is
1357: // called for. If the criteria is the same as the last
1358: // one, just return the collection.
1359: criteria.add(RModuleIssueTypePeer.MODULE_ID,
1360: getModuleId());
1361: if (!lastRModuleIssueTypesCriteria.equals(criteria)) {
1362: collRModuleIssueTypes = RModuleIssueTypePeer
1363: .doSelect(criteria, con);
1364: }
1365: }
1366: }
1367: lastRModuleIssueTypesCriteria = criteria;
1368:
1369: return collRModuleIssueTypes;
1370: }
1371:
1372: /**
1373: * If this collection has already been initialized with
1374: * an identical criteria, it returns the collection.
1375: * Otherwise if this ScarabModule is new, it will return
1376: * an empty collection; or if this ScarabModule has previously
1377: * been saved, it will retrieve related RModuleIssueTypes from storage.
1378: *
1379: * This method is protected by default in order to keep the public
1380: * api reasonable. You can provide public methods for those you
1381: * actually need in ScarabModule.
1382: */
1383: protected List getRModuleIssueTypesJoinScarabModule(
1384: Criteria criteria) throws TorqueException {
1385: if (collRModuleIssueTypes == null) {
1386: if (isNew()) {
1387: collRModuleIssueTypes = new ArrayList();
1388: } else {
1389: criteria.add(RModuleIssueTypePeer.MODULE_ID,
1390: getModuleId());
1391: collRModuleIssueTypes = RModuleIssueTypePeer
1392: .doSelectJoinScarabModule(criteria);
1393: }
1394: } else {
1395: // the following code is to determine if a new query is
1396: // called for. If the criteria is the same as the last
1397: // one, just return the collection.
1398: criteria.add(RModuleIssueTypePeer.MODULE_ID, getModuleId());
1399: if (!lastRModuleIssueTypesCriteria.equals(criteria)) {
1400: collRModuleIssueTypes = RModuleIssueTypePeer
1401: .doSelectJoinScarabModule(criteria);
1402: }
1403: }
1404: lastRModuleIssueTypesCriteria = criteria;
1405:
1406: return collRModuleIssueTypes;
1407: }
1408:
1409: /**
1410: * If this collection has already been initialized with
1411: * an identical criteria, it returns the collection.
1412: * Otherwise if this ScarabModule is new, it will return
1413: * an empty collection; or if this ScarabModule has previously
1414: * been saved, it will retrieve related RModuleIssueTypes from storage.
1415: *
1416: * This method is protected by default in order to keep the public
1417: * api reasonable. You can provide public methods for those you
1418: * actually need in ScarabModule.
1419: */
1420: protected List getRModuleIssueTypesJoinIssueType(Criteria criteria)
1421: throws TorqueException {
1422: if (collRModuleIssueTypes == null) {
1423: if (isNew()) {
1424: collRModuleIssueTypes = new ArrayList();
1425: } else {
1426: criteria.add(RModuleIssueTypePeer.MODULE_ID,
1427: getModuleId());
1428: collRModuleIssueTypes = RModuleIssueTypePeer
1429: .doSelectJoinIssueType(criteria);
1430: }
1431: } else {
1432: // the following code is to determine if a new query is
1433: // called for. If the criteria is the same as the last
1434: // one, just return the collection.
1435: criteria.add(RModuleIssueTypePeer.MODULE_ID, getModuleId());
1436: if (!lastRModuleIssueTypesCriteria.equals(criteria)) {
1437: collRModuleIssueTypes = RModuleIssueTypePeer
1438: .doSelectJoinIssueType(criteria);
1439: }
1440: }
1441: lastRModuleIssueTypesCriteria = criteria;
1442:
1443: return collRModuleIssueTypes;
1444: }
1445:
1446: /**
1447: * Collection to store aggregation of collMITListItems
1448: */
1449: protected List collMITListItems;
1450:
1451: /**
1452: * Temporary storage of collMITListItems to save a possible db hit in
1453: * the event objects are add to the collection, but the
1454: * complete collection is never requested.
1455: */
1456: protected void initMITListItems() {
1457: if (collMITListItems == null) {
1458: collMITListItems = new ArrayList();
1459: }
1460: }
1461:
1462: /**
1463: * Method called to associate a MITListItem object to this object
1464: * through the MITListItem foreign key attribute
1465: *
1466: * @param l MITListItem
1467: * @throws TorqueException
1468: */
1469: public void addMITListItem(MITListItem l) throws TorqueException {
1470: getMITListItems().add(l);
1471: l.setModule((ScarabModule) this );
1472: }
1473:
1474: /**
1475: * The criteria used to select the current contents of collMITListItems
1476: */
1477: private Criteria lastMITListItemsCriteria = null;
1478:
1479: /**
1480: * If this collection has already been initialized, returns
1481: * the collection. Otherwise returns the results of
1482: * getMITListItems(new Criteria())
1483: *
1484: * @return the collection of associated objects
1485: * @throws TorqueException
1486: */
1487: public List getMITListItems() throws TorqueException {
1488: if (collMITListItems == null) {
1489: collMITListItems = getMITListItems(new Criteria(10));
1490: }
1491: return collMITListItems;
1492: }
1493:
1494: /**
1495: * If this collection has already been initialized with
1496: * an identical criteria, it returns the collection.
1497: * Otherwise if this ScarabModule has previously
1498: * been saved, it will retrieve related MITListItems from storage.
1499: * If this ScarabModule is new, it will return
1500: * an empty collection or the current collection, the criteria
1501: * is ignored on a new object.
1502: *
1503: * @throws TorqueException
1504: */
1505: public List getMITListItems(Criteria criteria)
1506: throws TorqueException {
1507: if (collMITListItems == null) {
1508: if (isNew()) {
1509: collMITListItems = new ArrayList();
1510: } else {
1511: criteria.add(MITListItemPeer.MODULE_ID, getModuleId());
1512: collMITListItems = MITListItemPeer.doSelect(criteria);
1513: }
1514: } else {
1515: // criteria has no effect for a new object
1516: if (!isNew()) {
1517: // the following code is to determine if a new query is
1518: // called for. If the criteria is the same as the last
1519: // one, just return the collection.
1520: criteria.add(MITListItemPeer.MODULE_ID, getModuleId());
1521: if (!lastMITListItemsCriteria.equals(criteria)) {
1522: collMITListItems = MITListItemPeer
1523: .doSelect(criteria);
1524: }
1525: }
1526: }
1527: lastMITListItemsCriteria = criteria;
1528:
1529: return collMITListItems;
1530: }
1531:
1532: /**
1533: * If this collection has already been initialized, returns
1534: * the collection. Otherwise returns the results of
1535: * getMITListItems(new Criteria(),Connection)
1536: * This method takes in the Connection also as input so that
1537: * referenced objects can also be obtained using a Connection
1538: * that is taken as input
1539: */
1540: public List getMITListItems(Connection con) throws TorqueException {
1541: if (collMITListItems == null) {
1542: collMITListItems = getMITListItems(new Criteria(10), con);
1543: }
1544: return collMITListItems;
1545: }
1546:
1547: /**
1548: * If this collection has already been initialized with
1549: * an identical criteria, it returns the collection.
1550: * Otherwise if this ScarabModule has previously
1551: * been saved, it will retrieve related MITListItems from storage.
1552: * If this ScarabModule is new, it will return
1553: * an empty collection or the current collection, the criteria
1554: * is ignored on a new object.
1555: * This method takes in the Connection also as input so that
1556: * referenced objects can also be obtained using a Connection
1557: * that is taken as input
1558: */
1559: public List getMITListItems(Criteria criteria, Connection con)
1560: throws TorqueException {
1561: if (collMITListItems == null) {
1562: if (isNew()) {
1563: collMITListItems = new ArrayList();
1564: } else {
1565: criteria.add(MITListItemPeer.MODULE_ID, getModuleId());
1566: collMITListItems = MITListItemPeer.doSelect(criteria,
1567: con);
1568: }
1569: } else {
1570: // criteria has no effect for a new object
1571: if (!isNew()) {
1572: // the following code is to determine if a new query is
1573: // called for. If the criteria is the same as the last
1574: // one, just return the collection.
1575: criteria.add(MITListItemPeer.MODULE_ID, getModuleId());
1576: if (!lastMITListItemsCriteria.equals(criteria)) {
1577: collMITListItems = MITListItemPeer.doSelect(
1578: criteria, con);
1579: }
1580: }
1581: }
1582: lastMITListItemsCriteria = criteria;
1583:
1584: return collMITListItems;
1585: }
1586:
1587: /**
1588: * If this collection has already been initialized with
1589: * an identical criteria, it returns the collection.
1590: * Otherwise if this ScarabModule is new, it will return
1591: * an empty collection; or if this ScarabModule has previously
1592: * been saved, it will retrieve related MITListItems from storage.
1593: *
1594: * This method is protected by default in order to keep the public
1595: * api reasonable. You can provide public methods for those you
1596: * actually need in ScarabModule.
1597: */
1598: protected List getMITListItemsJoinMITList(Criteria criteria)
1599: throws TorqueException {
1600: if (collMITListItems == null) {
1601: if (isNew()) {
1602: collMITListItems = new ArrayList();
1603: } else {
1604: criteria.add(MITListItemPeer.MODULE_ID, getModuleId());
1605: collMITListItems = MITListItemPeer
1606: .doSelectJoinMITList(criteria);
1607: }
1608: } else {
1609: // the following code is to determine if a new query is
1610: // called for. If the criteria is the same as the last
1611: // one, just return the collection.
1612: criteria.add(MITListItemPeer.MODULE_ID, getModuleId());
1613: if (!lastMITListItemsCriteria.equals(criteria)) {
1614: collMITListItems = MITListItemPeer
1615: .doSelectJoinMITList(criteria);
1616: }
1617: }
1618: lastMITListItemsCriteria = criteria;
1619:
1620: return collMITListItems;
1621: }
1622:
1623: /**
1624: * If this collection has already been initialized with
1625: * an identical criteria, it returns the collection.
1626: * Otherwise if this ScarabModule is new, it will return
1627: * an empty collection; or if this ScarabModule has previously
1628: * been saved, it will retrieve related MITListItems from storage.
1629: *
1630: * This method is protected by default in order to keep the public
1631: * api reasonable. You can provide public methods for those you
1632: * actually need in ScarabModule.
1633: */
1634: protected List getMITListItemsJoinScarabModule(Criteria criteria)
1635: throws TorqueException {
1636: if (collMITListItems == null) {
1637: if (isNew()) {
1638: collMITListItems = new ArrayList();
1639: } else {
1640: criteria.add(MITListItemPeer.MODULE_ID, getModuleId());
1641: collMITListItems = MITListItemPeer
1642: .doSelectJoinScarabModule(criteria);
1643: }
1644: } else {
1645: // the following code is to determine if a new query is
1646: // called for. If the criteria is the same as the last
1647: // one, just return the collection.
1648: criteria.add(MITListItemPeer.MODULE_ID, getModuleId());
1649: if (!lastMITListItemsCriteria.equals(criteria)) {
1650: collMITListItems = MITListItemPeer
1651: .doSelectJoinScarabModule(criteria);
1652: }
1653: }
1654: lastMITListItemsCriteria = criteria;
1655:
1656: return collMITListItems;
1657: }
1658:
1659: /**
1660: * If this collection has already been initialized with
1661: * an identical criteria, it returns the collection.
1662: * Otherwise if this ScarabModule is new, it will return
1663: * an empty collection; or if this ScarabModule has previously
1664: * been saved, it will retrieve related MITListItems from storage.
1665: *
1666: * This method is protected by default in order to keep the public
1667: * api reasonable. You can provide public methods for those you
1668: * actually need in ScarabModule.
1669: */
1670: protected List getMITListItemsJoinIssueType(Criteria criteria)
1671: throws TorqueException {
1672: if (collMITListItems == null) {
1673: if (isNew()) {
1674: collMITListItems = new ArrayList();
1675: } else {
1676: criteria.add(MITListItemPeer.MODULE_ID, getModuleId());
1677: collMITListItems = MITListItemPeer
1678: .doSelectJoinIssueType(criteria);
1679: }
1680: } else {
1681: // the following code is to determine if a new query is
1682: // called for. If the criteria is the same as the last
1683: // one, just return the collection.
1684: criteria.add(MITListItemPeer.MODULE_ID, getModuleId());
1685: if (!lastMITListItemsCriteria.equals(criteria)) {
1686: collMITListItems = MITListItemPeer
1687: .doSelectJoinIssueType(criteria);
1688: }
1689: }
1690: lastMITListItemsCriteria = criteria;
1691:
1692: return collMITListItems;
1693: }
1694:
1695: /**
1696: * Collection to store aggregation of collRModuleAttributes
1697: */
1698: protected List collRModuleAttributes;
1699:
1700: /**
1701: * Temporary storage of collRModuleAttributes to save a possible db hit in
1702: * the event objects are add to the collection, but the
1703: * complete collection is never requested.
1704: */
1705: protected void initRModuleAttributes() {
1706: if (collRModuleAttributes == null) {
1707: collRModuleAttributes = new ArrayList();
1708: }
1709: }
1710:
1711: /**
1712: * Method called to associate a RModuleAttribute object to this object
1713: * through the RModuleAttribute foreign key attribute
1714: *
1715: * @param l RModuleAttribute
1716: * @throws TorqueException
1717: */
1718: public void addRModuleAttribute(RModuleAttribute l)
1719: throws TorqueException {
1720: getRModuleAttributes().add(l);
1721: l.setModule((ScarabModule) this );
1722: }
1723:
1724: /**
1725: * The criteria used to select the current contents of collRModuleAttributes
1726: */
1727: private Criteria lastRModuleAttributesCriteria = null;
1728:
1729: /**
1730: * If this collection has already been initialized, returns
1731: * the collection. Otherwise returns the results of
1732: * getRModuleAttributes(new Criteria())
1733: *
1734: * @return the collection of associated objects
1735: * @throws TorqueException
1736: */
1737: public List getRModuleAttributes() throws TorqueException {
1738: if (collRModuleAttributes == null) {
1739: collRModuleAttributes = getRModuleAttributes(new Criteria(
1740: 10));
1741: }
1742: return collRModuleAttributes;
1743: }
1744:
1745: /**
1746: * If this collection has already been initialized with
1747: * an identical criteria, it returns the collection.
1748: * Otherwise if this ScarabModule has previously
1749: * been saved, it will retrieve related RModuleAttributes from storage.
1750: * If this ScarabModule is new, it will return
1751: * an empty collection or the current collection, the criteria
1752: * is ignored on a new object.
1753: *
1754: * @throws TorqueException
1755: */
1756: public List getRModuleAttributes(Criteria criteria)
1757: throws TorqueException {
1758: if (collRModuleAttributes == null) {
1759: if (isNew()) {
1760: collRModuleAttributes = new ArrayList();
1761: } else {
1762: criteria.add(RModuleAttributePeer.MODULE_ID,
1763: getModuleId());
1764: collRModuleAttributes = RModuleAttributePeer
1765: .doSelect(criteria);
1766: }
1767: } else {
1768: // criteria has no effect for a new object
1769: if (!isNew()) {
1770: // the following code is to determine if a new query is
1771: // called for. If the criteria is the same as the last
1772: // one, just return the collection.
1773: criteria.add(RModuleAttributePeer.MODULE_ID,
1774: getModuleId());
1775: if (!lastRModuleAttributesCriteria.equals(criteria)) {
1776: collRModuleAttributes = RModuleAttributePeer
1777: .doSelect(criteria);
1778: }
1779: }
1780: }
1781: lastRModuleAttributesCriteria = criteria;
1782:
1783: return collRModuleAttributes;
1784: }
1785:
1786: /**
1787: * If this collection has already been initialized, returns
1788: * the collection. Otherwise returns the results of
1789: * getRModuleAttributes(new Criteria(),Connection)
1790: * This method takes in the Connection also as input so that
1791: * referenced objects can also be obtained using a Connection
1792: * that is taken as input
1793: */
1794: public List getRModuleAttributes(Connection con)
1795: throws TorqueException {
1796: if (collRModuleAttributes == null) {
1797: collRModuleAttributes = getRModuleAttributes(new Criteria(
1798: 10), con);
1799: }
1800: return collRModuleAttributes;
1801: }
1802:
1803: /**
1804: * If this collection has already been initialized with
1805: * an identical criteria, it returns the collection.
1806: * Otherwise if this ScarabModule has previously
1807: * been saved, it will retrieve related RModuleAttributes from storage.
1808: * If this ScarabModule is new, it will return
1809: * an empty collection or the current collection, the criteria
1810: * is ignored on a new object.
1811: * This method takes in the Connection also as input so that
1812: * referenced objects can also be obtained using a Connection
1813: * that is taken as input
1814: */
1815: public List getRModuleAttributes(Criteria criteria, Connection con)
1816: throws TorqueException {
1817: if (collRModuleAttributes == null) {
1818: if (isNew()) {
1819: collRModuleAttributes = new ArrayList();
1820: } else {
1821: criteria.add(RModuleAttributePeer.MODULE_ID,
1822: getModuleId());
1823: collRModuleAttributes = RModuleAttributePeer.doSelect(
1824: criteria, con);
1825: }
1826: } else {
1827: // criteria has no effect for a new object
1828: if (!isNew()) {
1829: // the following code is to determine if a new query is
1830: // called for. If the criteria is the same as the last
1831: // one, just return the collection.
1832: criteria.add(RModuleAttributePeer.MODULE_ID,
1833: getModuleId());
1834: if (!lastRModuleAttributesCriteria.equals(criteria)) {
1835: collRModuleAttributes = RModuleAttributePeer
1836: .doSelect(criteria, con);
1837: }
1838: }
1839: }
1840: lastRModuleAttributesCriteria = criteria;
1841:
1842: return collRModuleAttributes;
1843: }
1844:
1845: /**
1846: * If this collection has already been initialized with
1847: * an identical criteria, it returns the collection.
1848: * Otherwise if this ScarabModule is new, it will return
1849: * an empty collection; or if this ScarabModule has previously
1850: * been saved, it will retrieve related RModuleAttributes from storage.
1851: *
1852: * This method is protected by default in order to keep the public
1853: * api reasonable. You can provide public methods for those you
1854: * actually need in ScarabModule.
1855: */
1856: protected List getRModuleAttributesJoinAttribute(Criteria criteria)
1857: throws TorqueException {
1858: if (collRModuleAttributes == null) {
1859: if (isNew()) {
1860: collRModuleAttributes = new ArrayList();
1861: } else {
1862: criteria.add(RModuleAttributePeer.MODULE_ID,
1863: getModuleId());
1864: collRModuleAttributes = RModuleAttributePeer
1865: .doSelectJoinAttribute(criteria);
1866: }
1867: } else {
1868: // the following code is to determine if a new query is
1869: // called for. If the criteria is the same as the last
1870: // one, just return the collection.
1871: criteria.add(RModuleAttributePeer.MODULE_ID, getModuleId());
1872: if (!lastRModuleAttributesCriteria.equals(criteria)) {
1873: collRModuleAttributes = RModuleAttributePeer
1874: .doSelectJoinAttribute(criteria);
1875: }
1876: }
1877: lastRModuleAttributesCriteria = criteria;
1878:
1879: return collRModuleAttributes;
1880: }
1881:
1882: /**
1883: * If this collection has already been initialized with
1884: * an identical criteria, it returns the collection.
1885: * Otherwise if this ScarabModule is new, it will return
1886: * an empty collection; or if this ScarabModule has previously
1887: * been saved, it will retrieve related RModuleAttributes from storage.
1888: *
1889: * This method is protected by default in order to keep the public
1890: * api reasonable. You can provide public methods for those you
1891: * actually need in ScarabModule.
1892: */
1893: protected List getRModuleAttributesJoinScarabModule(
1894: Criteria criteria) throws TorqueException {
1895: if (collRModuleAttributes == null) {
1896: if (isNew()) {
1897: collRModuleAttributes = new ArrayList();
1898: } else {
1899: criteria.add(RModuleAttributePeer.MODULE_ID,
1900: getModuleId());
1901: collRModuleAttributes = RModuleAttributePeer
1902: .doSelectJoinScarabModule(criteria);
1903: }
1904: } else {
1905: // the following code is to determine if a new query is
1906: // called for. If the criteria is the same as the last
1907: // one, just return the collection.
1908: criteria.add(RModuleAttributePeer.MODULE_ID, getModuleId());
1909: if (!lastRModuleAttributesCriteria.equals(criteria)) {
1910: collRModuleAttributes = RModuleAttributePeer
1911: .doSelectJoinScarabModule(criteria);
1912: }
1913: }
1914: lastRModuleAttributesCriteria = criteria;
1915:
1916: return collRModuleAttributes;
1917: }
1918:
1919: /**
1920: * If this collection has already been initialized with
1921: * an identical criteria, it returns the collection.
1922: * Otherwise if this ScarabModule is new, it will return
1923: * an empty collection; or if this ScarabModule has previously
1924: * been saved, it will retrieve related RModuleAttributes from storage.
1925: *
1926: * This method is protected by default in order to keep the public
1927: * api reasonable. You can provide public methods for those you
1928: * actually need in ScarabModule.
1929: */
1930: protected List getRModuleAttributesJoinIssueType(Criteria criteria)
1931: throws TorqueException {
1932: if (collRModuleAttributes == null) {
1933: if (isNew()) {
1934: collRModuleAttributes = new ArrayList();
1935: } else {
1936: criteria.add(RModuleAttributePeer.MODULE_ID,
1937: getModuleId());
1938: collRModuleAttributes = RModuleAttributePeer
1939: .doSelectJoinIssueType(criteria);
1940: }
1941: } else {
1942: // the following code is to determine if a new query is
1943: // called for. If the criteria is the same as the last
1944: // one, just return the collection.
1945: criteria.add(RModuleAttributePeer.MODULE_ID, getModuleId());
1946: if (!lastRModuleAttributesCriteria.equals(criteria)) {
1947: collRModuleAttributes = RModuleAttributePeer
1948: .doSelectJoinIssueType(criteria);
1949: }
1950: }
1951: lastRModuleAttributesCriteria = criteria;
1952:
1953: return collRModuleAttributes;
1954: }
1955:
1956: /**
1957: * Collection to store aggregation of collRModuleOptions
1958: */
1959: protected List collRModuleOptions;
1960:
1961: /**
1962: * Temporary storage of collRModuleOptions to save a possible db hit in
1963: * the event objects are add to the collection, but the
1964: * complete collection is never requested.
1965: */
1966: protected void initRModuleOptions() {
1967: if (collRModuleOptions == null) {
1968: collRModuleOptions = new ArrayList();
1969: }
1970: }
1971:
1972: /**
1973: * Method called to associate a RModuleOption object to this object
1974: * through the RModuleOption foreign key attribute
1975: *
1976: * @param l RModuleOption
1977: * @throws TorqueException
1978: */
1979: public void addRModuleOption(RModuleOption l)
1980: throws TorqueException {
1981: getRModuleOptions().add(l);
1982: l.setModule((ScarabModule) this );
1983: }
1984:
1985: /**
1986: * The criteria used to select the current contents of collRModuleOptions
1987: */
1988: private Criteria lastRModuleOptionsCriteria = null;
1989:
1990: /**
1991: * If this collection has already been initialized, returns
1992: * the collection. Otherwise returns the results of
1993: * getRModuleOptions(new Criteria())
1994: *
1995: * @return the collection of associated objects
1996: * @throws TorqueException
1997: */
1998: public List getRModuleOptions() throws TorqueException {
1999: if (collRModuleOptions == null) {
2000: collRModuleOptions = getRModuleOptions(new Criteria(10));
2001: }
2002: return collRModuleOptions;
2003: }
2004:
2005: /**
2006: * If this collection has already been initialized with
2007: * an identical criteria, it returns the collection.
2008: * Otherwise if this ScarabModule has previously
2009: * been saved, it will retrieve related RModuleOptions from storage.
2010: * If this ScarabModule is new, it will return
2011: * an empty collection or the current collection, the criteria
2012: * is ignored on a new object.
2013: *
2014: * @throws TorqueException
2015: */
2016: public List getRModuleOptions(Criteria criteria)
2017: throws TorqueException {
2018: if (collRModuleOptions == null) {
2019: if (isNew()) {
2020: collRModuleOptions = new ArrayList();
2021: } else {
2022: criteria
2023: .add(RModuleOptionPeer.MODULE_ID, getModuleId());
2024: collRModuleOptions = RModuleOptionPeer
2025: .doSelect(criteria);
2026: }
2027: } else {
2028: // criteria has no effect for a new object
2029: if (!isNew()) {
2030: // the following code is to determine if a new query is
2031: // called for. If the criteria is the same as the last
2032: // one, just return the collection.
2033: criteria
2034: .add(RModuleOptionPeer.MODULE_ID, getModuleId());
2035: if (!lastRModuleOptionsCriteria.equals(criteria)) {
2036: collRModuleOptions = RModuleOptionPeer
2037: .doSelect(criteria);
2038: }
2039: }
2040: }
2041: lastRModuleOptionsCriteria = criteria;
2042:
2043: return collRModuleOptions;
2044: }
2045:
2046: /**
2047: * If this collection has already been initialized, returns
2048: * the collection. Otherwise returns the results of
2049: * getRModuleOptions(new Criteria(),Connection)
2050: * This method takes in the Connection also as input so that
2051: * referenced objects can also be obtained using a Connection
2052: * that is taken as input
2053: */
2054: public List getRModuleOptions(Connection con)
2055: throws TorqueException {
2056: if (collRModuleOptions == null) {
2057: collRModuleOptions = getRModuleOptions(new Criteria(10),
2058: con);
2059: }
2060: return collRModuleOptions;
2061: }
2062:
2063: /**
2064: * If this collection has already been initialized with
2065: * an identical criteria, it returns the collection.
2066: * Otherwise if this ScarabModule has previously
2067: * been saved, it will retrieve related RModuleOptions from storage.
2068: * If this ScarabModule is new, it will return
2069: * an empty collection or the current collection, the criteria
2070: * is ignored on a new object.
2071: * This method takes in the Connection also as input so that
2072: * referenced objects can also be obtained using a Connection
2073: * that is taken as input
2074: */
2075: public List getRModuleOptions(Criteria criteria, Connection con)
2076: throws TorqueException {
2077: if (collRModuleOptions == null) {
2078: if (isNew()) {
2079: collRModuleOptions = new ArrayList();
2080: } else {
2081: criteria
2082: .add(RModuleOptionPeer.MODULE_ID, getModuleId());
2083: collRModuleOptions = RModuleOptionPeer.doSelect(
2084: criteria, con);
2085: }
2086: } else {
2087: // criteria has no effect for a new object
2088: if (!isNew()) {
2089: // the following code is to determine if a new query is
2090: // called for. If the criteria is the same as the last
2091: // one, just return the collection.
2092: criteria
2093: .add(RModuleOptionPeer.MODULE_ID, getModuleId());
2094: if (!lastRModuleOptionsCriteria.equals(criteria)) {
2095: collRModuleOptions = RModuleOptionPeer.doSelect(
2096: criteria, con);
2097: }
2098: }
2099: }
2100: lastRModuleOptionsCriteria = criteria;
2101:
2102: return collRModuleOptions;
2103: }
2104:
2105: /**
2106: * If this collection has already been initialized with
2107: * an identical criteria, it returns the collection.
2108: * Otherwise if this ScarabModule is new, it will return
2109: * an empty collection; or if this ScarabModule has previously
2110: * been saved, it will retrieve related RModuleOptions from storage.
2111: *
2112: * This method is protected by default in order to keep the public
2113: * api reasonable. You can provide public methods for those you
2114: * actually need in ScarabModule.
2115: */
2116: protected List getRModuleOptionsJoinAttributeOption(
2117: Criteria criteria) throws TorqueException {
2118: if (collRModuleOptions == null) {
2119: if (isNew()) {
2120: collRModuleOptions = new ArrayList();
2121: } else {
2122: criteria
2123: .add(RModuleOptionPeer.MODULE_ID, getModuleId());
2124: collRModuleOptions = RModuleOptionPeer
2125: .doSelectJoinAttributeOption(criteria);
2126: }
2127: } else {
2128: // the following code is to determine if a new query is
2129: // called for. If the criteria is the same as the last
2130: // one, just return the collection.
2131: criteria.add(RModuleOptionPeer.MODULE_ID, getModuleId());
2132: if (!lastRModuleOptionsCriteria.equals(criteria)) {
2133: collRModuleOptions = RModuleOptionPeer
2134: .doSelectJoinAttributeOption(criteria);
2135: }
2136: }
2137: lastRModuleOptionsCriteria = criteria;
2138:
2139: return collRModuleOptions;
2140: }
2141:
2142: /**
2143: * If this collection has already been initialized with
2144: * an identical criteria, it returns the collection.
2145: * Otherwise if this ScarabModule is new, it will return
2146: * an empty collection; or if this ScarabModule has previously
2147: * been saved, it will retrieve related RModuleOptions from storage.
2148: *
2149: * This method is protected by default in order to keep the public
2150: * api reasonable. You can provide public methods for those you
2151: * actually need in ScarabModule.
2152: */
2153: protected List getRModuleOptionsJoinScarabModule(Criteria criteria)
2154: throws TorqueException {
2155: if (collRModuleOptions == null) {
2156: if (isNew()) {
2157: collRModuleOptions = new ArrayList();
2158: } else {
2159: criteria
2160: .add(RModuleOptionPeer.MODULE_ID, getModuleId());
2161: collRModuleOptions = RModuleOptionPeer
2162: .doSelectJoinScarabModule(criteria);
2163: }
2164: } else {
2165: // the following code is to determine if a new query is
2166: // called for. If the criteria is the same as the last
2167: // one, just return the collection.
2168: criteria.add(RModuleOptionPeer.MODULE_ID, getModuleId());
2169: if (!lastRModuleOptionsCriteria.equals(criteria)) {
2170: collRModuleOptions = RModuleOptionPeer
2171: .doSelectJoinScarabModule(criteria);
2172: }
2173: }
2174: lastRModuleOptionsCriteria = criteria;
2175:
2176: return collRModuleOptions;
2177: }
2178:
2179: /**
2180: * If this collection has already been initialized with
2181: * an identical criteria, it returns the collection.
2182: * Otherwise if this ScarabModule is new, it will return
2183: * an empty collection; or if this ScarabModule has previously
2184: * been saved, it will retrieve related RModuleOptions from storage.
2185: *
2186: * This method is protected by default in order to keep the public
2187: * api reasonable. You can provide public methods for those you
2188: * actually need in ScarabModule.
2189: */
2190: protected List getRModuleOptionsJoinIssueType(Criteria criteria)
2191: throws TorqueException {
2192: if (collRModuleOptions == null) {
2193: if (isNew()) {
2194: collRModuleOptions = new ArrayList();
2195: } else {
2196: criteria
2197: .add(RModuleOptionPeer.MODULE_ID, getModuleId());
2198: collRModuleOptions = RModuleOptionPeer
2199: .doSelectJoinIssueType(criteria);
2200: }
2201: } else {
2202: // the following code is to determine if a new query is
2203: // called for. If the criteria is the same as the last
2204: // one, just return the collection.
2205: criteria.add(RModuleOptionPeer.MODULE_ID, getModuleId());
2206: if (!lastRModuleOptionsCriteria.equals(criteria)) {
2207: collRModuleOptions = RModuleOptionPeer
2208: .doSelectJoinIssueType(criteria);
2209: }
2210: }
2211: lastRModuleOptionsCriteria = criteria;
2212:
2213: return collRModuleOptions;
2214: }
2215:
2216: /**
2217: * Collection to store aggregation of collRModuleUserAttributes
2218: */
2219: protected List collRModuleUserAttributes;
2220:
2221: /**
2222: * Temporary storage of collRModuleUserAttributes to save a possible db hit in
2223: * the event objects are add to the collection, but the
2224: * complete collection is never requested.
2225: */
2226: protected void initRModuleUserAttributes() {
2227: if (collRModuleUserAttributes == null) {
2228: collRModuleUserAttributes = new ArrayList();
2229: }
2230: }
2231:
2232: /**
2233: * Method called to associate a RModuleUserAttribute object to this object
2234: * through the RModuleUserAttribute foreign key attribute
2235: *
2236: * @param l RModuleUserAttribute
2237: * @throws TorqueException
2238: */
2239: public void addRModuleUserAttribute(RModuleUserAttribute l)
2240: throws TorqueException {
2241: getRModuleUserAttributes().add(l);
2242: l.setModule((ScarabModule) this );
2243: }
2244:
2245: /**
2246: * The criteria used to select the current contents of collRModuleUserAttributes
2247: */
2248: private Criteria lastRModuleUserAttributesCriteria = null;
2249:
2250: /**
2251: * If this collection has already been initialized, returns
2252: * the collection. Otherwise returns the results of
2253: * getRModuleUserAttributes(new Criteria())
2254: *
2255: * @return the collection of associated objects
2256: * @throws TorqueException
2257: */
2258: public List getRModuleUserAttributes() throws TorqueException {
2259: if (collRModuleUserAttributes == null) {
2260: collRModuleUserAttributes = getRModuleUserAttributes(new Criteria(
2261: 10));
2262: }
2263: return collRModuleUserAttributes;
2264: }
2265:
2266: /**
2267: * If this collection has already been initialized with
2268: * an identical criteria, it returns the collection.
2269: * Otherwise if this ScarabModule has previously
2270: * been saved, it will retrieve related RModuleUserAttributes from storage.
2271: * If this ScarabModule is new, it will return
2272: * an empty collection or the current collection, the criteria
2273: * is ignored on a new object.
2274: *
2275: * @throws TorqueException
2276: */
2277: public List getRModuleUserAttributes(Criteria criteria)
2278: throws TorqueException {
2279: if (collRModuleUserAttributes == null) {
2280: if (isNew()) {
2281: collRModuleUserAttributes = new ArrayList();
2282: } else {
2283: criteria.add(RModuleUserAttributePeer.MODULE_ID,
2284: getModuleId());
2285: collRModuleUserAttributes = RModuleUserAttributePeer
2286: .doSelect(criteria);
2287: }
2288: } else {
2289: // criteria has no effect for a new object
2290: if (!isNew()) {
2291: // the following code is to determine if a new query is
2292: // called for. If the criteria is the same as the last
2293: // one, just return the collection.
2294: criteria.add(RModuleUserAttributePeer.MODULE_ID,
2295: getModuleId());
2296: if (!lastRModuleUserAttributesCriteria.equals(criteria)) {
2297: collRModuleUserAttributes = RModuleUserAttributePeer
2298: .doSelect(criteria);
2299: }
2300: }
2301: }
2302: lastRModuleUserAttributesCriteria = criteria;
2303:
2304: return collRModuleUserAttributes;
2305: }
2306:
2307: /**
2308: * If this collection has already been initialized, returns
2309: * the collection. Otherwise returns the results of
2310: * getRModuleUserAttributes(new Criteria(),Connection)
2311: * This method takes in the Connection also as input so that
2312: * referenced objects can also be obtained using a Connection
2313: * that is taken as input
2314: */
2315: public List getRModuleUserAttributes(Connection con)
2316: throws TorqueException {
2317: if (collRModuleUserAttributes == null) {
2318: collRModuleUserAttributes = getRModuleUserAttributes(
2319: new Criteria(10), con);
2320: }
2321: return collRModuleUserAttributes;
2322: }
2323:
2324: /**
2325: * If this collection has already been initialized with
2326: * an identical criteria, it returns the collection.
2327: * Otherwise if this ScarabModule has previously
2328: * been saved, it will retrieve related RModuleUserAttributes from storage.
2329: * If this ScarabModule is new, it will return
2330: * an empty collection or the current collection, the criteria
2331: * is ignored on a new object.
2332: * This method takes in the Connection also as input so that
2333: * referenced objects can also be obtained using a Connection
2334: * that is taken as input
2335: */
2336: public List getRModuleUserAttributes(Criteria criteria,
2337: Connection con) throws TorqueException {
2338: if (collRModuleUserAttributes == null) {
2339: if (isNew()) {
2340: collRModuleUserAttributes = new ArrayList();
2341: } else {
2342: criteria.add(RModuleUserAttributePeer.MODULE_ID,
2343: getModuleId());
2344: collRModuleUserAttributes = RModuleUserAttributePeer
2345: .doSelect(criteria, con);
2346: }
2347: } else {
2348: // criteria has no effect for a new object
2349: if (!isNew()) {
2350: // the following code is to determine if a new query is
2351: // called for. If the criteria is the same as the last
2352: // one, just return the collection.
2353: criteria.add(RModuleUserAttributePeer.MODULE_ID,
2354: getModuleId());
2355: if (!lastRModuleUserAttributesCriteria.equals(criteria)) {
2356: collRModuleUserAttributes = RModuleUserAttributePeer
2357: .doSelect(criteria, con);
2358: }
2359: }
2360: }
2361: lastRModuleUserAttributesCriteria = criteria;
2362:
2363: return collRModuleUserAttributes;
2364: }
2365:
2366: /**
2367: * If this collection has already been initialized with
2368: * an identical criteria, it returns the collection.
2369: * Otherwise if this ScarabModule is new, it will return
2370: * an empty collection; or if this ScarabModule has previously
2371: * been saved, it will retrieve related RModuleUserAttributes from storage.
2372: *
2373: * This method is protected by default in order to keep the public
2374: * api reasonable. You can provide public methods for those you
2375: * actually need in ScarabModule.
2376: */
2377: protected List getRModuleUserAttributesJoinMITList(Criteria criteria)
2378: throws TorqueException {
2379: if (collRModuleUserAttributes == null) {
2380: if (isNew()) {
2381: collRModuleUserAttributes = new ArrayList();
2382: } else {
2383: criteria.add(RModuleUserAttributePeer.MODULE_ID,
2384: getModuleId());
2385: collRModuleUserAttributes = RModuleUserAttributePeer
2386: .doSelectJoinMITList(criteria);
2387: }
2388: } else {
2389: // the following code is to determine if a new query is
2390: // called for. If the criteria is the same as the last
2391: // one, just return the collection.
2392: criteria.add(RModuleUserAttributePeer.MODULE_ID,
2393: getModuleId());
2394: if (!lastRModuleUserAttributesCriteria.equals(criteria)) {
2395: collRModuleUserAttributes = RModuleUserAttributePeer
2396: .doSelectJoinMITList(criteria);
2397: }
2398: }
2399: lastRModuleUserAttributesCriteria = criteria;
2400:
2401: return collRModuleUserAttributes;
2402: }
2403:
2404: /**
2405: * If this collection has already been initialized with
2406: * an identical criteria, it returns the collection.
2407: * Otherwise if this ScarabModule is new, it will return
2408: * an empty collection; or if this ScarabModule has previously
2409: * been saved, it will retrieve related RModuleUserAttributes from storage.
2410: *
2411: * This method is protected by default in order to keep the public
2412: * api reasonable. You can provide public methods for those you
2413: * actually need in ScarabModule.
2414: */
2415: protected List getRModuleUserAttributesJoinScarabModule(
2416: Criteria criteria) throws TorqueException {
2417: if (collRModuleUserAttributes == null) {
2418: if (isNew()) {
2419: collRModuleUserAttributes = new ArrayList();
2420: } else {
2421: criteria.add(RModuleUserAttributePeer.MODULE_ID,
2422: getModuleId());
2423: collRModuleUserAttributes = RModuleUserAttributePeer
2424: .doSelectJoinScarabModule(criteria);
2425: }
2426: } else {
2427: // the following code is to determine if a new query is
2428: // called for. If the criteria is the same as the last
2429: // one, just return the collection.
2430: criteria.add(RModuleUserAttributePeer.MODULE_ID,
2431: getModuleId());
2432: if (!lastRModuleUserAttributesCriteria.equals(criteria)) {
2433: collRModuleUserAttributes = RModuleUserAttributePeer
2434: .doSelectJoinScarabModule(criteria);
2435: }
2436: }
2437: lastRModuleUserAttributesCriteria = criteria;
2438:
2439: return collRModuleUserAttributes;
2440: }
2441:
2442: /**
2443: * If this collection has already been initialized with
2444: * an identical criteria, it returns the collection.
2445: * Otherwise if this ScarabModule is new, it will return
2446: * an empty collection; or if this ScarabModule has previously
2447: * been saved, it will retrieve related RModuleUserAttributes from storage.
2448: *
2449: * This method is protected by default in order to keep the public
2450: * api reasonable. You can provide public methods for those you
2451: * actually need in ScarabModule.
2452: */
2453: protected List getRModuleUserAttributesJoinScarabUserImpl(
2454: Criteria criteria) throws TorqueException {
2455: if (collRModuleUserAttributes == null) {
2456: if (isNew()) {
2457: collRModuleUserAttributes = new ArrayList();
2458: } else {
2459: criteria.add(RModuleUserAttributePeer.MODULE_ID,
2460: getModuleId());
2461: collRModuleUserAttributes = RModuleUserAttributePeer
2462: .doSelectJoinScarabUserImpl(criteria);
2463: }
2464: } else {
2465: // the following code is to determine if a new query is
2466: // called for. If the criteria is the same as the last
2467: // one, just return the collection.
2468: criteria.add(RModuleUserAttributePeer.MODULE_ID,
2469: getModuleId());
2470: if (!lastRModuleUserAttributesCriteria.equals(criteria)) {
2471: collRModuleUserAttributes = RModuleUserAttributePeer
2472: .doSelectJoinScarabUserImpl(criteria);
2473: }
2474: }
2475: lastRModuleUserAttributesCriteria = criteria;
2476:
2477: return collRModuleUserAttributes;
2478: }
2479:
2480: /**
2481: * If this collection has already been initialized with
2482: * an identical criteria, it returns the collection.
2483: * Otherwise if this ScarabModule is new, it will return
2484: * an empty collection; or if this ScarabModule has previously
2485: * been saved, it will retrieve related RModuleUserAttributes from storage.
2486: *
2487: * This method is protected by default in order to keep the public
2488: * api reasonable. You can provide public methods for those you
2489: * actually need in ScarabModule.
2490: */
2491: protected List getRModuleUserAttributesJoinIssueType(
2492: Criteria criteria) throws TorqueException {
2493: if (collRModuleUserAttributes == null) {
2494: if (isNew()) {
2495: collRModuleUserAttributes = new ArrayList();
2496: } else {
2497: criteria.add(RModuleUserAttributePeer.MODULE_ID,
2498: getModuleId());
2499: collRModuleUserAttributes = RModuleUserAttributePeer
2500: .doSelectJoinIssueType(criteria);
2501: }
2502: } else {
2503: // the following code is to determine if a new query is
2504: // called for. If the criteria is the same as the last
2505: // one, just return the collection.
2506: criteria.add(RModuleUserAttributePeer.MODULE_ID,
2507: getModuleId());
2508: if (!lastRModuleUserAttributesCriteria.equals(criteria)) {
2509: collRModuleUserAttributes = RModuleUserAttributePeer
2510: .doSelectJoinIssueType(criteria);
2511: }
2512: }
2513: lastRModuleUserAttributesCriteria = criteria;
2514:
2515: return collRModuleUserAttributes;
2516: }
2517:
2518: /**
2519: * If this collection has already been initialized with
2520: * an identical criteria, it returns the collection.
2521: * Otherwise if this ScarabModule is new, it will return
2522: * an empty collection; or if this ScarabModule has previously
2523: * been saved, it will retrieve related RModuleUserAttributes from storage.
2524: *
2525: * This method is protected by default in order to keep the public
2526: * api reasonable. You can provide public methods for those you
2527: * actually need in ScarabModule.
2528: */
2529: protected List getRModuleUserAttributesJoinAttribute(
2530: Criteria criteria) throws TorqueException {
2531: if (collRModuleUserAttributes == null) {
2532: if (isNew()) {
2533: collRModuleUserAttributes = new ArrayList();
2534: } else {
2535: criteria.add(RModuleUserAttributePeer.MODULE_ID,
2536: getModuleId());
2537: collRModuleUserAttributes = RModuleUserAttributePeer
2538: .doSelectJoinAttribute(criteria);
2539: }
2540: } else {
2541: // the following code is to determine if a new query is
2542: // called for. If the criteria is the same as the last
2543: // one, just return the collection.
2544: criteria.add(RModuleUserAttributePeer.MODULE_ID,
2545: getModuleId());
2546: if (!lastRModuleUserAttributesCriteria.equals(criteria)) {
2547: collRModuleUserAttributes = RModuleUserAttributePeer
2548: .doSelectJoinAttribute(criteria);
2549: }
2550: }
2551: lastRModuleUserAttributesCriteria = criteria;
2552:
2553: return collRModuleUserAttributes;
2554: }
2555:
2556: /**
2557: * Collection to store aggregation of collUserVotes
2558: */
2559: protected List collUserVotes;
2560:
2561: /**
2562: * Temporary storage of collUserVotes to save a possible db hit in
2563: * the event objects are add to the collection, but the
2564: * complete collection is never requested.
2565: */
2566: protected void initUserVotes() {
2567: if (collUserVotes == null) {
2568: collUserVotes = new ArrayList();
2569: }
2570: }
2571:
2572: /**
2573: * Method called to associate a UserVote object to this object
2574: * through the UserVote foreign key attribute
2575: *
2576: * @param l UserVote
2577: * @throws TorqueException
2578: */
2579: public void addUserVote(UserVote l) throws TorqueException {
2580: getUserVotes().add(l);
2581: l.setModule((ScarabModule) this );
2582: }
2583:
2584: /**
2585: * The criteria used to select the current contents of collUserVotes
2586: */
2587: private Criteria lastUserVotesCriteria = null;
2588:
2589: /**
2590: * If this collection has already been initialized, returns
2591: * the collection. Otherwise returns the results of
2592: * getUserVotes(new Criteria())
2593: *
2594: * @return the collection of associated objects
2595: * @throws TorqueException
2596: */
2597: public List getUserVotes() throws TorqueException {
2598: if (collUserVotes == null) {
2599: collUserVotes = getUserVotes(new Criteria(10));
2600: }
2601: return collUserVotes;
2602: }
2603:
2604: /**
2605: * If this collection has already been initialized with
2606: * an identical criteria, it returns the collection.
2607: * Otherwise if this ScarabModule has previously
2608: * been saved, it will retrieve related UserVotes from storage.
2609: * If this ScarabModule is new, it will return
2610: * an empty collection or the current collection, the criteria
2611: * is ignored on a new object.
2612: *
2613: * @throws TorqueException
2614: */
2615: public List getUserVotes(Criteria criteria) throws TorqueException {
2616: if (collUserVotes == null) {
2617: if (isNew()) {
2618: collUserVotes = new ArrayList();
2619: } else {
2620: criteria.add(UserVotePeer.MODULE_ID, getModuleId());
2621: collUserVotes = UserVotePeer.doSelect(criteria);
2622: }
2623: } else {
2624: // criteria has no effect for a new object
2625: if (!isNew()) {
2626: // the following code is to determine if a new query is
2627: // called for. If the criteria is the same as the last
2628: // one, just return the collection.
2629: criteria.add(UserVotePeer.MODULE_ID, getModuleId());
2630: if (!lastUserVotesCriteria.equals(criteria)) {
2631: collUserVotes = UserVotePeer.doSelect(criteria);
2632: }
2633: }
2634: }
2635: lastUserVotesCriteria = criteria;
2636:
2637: return collUserVotes;
2638: }
2639:
2640: /**
2641: * If this collection has already been initialized, returns
2642: * the collection. Otherwise returns the results of
2643: * getUserVotes(new Criteria(),Connection)
2644: * This method takes in the Connection also as input so that
2645: * referenced objects can also be obtained using a Connection
2646: * that is taken as input
2647: */
2648: public List getUserVotes(Connection con) throws TorqueException {
2649: if (collUserVotes == null) {
2650: collUserVotes = getUserVotes(new Criteria(10), con);
2651: }
2652: return collUserVotes;
2653: }
2654:
2655: /**
2656: * If this collection has already been initialized with
2657: * an identical criteria, it returns the collection.
2658: * Otherwise if this ScarabModule has previously
2659: * been saved, it will retrieve related UserVotes from storage.
2660: * If this ScarabModule is new, it will return
2661: * an empty collection or the current collection, the criteria
2662: * is ignored on a new object.
2663: * This method takes in the Connection also as input so that
2664: * referenced objects can also be obtained using a Connection
2665: * that is taken as input
2666: */
2667: public List getUserVotes(Criteria criteria, Connection con)
2668: throws TorqueException {
2669: if (collUserVotes == null) {
2670: if (isNew()) {
2671: collUserVotes = new ArrayList();
2672: } else {
2673: criteria.add(UserVotePeer.MODULE_ID, getModuleId());
2674: collUserVotes = UserVotePeer.doSelect(criteria, con);
2675: }
2676: } else {
2677: // criteria has no effect for a new object
2678: if (!isNew()) {
2679: // the following code is to determine if a new query is
2680: // called for. If the criteria is the same as the last
2681: // one, just return the collection.
2682: criteria.add(UserVotePeer.MODULE_ID, getModuleId());
2683: if (!lastUserVotesCriteria.equals(criteria)) {
2684: collUserVotes = UserVotePeer
2685: .doSelect(criteria, con);
2686: }
2687: }
2688: }
2689: lastUserVotesCriteria = criteria;
2690:
2691: return collUserVotes;
2692: }
2693:
2694: /**
2695: * If this collection has already been initialized with
2696: * an identical criteria, it returns the collection.
2697: * Otherwise if this ScarabModule is new, it will return
2698: * an empty collection; or if this ScarabModule has previously
2699: * been saved, it will retrieve related UserVotes from storage.
2700: *
2701: * This method is protected by default in order to keep the public
2702: * api reasonable. You can provide public methods for those you
2703: * actually need in ScarabModule.
2704: */
2705: protected List getUserVotesJoinScarabModule(Criteria criteria)
2706: throws TorqueException {
2707: if (collUserVotes == null) {
2708: if (isNew()) {
2709: collUserVotes = new ArrayList();
2710: } else {
2711: criteria.add(UserVotePeer.MODULE_ID, getModuleId());
2712: collUserVotes = UserVotePeer
2713: .doSelectJoinScarabModule(criteria);
2714: }
2715: } else {
2716: // the following code is to determine if a new query is
2717: // called for. If the criteria is the same as the last
2718: // one, just return the collection.
2719: criteria.add(UserVotePeer.MODULE_ID, getModuleId());
2720: if (!lastUserVotesCriteria.equals(criteria)) {
2721: collUserVotes = UserVotePeer
2722: .doSelectJoinScarabModule(criteria);
2723: }
2724: }
2725: lastUserVotesCriteria = criteria;
2726:
2727: return collUserVotes;
2728: }
2729:
2730: /**
2731: * If this collection has already been initialized with
2732: * an identical criteria, it returns the collection.
2733: * Otherwise if this ScarabModule is new, it will return
2734: * an empty collection; or if this ScarabModule has previously
2735: * been saved, it will retrieve related UserVotes from storage.
2736: *
2737: * This method is protected by default in order to keep the public
2738: * api reasonable. You can provide public methods for those you
2739: * actually need in ScarabModule.
2740: */
2741: protected List getUserVotesJoinScarabUserImpl(Criteria criteria)
2742: throws TorqueException {
2743: if (collUserVotes == null) {
2744: if (isNew()) {
2745: collUserVotes = new ArrayList();
2746: } else {
2747: criteria.add(UserVotePeer.MODULE_ID, getModuleId());
2748: collUserVotes = UserVotePeer
2749: .doSelectJoinScarabUserImpl(criteria);
2750: }
2751: } else {
2752: // the following code is to determine if a new query is
2753: // called for. If the criteria is the same as the last
2754: // one, just return the collection.
2755: criteria.add(UserVotePeer.MODULE_ID, getModuleId());
2756: if (!lastUserVotesCriteria.equals(criteria)) {
2757: collUserVotes = UserVotePeer
2758: .doSelectJoinScarabUserImpl(criteria);
2759: }
2760: }
2761: lastUserVotesCriteria = criteria;
2762:
2763: return collUserVotes;
2764: }
2765:
2766: /**
2767: * Collection to store aggregation of collQuerys
2768: */
2769: protected List collQuerys;
2770:
2771: /**
2772: * Temporary storage of collQuerys to save a possible db hit in
2773: * the event objects are add to the collection, but the
2774: * complete collection is never requested.
2775: */
2776: protected void initQuerys() {
2777: if (collQuerys == null) {
2778: collQuerys = new ArrayList();
2779: }
2780: }
2781:
2782: /**
2783: * Method called to associate a Query object to this object
2784: * through the Query foreign key attribute
2785: *
2786: * @param l Query
2787: * @throws TorqueException
2788: */
2789: public void addQuery(Query l) throws TorqueException {
2790: getQuerys().add(l);
2791: l.setModule((ScarabModule) this );
2792: }
2793:
2794: /**
2795: * The criteria used to select the current contents of collQuerys
2796: */
2797: private Criteria lastQuerysCriteria = null;
2798:
2799: /**
2800: * If this collection has already been initialized, returns
2801: * the collection. Otherwise returns the results of
2802: * getQuerys(new Criteria())
2803: *
2804: * @return the collection of associated objects
2805: * @throws TorqueException
2806: */
2807: public List getQuerys() throws TorqueException {
2808: if (collQuerys == null) {
2809: collQuerys = getQuerys(new Criteria(10));
2810: }
2811: return collQuerys;
2812: }
2813:
2814: /**
2815: * If this collection has already been initialized with
2816: * an identical criteria, it returns the collection.
2817: * Otherwise if this ScarabModule has previously
2818: * been saved, it will retrieve related Querys from storage.
2819: * If this ScarabModule is new, it will return
2820: * an empty collection or the current collection, the criteria
2821: * is ignored on a new object.
2822: *
2823: * @throws TorqueException
2824: */
2825: public List getQuerys(Criteria criteria) throws TorqueException {
2826: if (collQuerys == null) {
2827: if (isNew()) {
2828: collQuerys = new ArrayList();
2829: } else {
2830: criteria.add(QueryPeer.MODULE_ID, getModuleId());
2831: collQuerys = QueryPeer.doSelect(criteria);
2832: }
2833: } else {
2834: // criteria has no effect for a new object
2835: if (!isNew()) {
2836: // the following code is to determine if a new query is
2837: // called for. If the criteria is the same as the last
2838: // one, just return the collection.
2839: criteria.add(QueryPeer.MODULE_ID, getModuleId());
2840: if (!lastQuerysCriteria.equals(criteria)) {
2841: collQuerys = QueryPeer.doSelect(criteria);
2842: }
2843: }
2844: }
2845: lastQuerysCriteria = criteria;
2846:
2847: return collQuerys;
2848: }
2849:
2850: /**
2851: * If this collection has already been initialized, returns
2852: * the collection. Otherwise returns the results of
2853: * getQuerys(new Criteria(),Connection)
2854: * This method takes in the Connection also as input so that
2855: * referenced objects can also be obtained using a Connection
2856: * that is taken as input
2857: */
2858: public List getQuerys(Connection con) throws TorqueException {
2859: if (collQuerys == null) {
2860: collQuerys = getQuerys(new Criteria(10), con);
2861: }
2862: return collQuerys;
2863: }
2864:
2865: /**
2866: * If this collection has already been initialized with
2867: * an identical criteria, it returns the collection.
2868: * Otherwise if this ScarabModule has previously
2869: * been saved, it will retrieve related Querys from storage.
2870: * If this ScarabModule is new, it will return
2871: * an empty collection or the current collection, the criteria
2872: * is ignored on a new object.
2873: * This method takes in the Connection also as input so that
2874: * referenced objects can also be obtained using a Connection
2875: * that is taken as input
2876: */
2877: public List getQuerys(Criteria criteria, Connection con)
2878: throws TorqueException {
2879: if (collQuerys == null) {
2880: if (isNew()) {
2881: collQuerys = new ArrayList();
2882: } else {
2883: criteria.add(QueryPeer.MODULE_ID, getModuleId());
2884: collQuerys = QueryPeer.doSelect(criteria, con);
2885: }
2886: } else {
2887: // criteria has no effect for a new object
2888: if (!isNew()) {
2889: // the following code is to determine if a new query is
2890: // called for. If the criteria is the same as the last
2891: // one, just return the collection.
2892: criteria.add(QueryPeer.MODULE_ID, getModuleId());
2893: if (!lastQuerysCriteria.equals(criteria)) {
2894: collQuerys = QueryPeer.doSelect(criteria, con);
2895: }
2896: }
2897: }
2898: lastQuerysCriteria = criteria;
2899:
2900: return collQuerys;
2901: }
2902:
2903: /**
2904: * If this collection has already been initialized with
2905: * an identical criteria, it returns the collection.
2906: * Otherwise if this ScarabModule is new, it will return
2907: * an empty collection; or if this ScarabModule has previously
2908: * been saved, it will retrieve related Querys from storage.
2909: *
2910: * This method is protected by default in order to keep the public
2911: * api reasonable. You can provide public methods for those you
2912: * actually need in ScarabModule.
2913: */
2914: protected List getQuerysJoinScarabUserImpl(Criteria criteria)
2915: throws TorqueException {
2916: if (collQuerys == null) {
2917: if (isNew()) {
2918: collQuerys = new ArrayList();
2919: } else {
2920: criteria.add(QueryPeer.MODULE_ID, getModuleId());
2921: collQuerys = QueryPeer
2922: .doSelectJoinScarabUserImpl(criteria);
2923: }
2924: } else {
2925: // the following code is to determine if a new query is
2926: // called for. If the criteria is the same as the last
2927: // one, just return the collection.
2928: criteria.add(QueryPeer.MODULE_ID, getModuleId());
2929: if (!lastQuerysCriteria.equals(criteria)) {
2930: collQuerys = QueryPeer
2931: .doSelectJoinScarabUserImpl(criteria);
2932: }
2933: }
2934: lastQuerysCriteria = criteria;
2935:
2936: return collQuerys;
2937: }
2938:
2939: /**
2940: * If this collection has already been initialized with
2941: * an identical criteria, it returns the collection.
2942: * Otherwise if this ScarabModule is new, it will return
2943: * an empty collection; or if this ScarabModule has previously
2944: * been saved, it will retrieve related Querys from storage.
2945: *
2946: * This method is protected by default in order to keep the public
2947: * api reasonable. You can provide public methods for those you
2948: * actually need in ScarabModule.
2949: */
2950: protected List getQuerysJoinScope(Criteria criteria)
2951: throws TorqueException {
2952: if (collQuerys == null) {
2953: if (isNew()) {
2954: collQuerys = new ArrayList();
2955: } else {
2956: criteria.add(QueryPeer.MODULE_ID, getModuleId());
2957: collQuerys = QueryPeer.doSelectJoinScope(criteria);
2958: }
2959: } else {
2960: // the following code is to determine if a new query is
2961: // called for. If the criteria is the same as the last
2962: // one, just return the collection.
2963: criteria.add(QueryPeer.MODULE_ID, getModuleId());
2964: if (!lastQuerysCriteria.equals(criteria)) {
2965: collQuerys = QueryPeer.doSelectJoinScope(criteria);
2966: }
2967: }
2968: lastQuerysCriteria = criteria;
2969:
2970: return collQuerys;
2971: }
2972:
2973: /**
2974: * If this collection has already been initialized with
2975: * an identical criteria, it returns the collection.
2976: * Otherwise if this ScarabModule is new, it will return
2977: * an empty collection; or if this ScarabModule has previously
2978: * been saved, it will retrieve related Querys from storage.
2979: *
2980: * This method is protected by default in order to keep the public
2981: * api reasonable. You can provide public methods for those you
2982: * actually need in ScarabModule.
2983: */
2984: protected List getQuerysJoinScarabModule(Criteria criteria)
2985: throws TorqueException {
2986: if (collQuerys == null) {
2987: if (isNew()) {
2988: collQuerys = new ArrayList();
2989: } else {
2990: criteria.add(QueryPeer.MODULE_ID, getModuleId());
2991: collQuerys = QueryPeer
2992: .doSelectJoinScarabModule(criteria);
2993: }
2994: } else {
2995: // the following code is to determine if a new query is
2996: // called for. If the criteria is the same as the last
2997: // one, just return the collection.
2998: criteria.add(QueryPeer.MODULE_ID, getModuleId());
2999: if (!lastQuerysCriteria.equals(criteria)) {
3000: collQuerys = QueryPeer
3001: .doSelectJoinScarabModule(criteria);
3002: }
3003: }
3004: lastQuerysCriteria = criteria;
3005:
3006: return collQuerys;
3007: }
3008:
3009: /**
3010: * If this collection has already been initialized with
3011: * an identical criteria, it returns the collection.
3012: * Otherwise if this ScarabModule is new, it will return
3013: * an empty collection; or if this ScarabModule has previously
3014: * been saved, it will retrieve related Querys from storage.
3015: *
3016: * This method is protected by default in order to keep the public
3017: * api reasonable. You can provide public methods for those you
3018: * actually need in ScarabModule.
3019: */
3020: protected List getQuerysJoinIssueType(Criteria criteria)
3021: throws TorqueException {
3022: if (collQuerys == null) {
3023: if (isNew()) {
3024: collQuerys = new ArrayList();
3025: } else {
3026: criteria.add(QueryPeer.MODULE_ID, getModuleId());
3027: collQuerys = QueryPeer.doSelectJoinIssueType(criteria);
3028: }
3029: } else {
3030: // the following code is to determine if a new query is
3031: // called for. If the criteria is the same as the last
3032: // one, just return the collection.
3033: criteria.add(QueryPeer.MODULE_ID, getModuleId());
3034: if (!lastQuerysCriteria.equals(criteria)) {
3035: collQuerys = QueryPeer.doSelectJoinIssueType(criteria);
3036: }
3037: }
3038: lastQuerysCriteria = criteria;
3039:
3040: return collQuerys;
3041: }
3042:
3043: /**
3044: * If this collection has already been initialized with
3045: * an identical criteria, it returns the collection.
3046: * Otherwise if this ScarabModule is new, it will return
3047: * an empty collection; or if this ScarabModule has previously
3048: * been saved, it will retrieve related Querys from storage.
3049: *
3050: * This method is protected by default in order to keep the public
3051: * api reasonable. You can provide public methods for those you
3052: * actually need in ScarabModule.
3053: */
3054: protected List getQuerysJoinMITList(Criteria criteria)
3055: throws TorqueException {
3056: if (collQuerys == null) {
3057: if (isNew()) {
3058: collQuerys = new ArrayList();
3059: } else {
3060: criteria.add(QueryPeer.MODULE_ID, getModuleId());
3061: collQuerys = QueryPeer.doSelectJoinMITList(criteria);
3062: }
3063: } else {
3064: // the following code is to determine if a new query is
3065: // called for. If the criteria is the same as the last
3066: // one, just return the collection.
3067: criteria.add(QueryPeer.MODULE_ID, getModuleId());
3068: if (!lastQuerysCriteria.equals(criteria)) {
3069: collQuerys = QueryPeer.doSelectJoinMITList(criteria);
3070: }
3071: }
3072: lastQuerysCriteria = criteria;
3073:
3074: return collQuerys;
3075: }
3076:
3077: /**
3078: * If this collection has already been initialized with
3079: * an identical criteria, it returns the collection.
3080: * Otherwise if this ScarabModule is new, it will return
3081: * an empty collection; or if this ScarabModule has previously
3082: * been saved, it will retrieve related Querys from storage.
3083: *
3084: * This method is protected by default in order to keep the public
3085: * api reasonable. You can provide public methods for those you
3086: * actually need in ScarabModule.
3087: */
3088: protected List getQuerysJoinFrequency(Criteria criteria)
3089: throws TorqueException {
3090: if (collQuerys == null) {
3091: if (isNew()) {
3092: collQuerys = new ArrayList();
3093: } else {
3094: criteria.add(QueryPeer.MODULE_ID, getModuleId());
3095: collQuerys = QueryPeer.doSelectJoinFrequency(criteria);
3096: }
3097: } else {
3098: // the following code is to determine if a new query is
3099: // called for. If the criteria is the same as the last
3100: // one, just return the collection.
3101: criteria.add(QueryPeer.MODULE_ID, getModuleId());
3102: if (!lastQuerysCriteria.equals(criteria)) {
3103: collQuerys = QueryPeer.doSelectJoinFrequency(criteria);
3104: }
3105: }
3106: lastQuerysCriteria = criteria;
3107:
3108: return collQuerys;
3109: }
3110:
3111: /**
3112: * Collection to store aggregation of collReports
3113: */
3114: protected List collReports;
3115:
3116: /**
3117: * Temporary storage of collReports to save a possible db hit in
3118: * the event objects are add to the collection, but the
3119: * complete collection is never requested.
3120: */
3121: protected void initReports() {
3122: if (collReports == null) {
3123: collReports = new ArrayList();
3124: }
3125: }
3126:
3127: /**
3128: * Method called to associate a Report object to this object
3129: * through the Report foreign key attribute
3130: *
3131: * @param l Report
3132: * @throws TorqueException
3133: */
3134: public void addReport(Report l) throws TorqueException {
3135: getReports().add(l);
3136: l.setModule((ScarabModule) this );
3137: }
3138:
3139: /**
3140: * The criteria used to select the current contents of collReports
3141: */
3142: private Criteria lastReportsCriteria = null;
3143:
3144: /**
3145: * If this collection has already been initialized, returns
3146: * the collection. Otherwise returns the results of
3147: * getReports(new Criteria())
3148: *
3149: * @return the collection of associated objects
3150: * @throws TorqueException
3151: */
3152: public List getReports() throws TorqueException {
3153: if (collReports == null) {
3154: collReports = getReports(new Criteria(10));
3155: }
3156: return collReports;
3157: }
3158:
3159: /**
3160: * If this collection has already been initialized with
3161: * an identical criteria, it returns the collection.
3162: * Otherwise if this ScarabModule has previously
3163: * been saved, it will retrieve related Reports from storage.
3164: * If this ScarabModule is new, it will return
3165: * an empty collection or the current collection, the criteria
3166: * is ignored on a new object.
3167: *
3168: * @throws TorqueException
3169: */
3170: public List getReports(Criteria criteria) throws TorqueException {
3171: if (collReports == null) {
3172: if (isNew()) {
3173: collReports = new ArrayList();
3174: } else {
3175: criteria.add(ReportPeer.MODULE_ID, getModuleId());
3176: collReports = ReportPeer.doSelect(criteria);
3177: }
3178: } else {
3179: // criteria has no effect for a new object
3180: if (!isNew()) {
3181: // the following code is to determine if a new query is
3182: // called for. If the criteria is the same as the last
3183: // one, just return the collection.
3184: criteria.add(ReportPeer.MODULE_ID, getModuleId());
3185: if (!lastReportsCriteria.equals(criteria)) {
3186: collReports = ReportPeer.doSelect(criteria);
3187: }
3188: }
3189: }
3190: lastReportsCriteria = criteria;
3191:
3192: return collReports;
3193: }
3194:
3195: /**
3196: * If this collection has already been initialized, returns
3197: * the collection. Otherwise returns the results of
3198: * getReports(new Criteria(),Connection)
3199: * This method takes in the Connection also as input so that
3200: * referenced objects can also be obtained using a Connection
3201: * that is taken as input
3202: */
3203: public List getReports(Connection con) throws TorqueException {
3204: if (collReports == null) {
3205: collReports = getReports(new Criteria(10), con);
3206: }
3207: return collReports;
3208: }
3209:
3210: /**
3211: * If this collection has already been initialized with
3212: * an identical criteria, it returns the collection.
3213: * Otherwise if this ScarabModule has previously
3214: * been saved, it will retrieve related Reports from storage.
3215: * If this ScarabModule is new, it will return
3216: * an empty collection or the current collection, the criteria
3217: * is ignored on a new object.
3218: * This method takes in the Connection also as input so that
3219: * referenced objects can also be obtained using a Connection
3220: * that is taken as input
3221: */
3222: public List getReports(Criteria criteria, Connection con)
3223: throws TorqueException {
3224: if (collReports == null) {
3225: if (isNew()) {
3226: collReports = new ArrayList();
3227: } else {
3228: criteria.add(ReportPeer.MODULE_ID, getModuleId());
3229: collReports = ReportPeer.doSelect(criteria, con);
3230: }
3231: } else {
3232: // criteria has no effect for a new object
3233: if (!isNew()) {
3234: // the following code is to determine if a new query is
3235: // called for. If the criteria is the same as the last
3236: // one, just return the collection.
3237: criteria.add(ReportPeer.MODULE_ID, getModuleId());
3238: if (!lastReportsCriteria.equals(criteria)) {
3239: collReports = ReportPeer.doSelect(criteria, con);
3240: }
3241: }
3242: }
3243: lastReportsCriteria = criteria;
3244:
3245: return collReports;
3246: }
3247:
3248: /**
3249: * If this collection has already been initialized with
3250: * an identical criteria, it returns the collection.
3251: * Otherwise if this ScarabModule is new, it will return
3252: * an empty collection; or if this ScarabModule has previously
3253: * been saved, it will retrieve related Reports from storage.
3254: *
3255: * This method is protected by default in order to keep the public
3256: * api reasonable. You can provide public methods for those you
3257: * actually need in ScarabModule.
3258: */
3259: protected List getReportsJoinIssueType(Criteria criteria)
3260: throws TorqueException {
3261: if (collReports == null) {
3262: if (isNew()) {
3263: collReports = new ArrayList();
3264: } else {
3265: criteria.add(ReportPeer.MODULE_ID, getModuleId());
3266: collReports = ReportPeer
3267: .doSelectJoinIssueType(criteria);
3268: }
3269: } else {
3270: // the following code is to determine if a new query is
3271: // called for. If the criteria is the same as the last
3272: // one, just return the collection.
3273: criteria.add(ReportPeer.MODULE_ID, getModuleId());
3274: if (!lastReportsCriteria.equals(criteria)) {
3275: collReports = ReportPeer
3276: .doSelectJoinIssueType(criteria);
3277: }
3278: }
3279: lastReportsCriteria = criteria;
3280:
3281: return collReports;
3282: }
3283:
3284: /**
3285: * If this collection has already been initialized with
3286: * an identical criteria, it returns the collection.
3287: * Otherwise if this ScarabModule is new, it will return
3288: * an empty collection; or if this ScarabModule has previously
3289: * been saved, it will retrieve related Reports from storage.
3290: *
3291: * This method is protected by default in order to keep the public
3292: * api reasonable. You can provide public methods for those you
3293: * actually need in ScarabModule.
3294: */
3295: protected List getReportsJoinScarabUserImpl(Criteria criteria)
3296: throws TorqueException {
3297: if (collReports == null) {
3298: if (isNew()) {
3299: collReports = new ArrayList();
3300: } else {
3301: criteria.add(ReportPeer.MODULE_ID, getModuleId());
3302: collReports = ReportPeer
3303: .doSelectJoinScarabUserImpl(criteria);
3304: }
3305: } else {
3306: // the following code is to determine if a new query is
3307: // called for. If the criteria is the same as the last
3308: // one, just return the collection.
3309: criteria.add(ReportPeer.MODULE_ID, getModuleId());
3310: if (!lastReportsCriteria.equals(criteria)) {
3311: collReports = ReportPeer
3312: .doSelectJoinScarabUserImpl(criteria);
3313: }
3314: }
3315: lastReportsCriteria = criteria;
3316:
3317: return collReports;
3318: }
3319:
3320: /**
3321: * If this collection has already been initialized with
3322: * an identical criteria, it returns the collection.
3323: * Otherwise if this ScarabModule is new, it will return
3324: * an empty collection; or if this ScarabModule has previously
3325: * been saved, it will retrieve related Reports from storage.
3326: *
3327: * This method is protected by default in order to keep the public
3328: * api reasonable. You can provide public methods for those you
3329: * actually need in ScarabModule.
3330: */
3331: protected List getReportsJoinScarabModule(Criteria criteria)
3332: throws TorqueException {
3333: if (collReports == null) {
3334: if (isNew()) {
3335: collReports = new ArrayList();
3336: } else {
3337: criteria.add(ReportPeer.MODULE_ID, getModuleId());
3338: collReports = ReportPeer
3339: .doSelectJoinScarabModule(criteria);
3340: }
3341: } else {
3342: // the following code is to determine if a new query is
3343: // called for. If the criteria is the same as the last
3344: // one, just return the collection.
3345: criteria.add(ReportPeer.MODULE_ID, getModuleId());
3346: if (!lastReportsCriteria.equals(criteria)) {
3347: collReports = ReportPeer
3348: .doSelectJoinScarabModule(criteria);
3349: }
3350: }
3351: lastReportsCriteria = criteria;
3352:
3353: return collReports;
3354: }
3355:
3356: /**
3357: * If this collection has already been initialized with
3358: * an identical criteria, it returns the collection.
3359: * Otherwise if this ScarabModule is new, it will return
3360: * an empty collection; or if this ScarabModule has previously
3361: * been saved, it will retrieve related Reports from storage.
3362: *
3363: * This method is protected by default in order to keep the public
3364: * api reasonable. You can provide public methods for those you
3365: * actually need in ScarabModule.
3366: */
3367: protected List getReportsJoinScope(Criteria criteria)
3368: throws TorqueException {
3369: if (collReports == null) {
3370: if (isNew()) {
3371: collReports = new ArrayList();
3372: } else {
3373: criteria.add(ReportPeer.MODULE_ID, getModuleId());
3374: collReports = ReportPeer.doSelectJoinScope(criteria);
3375: }
3376: } else {
3377: // the following code is to determine if a new query is
3378: // called for. If the criteria is the same as the last
3379: // one, just return the collection.
3380: criteria.add(ReportPeer.MODULE_ID, getModuleId());
3381: if (!lastReportsCriteria.equals(criteria)) {
3382: collReports = ReportPeer.doSelectJoinScope(criteria);
3383: }
3384: }
3385: lastReportsCriteria = criteria;
3386:
3387: return collReports;
3388: }
3389:
3390: /**
3391: * Collection to store aggregation of collPendingGroupUserRoles
3392: */
3393: protected List collPendingGroupUserRoles;
3394:
3395: /**
3396: * Temporary storage of collPendingGroupUserRoles to save a possible db hit in
3397: * the event objects are add to the collection, but the
3398: * complete collection is never requested.
3399: */
3400: protected void initPendingGroupUserRoles() {
3401: if (collPendingGroupUserRoles == null) {
3402: collPendingGroupUserRoles = new ArrayList();
3403: }
3404: }
3405:
3406: /**
3407: * Method called to associate a PendingGroupUserRole object to this object
3408: * through the PendingGroupUserRole foreign key attribute
3409: *
3410: * @param l PendingGroupUserRole
3411: * @throws TorqueException
3412: */
3413: public void addPendingGroupUserRole(PendingGroupUserRole l)
3414: throws TorqueException {
3415: getPendingGroupUserRoles().add(l);
3416: l.setModule((ScarabModule) this );
3417: }
3418:
3419: /**
3420: * The criteria used to select the current contents of collPendingGroupUserRoles
3421: */
3422: private Criteria lastPendingGroupUserRolesCriteria = null;
3423:
3424: /**
3425: * If this collection has already been initialized, returns
3426: * the collection. Otherwise returns the results of
3427: * getPendingGroupUserRoles(new Criteria())
3428: *
3429: * @return the collection of associated objects
3430: * @throws TorqueException
3431: */
3432: public List getPendingGroupUserRoles() throws TorqueException {
3433: if (collPendingGroupUserRoles == null) {
3434: collPendingGroupUserRoles = getPendingGroupUserRoles(new Criteria(
3435: 10));
3436: }
3437: return collPendingGroupUserRoles;
3438: }
3439:
3440: /**
3441: * If this collection has already been initialized with
3442: * an identical criteria, it returns the collection.
3443: * Otherwise if this ScarabModule has previously
3444: * been saved, it will retrieve related PendingGroupUserRoles from storage.
3445: * If this ScarabModule is new, it will return
3446: * an empty collection or the current collection, the criteria
3447: * is ignored on a new object.
3448: *
3449: * @throws TorqueException
3450: */
3451: public List getPendingGroupUserRoles(Criteria criteria)
3452: throws TorqueException {
3453: if (collPendingGroupUserRoles == null) {
3454: if (isNew()) {
3455: collPendingGroupUserRoles = new ArrayList();
3456: } else {
3457: criteria.add(PendingGroupUserRolePeer.GROUP_ID,
3458: getModuleId());
3459: collPendingGroupUserRoles = PendingGroupUserRolePeer
3460: .doSelect(criteria);
3461: }
3462: } else {
3463: // criteria has no effect for a new object
3464: if (!isNew()) {
3465: // the following code is to determine if a new query is
3466: // called for. If the criteria is the same as the last
3467: // one, just return the collection.
3468: criteria.add(PendingGroupUserRolePeer.GROUP_ID,
3469: getModuleId());
3470: if (!lastPendingGroupUserRolesCriteria.equals(criteria)) {
3471: collPendingGroupUserRoles = PendingGroupUserRolePeer
3472: .doSelect(criteria);
3473: }
3474: }
3475: }
3476: lastPendingGroupUserRolesCriteria = criteria;
3477:
3478: return collPendingGroupUserRoles;
3479: }
3480:
3481: /**
3482: * If this collection has already been initialized, returns
3483: * the collection. Otherwise returns the results of
3484: * getPendingGroupUserRoles(new Criteria(),Connection)
3485: * This method takes in the Connection also as input so that
3486: * referenced objects can also be obtained using a Connection
3487: * that is taken as input
3488: */
3489: public List getPendingGroupUserRoles(Connection con)
3490: throws TorqueException {
3491: if (collPendingGroupUserRoles == null) {
3492: collPendingGroupUserRoles = getPendingGroupUserRoles(
3493: new Criteria(10), con);
3494: }
3495: return collPendingGroupUserRoles;
3496: }
3497:
3498: /**
3499: * If this collection has already been initialized with
3500: * an identical criteria, it returns the collection.
3501: * Otherwise if this ScarabModule has previously
3502: * been saved, it will retrieve related PendingGroupUserRoles from storage.
3503: * If this ScarabModule is new, it will return
3504: * an empty collection or the current collection, the criteria
3505: * is ignored on a new object.
3506: * This method takes in the Connection also as input so that
3507: * referenced objects can also be obtained using a Connection
3508: * that is taken as input
3509: */
3510: public List getPendingGroupUserRoles(Criteria criteria,
3511: Connection con) throws TorqueException {
3512: if (collPendingGroupUserRoles == null) {
3513: if (isNew()) {
3514: collPendingGroupUserRoles = new ArrayList();
3515: } else {
3516: criteria.add(PendingGroupUserRolePeer.GROUP_ID,
3517: getModuleId());
3518: collPendingGroupUserRoles = PendingGroupUserRolePeer
3519: .doSelect(criteria, con);
3520: }
3521: } else {
3522: // criteria has no effect for a new object
3523: if (!isNew()) {
3524: // the following code is to determine if a new query is
3525: // called for. If the criteria is the same as the last
3526: // one, just return the collection.
3527: criteria.add(PendingGroupUserRolePeer.GROUP_ID,
3528: getModuleId());
3529: if (!lastPendingGroupUserRolesCriteria.equals(criteria)) {
3530: collPendingGroupUserRoles = PendingGroupUserRolePeer
3531: .doSelect(criteria, con);
3532: }
3533: }
3534: }
3535: lastPendingGroupUserRolesCriteria = criteria;
3536:
3537: return collPendingGroupUserRoles;
3538: }
3539:
3540: /**
3541: * If this collection has already been initialized with
3542: * an identical criteria, it returns the collection.
3543: * Otherwise if this ScarabModule is new, it will return
3544: * an empty collection; or if this ScarabModule has previously
3545: * been saved, it will retrieve related PendingGroupUserRoles from storage.
3546: *
3547: * This method is protected by default in order to keep the public
3548: * api reasonable. You can provide public methods for those you
3549: * actually need in ScarabModule.
3550: */
3551: protected List getPendingGroupUserRolesJoinScarabUserImpl(
3552: Criteria criteria) throws TorqueException {
3553: if (collPendingGroupUserRoles == null) {
3554: if (isNew()) {
3555: collPendingGroupUserRoles = new ArrayList();
3556: } else {
3557: criteria.add(PendingGroupUserRolePeer.GROUP_ID,
3558: getModuleId());
3559: collPendingGroupUserRoles = PendingGroupUserRolePeer
3560: .doSelectJoinScarabUserImpl(criteria);
3561: }
3562: } else {
3563: // the following code is to determine if a new query is
3564: // called for. If the criteria is the same as the last
3565: // one, just return the collection.
3566: criteria.add(PendingGroupUserRolePeer.GROUP_ID,
3567: getModuleId());
3568: if (!lastPendingGroupUserRolesCriteria.equals(criteria)) {
3569: collPendingGroupUserRoles = PendingGroupUserRolePeer
3570: .doSelectJoinScarabUserImpl(criteria);
3571: }
3572: }
3573: lastPendingGroupUserRolesCriteria = criteria;
3574:
3575: return collPendingGroupUserRoles;
3576: }
3577:
3578: /**
3579: * If this collection has already been initialized with
3580: * an identical criteria, it returns the collection.
3581: * Otherwise if this ScarabModule is new, it will return
3582: * an empty collection; or if this ScarabModule has previously
3583: * been saved, it will retrieve related PendingGroupUserRoles from storage.
3584: *
3585: * This method is protected by default in order to keep the public
3586: * api reasonable. You can provide public methods for those you
3587: * actually need in ScarabModule.
3588: */
3589: protected List getPendingGroupUserRolesJoinScarabModule(
3590: Criteria criteria) throws TorqueException {
3591: if (collPendingGroupUserRoles == null) {
3592: if (isNew()) {
3593: collPendingGroupUserRoles = new ArrayList();
3594: } else {
3595: criteria.add(PendingGroupUserRolePeer.GROUP_ID,
3596: getModuleId());
3597: collPendingGroupUserRoles = PendingGroupUserRolePeer
3598: .doSelectJoinScarabModule(criteria);
3599: }
3600: } else {
3601: // the following code is to determine if a new query is
3602: // called for. If the criteria is the same as the last
3603: // one, just return the collection.
3604: criteria.add(PendingGroupUserRolePeer.GROUP_ID,
3605: getModuleId());
3606: if (!lastPendingGroupUserRolesCriteria.equals(criteria)) {
3607: collPendingGroupUserRoles = PendingGroupUserRolePeer
3608: .doSelectJoinScarabModule(criteria);
3609: }
3610: }
3611: lastPendingGroupUserRolesCriteria = criteria;
3612:
3613: return collPendingGroupUserRoles;
3614: }
3615:
3616: /**
3617: * Collection to store aggregation of collGlobalParameters
3618: */
3619: protected List collGlobalParameters;
3620:
3621: /**
3622: * Temporary storage of collGlobalParameters to save a possible db hit in
3623: * the event objects are add to the collection, but the
3624: * complete collection is never requested.
3625: */
3626: protected void initGlobalParameters() {
3627: if (collGlobalParameters == null) {
3628: collGlobalParameters = new ArrayList();
3629: }
3630: }
3631:
3632: /**
3633: * Method called to associate a GlobalParameter object to this object
3634: * through the GlobalParameter foreign key attribute
3635: *
3636: * @param l GlobalParameter
3637: * @throws TorqueException
3638: */
3639: public void addGlobalParameter(GlobalParameter l)
3640: throws TorqueException {
3641: getGlobalParameters().add(l);
3642: l.setModule((ScarabModule) this );
3643: }
3644:
3645: /**
3646: * The criteria used to select the current contents of collGlobalParameters
3647: */
3648: private Criteria lastGlobalParametersCriteria = null;
3649:
3650: /**
3651: * If this collection has already been initialized, returns
3652: * the collection. Otherwise returns the results of
3653: * getGlobalParameters(new Criteria())
3654: *
3655: * @return the collection of associated objects
3656: * @throws TorqueException
3657: */
3658: public List getGlobalParameters() throws TorqueException {
3659: if (collGlobalParameters == null) {
3660: collGlobalParameters = getGlobalParameters(new Criteria(10));
3661: }
3662: return collGlobalParameters;
3663: }
3664:
3665: /**
3666: * If this collection has already been initialized with
3667: * an identical criteria, it returns the collection.
3668: * Otherwise if this ScarabModule has previously
3669: * been saved, it will retrieve related GlobalParameters from storage.
3670: * If this ScarabModule is new, it will return
3671: * an empty collection or the current collection, the criteria
3672: * is ignored on a new object.
3673: *
3674: * @throws TorqueException
3675: */
3676: public List getGlobalParameters(Criteria criteria)
3677: throws TorqueException {
3678: if (collGlobalParameters == null) {
3679: if (isNew()) {
3680: collGlobalParameters = new ArrayList();
3681: } else {
3682: criteria.add(GlobalParameterPeer.MODULE_ID,
3683: getModuleId());
3684: collGlobalParameters = GlobalParameterPeer
3685: .doSelect(criteria);
3686: }
3687: } else {
3688: // criteria has no effect for a new object
3689: if (!isNew()) {
3690: // the following code is to determine if a new query is
3691: // called for. If the criteria is the same as the last
3692: // one, just return the collection.
3693: criteria.add(GlobalParameterPeer.MODULE_ID,
3694: getModuleId());
3695: if (!lastGlobalParametersCriteria.equals(criteria)) {
3696: collGlobalParameters = GlobalParameterPeer
3697: .doSelect(criteria);
3698: }
3699: }
3700: }
3701: lastGlobalParametersCriteria = criteria;
3702:
3703: return collGlobalParameters;
3704: }
3705:
3706: /**
3707: * If this collection has already been initialized, returns
3708: * the collection. Otherwise returns the results of
3709: * getGlobalParameters(new Criteria(),Connection)
3710: * This method takes in the Connection also as input so that
3711: * referenced objects can also be obtained using a Connection
3712: * that is taken as input
3713: */
3714: public List getGlobalParameters(Connection con)
3715: throws TorqueException {
3716: if (collGlobalParameters == null) {
3717: collGlobalParameters = getGlobalParameters(
3718: new Criteria(10), con);
3719: }
3720: return collGlobalParameters;
3721: }
3722:
3723: /**
3724: * If this collection has already been initialized with
3725: * an identical criteria, it returns the collection.
3726: * Otherwise if this ScarabModule has previously
3727: * been saved, it will retrieve related GlobalParameters from storage.
3728: * If this ScarabModule is new, it will return
3729: * an empty collection or the current collection, the criteria
3730: * is ignored on a new object.
3731: * This method takes in the Connection also as input so that
3732: * referenced objects can also be obtained using a Connection
3733: * that is taken as input
3734: */
3735: public List getGlobalParameters(Criteria criteria, Connection con)
3736: throws TorqueException {
3737: if (collGlobalParameters == null) {
3738: if (isNew()) {
3739: collGlobalParameters = new ArrayList();
3740: } else {
3741: criteria.add(GlobalParameterPeer.MODULE_ID,
3742: getModuleId());
3743: collGlobalParameters = GlobalParameterPeer.doSelect(
3744: criteria, con);
3745: }
3746: } else {
3747: // criteria has no effect for a new object
3748: if (!isNew()) {
3749: // the following code is to determine if a new query is
3750: // called for. If the criteria is the same as the last
3751: // one, just return the collection.
3752: criteria.add(GlobalParameterPeer.MODULE_ID,
3753: getModuleId());
3754: if (!lastGlobalParametersCriteria.equals(criteria)) {
3755: collGlobalParameters = GlobalParameterPeer
3756: .doSelect(criteria, con);
3757: }
3758: }
3759: }
3760: lastGlobalParametersCriteria = criteria;
3761:
3762: return collGlobalParameters;
3763: }
3764:
3765: /**
3766: * If this collection has already been initialized with
3767: * an identical criteria, it returns the collection.
3768: * Otherwise if this ScarabModule is new, it will return
3769: * an empty collection; or if this ScarabModule has previously
3770: * been saved, it will retrieve related GlobalParameters from storage.
3771: *
3772: * This method is protected by default in order to keep the public
3773: * api reasonable. You can provide public methods for those you
3774: * actually need in ScarabModule.
3775: */
3776: protected List getGlobalParametersJoinScarabModule(Criteria criteria)
3777: throws TorqueException {
3778: if (collGlobalParameters == null) {
3779: if (isNew()) {
3780: collGlobalParameters = new ArrayList();
3781: } else {
3782: criteria.add(GlobalParameterPeer.MODULE_ID,
3783: getModuleId());
3784: collGlobalParameters = GlobalParameterPeer
3785: .doSelectJoinScarabModule(criteria);
3786: }
3787: } else {
3788: // the following code is to determine if a new query is
3789: // called for. If the criteria is the same as the last
3790: // one, just return the collection.
3791: criteria.add(GlobalParameterPeer.MODULE_ID, getModuleId());
3792: if (!lastGlobalParametersCriteria.equals(criteria)) {
3793: collGlobalParameters = GlobalParameterPeer
3794: .doSelectJoinScarabModule(criteria);
3795: }
3796: }
3797: lastGlobalParametersCriteria = criteria;
3798:
3799: return collGlobalParameters;
3800: }
3801:
3802: /**
3803: * Collection to store aggregation of collNotificationFilters
3804: */
3805: protected List collNotificationFilters;
3806:
3807: /**
3808: * Temporary storage of collNotificationFilters to save a possible db hit in
3809: * the event objects are add to the collection, but the
3810: * complete collection is never requested.
3811: */
3812: protected void initNotificationFilters() {
3813: if (collNotificationFilters == null) {
3814: collNotificationFilters = new ArrayList();
3815: }
3816: }
3817:
3818: /**
3819: * Method called to associate a NotificationFilter object to this object
3820: * through the NotificationFilter foreign key attribute
3821: *
3822: * @param l NotificationFilter
3823: * @throws TorqueException
3824: */
3825: public void addNotificationFilter(NotificationFilter l)
3826: throws TorqueException {
3827: getNotificationFilters().add(l);
3828: l.setModule((ScarabModule) this );
3829: }
3830:
3831: /**
3832: * The criteria used to select the current contents of collNotificationFilters
3833: */
3834: private Criteria lastNotificationFiltersCriteria = null;
3835:
3836: /**
3837: * If this collection has already been initialized, returns
3838: * the collection. Otherwise returns the results of
3839: * getNotificationFilters(new Criteria())
3840: *
3841: * @return the collection of associated objects
3842: * @throws TorqueException
3843: */
3844: public List getNotificationFilters() throws TorqueException {
3845: if (collNotificationFilters == null) {
3846: collNotificationFilters = getNotificationFilters(new Criteria(
3847: 10));
3848: }
3849: return collNotificationFilters;
3850: }
3851:
3852: /**
3853: * If this collection has already been initialized with
3854: * an identical criteria, it returns the collection.
3855: * Otherwise if this ScarabModule has previously
3856: * been saved, it will retrieve related NotificationFilters from storage.
3857: * If this ScarabModule is new, it will return
3858: * an empty collection or the current collection, the criteria
3859: * is ignored on a new object.
3860: *
3861: * @throws TorqueException
3862: */
3863: public List getNotificationFilters(Criteria criteria)
3864: throws TorqueException {
3865: if (collNotificationFilters == null) {
3866: if (isNew()) {
3867: collNotificationFilters = new ArrayList();
3868: } else {
3869: criteria.add(NotificationFilterPeer.MODULE_ID,
3870: getModuleId());
3871: collNotificationFilters = NotificationFilterPeer
3872: .doSelect(criteria);
3873: }
3874: } else {
3875: // criteria has no effect for a new object
3876: if (!isNew()) {
3877: // the following code is to determine if a new query is
3878: // called for. If the criteria is the same as the last
3879: // one, just return the collection.
3880: criteria.add(NotificationFilterPeer.MODULE_ID,
3881: getModuleId());
3882: if (!lastNotificationFiltersCriteria.equals(criteria)) {
3883: collNotificationFilters = NotificationFilterPeer
3884: .doSelect(criteria);
3885: }
3886: }
3887: }
3888: lastNotificationFiltersCriteria = criteria;
3889:
3890: return collNotificationFilters;
3891: }
3892:
3893: /**
3894: * If this collection has already been initialized, returns
3895: * the collection. Otherwise returns the results of
3896: * getNotificationFilters(new Criteria(),Connection)
3897: * This method takes in the Connection also as input so that
3898: * referenced objects can also be obtained using a Connection
3899: * that is taken as input
3900: */
3901: public List getNotificationFilters(Connection con)
3902: throws TorqueException {
3903: if (collNotificationFilters == null) {
3904: collNotificationFilters = getNotificationFilters(
3905: new Criteria(10), con);
3906: }
3907: return collNotificationFilters;
3908: }
3909:
3910: /**
3911: * If this collection has already been initialized with
3912: * an identical criteria, it returns the collection.
3913: * Otherwise if this ScarabModule has previously
3914: * been saved, it will retrieve related NotificationFilters from storage.
3915: * If this ScarabModule is new, it will return
3916: * an empty collection or the current collection, the criteria
3917: * is ignored on a new object.
3918: * This method takes in the Connection also as input so that
3919: * referenced objects can also be obtained using a Connection
3920: * that is taken as input
3921: */
3922: public List getNotificationFilters(Criteria criteria, Connection con)
3923: throws TorqueException {
3924: if (collNotificationFilters == null) {
3925: if (isNew()) {
3926: collNotificationFilters = new ArrayList();
3927: } else {
3928: criteria.add(NotificationFilterPeer.MODULE_ID,
3929: getModuleId());
3930: collNotificationFilters = NotificationFilterPeer
3931: .doSelect(criteria, con);
3932: }
3933: } else {
3934: // criteria has no effect for a new object
3935: if (!isNew()) {
3936: // the following code is to determine if a new query is
3937: // called for. If the criteria is the same as the last
3938: // one, just return the collection.
3939: criteria.add(NotificationFilterPeer.MODULE_ID,
3940: getModuleId());
3941: if (!lastNotificationFiltersCriteria.equals(criteria)) {
3942: collNotificationFilters = NotificationFilterPeer
3943: .doSelect(criteria, con);
3944: }
3945: }
3946: }
3947: lastNotificationFiltersCriteria = criteria;
3948:
3949: return collNotificationFilters;
3950: }
3951:
3952: /**
3953: * If this collection has already been initialized with
3954: * an identical criteria, it returns the collection.
3955: * Otherwise if this ScarabModule is new, it will return
3956: * an empty collection; or if this ScarabModule has previously
3957: * been saved, it will retrieve related NotificationFilters from storage.
3958: *
3959: * This method is protected by default in order to keep the public
3960: * api reasonable. You can provide public methods for those you
3961: * actually need in ScarabModule.
3962: */
3963: protected List getNotificationFiltersJoinScarabUserImpl(
3964: Criteria criteria) throws TorqueException {
3965: if (collNotificationFilters == null) {
3966: if (isNew()) {
3967: collNotificationFilters = new ArrayList();
3968: } else {
3969: criteria.add(NotificationFilterPeer.MODULE_ID,
3970: getModuleId());
3971: collNotificationFilters = NotificationFilterPeer
3972: .doSelectJoinScarabUserImpl(criteria);
3973: }
3974: } else {
3975: // the following code is to determine if a new query is
3976: // called for. If the criteria is the same as the last
3977: // one, just return the collection.
3978: criteria.add(NotificationFilterPeer.MODULE_ID,
3979: getModuleId());
3980: if (!lastNotificationFiltersCriteria.equals(criteria)) {
3981: collNotificationFilters = NotificationFilterPeer
3982: .doSelectJoinScarabUserImpl(criteria);
3983: }
3984: }
3985: lastNotificationFiltersCriteria = criteria;
3986:
3987: return collNotificationFilters;
3988: }
3989:
3990: /**
3991: * If this collection has already been initialized with
3992: * an identical criteria, it returns the collection.
3993: * Otherwise if this ScarabModule is new, it will return
3994: * an empty collection; or if this ScarabModule has previously
3995: * been saved, it will retrieve related NotificationFilters from storage.
3996: *
3997: * This method is protected by default in order to keep the public
3998: * api reasonable. You can provide public methods for those you
3999: * actually need in ScarabModule.
4000: */
4001: protected List getNotificationFiltersJoinScarabModule(
4002: Criteria criteria) throws TorqueException {
4003: if (collNotificationFilters == null) {
4004: if (isNew()) {
4005: collNotificationFilters = new ArrayList();
4006: } else {
4007: criteria.add(NotificationFilterPeer.MODULE_ID,
4008: getModuleId());
4009: collNotificationFilters = NotificationFilterPeer
4010: .doSelectJoinScarabModule(criteria);
4011: }
4012: } else {
4013: // the following code is to determine if a new query is
4014: // called for. If the criteria is the same as the last
4015: // one, just return the collection.
4016: criteria.add(NotificationFilterPeer.MODULE_ID,
4017: getModuleId());
4018: if (!lastNotificationFiltersCriteria.equals(criteria)) {
4019: collNotificationFilters = NotificationFilterPeer
4020: .doSelectJoinScarabModule(criteria);
4021: }
4022: }
4023: lastNotificationFiltersCriteria = criteria;
4024:
4025: return collNotificationFilters;
4026: }
4027:
4028: /**
4029: * Collection to store aggregation of collNotificationDefaultFilters
4030: */
4031: protected List collNotificationDefaultFilters;
4032:
4033: /**
4034: * Temporary storage of collNotificationDefaultFilters to save a possible db hit in
4035: * the event objects are add to the collection, but the
4036: * complete collection is never requested.
4037: */
4038: protected void initNotificationDefaultFilters() {
4039: if (collNotificationDefaultFilters == null) {
4040: collNotificationDefaultFilters = new ArrayList();
4041: }
4042: }
4043:
4044: /**
4045: * Method called to associate a NotificationDefaultFilter object to this object
4046: * through the NotificationDefaultFilter foreign key attribute
4047: *
4048: * @param l NotificationDefaultFilter
4049: * @throws TorqueException
4050: */
4051: public void addNotificationDefaultFilter(NotificationDefaultFilter l)
4052: throws TorqueException {
4053: getNotificationDefaultFilters().add(l);
4054: l.setModule((ScarabModule) this );
4055: }
4056:
4057: /**
4058: * The criteria used to select the current contents of collNotificationDefaultFilters
4059: */
4060: private Criteria lastNotificationDefaultFiltersCriteria = null;
4061:
4062: /**
4063: * If this collection has already been initialized, returns
4064: * the collection. Otherwise returns the results of
4065: * getNotificationDefaultFilters(new Criteria())
4066: *
4067: * @return the collection of associated objects
4068: * @throws TorqueException
4069: */
4070: public List getNotificationDefaultFilters() throws TorqueException {
4071: if (collNotificationDefaultFilters == null) {
4072: collNotificationDefaultFilters = getNotificationDefaultFilters(new Criteria(
4073: 10));
4074: }
4075: return collNotificationDefaultFilters;
4076: }
4077:
4078: /**
4079: * If this collection has already been initialized with
4080: * an identical criteria, it returns the collection.
4081: * Otherwise if this ScarabModule has previously
4082: * been saved, it will retrieve related NotificationDefaultFilters from storage.
4083: * If this ScarabModule is new, it will return
4084: * an empty collection or the current collection, the criteria
4085: * is ignored on a new object.
4086: *
4087: * @throws TorqueException
4088: */
4089: public List getNotificationDefaultFilters(Criteria criteria)
4090: throws TorqueException {
4091: if (collNotificationDefaultFilters == null) {
4092: if (isNew()) {
4093: collNotificationDefaultFilters = new ArrayList();
4094: } else {
4095: criteria.add(NotificationDefaultFilterPeer.MODULE_ID,
4096: getModuleId());
4097: collNotificationDefaultFilters = NotificationDefaultFilterPeer
4098: .doSelect(criteria);
4099: }
4100: } else {
4101: // criteria has no effect for a new object
4102: if (!isNew()) {
4103: // the following code is to determine if a new query is
4104: // called for. If the criteria is the same as the last
4105: // one, just return the collection.
4106: criteria.add(NotificationDefaultFilterPeer.MODULE_ID,
4107: getModuleId());
4108: if (!lastNotificationDefaultFiltersCriteria
4109: .equals(criteria)) {
4110: collNotificationDefaultFilters = NotificationDefaultFilterPeer
4111: .doSelect(criteria);
4112: }
4113: }
4114: }
4115: lastNotificationDefaultFiltersCriteria = criteria;
4116:
4117: return collNotificationDefaultFilters;
4118: }
4119:
4120: /**
4121: * If this collection has already been initialized, returns
4122: * the collection. Otherwise returns the results of
4123: * getNotificationDefaultFilters(new Criteria(),Connection)
4124: * This method takes in the Connection also as input so that
4125: * referenced objects can also be obtained using a Connection
4126: * that is taken as input
4127: */
4128: public List getNotificationDefaultFilters(Connection con)
4129: throws TorqueException {
4130: if (collNotificationDefaultFilters == null) {
4131: collNotificationDefaultFilters = getNotificationDefaultFilters(
4132: new Criteria(10), con);
4133: }
4134: return collNotificationDefaultFilters;
4135: }
4136:
4137: /**
4138: * If this collection has already been initialized with
4139: * an identical criteria, it returns the collection.
4140: * Otherwise if this ScarabModule has previously
4141: * been saved, it will retrieve related NotificationDefaultFilters from storage.
4142: * If this ScarabModule is new, it will return
4143: * an empty collection or the current collection, the criteria
4144: * is ignored on a new object.
4145: * This method takes in the Connection also as input so that
4146: * referenced objects can also be obtained using a Connection
4147: * that is taken as input
4148: */
4149: public List getNotificationDefaultFilters(Criteria criteria,
4150: Connection con) throws TorqueException {
4151: if (collNotificationDefaultFilters == null) {
4152: if (isNew()) {
4153: collNotificationDefaultFilters = new ArrayList();
4154: } else {
4155: criteria.add(NotificationDefaultFilterPeer.MODULE_ID,
4156: getModuleId());
4157: collNotificationDefaultFilters = NotificationDefaultFilterPeer
4158: .doSelect(criteria, con);
4159: }
4160: } else {
4161: // criteria has no effect for a new object
4162: if (!isNew()) {
4163: // the following code is to determine if a new query is
4164: // called for. If the criteria is the same as the last
4165: // one, just return the collection.
4166: criteria.add(NotificationDefaultFilterPeer.MODULE_ID,
4167: getModuleId());
4168: if (!lastNotificationDefaultFiltersCriteria
4169: .equals(criteria)) {
4170: collNotificationDefaultFilters = NotificationDefaultFilterPeer
4171: .doSelect(criteria, con);
4172: }
4173: }
4174: }
4175: lastNotificationDefaultFiltersCriteria = criteria;
4176:
4177: return collNotificationDefaultFilters;
4178: }
4179:
4180: /**
4181: * If this collection has already been initialized with
4182: * an identical criteria, it returns the collection.
4183: * Otherwise if this ScarabModule is new, it will return
4184: * an empty collection; or if this ScarabModule has previously
4185: * been saved, it will retrieve related NotificationDefaultFilters from storage.
4186: *
4187: * This method is protected by default in order to keep the public
4188: * api reasonable. You can provide public methods for those you
4189: * actually need in ScarabModule.
4190: */
4191: protected List getNotificationDefaultFiltersJoinScarabRoleImpl(
4192: Criteria criteria) throws TorqueException {
4193: if (collNotificationDefaultFilters == null) {
4194: if (isNew()) {
4195: collNotificationDefaultFilters = new ArrayList();
4196: } else {
4197: criteria.add(NotificationDefaultFilterPeer.MODULE_ID,
4198: getModuleId());
4199: collNotificationDefaultFilters = NotificationDefaultFilterPeer
4200: .doSelectJoinScarabRoleImpl(criteria);
4201: }
4202: } else {
4203: // the following code is to determine if a new query is
4204: // called for. If the criteria is the same as the last
4205: // one, just return the collection.
4206: criteria.add(NotificationDefaultFilterPeer.MODULE_ID,
4207: getModuleId());
4208: if (!lastNotificationDefaultFiltersCriteria
4209: .equals(criteria)) {
4210: collNotificationDefaultFilters = NotificationDefaultFilterPeer
4211: .doSelectJoinScarabRoleImpl(criteria);
4212: }
4213: }
4214: lastNotificationDefaultFiltersCriteria = criteria;
4215:
4216: return collNotificationDefaultFilters;
4217: }
4218:
4219: /**
4220: * If this collection has already been initialized with
4221: * an identical criteria, it returns the collection.
4222: * Otherwise if this ScarabModule is new, it will return
4223: * an empty collection; or if this ScarabModule has previously
4224: * been saved, it will retrieve related NotificationDefaultFilters from storage.
4225: *
4226: * This method is protected by default in order to keep the public
4227: * api reasonable. You can provide public methods for those you
4228: * actually need in ScarabModule.
4229: */
4230: protected List getNotificationDefaultFiltersJoinScarabModule(
4231: Criteria criteria) throws TorqueException {
4232: if (collNotificationDefaultFilters == null) {
4233: if (isNew()) {
4234: collNotificationDefaultFilters = new ArrayList();
4235: } else {
4236: criteria.add(NotificationDefaultFilterPeer.MODULE_ID,
4237: getModuleId());
4238: collNotificationDefaultFilters = NotificationDefaultFilterPeer
4239: .doSelectJoinScarabModule(criteria);
4240: }
4241: } else {
4242: // the following code is to determine if a new query is
4243: // called for. If the criteria is the same as the last
4244: // one, just return the collection.
4245: criteria.add(NotificationDefaultFilterPeer.MODULE_ID,
4246: getModuleId());
4247: if (!lastNotificationDefaultFiltersCriteria
4248: .equals(criteria)) {
4249: collNotificationDefaultFilters = NotificationDefaultFilterPeer
4250: .doSelectJoinScarabModule(criteria);
4251: }
4252: }
4253: lastNotificationDefaultFiltersCriteria = criteria;
4254:
4255: return collNotificationDefaultFilters;
4256: }
4257:
4258: private static List fieldNames = null;
4259:
4260: /**
4261: * Generate a list of field names.
4262: *
4263: * @return a list of field names
4264: */
4265: public static synchronized List getFieldNames() {
4266: if (fieldNames == null) {
4267: fieldNames = new ArrayList();
4268: fieldNames.add("ModuleId");
4269: fieldNames.add("RealName");
4270: fieldNames.add("Domain");
4271: fieldNames.add("Code");
4272: fieldNames.add("Description");
4273: fieldNames.add("Url");
4274: fieldNames.add("ArchiveEmail");
4275: fieldNames.add("ParentId");
4276: fieldNames.add("OwnerId");
4277: fieldNames.add("QaContactId");
4278: fieldNames.add("Deleted");
4279: fieldNames.add("Locked");
4280: fieldNames.add("ClassKey");
4281: fieldNames = Collections.unmodifiableList(fieldNames);
4282: }
4283: return fieldNames;
4284: }
4285:
4286: /**
4287: * Retrieves a field from the object by name passed in as a String.
4288: *
4289: * @param name field name
4290: * @return value
4291: */
4292: public Object getByName(String name) {
4293: if (name.equals("ModuleId")) {
4294: return getModuleId();
4295: }
4296: if (name.equals("RealName")) {
4297: return getRealName();
4298: }
4299: if (name.equals("Domain")) {
4300: return getDomain();
4301: }
4302: if (name.equals("Code")) {
4303: return getCode();
4304: }
4305: if (name.equals("Description")) {
4306: return getDescription();
4307: }
4308: if (name.equals("Url")) {
4309: return getUrl();
4310: }
4311: if (name.equals("ArchiveEmail")) {
4312: return getArchiveEmail();
4313: }
4314: if (name.equals("ParentId")) {
4315: return getParentId();
4316: }
4317: if (name.equals("OwnerId")) {
4318: return getOwnerId();
4319: }
4320: if (name.equals("QaContactId")) {
4321: return getQaContactId();
4322: }
4323: if (name.equals("Deleted")) {
4324: return Boolean.valueOf(getDeleted());
4325: }
4326: if (name.equals("Locked")) {
4327: return Boolean.valueOf(getLocked());
4328: }
4329: if (name.equals("ClassKey")) {
4330: return new Integer(getClassKey());
4331: }
4332: return null;
4333: }
4334:
4335: /**
4336: * Retrieves a field from the object by name passed in
4337: * as a String. The String must be one of the static
4338: * Strings defined in this Class' Peer.
4339: *
4340: * @param name peer name
4341: * @return value
4342: */
4343: public Object getByPeerName(String name) {
4344: if (name.equals(ScarabModulePeer.MODULE_ID)) {
4345: return getModuleId();
4346: }
4347: if (name.equals(ScarabModulePeer.MODULE_NAME)) {
4348: return getRealName();
4349: }
4350: if (name.equals(ScarabModulePeer.DOMAIN)) {
4351: return getDomain();
4352: }
4353: if (name.equals(ScarabModulePeer.MODULE_CODE)) {
4354: return getCode();
4355: }
4356: if (name.equals(ScarabModulePeer.MODULE_DESCRIPTION)) {
4357: return getDescription();
4358: }
4359: if (name.equals(ScarabModulePeer.MODULE_URL)) {
4360: return getUrl();
4361: }
4362: if (name.equals(ScarabModulePeer.ARCHIVE_EMAIL)) {
4363: return getArchiveEmail();
4364: }
4365: if (name.equals(ScarabModulePeer.PARENT_ID)) {
4366: return getParentId();
4367: }
4368: if (name.equals(ScarabModulePeer.OWNER_ID)) {
4369: return getOwnerId();
4370: }
4371: if (name.equals(ScarabModulePeer.QA_CONTACT_ID)) {
4372: return getQaContactId();
4373: }
4374: if (name.equals(ScarabModulePeer.DELETED)) {
4375: return Boolean.valueOf(getDeleted());
4376: }
4377: if (name.equals(ScarabModulePeer.LOCKED)) {
4378: return Boolean.valueOf(getLocked());
4379: }
4380: if (name.equals(ScarabModulePeer.CLASS_KEY)) {
4381: return new Integer(getClassKey());
4382: }
4383: return null;
4384: }
4385:
4386: /**
4387: * Retrieves a field from the object by Position as specified
4388: * in the xml schema. Zero-based.
4389: *
4390: * @param pos position in xml schema
4391: * @return value
4392: */
4393: public Object getByPosition(int pos) {
4394: if (pos == 0) {
4395: return getModuleId();
4396: }
4397: if (pos == 1) {
4398: return getRealName();
4399: }
4400: if (pos == 2) {
4401: return getDomain();
4402: }
4403: if (pos == 3) {
4404: return getCode();
4405: }
4406: if (pos == 4) {
4407: return getDescription();
4408: }
4409: if (pos == 5) {
4410: return getUrl();
4411: }
4412: if (pos == 6) {
4413: return getArchiveEmail();
4414: }
4415: if (pos == 7) {
4416: return getParentId();
4417: }
4418: if (pos == 8) {
4419: return getOwnerId();
4420: }
4421: if (pos == 9) {
4422: return getQaContactId();
4423: }
4424: if (pos == 10) {
4425: return Boolean.valueOf(getDeleted());
4426: }
4427: if (pos == 11) {
4428: return Boolean.valueOf(getLocked());
4429: }
4430: if (pos == 12) {
4431: return new Integer(getClassKey());
4432: }
4433: return null;
4434: }
4435:
4436: /**
4437: * Stores the object in the database. If the object is new,
4438: * it inserts it; otherwise an update is performed.
4439: *
4440: * @throws TorqueException
4441: */
4442: public void save() throws TorqueException {
4443: save(ScarabModulePeer.getMapBuilder().getDatabaseMap()
4444: .getName());
4445: }
4446:
4447: /**
4448: * Stores the object in the database. If the object is new,
4449: * it inserts it; otherwise an update is performed.
4450: * Note: this code is here because the method body is
4451: * auto-generated conditionally and therefore needs to be
4452: * in this file instead of in the super class, BaseObject.
4453: *
4454: * @param dbName
4455: * @throws TorqueException
4456: */
4457: public void save(String dbName) throws TorqueException {
4458: Connection con = null;
4459: try {
4460: con = Transaction.begin(dbName);
4461: save(con);
4462: Transaction.commit(con);
4463: } catch (TorqueException e) {
4464: Transaction.safeRollback(con);
4465: throw e;
4466: }
4467: }
4468:
4469: /** flag to prevent endless save loop, if this object is referenced
4470: by another object which falls in this transaction. */
4471: private boolean alreadyInSave = false;
4472:
4473: /**
4474: * Stores the object in the database. If the object is new,
4475: * it inserts it; otherwise an update is performed. This method
4476: * is meant to be used as part of a transaction, otherwise use
4477: * the save() method and the connection details will be handled
4478: * internally
4479: *
4480: * @param con
4481: * @throws TorqueException
4482: */
4483: public void save(Connection con) throws TorqueException {
4484: if (!alreadyInSave) {
4485: alreadyInSave = true;
4486:
4487: // If this object has been modified, then save it to the database.
4488: if (isModified()) {
4489: if (isNew()) {
4490: ScarabModulePeer.doInsert((ScarabModule) this , con);
4491: setNew(false);
4492: } else {
4493: ScarabModulePeer.doUpdate((ScarabModule) this , con);
4494: }
4495:
4496: if (isCacheOnSave()) {
4497: ModuleManager.putInstance(this );
4498: }
4499: }
4500:
4501: if (collAttributeGroups != null) {
4502: for (int i = 0; i < collAttributeGroups.size(); i++) {
4503: ((AttributeGroup) collAttributeGroups.get(i))
4504: .save(con);
4505: }
4506: }
4507:
4508: if (collIssues != null) {
4509: for (int i = 0; i < collIssues.size(); i++) {
4510: ((Issue) collIssues.get(i)).save(con);
4511: }
4512: }
4513:
4514: if (collRModuleIssueTypes != null) {
4515: for (int i = 0; i < collRModuleIssueTypes.size(); i++) {
4516: ((RModuleIssueType) collRModuleIssueTypes.get(i))
4517: .save(con);
4518: }
4519: }
4520:
4521: if (collMITListItems != null) {
4522: for (int i = 0; i < collMITListItems.size(); i++) {
4523: ((MITListItem) collMITListItems.get(i)).save(con);
4524: }
4525: }
4526:
4527: if (collRModuleAttributes != null) {
4528: for (int i = 0; i < collRModuleAttributes.size(); i++) {
4529: ((RModuleAttribute) collRModuleAttributes.get(i))
4530: .save(con);
4531: }
4532: }
4533:
4534: if (collRModuleOptions != null) {
4535: for (int i = 0; i < collRModuleOptions.size(); i++) {
4536: ((RModuleOption) collRModuleOptions.get(i))
4537: .save(con);
4538: }
4539: }
4540:
4541: if (collRModuleUserAttributes != null) {
4542: for (int i = 0; i < collRModuleUserAttributes.size(); i++) {
4543: ((RModuleUserAttribute) collRModuleUserAttributes
4544: .get(i)).save(con);
4545: }
4546: }
4547:
4548: if (collUserVotes != null) {
4549: for (int i = 0; i < collUserVotes.size(); i++) {
4550: ((UserVote) collUserVotes.get(i)).save(con);
4551: }
4552: }
4553:
4554: if (collQuerys != null) {
4555: for (int i = 0; i < collQuerys.size(); i++) {
4556: ((Query) collQuerys.get(i)).save(con);
4557: }
4558: }
4559:
4560: if (collReports != null) {
4561: for (int i = 0; i < collReports.size(); i++) {
4562: ((Report) collReports.get(i)).save(con);
4563: }
4564: }
4565:
4566: if (collPendingGroupUserRoles != null) {
4567: for (int i = 0; i < collPendingGroupUserRoles.size(); i++) {
4568: ((PendingGroupUserRole) collPendingGroupUserRoles
4569: .get(i)).save(con);
4570: }
4571: }
4572:
4573: if (collGlobalParameters != null) {
4574: for (int i = 0; i < collGlobalParameters.size(); i++) {
4575: ((GlobalParameter) collGlobalParameters.get(i))
4576: .save(con);
4577: }
4578: }
4579:
4580: if (collNotificationFilters != null) {
4581: for (int i = 0; i < collNotificationFilters.size(); i++) {
4582: ((NotificationFilter) collNotificationFilters
4583: .get(i)).save(con);
4584: }
4585: }
4586:
4587: if (collNotificationDefaultFilters != null) {
4588: for (int i = 0; i < collNotificationDefaultFilters
4589: .size(); i++) {
4590: ((NotificationDefaultFilter) collNotificationDefaultFilters
4591: .get(i)).save(con);
4592: }
4593: }
4594: alreadyInSave = false;
4595: }
4596: }
4597:
4598: /**
4599: * Specify whether to cache the object after saving to the db.
4600: * This method returns true
4601: */
4602: protected boolean isCacheOnSave() {
4603: return true;
4604: }
4605:
4606: /**
4607: * Set the PrimaryKey using ObjectKey.
4608: *
4609: * @param key moduleId ObjectKey
4610: */
4611: public void setPrimaryKey(ObjectKey key) throws TorqueException {
4612: setModuleId(new Integer(((NumberKey) key).intValue()));
4613: }
4614:
4615: /**
4616: * Set the PrimaryKey using a String.
4617: *
4618: * @param key
4619: */
4620: public void setPrimaryKey(String key) throws TorqueException {
4621: setModuleId(new Integer(key));
4622: }
4623:
4624: /**
4625: * returns an id that differentiates this object from others
4626: * of its class.
4627: */
4628: public ObjectKey getPrimaryKey() {
4629: return SimpleKey.keyFor(getModuleId());
4630: }
4631:
4632: /**
4633: * get an id that differentiates this object from others
4634: * of its class.
4635: */
4636: public String getQueryKey() {
4637: if (getPrimaryKey() == null) {
4638: return "";
4639: } else {
4640: return getPrimaryKey().toString();
4641: }
4642: }
4643:
4644: /**
4645: * set an id that differentiates this object from others
4646: * of its class.
4647: */
4648: public void setQueryKey(String key) throws TorqueException {
4649: setPrimaryKey(key);
4650: }
4651:
4652: /**
4653: * Makes a copy of this object.
4654: * It creates a new object filling in the simple attributes.
4655: * It then fills all the association collections and sets the
4656: * related objects to isNew=true.
4657: */
4658: public ScarabModule copy() throws TorqueException {
4659: return copyInto(new ScarabModule());
4660: }
4661:
4662: protected ScarabModule copyInto(ScarabModule copyObj)
4663: throws TorqueException {
4664: copyObj.setModuleId(moduleId);
4665: copyObj.setRealName(realName);
4666: copyObj.setDomain(domain);
4667: copyObj.setCode(code);
4668: copyObj.setDescription(description);
4669: copyObj.setUrl(url);
4670: copyObj.setArchiveEmail(archiveEmail);
4671: copyObj.setParentId(parentId);
4672: copyObj.setOwnerId(ownerId);
4673: copyObj.setQaContactId(qaContactId);
4674: copyObj.setDeleted(deleted);
4675: copyObj.setLocked(locked);
4676: copyObj.setClassKey(classKey);
4677:
4678: copyObj.setModuleId((Integer) null);
4679:
4680: List v = getAttributeGroups();
4681: if (v != null) {
4682: for (int i = 0; i < v.size(); i++) {
4683: AttributeGroup obj = (AttributeGroup) v.get(i);
4684: copyObj.addAttributeGroup(obj.copy());
4685: }
4686: } else {
4687: copyObj.collAttributeGroups = null;
4688: }
4689:
4690: v = getIssues();
4691: if (v != null) {
4692: for (int i = 0; i < v.size(); i++) {
4693: Issue obj = (Issue) v.get(i);
4694: copyObj.addIssue(obj.copy());
4695: }
4696: } else {
4697: copyObj.collIssues = null;
4698: }
4699:
4700: v = getRModuleIssueTypes();
4701: if (v != null) {
4702: for (int i = 0; i < v.size(); i++) {
4703: RModuleIssueType obj = (RModuleIssueType) v.get(i);
4704: copyObj.addRModuleIssueType(obj.copy());
4705: }
4706: } else {
4707: copyObj.collRModuleIssueTypes = null;
4708: }
4709:
4710: v = getMITListItems();
4711: if (v != null) {
4712: for (int i = 0; i < v.size(); i++) {
4713: MITListItem obj = (MITListItem) v.get(i);
4714: copyObj.addMITListItem(obj.copy());
4715: }
4716: } else {
4717: copyObj.collMITListItems = null;
4718: }
4719:
4720: v = getRModuleAttributes();
4721: if (v != null) {
4722: for (int i = 0; i < v.size(); i++) {
4723: RModuleAttribute obj = (RModuleAttribute) v.get(i);
4724: copyObj.addRModuleAttribute(obj.copy());
4725: }
4726: } else {
4727: copyObj.collRModuleAttributes = null;
4728: }
4729:
4730: v = getRModuleOptions();
4731: if (v != null) {
4732: for (int i = 0; i < v.size(); i++) {
4733: RModuleOption obj = (RModuleOption) v.get(i);
4734: copyObj.addRModuleOption(obj.copy());
4735: }
4736: } else {
4737: copyObj.collRModuleOptions = null;
4738: }
4739:
4740: v = getRModuleUserAttributes();
4741: if (v != null) {
4742: for (int i = 0; i < v.size(); i++) {
4743: RModuleUserAttribute obj = (RModuleUserAttribute) v
4744: .get(i);
4745: copyObj.addRModuleUserAttribute(obj.copy());
4746: }
4747: } else {
4748: copyObj.collRModuleUserAttributes = null;
4749: }
4750:
4751: v = getUserVotes();
4752: if (v != null) {
4753: for (int i = 0; i < v.size(); i++) {
4754: UserVote obj = (UserVote) v.get(i);
4755: copyObj.addUserVote(obj.copy());
4756: }
4757: } else {
4758: copyObj.collUserVotes = null;
4759: }
4760:
4761: v = getQuerys();
4762: if (v != null) {
4763: for (int i = 0; i < v.size(); i++) {
4764: Query obj = (Query) v.get(i);
4765: copyObj.addQuery(obj.copy());
4766: }
4767: } else {
4768: copyObj.collQuerys = null;
4769: }
4770:
4771: v = getReports();
4772: if (v != null) {
4773: for (int i = 0; i < v.size(); i++) {
4774: Report obj = (Report) v.get(i);
4775: copyObj.addReport(obj.copy());
4776: }
4777: } else {
4778: copyObj.collReports = null;
4779: }
4780:
4781: v = getPendingGroupUserRoles();
4782: if (v != null) {
4783: for (int i = 0; i < v.size(); i++) {
4784: PendingGroupUserRole obj = (PendingGroupUserRole) v
4785: .get(i);
4786: copyObj.addPendingGroupUserRole(obj.copy());
4787: }
4788: } else {
4789: copyObj.collPendingGroupUserRoles = null;
4790: }
4791:
4792: v = getGlobalParameters();
4793: if (v != null) {
4794: for (int i = 0; i < v.size(); i++) {
4795: GlobalParameter obj = (GlobalParameter) v.get(i);
4796: copyObj.addGlobalParameter(obj.copy());
4797: }
4798: } else {
4799: copyObj.collGlobalParameters = null;
4800: }
4801:
4802: v = getNotificationFilters();
4803: if (v != null) {
4804: for (int i = 0; i < v.size(); i++) {
4805: NotificationFilter obj = (NotificationFilter) v.get(i);
4806: copyObj.addNotificationFilter(obj.copy());
4807: }
4808: } else {
4809: copyObj.collNotificationFilters = null;
4810: }
4811:
4812: v = getNotificationDefaultFilters();
4813: if (v != null) {
4814: for (int i = 0; i < v.size(); i++) {
4815: NotificationDefaultFilter obj = (NotificationDefaultFilter) v
4816: .get(i);
4817: copyObj.addNotificationDefaultFilter(obj.copy());
4818: }
4819: } else {
4820: copyObj.collNotificationDefaultFilters = null;
4821: }
4822: return copyObj;
4823: }
4824:
4825: /**
4826: * returns a peer instance associated with this om. Since Peer classes
4827: * are not to have any instance attributes, this method returns the
4828: * same instance for all member of this class. The method could therefore
4829: * be static, but this would prevent one from overriding the behavior.
4830: */
4831: public ScarabModulePeer getPeer() {
4832: return peer;
4833: }
4834:
4835: public String toString() {
4836: StringBuffer str = new StringBuffer();
4837: str.append("ScarabModule:\n");
4838: str.append("ModuleId = ").append(getModuleId()).append("\n");
4839: str.append("RealName = ").append(getRealName()).append("\n");
4840: str.append("Domain = ").append(getDomain()).append("\n");
4841: str.append("Code = ").append(getCode()).append("\n");
4842: str.append("Description = ").append(getDescription()).append(
4843: "\n");
4844: str.append("Url = ").append(getUrl()).append("\n");
4845: str.append("ArchiveEmail = ").append(getArchiveEmail()).append(
4846: "\n");
4847: str.append("ParentId = ").append(getParentId()).append("\n");
4848: str.append("OwnerId = ").append(getOwnerId()).append("\n");
4849: str.append("QaContactId = ").append(getQaContactId()).append(
4850: "\n");
4851: str.append("Deleted = ").append(getDeleted()).append("\n");
4852: str.append("Locked = ").append(getLocked()).append("\n");
4853: str.append("ClassKey = ").append(getClassKey()).append("\n");
4854: return (str.toString());
4855: }
4856: }
|