Source Code Cross Referenced for Item.java in  » J2EE » Jaffa » org » jaffa » persistence » domainobjects » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Jaffa » org.jaffa.persistence.domainobjects 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        // .//GEN-BEGIN:1_be
0002:        /******************************************************
0003:         * Code Generated From JAFFA Framework Default Pattern
0004:         * 
0005:         * The JAFFA Project can be found at http://jaffa.sourceforge.net
0006:         * and is available under the Lesser GNU Public License
0007:         ******************************************************/package org.jaffa.persistence.domainobjects;
0008:
0009:        import org.apache.log4j.Logger;
0010:        import java.util.*;
0011:        import org.jaffa.datatypes.*;
0012:        import org.jaffa.metadata.*;
0013:        import org.jaffa.rules.RulesEngine;
0014:        import org.jaffa.persistence.*;
0015:        import org.jaffa.persistence.exceptions.*;
0016:        import org.jaffa.exceptions.FrameworkException;
0017:        import org.jaffa.exceptions.RelatedDomainObjectFoundException;
0018:        import org.jaffa.exceptions.DuplicateKeyException;
0019:        import org.jaffa.datatypes.exceptions.InvalidForeignKeyException;
0020:        import org.jaffa.exceptions.ApplicationExceptions;
0021:
0022:        import org.jaffa.persistence.domainobjects.Part;
0023:        import org.jaffa.persistence.domainobjects.PartMeta;
0024:        import org.jaffa.persistence.domainobjects.Condition;
0025:        import org.jaffa.persistence.domainobjects.ConditionMeta;
0026:
0027:        // .//GEN-END:1_be
0028:        // Add additional imports//GEN-FIRST:imports
0029:
0030:        // .//GEN-LAST:imports
0031:        // .//GEN-BEGIN:2_be
0032:        /**
0033:         * Auto Generated Persistent class for the ZZ_JUT_ITEM table.
0034:         * @author  Auto-Generated
0035:         */
0036:        public class Item extends Persistent {
0037:
0038:            private static final Logger log = Logger.getLogger(Item.class);
0039:
0040:            /** Holds value of property itemId. */
0041:            private java.lang.String m_itemId;
0042:
0043:            /** Holds value of property receivedItemId. */
0044:            private java.lang.String m_receivedItemId;
0045:
0046:            /** Holds value of property part. */
0047:            private java.lang.String m_part;
0048:
0049:            /** Holds value of property prime. */
0050:            private java.lang.String m_prime;
0051:
0052:            /** Holds value of property sc. */
0053:            private java.lang.String m_sc;
0054:
0055:            /** Holds value of property condition. */
0056:            private java.lang.String m_condition;
0057:
0058:            /** Holds value of property createdDatetime. */
0059:            private org.jaffa.datatypes.DateTime m_createdDatetime;
0060:
0061:            /** Holds value of property qty. */
0062:            private java.lang.Long m_qty;
0063:
0064:            /** Holds value of property keyRef. */
0065:            private java.lang.String m_keyRef;
0066:
0067:            /** Holds value of property status1. */
0068:            private java.lang.String m_status1;
0069:
0070:            /** Holds value of property status2. */
0071:            private java.lang.String m_status2;
0072:
0073:            /** Holds value of property status3. */
0074:            private java.lang.String m_status3;
0075:
0076:            /** Holds related foreign Part object. */
0077:            private transient Part m_partObject;
0078:
0079:            /** Holds related foreign Condition object. */
0080:            private transient Condition m_conditionObject;
0081:
0082:            /** Check if the domain object exists for the input Primary Key.
0083:             * @return true if the domain object exists for the input Primary Key.
0084:             * @throws FrameworkException Indicates some system error
0085:             */
0086:            public static boolean exists(UOW uow, java.lang.String itemId)
0087:                    throws FrameworkException {
0088:                return findByPK(uow, itemId) != null ? true : false;
0089:            }
0090:
0091:            /** Returns the domain object for the input Primary Key.
0092:             * @return the domain object for the input Primary Key. A null is returned if the domain object is not found.
0093:             * @throws FrameworkException Indicates some system error
0094:             */
0095:            public static Item findByPK(UOW uow, java.lang.String itemId)
0096:                    throws FrameworkException {
0097:                boolean localUow = false;
0098:                try {
0099:                    if (uow == null || !uow.isActive()) {
0100:                        uow = new UOW();
0101:                        localUow = true;
0102:                    }
0103:                    Criteria criteria = findByPKCriteria(itemId);
0104:                    Iterator itr = uow.query(criteria).iterator();
0105:                    if (itr.hasNext())
0106:                        return (Item) itr.next();
0107:                    else
0108:                        return null;
0109:                } finally {
0110:                    if (localUow && uow != null)
0111:                        uow.rollback();
0112:                }
0113:            }
0114:
0115:            /** Returns a Criteria object for retrieving the domain object based on the input Primary Key.
0116:             * @return a Criteria object for retrieving the domain object based on the input Primary Key.
0117:             */
0118:            public static Criteria findByPKCriteria(java.lang.String itemId) {
0119:                Criteria criteria = new Criteria();
0120:                criteria.setTable(ItemMeta.getName());
0121:                criteria.addCriteria(ItemMeta.ITEM_ID, itemId);
0122:                return criteria;
0123:            }
0124:
0125:            // .//GEN-END:2_be
0126:            // .//GEN-BEGIN:itemId_be
0127:            /** Getter for property itemId.
0128:             * @return Value of property itemId.
0129:             */
0130:            public java.lang.String getItemId() {
0131:                return m_itemId;
0132:            }
0133:
0134:            /** Use this method to update the property itemId.
0135:             * This method will do nothing and simply return if the input value is the same as the current value.
0136:             * Validation will be performed on the input value.
0137:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
0138:             * @param itemId New value of property itemId.
0139:             * @throws ValidationException if an invalid value is passed.
0140:             * @throws UpdatePrimaryKeyException if this domain object was loaded from the database.
0141:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0142:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0143:             * @throws FrameworkException Indicates some system error
0144:             */
0145:            public void setItemId(java.lang.String itemId)
0146:                    throws ValidationException, UpdatePrimaryKeyException,
0147:                    ReadOnlyObjectException, AlreadyLockedObjectException,
0148:                    FrameworkException {
0149:                // ignore, if the current value and new value are the same
0150:                if (m_itemId == null ? itemId == null : m_itemId.equals(itemId))
0151:                    return;
0152:
0153:                // this is part of the primary key.. do not update if its a database occurence.
0154:                if (isDatabaseOccurence())
0155:                    throw new UpdatePrimaryKeyException();
0156:
0157:                itemId = validateItemId(itemId);
0158:                // .//GEN-END:itemId_be
0159:                // Add custom code before setting the value//GEN-FIRST:itemId
0160:
0161:                // .//GEN-LAST:itemId
0162:                // .//GEN-BEGIN:itemId_1_be
0163:                super .update();
0164:                super .addInitialValue(ItemMeta.ITEM_ID, m_itemId);
0165:                m_itemId = itemId;
0166:                // .//GEN-END:itemId_1_be
0167:                // Add custom code after setting the value//GEN-FIRST:itemId_3
0168:
0169:                // .//GEN-LAST:itemId_3
0170:                // .//GEN-BEGIN:itemId_2_be
0171:            }
0172:
0173:            /** This method is present for backwards compatibility only.
0174:             * It merely invokes the setItemId() method.
0175:             * @param itemId New value of property itemId.
0176:             * @throws ValidationException if an invalid value is passed.
0177:             * @throws UpdatePrimaryKeyException if this domain object was loaded from the database.
0178:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0179:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0180:             * @throws FrameworkException Indicates some system error
0181:             */
0182:            public void updateItemId(java.lang.String itemId)
0183:                    throws ValidationException, UpdatePrimaryKeyException,
0184:                    ReadOnlyObjectException, AlreadyLockedObjectException,
0185:                    FrameworkException {
0186:                setItemId(itemId);
0187:            }
0188:
0189:            /** Use this method to validate a value for the property itemId.
0190:             * @param itemId Value to be validated for the property itemId.
0191:             * @throws ValidationException if an invalid value is passed
0192:             * @throws FrameworkException Indicates some system error
0193:             */
0194:            public java.lang.String validateItemId(java.lang.String itemId)
0195:                    throws ValidationException, FrameworkException {
0196:                // .//GEN-END:itemId_2_be
0197:                // Add custom code before validation//GEN-FIRST:itemId_1
0198:
0199:                // .//GEN-LAST:itemId_1
0200:                // .//GEN-BEGIN:itemId_3_be
0201:                itemId = FieldValidator.validate(itemId,
0202:                        (StringFieldMetaData) ItemMeta.META_ITEM_ID, true);
0203:
0204:                // Invoke the Dynamic Rules Engine
0205:                RulesEngine.doAllValidationsForDomainField(ItemMeta.getName(),
0206:                        ItemMeta.ITEM_ID, itemId, this .getUOW());
0207:
0208:                // .//GEN-END:itemId_3_be
0209:                // Add custom code after a successful validation//GEN-FIRST:itemId_2
0210:
0211:                // .//GEN-LAST:itemId_2
0212:                // .//GEN-BEGIN:itemId_4_be
0213:                return itemId;
0214:            }
0215:
0216:            // .//GEN-END:itemId_4_be
0217:            // .//GEN-BEGIN:receivedItemId_be
0218:            /** Getter for property receivedItemId.
0219:             * @return Value of property receivedItemId.
0220:             */
0221:            public java.lang.String getReceivedItemId() {
0222:                return m_receivedItemId;
0223:            }
0224:
0225:            /** Use this method to update the property receivedItemId.
0226:             * This method will do nothing and simply return if the input value is the same as the current value.
0227:             * Validation will be performed on the input value.
0228:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
0229:             * @param receivedItemId New value of property receivedItemId.
0230:             * @throws ValidationException if an invalid value is passed.
0231:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0232:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0233:             * @throws FrameworkException Indicates some system error
0234:             */
0235:            public void setReceivedItemId(java.lang.String receivedItemId)
0236:                    throws ValidationException, ReadOnlyObjectException,
0237:                    AlreadyLockedObjectException, FrameworkException {
0238:                // ignore, if the current value and new value are the same
0239:                if (m_receivedItemId == null ? receivedItemId == null
0240:                        : m_receivedItemId.equals(receivedItemId))
0241:                    return;
0242:
0243:                receivedItemId = validateReceivedItemId(receivedItemId);
0244:                // .//GEN-END:receivedItemId_be
0245:                // Add custom code before setting the value//GEN-FIRST:receivedItemId
0246:
0247:                // .//GEN-LAST:receivedItemId
0248:                // .//GEN-BEGIN:receivedItemId_1_be
0249:                super .update();
0250:                super .addInitialValue(ItemMeta.RECEIVED_ITEM_ID,
0251:                        m_receivedItemId);
0252:                m_receivedItemId = receivedItemId;
0253:                // .//GEN-END:receivedItemId_1_be
0254:                // Add custom code after setting the value//GEN-FIRST:receivedItemId_3
0255:
0256:                // .//GEN-LAST:receivedItemId_3
0257:                // .//GEN-BEGIN:receivedItemId_2_be
0258:            }
0259:
0260:            /** This method is present for backwards compatibility only.
0261:             * It merely invokes the setReceivedItemId() method.
0262:             * @param receivedItemId New value of property receivedItemId.
0263:             * @throws ValidationException if an invalid value is passed.
0264:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0265:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0266:             * @throws FrameworkException Indicates some system error
0267:             */
0268:            public void updateReceivedItemId(java.lang.String receivedItemId)
0269:                    throws ValidationException, ReadOnlyObjectException,
0270:                    AlreadyLockedObjectException, FrameworkException {
0271:                setReceivedItemId(receivedItemId);
0272:            }
0273:
0274:            /** Use this method to validate a value for the property receivedItemId.
0275:             * @param receivedItemId Value to be validated for the property receivedItemId.
0276:             * @throws ValidationException if an invalid value is passed
0277:             * @throws FrameworkException Indicates some system error
0278:             */
0279:            public java.lang.String validateReceivedItemId(
0280:                    java.lang.String receivedItemId)
0281:                    throws ValidationException, FrameworkException {
0282:                // .//GEN-END:receivedItemId_2_be
0283:                // Add custom code before validation//GEN-FIRST:receivedItemId_1
0284:
0285:                // .//GEN-LAST:receivedItemId_1
0286:                // .//GEN-BEGIN:receivedItemId_3_be
0287:                receivedItemId = FieldValidator.validate(receivedItemId,
0288:                        (StringFieldMetaData) ItemMeta.META_RECEIVED_ITEM_ID,
0289:                        true);
0290:
0291:                // Invoke the Dynamic Rules Engine
0292:                RulesEngine.doAllValidationsForDomainField(ItemMeta.getName(),
0293:                        ItemMeta.RECEIVED_ITEM_ID, receivedItemId, this 
0294:                                .getUOW());
0295:
0296:                // .//GEN-END:receivedItemId_3_be
0297:                // Add custom code after a successful validation//GEN-FIRST:receivedItemId_2
0298:
0299:                // .//GEN-LAST:receivedItemId_2
0300:                // .//GEN-BEGIN:receivedItemId_4_be
0301:                return receivedItemId;
0302:            }
0303:
0304:            // .//GEN-END:receivedItemId_4_be
0305:            // .//GEN-BEGIN:part_be
0306:            /** Getter for property part.
0307:             * @return Value of property part.
0308:             */
0309:            public java.lang.String getPart() {
0310:                return m_part;
0311:            }
0312:
0313:            /** Use this method to update the property part.
0314:             * This method will do nothing and simply return if the input value is the same as the current value.
0315:             * Validation will be performed on the input value.
0316:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
0317:             * @param part New value of property part.
0318:             * @throws ValidationException if an invalid value is passed.
0319:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0320:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0321:             * @throws FrameworkException Indicates some system error
0322:             */
0323:            public void setPart(java.lang.String part)
0324:                    throws ValidationException, ReadOnlyObjectException,
0325:                    AlreadyLockedObjectException, FrameworkException {
0326:                // ignore, if the current value and new value are the same
0327:                if (m_part == null ? part == null : m_part.equals(part))
0328:                    return;
0329:
0330:                part = validatePart(part);
0331:                // .//GEN-END:part_be
0332:                // Add custom code before setting the value//GEN-FIRST:part
0333:
0334:                // .//GEN-LAST:part
0335:                // .//GEN-BEGIN:part_1_be
0336:                super .update();
0337:                super .addInitialValue(ItemMeta.PART, m_part);
0338:                m_part = part;
0339:                m_partObject = null;
0340:                // .//GEN-END:part_1_be
0341:                // Add custom code after setting the value//GEN-FIRST:part_3
0342:
0343:                // .//GEN-LAST:part_3
0344:                // .//GEN-BEGIN:part_2_be
0345:            }
0346:
0347:            /** This method is present for backwards compatibility only.
0348:             * It merely invokes the setPart() method.
0349:             * @param part New value of property part.
0350:             * @throws ValidationException if an invalid value is passed.
0351:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0352:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0353:             * @throws FrameworkException Indicates some system error
0354:             */
0355:            public void updatePart(java.lang.String part)
0356:                    throws ValidationException, ReadOnlyObjectException,
0357:                    AlreadyLockedObjectException, FrameworkException {
0358:                setPart(part);
0359:            }
0360:
0361:            /** Use this method to validate a value for the property part.
0362:             * @param part Value to be validated for the property part.
0363:             * @throws ValidationException if an invalid value is passed
0364:             * @throws FrameworkException Indicates some system error
0365:             */
0366:            public java.lang.String validatePart(java.lang.String part)
0367:                    throws ValidationException, FrameworkException {
0368:                // .//GEN-END:part_2_be
0369:                // Add custom code before validation//GEN-FIRST:part_1
0370:
0371:                // .//GEN-LAST:part_1
0372:                // .//GEN-BEGIN:part_3_be
0373:                part = FieldValidator.validate(part,
0374:                        (StringFieldMetaData) ItemMeta.META_PART, true);
0375:
0376:                // Invoke the Dynamic Rules Engine
0377:                RulesEngine.doAllValidationsForDomainField(ItemMeta.getName(),
0378:                        ItemMeta.PART, part, this .getUOW());
0379:
0380:                // .//GEN-END:part_3_be
0381:                // Add custom code after a successful validation//GEN-FIRST:part_2
0382:
0383:                // .//GEN-LAST:part_2
0384:                // .//GEN-BEGIN:part_4_be
0385:                return part;
0386:            }
0387:
0388:            // .//GEN-END:part_4_be
0389:            // .//GEN-BEGIN:prime_be
0390:            /** Getter for property prime.
0391:             * @return Value of property prime.
0392:             */
0393:            public java.lang.String getPrime() {
0394:                return m_prime;
0395:            }
0396:
0397:            /** Use this method to update the property prime.
0398:             * This method will do nothing and simply return if the input value is the same as the current value.
0399:             * Validation will be performed on the input value.
0400:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
0401:             * @param prime New value of property prime.
0402:             * @throws ValidationException if an invalid value is passed.
0403:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0404:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0405:             * @throws FrameworkException Indicates some system error
0406:             */
0407:            public void setPrime(java.lang.String prime)
0408:                    throws ValidationException, ReadOnlyObjectException,
0409:                    AlreadyLockedObjectException, FrameworkException {
0410:                // ignore, if the current value and new value are the same
0411:                if (m_prime == null ? prime == null : m_prime.equals(prime))
0412:                    return;
0413:
0414:                prime = validatePrime(prime);
0415:                // .//GEN-END:prime_be
0416:                // Add custom code before setting the value//GEN-FIRST:prime
0417:
0418:                // .//GEN-LAST:prime
0419:                // .//GEN-BEGIN:prime_1_be
0420:                super .update();
0421:                super .addInitialValue(ItemMeta.PRIME, m_prime);
0422:                m_prime = prime;
0423:                // .//GEN-END:prime_1_be
0424:                // Add custom code after setting the value//GEN-FIRST:prime_3
0425:
0426:                // .//GEN-LAST:prime_3
0427:                // .//GEN-BEGIN:prime_2_be
0428:            }
0429:
0430:            /** This method is present for backwards compatibility only.
0431:             * It merely invokes the setPrime() method.
0432:             * @param prime New value of property prime.
0433:             * @throws ValidationException if an invalid value is passed.
0434:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0435:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0436:             * @throws FrameworkException Indicates some system error
0437:             */
0438:            public void updatePrime(java.lang.String prime)
0439:                    throws ValidationException, ReadOnlyObjectException,
0440:                    AlreadyLockedObjectException, FrameworkException {
0441:                setPrime(prime);
0442:            }
0443:
0444:            /** Use this method to validate a value for the property prime.
0445:             * @param prime Value to be validated for the property prime.
0446:             * @throws ValidationException if an invalid value is passed
0447:             * @throws FrameworkException Indicates some system error
0448:             */
0449:            public java.lang.String validatePrime(java.lang.String prime)
0450:                    throws ValidationException, FrameworkException {
0451:                // .//GEN-END:prime_2_be
0452:                // Add custom code before validation//GEN-FIRST:prime_1
0453:
0454:                // .//GEN-LAST:prime_1
0455:                // .//GEN-BEGIN:prime_3_be
0456:                prime = FieldValidator.validate(prime,
0457:                        (StringFieldMetaData) ItemMeta.META_PRIME, true);
0458:
0459:                // Invoke the Dynamic Rules Engine
0460:                RulesEngine.doAllValidationsForDomainField(ItemMeta.getName(),
0461:                        ItemMeta.PRIME, prime, this .getUOW());
0462:
0463:                // .//GEN-END:prime_3_be
0464:                // Add custom code after a successful validation//GEN-FIRST:prime_2
0465:
0466:                // .//GEN-LAST:prime_2
0467:                // .//GEN-BEGIN:prime_4_be
0468:                return prime;
0469:            }
0470:
0471:            // .//GEN-END:prime_4_be
0472:            // .//GEN-BEGIN:sc_be
0473:            /** Getter for property sc.
0474:             * @return Value of property sc.
0475:             */
0476:            public java.lang.String getSc() {
0477:                return m_sc;
0478:            }
0479:
0480:            /** Use this method to update the property sc.
0481:             * This method will do nothing and simply return if the input value is the same as the current value.
0482:             * Validation will be performed on the input value.
0483:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
0484:             * @param sc New value of property sc.
0485:             * @throws ValidationException if an invalid value is passed.
0486:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0487:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0488:             * @throws FrameworkException Indicates some system error
0489:             */
0490:            public void setSc(java.lang.String sc) throws ValidationException,
0491:                    ReadOnlyObjectException, AlreadyLockedObjectException,
0492:                    FrameworkException {
0493:                // ignore, if the current value and new value are the same
0494:                if (m_sc == null ? sc == null : m_sc.equals(sc))
0495:                    return;
0496:
0497:                sc = validateSc(sc);
0498:                // .//GEN-END:sc_be
0499:                // Add custom code before setting the value//GEN-FIRST:sc
0500:
0501:                // .//GEN-LAST:sc
0502:                // .//GEN-BEGIN:sc_1_be
0503:                super .update();
0504:                super .addInitialValue(ItemMeta.SC, m_sc);
0505:                m_sc = sc;
0506:                // .//GEN-END:sc_1_be
0507:                // Add custom code after setting the value//GEN-FIRST:sc_3
0508:
0509:                // .//GEN-LAST:sc_3
0510:                // .//GEN-BEGIN:sc_2_be
0511:            }
0512:
0513:            /** This method is present for backwards compatibility only.
0514:             * It merely invokes the setSc() method.
0515:             * @param sc New value of property sc.
0516:             * @throws ValidationException if an invalid value is passed.
0517:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0518:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0519:             * @throws FrameworkException Indicates some system error
0520:             */
0521:            public void updateSc(java.lang.String sc)
0522:                    throws ValidationException, ReadOnlyObjectException,
0523:                    AlreadyLockedObjectException, FrameworkException {
0524:                setSc(sc);
0525:            }
0526:
0527:            /** Use this method to validate a value for the property sc.
0528:             * @param sc Value to be validated for the property sc.
0529:             * @throws ValidationException if an invalid value is passed
0530:             * @throws FrameworkException Indicates some system error
0531:             */
0532:            public java.lang.String validateSc(java.lang.String sc)
0533:                    throws ValidationException, FrameworkException {
0534:                // .//GEN-END:sc_2_be
0535:                // Add custom code before validation//GEN-FIRST:sc_1
0536:
0537:                // .//GEN-LAST:sc_1
0538:                // .//GEN-BEGIN:sc_3_be
0539:                sc = FieldValidator.validate(sc,
0540:                        (StringFieldMetaData) ItemMeta.META_SC, true);
0541:
0542:                // Invoke the Dynamic Rules Engine
0543:                RulesEngine.doAllValidationsForDomainField(ItemMeta.getName(),
0544:                        ItemMeta.SC, sc, this .getUOW());
0545:
0546:                // .//GEN-END:sc_3_be
0547:                // Add custom code after a successful validation//GEN-FIRST:sc_2
0548:
0549:                // .//GEN-LAST:sc_2
0550:                // .//GEN-BEGIN:sc_4_be
0551:                return sc;
0552:            }
0553:
0554:            // .//GEN-END:sc_4_be
0555:            // .//GEN-BEGIN:condition_be
0556:            /** Getter for property condition.
0557:             * @return Value of property condition.
0558:             */
0559:            public java.lang.String getCondition() {
0560:                return m_condition;
0561:            }
0562:
0563:            /** Use this method to update the property condition.
0564:             * This method will do nothing and simply return if the input value is the same as the current value.
0565:             * Validation will be performed on the input value.
0566:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
0567:             * @param condition New value of property condition.
0568:             * @throws ValidationException if an invalid value is passed.
0569:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0570:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0571:             * @throws FrameworkException Indicates some system error
0572:             */
0573:            public void setCondition(java.lang.String condition)
0574:                    throws ValidationException, ReadOnlyObjectException,
0575:                    AlreadyLockedObjectException, FrameworkException {
0576:                // ignore, if the current value and new value are the same
0577:                if (m_condition == null ? condition == null : m_condition
0578:                        .equals(condition))
0579:                    return;
0580:
0581:                condition = validateCondition(condition);
0582:                // .//GEN-END:condition_be
0583:                // Add custom code before setting the value//GEN-FIRST:condition
0584:
0585:                // .//GEN-LAST:condition
0586:                // .//GEN-BEGIN:condition_1_be
0587:                super .update();
0588:                super .addInitialValue(ItemMeta.CONDITION, m_condition);
0589:                m_condition = condition;
0590:                m_conditionObject = null;
0591:                // .//GEN-END:condition_1_be
0592:                // Add custom code after setting the value//GEN-FIRST:condition_3
0593:
0594:                // .//GEN-LAST:condition_3
0595:                // .//GEN-BEGIN:condition_2_be
0596:            }
0597:
0598:            /** This method is present for backwards compatibility only.
0599:             * It merely invokes the setCondition() method.
0600:             * @param condition New value of property condition.
0601:             * @throws ValidationException if an invalid value is passed.
0602:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0603:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0604:             * @throws FrameworkException Indicates some system error
0605:             */
0606:            public void updateCondition(java.lang.String condition)
0607:                    throws ValidationException, ReadOnlyObjectException,
0608:                    AlreadyLockedObjectException, FrameworkException {
0609:                setCondition(condition);
0610:            }
0611:
0612:            /** Use this method to validate a value for the property condition.
0613:             * @param condition Value to be validated for the property condition.
0614:             * @throws ValidationException if an invalid value is passed
0615:             * @throws FrameworkException Indicates some system error
0616:             */
0617:            public java.lang.String validateCondition(java.lang.String condition)
0618:                    throws ValidationException, FrameworkException {
0619:                // .//GEN-END:condition_2_be
0620:                // Add custom code before validation//GEN-FIRST:condition_1
0621:
0622:                // .//GEN-LAST:condition_1
0623:                // .//GEN-BEGIN:condition_3_be
0624:                condition = FieldValidator.validate(condition,
0625:                        (StringFieldMetaData) ItemMeta.META_CONDITION, true);
0626:
0627:                // Invoke the Dynamic Rules Engine
0628:                RulesEngine.doAllValidationsForDomainField(ItemMeta.getName(),
0629:                        ItemMeta.CONDITION, condition, this .getUOW());
0630:
0631:                // .//GEN-END:condition_3_be
0632:                // Add custom code after a successful validation//GEN-FIRST:condition_2
0633:
0634:                // .//GEN-LAST:condition_2
0635:                // .//GEN-BEGIN:condition_4_be
0636:                return condition;
0637:            }
0638:
0639:            // .//GEN-END:condition_4_be
0640:            // .//GEN-BEGIN:createdDatetime_be
0641:            /** Getter for property createdDatetime.
0642:             * @return Value of property createdDatetime.
0643:             */
0644:            public org.jaffa.datatypes.DateTime getCreatedDatetime() {
0645:                return m_createdDatetime;
0646:            }
0647:
0648:            /** Use this method to update the property createdDatetime.
0649:             * This method will do nothing and simply return if the input value is the same as the current value.
0650:             * Validation will be performed on the input value.
0651:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
0652:             * @param createdDatetime New value of property createdDatetime.
0653:             * @throws ValidationException if an invalid value is passed.
0654:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0655:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0656:             * @throws FrameworkException Indicates some system error
0657:             */
0658:            public void setCreatedDatetime(
0659:                    org.jaffa.datatypes.DateTime createdDatetime)
0660:                    throws ValidationException, ReadOnlyObjectException,
0661:                    AlreadyLockedObjectException, FrameworkException {
0662:                // ignore, if the current value and new value are the same
0663:                if (m_createdDatetime == null ? createdDatetime == null
0664:                        : m_createdDatetime.equals(createdDatetime))
0665:                    return;
0666:
0667:                createdDatetime = validateCreatedDatetime(createdDatetime);
0668:                // .//GEN-END:createdDatetime_be
0669:                // Add custom code before setting the value//GEN-FIRST:createdDatetime
0670:
0671:                // .//GEN-LAST:createdDatetime
0672:                // .//GEN-BEGIN:createdDatetime_1_be
0673:                super .update();
0674:                super .addInitialValue(ItemMeta.CREATED_DATETIME,
0675:                        m_createdDatetime);
0676:                m_createdDatetime = createdDatetime;
0677:                // .//GEN-END:createdDatetime_1_be
0678:                // Add custom code after setting the value//GEN-FIRST:createdDatetime_3
0679:
0680:                // .//GEN-LAST:createdDatetime_3
0681:                // .//GEN-BEGIN:createdDatetime_2_be
0682:            }
0683:
0684:            /** This method is present for backwards compatibility only.
0685:             * It merely invokes the setCreatedDatetime() method.
0686:             * @param createdDatetime New value of property createdDatetime.
0687:             * @throws ValidationException if an invalid value is passed.
0688:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0689:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0690:             * @throws FrameworkException Indicates some system error
0691:             */
0692:            public void updateCreatedDatetime(
0693:                    org.jaffa.datatypes.DateTime createdDatetime)
0694:                    throws ValidationException, ReadOnlyObjectException,
0695:                    AlreadyLockedObjectException, FrameworkException {
0696:                setCreatedDatetime(createdDatetime);
0697:            }
0698:
0699:            /** Use this method to validate a value for the property createdDatetime.
0700:             * @param createdDatetime Value to be validated for the property createdDatetime.
0701:             * @throws ValidationException if an invalid value is passed
0702:             * @throws FrameworkException Indicates some system error
0703:             */
0704:            public org.jaffa.datatypes.DateTime validateCreatedDatetime(
0705:                    org.jaffa.datatypes.DateTime createdDatetime)
0706:                    throws ValidationException, FrameworkException {
0707:                // .//GEN-END:createdDatetime_2_be
0708:                // Add custom code before validation//GEN-FIRST:createdDatetime_1
0709:
0710:                // .//GEN-LAST:createdDatetime_1
0711:                // .//GEN-BEGIN:createdDatetime_3_be
0712:                createdDatetime = FieldValidator.validate(createdDatetime,
0713:                        (DateTimeFieldMetaData) ItemMeta.META_CREATED_DATETIME,
0714:                        true);
0715:
0716:                // Invoke the Dynamic Rules Engine
0717:                RulesEngine.doAllValidationsForDomainField(ItemMeta.getName(),
0718:                        ItemMeta.CREATED_DATETIME, createdDatetime, this 
0719:                                .getUOW());
0720:
0721:                // .//GEN-END:createdDatetime_3_be
0722:                // Add custom code after a successful validation//GEN-FIRST:createdDatetime_2
0723:
0724:                // .//GEN-LAST:createdDatetime_2
0725:                // .//GEN-BEGIN:createdDatetime_4_be
0726:                return createdDatetime;
0727:            }
0728:
0729:            // .//GEN-END:createdDatetime_4_be
0730:            // .//GEN-BEGIN:qty_be
0731:            /** Getter for property qty.
0732:             * @return Value of property qty.
0733:             */
0734:            public java.lang.Long getQty() {
0735:                return m_qty;
0736:            }
0737:
0738:            /** Use this method to update the property qty.
0739:             * This method will do nothing and simply return if the input value is the same as the current value.
0740:             * Validation will be performed on the input value.
0741:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
0742:             * @param qty New value of property qty.
0743:             * @throws ValidationException if an invalid value is passed.
0744:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0745:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0746:             * @throws FrameworkException Indicates some system error
0747:             */
0748:            public void setQty(java.lang.Long qty) throws ValidationException,
0749:                    ReadOnlyObjectException, AlreadyLockedObjectException,
0750:                    FrameworkException {
0751:                // ignore, if the current value and new value are the same
0752:                if (m_qty == null ? qty == null : m_qty.equals(qty))
0753:                    return;
0754:
0755:                qty = validateQty(qty);
0756:                // .//GEN-END:qty_be
0757:                // Add custom code before setting the value//GEN-FIRST:qty
0758:
0759:                // .//GEN-LAST:qty
0760:                // .//GEN-BEGIN:qty_1_be
0761:                super .update();
0762:                super .addInitialValue(ItemMeta.QTY, m_qty);
0763:                m_qty = qty;
0764:                // .//GEN-END:qty_1_be
0765:                // Add custom code after setting the value//GEN-FIRST:qty_3
0766:
0767:                // .//GEN-LAST:qty_3
0768:                // .//GEN-BEGIN:qty_2_be
0769:            }
0770:
0771:            /** This method is present for backwards compatibility only.
0772:             * It merely invokes the setQty() method.
0773:             * @param qty New value of property qty.
0774:             * @throws ValidationException if an invalid value is passed.
0775:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0776:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0777:             * @throws FrameworkException Indicates some system error
0778:             */
0779:            public void updateQty(java.lang.Long qty)
0780:                    throws ValidationException, ReadOnlyObjectException,
0781:                    AlreadyLockedObjectException, FrameworkException {
0782:                setQty(qty);
0783:            }
0784:
0785:            /** Use this method to validate a value for the property qty.
0786:             * @param qty Value to be validated for the property qty.
0787:             * @throws ValidationException if an invalid value is passed
0788:             * @throws FrameworkException Indicates some system error
0789:             */
0790:            public java.lang.Long validateQty(java.lang.Long qty)
0791:                    throws ValidationException, FrameworkException {
0792:                // .//GEN-END:qty_2_be
0793:                // Add custom code before validation//GEN-FIRST:qty_1
0794:
0795:                // .//GEN-LAST:qty_1
0796:                // .//GEN-BEGIN:qty_3_be
0797:                qty = FieldValidator.validate(qty,
0798:                        (IntegerFieldMetaData) ItemMeta.META_QTY, true);
0799:
0800:                // Invoke the Dynamic Rules Engine
0801:                RulesEngine.doAllValidationsForDomainField(ItemMeta.getName(),
0802:                        ItemMeta.QTY, qty, this .getUOW());
0803:
0804:                // .//GEN-END:qty_3_be
0805:                // Add custom code after a successful validation//GEN-FIRST:qty_2
0806:
0807:                // .//GEN-LAST:qty_2
0808:                // .//GEN-BEGIN:qty_4_be
0809:                return qty;
0810:            }
0811:
0812:            // .//GEN-END:qty_4_be
0813:            // .//GEN-BEGIN:keyRef_be
0814:            /** Getter for property keyRef.
0815:             * @return Value of property keyRef.
0816:             */
0817:            public java.lang.String getKeyRef() {
0818:                return m_keyRef;
0819:            }
0820:
0821:            /** Use this method to update the property keyRef.
0822:             * This method will do nothing and simply return if the input value is the same as the current value.
0823:             * Validation will be performed on the input value.
0824:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
0825:             * @param keyRef New value of property keyRef.
0826:             * @throws ValidationException if an invalid value is passed.
0827:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0828:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0829:             * @throws FrameworkException Indicates some system error
0830:             */
0831:            public void setKeyRef(java.lang.String keyRef)
0832:                    throws ValidationException, ReadOnlyObjectException,
0833:                    AlreadyLockedObjectException, FrameworkException {
0834:                // ignore, if the current value and new value are the same
0835:                if (m_keyRef == null ? keyRef == null : m_keyRef.equals(keyRef))
0836:                    return;
0837:
0838:                keyRef = validateKeyRef(keyRef);
0839:                // .//GEN-END:keyRef_be
0840:                // Add custom code before setting the value//GEN-FIRST:keyRef
0841:
0842:                // .//GEN-LAST:keyRef
0843:                // .//GEN-BEGIN:keyRef_1_be
0844:                super .update();
0845:                super .addInitialValue(ItemMeta.KEY_REF, m_keyRef);
0846:                m_keyRef = keyRef;
0847:                // .//GEN-END:keyRef_1_be
0848:                // Add custom code after setting the value//GEN-FIRST:keyRef_3
0849:
0850:                // .//GEN-LAST:keyRef_3
0851:                // .//GEN-BEGIN:keyRef_2_be
0852:            }
0853:
0854:            /** This method is present for backwards compatibility only.
0855:             * It merely invokes the setKeyRef() method.
0856:             * @param keyRef New value of property keyRef.
0857:             * @throws ValidationException if an invalid value is passed.
0858:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0859:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0860:             * @throws FrameworkException Indicates some system error
0861:             */
0862:            public void updateKeyRef(java.lang.String keyRef)
0863:                    throws ValidationException, ReadOnlyObjectException,
0864:                    AlreadyLockedObjectException, FrameworkException {
0865:                setKeyRef(keyRef);
0866:            }
0867:
0868:            /** Use this method to validate a value for the property keyRef.
0869:             * @param keyRef Value to be validated for the property keyRef.
0870:             * @throws ValidationException if an invalid value is passed
0871:             * @throws FrameworkException Indicates some system error
0872:             */
0873:            public java.lang.String validateKeyRef(java.lang.String keyRef)
0874:                    throws ValidationException, FrameworkException {
0875:                // .//GEN-END:keyRef_2_be
0876:                // Add custom code before validation//GEN-FIRST:keyRef_1
0877:
0878:                // .//GEN-LAST:keyRef_1
0879:                // .//GEN-BEGIN:keyRef_3_be
0880:                keyRef = FieldValidator.validate(keyRef,
0881:                        (StringFieldMetaData) ItemMeta.META_KEY_REF, true);
0882:
0883:                // Invoke the Dynamic Rules Engine
0884:                RulesEngine.doAllValidationsForDomainField(ItemMeta.getName(),
0885:                        ItemMeta.KEY_REF, keyRef, this .getUOW());
0886:
0887:                // .//GEN-END:keyRef_3_be
0888:                // Add custom code after a successful validation//GEN-FIRST:keyRef_2
0889:
0890:                // .//GEN-LAST:keyRef_2
0891:                // .//GEN-BEGIN:keyRef_4_be
0892:                return keyRef;
0893:            }
0894:
0895:            // .//GEN-END:keyRef_4_be
0896:            // .//GEN-BEGIN:status1_be
0897:            /** Getter for property status1.
0898:             * @return Value of property status1.
0899:             */
0900:            public java.lang.String getStatus1() {
0901:                return m_status1;
0902:            }
0903:
0904:            /** Use this method to update the property status1.
0905:             * This method will do nothing and simply return if the input value is the same as the current value.
0906:             * Validation will be performed on the input value.
0907:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
0908:             * @param status1 New value of property status1.
0909:             * @throws ValidationException if an invalid value is passed.
0910:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0911:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0912:             * @throws FrameworkException Indicates some system error
0913:             */
0914:            public void setStatus1(java.lang.String status1)
0915:                    throws ValidationException, ReadOnlyObjectException,
0916:                    AlreadyLockedObjectException, FrameworkException {
0917:                // ignore, if the current value and new value are the same
0918:                if (m_status1 == null ? status1 == null : m_status1
0919:                        .equals(status1))
0920:                    return;
0921:
0922:                status1 = validateStatus1(status1);
0923:                // .//GEN-END:status1_be
0924:                // Add custom code before setting the value//GEN-FIRST:status1
0925:
0926:                // .//GEN-LAST:status1
0927:                // .//GEN-BEGIN:status1_1_be
0928:                super .update();
0929:                super .addInitialValue(ItemMeta.STATUS1, m_status1);
0930:                m_status1 = status1;
0931:                // .//GEN-END:status1_1_be
0932:                // Add custom code after setting the value//GEN-FIRST:status1_3
0933:
0934:                // .//GEN-LAST:status1_3
0935:                // .//GEN-BEGIN:status1_2_be
0936:            }
0937:
0938:            /** This method is present for backwards compatibility only.
0939:             * It merely invokes the setStatus1() method.
0940:             * @param status1 New value of property status1.
0941:             * @throws ValidationException if an invalid value is passed.
0942:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0943:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0944:             * @throws FrameworkException Indicates some system error
0945:             */
0946:            public void updateStatus1(java.lang.String status1)
0947:                    throws ValidationException, ReadOnlyObjectException,
0948:                    AlreadyLockedObjectException, FrameworkException {
0949:                setStatus1(status1);
0950:            }
0951:
0952:            /** Use this method to validate a value for the property status1.
0953:             * @param status1 Value to be validated for the property status1.
0954:             * @throws ValidationException if an invalid value is passed
0955:             * @throws FrameworkException Indicates some system error
0956:             */
0957:            public java.lang.String validateStatus1(java.lang.String status1)
0958:                    throws ValidationException, FrameworkException {
0959:                // .//GEN-END:status1_2_be
0960:                // Add custom code before validation//GEN-FIRST:status1_1
0961:
0962:                // .//GEN-LAST:status1_1
0963:                // .//GEN-BEGIN:status1_3_be
0964:                status1 = FieldValidator.validate(status1,
0965:                        (StringFieldMetaData) ItemMeta.META_STATUS1, true);
0966:
0967:                // Invoke the Dynamic Rules Engine
0968:                RulesEngine.doAllValidationsForDomainField(ItemMeta.getName(),
0969:                        ItemMeta.STATUS1, status1, this .getUOW());
0970:
0971:                // .//GEN-END:status1_3_be
0972:                // Add custom code after a successful validation//GEN-FIRST:status1_2
0973:
0974:                // .//GEN-LAST:status1_2
0975:                // .//GEN-BEGIN:status1_4_be
0976:                return status1;
0977:            }
0978:
0979:            // .//GEN-END:status1_4_be
0980:            // .//GEN-BEGIN:status2_be
0981:            /** Getter for property status2.
0982:             * @return Value of property status2.
0983:             */
0984:            public java.lang.String getStatus2() {
0985:                return m_status2;
0986:            }
0987:
0988:            /** Use this method to update the property status2.
0989:             * This method will do nothing and simply return if the input value is the same as the current value.
0990:             * Validation will be performed on the input value.
0991:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
0992:             * @param status2 New value of property status2.
0993:             * @throws ValidationException if an invalid value is passed.
0994:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
0995:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
0996:             * @throws FrameworkException Indicates some system error
0997:             */
0998:            public void setStatus2(java.lang.String status2)
0999:                    throws ValidationException, ReadOnlyObjectException,
1000:                    AlreadyLockedObjectException, FrameworkException {
1001:                // ignore, if the current value and new value are the same
1002:                if (m_status2 == null ? status2 == null : m_status2
1003:                        .equals(status2))
1004:                    return;
1005:
1006:                status2 = validateStatus2(status2);
1007:                // .//GEN-END:status2_be
1008:                // Add custom code before setting the value//GEN-FIRST:status2
1009:
1010:                // .//GEN-LAST:status2
1011:                // .//GEN-BEGIN:status2_1_be
1012:                super .update();
1013:                super .addInitialValue(ItemMeta.STATUS2, m_status2);
1014:                m_status2 = status2;
1015:                // .//GEN-END:status2_1_be
1016:                // Add custom code after setting the value//GEN-FIRST:status2_3
1017:
1018:                // .//GEN-LAST:status2_3
1019:                // .//GEN-BEGIN:status2_2_be
1020:            }
1021:
1022:            /** This method is present for backwards compatibility only.
1023:             * It merely invokes the setStatus2() method.
1024:             * @param status2 New value of property status2.
1025:             * @throws ValidationException if an invalid value is passed.
1026:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
1027:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
1028:             * @throws FrameworkException Indicates some system error
1029:             */
1030:            public void updateStatus2(java.lang.String status2)
1031:                    throws ValidationException, ReadOnlyObjectException,
1032:                    AlreadyLockedObjectException, FrameworkException {
1033:                setStatus2(status2);
1034:            }
1035:
1036:            /** Use this method to validate a value for the property status2.
1037:             * @param status2 Value to be validated for the property status2.
1038:             * @throws ValidationException if an invalid value is passed
1039:             * @throws FrameworkException Indicates some system error
1040:             */
1041:            public java.lang.String validateStatus2(java.lang.String status2)
1042:                    throws ValidationException, FrameworkException {
1043:                // .//GEN-END:status2_2_be
1044:                // Add custom code before validation//GEN-FIRST:status2_1
1045:
1046:                // .//GEN-LAST:status2_1
1047:                // .//GEN-BEGIN:status2_3_be
1048:                status2 = FieldValidator.validate(status2,
1049:                        (StringFieldMetaData) ItemMeta.META_STATUS2, true);
1050:
1051:                // Invoke the Dynamic Rules Engine
1052:                RulesEngine.doAllValidationsForDomainField(ItemMeta.getName(),
1053:                        ItemMeta.STATUS2, status2, this .getUOW());
1054:
1055:                // .//GEN-END:status2_3_be
1056:                // Add custom code after a successful validation//GEN-FIRST:status2_2
1057:
1058:                // .//GEN-LAST:status2_2
1059:                // .//GEN-BEGIN:status2_4_be
1060:                return status2;
1061:            }
1062:
1063:            // .//GEN-END:status2_4_be
1064:            // .//GEN-BEGIN:status3_be
1065:            /** Getter for property status3.
1066:             * @return Value of property status3.
1067:             */
1068:            public java.lang.String getStatus3() {
1069:                return m_status3;
1070:            }
1071:
1072:            /** Use this method to update the property status3.
1073:             * This method will do nothing and simply return if the input value is the same as the current value.
1074:             * Validation will be performed on the input value.
1075:             * This will try to lock the underlying database row, in case CAUTIOUS locking is specified at the time of query.
1076:             * @param status3 New value of property status3.
1077:             * @throws ValidationException if an invalid value is passed.
1078:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
1079:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
1080:             * @throws FrameworkException Indicates some system error
1081:             */
1082:            public void setStatus3(java.lang.String status3)
1083:                    throws ValidationException, ReadOnlyObjectException,
1084:                    AlreadyLockedObjectException, FrameworkException {
1085:                // ignore, if the current value and new value are the same
1086:                if (m_status3 == null ? status3 == null : m_status3
1087:                        .equals(status3))
1088:                    return;
1089:
1090:                status3 = validateStatus3(status3);
1091:                // .//GEN-END:status3_be
1092:                // Add custom code before setting the value//GEN-FIRST:status3
1093:
1094:                // .//GEN-LAST:status3
1095:                // .//GEN-BEGIN:status3_1_be
1096:                super .update();
1097:                super .addInitialValue(ItemMeta.STATUS3, m_status3);
1098:                m_status3 = status3;
1099:                // .//GEN-END:status3_1_be
1100:                // Add custom code after setting the value//GEN-FIRST:status3_3
1101:
1102:                // .//GEN-LAST:status3_3
1103:                // .//GEN-BEGIN:status3_2_be
1104:            }
1105:
1106:            /** This method is present for backwards compatibility only.
1107:             * It merely invokes the setStatus3() method.
1108:             * @param status3 New value of property status3.
1109:             * @throws ValidationException if an invalid value is passed.
1110:             * @throws ReadOnlyObjectException if a Read-Only object is updated.
1111:             * @throws AlreadyLockedObjectException if the underlying database row is already locked by another process.
1112:             * @throws FrameworkException Indicates some system error
1113:             */
1114:            public void updateStatus3(java.lang.String status3)
1115:                    throws ValidationException, ReadOnlyObjectException,
1116:                    AlreadyLockedObjectException, FrameworkException {
1117:                setStatus3(status3);
1118:            }
1119:
1120:            /** Use this method to validate a value for the property status3.
1121:             * @param status3 Value to be validated for the property status3.
1122:             * @throws ValidationException if an invalid value is passed
1123:             * @throws FrameworkException Indicates some system error
1124:             */
1125:            public java.lang.String validateStatus3(java.lang.String status3)
1126:                    throws ValidationException, FrameworkException {
1127:                // .//GEN-END:status3_2_be
1128:                // Add custom code before validation//GEN-FIRST:status3_1
1129:
1130:                // .//GEN-LAST:status3_1
1131:                // .//GEN-BEGIN:status3_3_be
1132:                status3 = FieldValidator.validate(status3,
1133:                        (StringFieldMetaData) ItemMeta.META_STATUS3, true);
1134:
1135:                // Invoke the Dynamic Rules Engine
1136:                RulesEngine.doAllValidationsForDomainField(ItemMeta.getName(),
1137:                        ItemMeta.STATUS3, status3, this .getUOW());
1138:
1139:                // .//GEN-END:status3_3_be
1140:                // Add custom code after a successful validation//GEN-FIRST:status3_2
1141:
1142:                // .//GEN-LAST:status3_2
1143:                // .//GEN-BEGIN:status3_4_be
1144:                return status3;
1145:            }
1146:
1147:            // .//GEN-END:status3_4_be
1148:            // .//GEN-BEGIN:partObject_1_be
1149:            /** Returns the related foreign Part object.
1150:             * The object is lazy-loaded.
1151:             * @return the related foreign Part object.
1152:             * @throws ValidationException if an invalid foreign key is set.
1153:             * @throws FrameworkException Indicates some system error
1154:             */
1155:            public Part getPartObject() throws ValidationException,
1156:                    FrameworkException {
1157:                UOW uow = getUOW();
1158:                boolean localUow = false;
1159:                try {
1160:                    if (m_partObject == null && getPart() != null) {
1161:                        Criteria criteria = new Criteria();
1162:                        criteria.setTable(PartMeta.getName());
1163:                        criteria.addCriteria(PartMeta.PART, getPart());
1164:                        if (uow == null || !uow.isActive()) {
1165:                            uow = new UOW();
1166:                            localUow = true;
1167:                        }
1168:                        Iterator itr = uow.query(criteria).iterator();
1169:                        if (itr.hasNext())
1170:                            m_partObject = (Part) itr.next();
1171:                        if (m_partObject == null)
1172:                            throw new InvalidForeignKeyException(
1173:                                    ItemMeta.META_PART.getLabelToken(),
1174:                                    new Object[] { PartMeta.getLabelToken(),
1175:                                            PartMeta.META_PART.getLabelToken() });
1176:                    }
1177:                    return m_partObject;
1178:                } finally {
1179:                    if (localUow && uow != null)
1180:                        uow.rollback();
1181:                }
1182:            }
1183:
1184:            // .//GEN-END:partObject_1_be
1185:            // .//GEN-BEGIN:conditionObject_1_be
1186:            /** Returns the related foreign Condition object.
1187:             * The object is lazy-loaded.
1188:             * @return the related foreign Condition object.
1189:             * @throws ValidationException if an invalid foreign key is set.
1190:             * @throws FrameworkException Indicates some system error
1191:             */
1192:            public Condition getConditionObject() throws ValidationException,
1193:                    FrameworkException {
1194:                UOW uow = getUOW();
1195:                boolean localUow = false;
1196:                try {
1197:                    if (m_conditionObject == null && getCondition() != null) {
1198:                        Criteria criteria = new Criteria();
1199:                        criteria.setTable(ConditionMeta.getName());
1200:                        criteria.addCriteria(ConditionMeta.CONDITION,
1201:                                getCondition());
1202:                        if (uow == null || !uow.isActive()) {
1203:                            uow = new UOW();
1204:                            localUow = true;
1205:                        }
1206:                        Iterator itr = uow.query(criteria).iterator();
1207:                        if (itr.hasNext())
1208:                            m_conditionObject = (Condition) itr.next();
1209:                        if (m_conditionObject == null)
1210:                            throw new InvalidForeignKeyException(
1211:                                    ItemMeta.META_CONDITION.getLabelToken(),
1212:                                    new Object[] {
1213:                                            ConditionMeta.getLabelToken(),
1214:                                            ConditionMeta.META_CONDITION
1215:                                                    .getLabelToken() });
1216:                    }
1217:                    return m_conditionObject;
1218:                } finally {
1219:                    if (localUow && uow != null)
1220:                        uow.rollback();
1221:                }
1222:            }
1223:
1224:            // .//GEN-END:conditionObject_1_be
1225:            // .//GEN-BEGIN:toString_1_be
1226:            /** This returns the diagnostic information.
1227:             * @return the diagnostic information.
1228:             */
1229:            public String toString() {
1230:                StringBuffer buf = new StringBuffer();
1231:                buf.append("<Item>");
1232:                buf.append("<itemId>");
1233:                if (m_itemId != null)
1234:                    buf.append(m_itemId);
1235:                buf.append("</itemId>");
1236:                buf.append("<receivedItemId>");
1237:                if (m_receivedItemId != null)
1238:                    buf.append(m_receivedItemId);
1239:                buf.append("</receivedItemId>");
1240:                buf.append("<part>");
1241:                if (m_part != null)
1242:                    buf.append(m_part);
1243:                buf.append("</part>");
1244:                buf.append("<prime>");
1245:                if (m_prime != null)
1246:                    buf.append(m_prime);
1247:                buf.append("</prime>");
1248:                buf.append("<sc>");
1249:                if (m_sc != null)
1250:                    buf.append(m_sc);
1251:                buf.append("</sc>");
1252:                buf.append("<condition>");
1253:                if (m_condition != null)
1254:                    buf.append(m_condition);
1255:                buf.append("</condition>");
1256:                buf.append("<createdDatetime>");
1257:                if (m_createdDatetime != null)
1258:                    buf.append(m_createdDatetime);
1259:                buf.append("</createdDatetime>");
1260:                buf.append("<qty>");
1261:                if (m_qty != null)
1262:                    buf.append(m_qty);
1263:                buf.append("</qty>");
1264:                buf.append("<keyRef>");
1265:                if (m_keyRef != null)
1266:                    buf.append(m_keyRef);
1267:                buf.append("</keyRef>");
1268:                buf.append("<status1>");
1269:                if (m_status1 != null)
1270:                    buf.append(m_status1);
1271:                buf.append("</status1>");
1272:                buf.append("<status2>");
1273:                if (m_status2 != null)
1274:                    buf.append(m_status2);
1275:                buf.append("</status2>");
1276:                buf.append("<status3>");
1277:                if (m_status3 != null)
1278:                    buf.append(m_status3);
1279:                buf.append("</status3>");
1280:                // .//GEN-END:toString_1_be
1281:                // Add custom debug information//GEN-FIRST:toString_1
1282:
1283:                // .//GEN-LAST:toString_1
1284:                // .//GEN-BEGIN:toString_2_be
1285:                buf.append(super .toString());
1286:                buf.append("</Item>");
1287:                return buf.toString();
1288:            }
1289:
1290:            // .//GEN-END:toString_2_be
1291:            // .//GEN-BEGIN:clone_1_be
1292:            /** Returns a clone of the object.
1293:             * @throws CloneNotSupportedException if cloning is not supported. This should never happen.
1294:             * @return a clone of the object.
1295:             */
1296:            public Object clone() throws CloneNotSupportedException {
1297:                Item obj = (Item) super .clone();
1298:                obj.m_partObject = null;
1299:                obj.m_conditionObject = null;
1300:                return obj;
1301:            }
1302:
1303:            // .//GEN-END:clone_1_be
1304:            // .//GEN-BEGIN:performForeignKeyValidations_1_be
1305:            /** This method ensures that the modified foreign-keys are valid.
1306:             * @throws ApplicationExceptions if an invalid foreign key is set.
1307:             * @throws FrameworkException Indicates some system error
1308:             */
1309:            public void performForeignKeyValidations()
1310:                    throws ApplicationExceptions, FrameworkException {
1311:                ApplicationExceptions appExps = new ApplicationExceptions();
1312:                try {
1313:                    if (isModified(ItemMeta.PART))
1314:                        getPartObject();
1315:                } catch (ValidationException e) {
1316:                    appExps.add(e);
1317:                }
1318:                try {
1319:                    if (isModified(ItemMeta.CONDITION))
1320:                        getConditionObject();
1321:                } catch (ValidationException e) {
1322:                    appExps.add(e);
1323:                }
1324:                if (appExps.size() > 0)
1325:                    throw appExps;
1326:            }
1327:
1328:            // .//GEN-END:performForeignKeyValidations_1_be
1329:            // .//GEN-BEGIN:performPreDeleteReferentialIntegrity_1_be
1330:            /** This method is triggered by the UOW, before adding this object to the Delete-Store.
1331:             * This will raise an exception if any associated/aggregated objects exist.
1332:             * This will cascade delete all composite objects.
1333:             * @throws PreDeleteFailedException if any error occurs during the process.
1334:             */
1335:            public void performPreDeleteReferentialIntegrity()
1336:                    throws PreDeleteFailedException {
1337:            }
1338:            // .//GEN-END:performPreDeleteReferentialIntegrity_1_be
1339:            // .//GEN-BEGIN:3_be
1340:            /**
1341:             * @clientCardinality 0..*
1342:             * @supplierCardinality 1
1343:             * @clientQualifier part
1344:             * @supplierQualifier part
1345:             * @link association
1346:             */
1347:            /*#Part lnkPart;*/
1348:
1349:            /**
1350:             * @clientCardinality 0..*
1351:             * @supplierCardinality 1
1352:             * @clientQualifier condition
1353:             * @supplierQualifier condition
1354:             * @link association
1355:             */
1356:            /*#Condition lnkCondition;*/
1357:
1358:            // .//GEN-END:3_be
1359:            // All the custom code goes here//GEN-FIRST:custom
1360:
1361:            // .//GEN-LAST:custom
1362:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.