Java Doc for GenericForeignKeyFieldValidator.java in  » J2EE » Jaffa » org » jaffa » rules » fieldvalidators » 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.rules.fieldvalidators 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jaffa.rules.fieldvalidators.AbstractFieldValidator
      org.jaffa.rules.fieldvalidators.GenericForeignKeyFieldValidator

GenericForeignKeyFieldValidator
public class GenericForeignKeyFieldValidator extends AbstractFieldValidator (Code)
This validates a field against a set of valid values for that field, as listed in a database table For eg. Lets assume that there is database table 'VALID_FIELD_VALUE' which holds a set of valid values for certain fields in the system. The structure of this table 'VALID_FIELD_VALUE' in oracle can be like - TABLE_NAME NOT NULL VARCHAR2(20) FIELD_NAME NOT NULL VARCHAR2(30) LEGAL_VALUE NOT NULL VARCHAR2(20) This table can hold values like - TABLE_NAME FIELD_NAME LEGAL_VALUE ========== ========== =========== USER DEPARTMENT ACCOUNTS USER DEPARTMENT ENGINEERING USER DEPARTMENT PERSONNEL ITEM TYPE CONSUMABLE ITEM TYPE NON-CONSUMABLE This way, the table can hold valid values for the different fields The generic implementation provides the ValidFieldValue domain class and its mapping file. Tweak its mapping file to map it to the correct table and fields. Or specify your own domain class. The GenericForeignKeyFieldValidator definition in validators.xml requires the appropriate values to be passed in parameters.




Method Summary
public  StringgetDomainClassName()
     Getter for property domainClassName.
public  StringgetFieldName()
     Getter for property fieldName.
public  StringgetFieldNameForField()
     Getter for property fieldNameForField.
public  StringgetFieldNameForTable()
     Getter for property fieldNameForTable.
public  StringgetFieldNameForValue()
     Getter for property fieldNameForValue.
public  StringgetTableName()
     Getter for property tableName.
public  voidsetDomainClassName(String domainClassName)
     Setter for property domainClassName.
public  voidsetFieldName(String fieldName)
     Setter for property fieldName.
public  voidsetFieldNameForField(String fieldNameForField)
     Setter for property fieldNameForField.
public  voidsetFieldNameForTable(String fieldNameForTable)
     Setter for property fieldNameForTable.
public  voidsetFieldNameForValue(String fieldNameForValue)
     Setter for property fieldNameForValue.
public  voidsetTableName(String tableName)
     Setter for property tableName.
public  voidvalidate()
     The RulesEngine will invoke this method to perform the field validation.



Method Detail
getDomainClassName
public String getDomainClassName()(Code)
Getter for property domainClassName. Value of property domainClassName.



getFieldName
public String getFieldName()(Code)
Getter for property fieldName. Value of property fieldName.



getFieldNameForField
public String getFieldNameForField()(Code)
Getter for property fieldNameForField. Value of property fieldNameForField.



getFieldNameForTable
public String getFieldNameForTable()(Code)
Getter for property fieldNameForTable. Value of property fieldNameForTable.



getFieldNameForValue
public String getFieldNameForValue()(Code)
Getter for property fieldNameForValue. Value of property fieldNameForValue.



getTableName
public String getTableName()(Code)
Getter for property tableName. Value of property tableName.



setDomainClassName
public void setDomainClassName(String domainClassName)(Code)
Setter for property domainClassName.
Parameters:
  domainClassName - New value of property domainClassName.



setFieldName
public void setFieldName(String fieldName)(Code)
Setter for property fieldName.
Parameters:
  fieldName - New value of property fieldName.



setFieldNameForField
public void setFieldNameForField(String fieldNameForField)(Code)
Setter for property fieldNameForField.
Parameters:
  fieldNameForField - New value of property fieldNameForField.



setFieldNameForTable
public void setFieldNameForTable(String fieldNameForTable)(Code)
Setter for property fieldNameForTable.
Parameters:
  fieldNameForTable - New value of property fieldNameForTable.



setFieldNameForValue
public void setFieldNameForValue(String fieldNameForValue)(Code)
Setter for property fieldNameForValue.
Parameters:
  fieldNameForValue - New value of property fieldNameForValue.



setTableName
public void setTableName(String tableName)(Code)
Setter for property tableName.
Parameters:
  tableName - New value of property tableName.



validate
public void validate() throws ValidationException, FrameworkException(Code)
The RulesEngine will invoke this method to perform the field validation.
throws:
  ValidationException - if any validation rule fails.
throws:
  FrameworkException - if any framework error occurs.



Methods inherited from org.jaffa.rules.fieldvalidators.AbstractFieldValidator
public void cleanup()(Code)(Java Doc)
public String getLabelToken()(Code)(Java Doc)
public UOW getUow()(Code)(Java Doc)
public Object getValue()(Code)(Java Doc)
public void init()(Code)(Java Doc)
public void setLabelToken(String labelToken)(Code)(Java Doc)
public void setUow(UOW uow)(Code)(Java Doc)
public void setValue(Object value)(Code)(Java Doc)
abstract public void validate() throws ValidationException, FrameworkException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.