Java Doc for ValidationRule.java in  » J2EE » Sofia » com » salmonllc » sql » 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 » Sofia » com.salmonllc.sql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.salmonllc.sql.ValidationRule

ValidationRule
public class ValidationRule implements java.io.Serializable(Code)
The definition of a validation rule


Field Summary
final public static  intTYPE_EXPRESSION
    
final public static  intTYPE_JAVASCRIPT
    
final public static  intTYPE_LOOKUP
    
final public static  intTYPE_RANGE
    
final public static  intTYPE_REGULAR_EXPRESSION
    
final public static  intTYPE_REMOTE
    
final public static  intTYPE_REQUIRED
    
final public static  intTYPE_TYPE_CHECK
    

Constructor Summary
public  ValidationRule(String expression, String errorMessage)
     Creates an expression rule.
public  ValidationRule(Object minValue, Object maxValue, String errorMessage)
     Creates a range rule.
public  ValidationRule(String expression, String errorMessage, int type)
     Creates an expression rule.
public  ValidationRule(DataStoreExpression expression, String errorMessage, boolean executeOnServer)
     Creates an expression rule.
public  ValidationRule(String errorMessage)
     Creates a type check rule.
public  ValidationRule(String errorMessage, int type)
     Creates a type or a required rule rule.
public  ValidationRule(String lookupTable, String searchExpression, String descriptionColumn, String descriptionBucket, String errorMessage)
    
public  ValidationRule()
    

Method Summary
public  voidevaluateRule(DataStoreBuffer ds, int rowNo, int colNo, DBConnection conn)
     Evaluates the rule for a specific datastore, row and column.
public  StringgetDesciptionColumn()
    
public  StringgetDescriptionBucket()
    
public  DataStoreExpressiongetDsExpression()
    
public  StringgetErrorMessage()
    
public  StringgetExpression()
    
public  StringgetLookupExpression()
    
public  StringgetLookupTable()
    
public  ObjectgetMaxValue()
    
public  ObjectgetMinValue()
    
public  intgetRuleType()
    
public  booleanisExecuteOnServer()
    

Field Detail
TYPE_EXPRESSION
final public static int TYPE_EXPRESSION(Code)



TYPE_JAVASCRIPT
final public static int TYPE_JAVASCRIPT(Code)



TYPE_LOOKUP
final public static int TYPE_LOOKUP(Code)



TYPE_RANGE
final public static int TYPE_RANGE(Code)



TYPE_REGULAR_EXPRESSION
final public static int TYPE_REGULAR_EXPRESSION(Code)



TYPE_REMOTE
final public static int TYPE_REMOTE(Code)



TYPE_REQUIRED
final public static int TYPE_REQUIRED(Code)



TYPE_TYPE_CHECK
final public static int TYPE_TYPE_CHECK(Code)




Constructor Detail
ValidationRule
public ValidationRule(String expression, String errorMessage)(Code)
Creates an expression rule. The expression is a boolean value and the rule will be violated if the expression returns false
Parameters:
  expression - The expression to evaluate
Parameters:
  errorMessage - The message to return if the rule is violated



ValidationRule
public ValidationRule(Object minValue, Object maxValue, String errorMessage)(Code)
Creates a range rule. The rule is true if the value of the field is within the minValue and maxValue



ValidationRule
public ValidationRule(String expression, String errorMessage, int type)(Code)
Creates an expression rule. The rule can be a SOFIA expression or a regular expression. A SOFIA expression returns a boolean value and the rule will be violated if the expression returns false. A regular expression will be violated if the value in the datastore column doesn't match the specified regular expression
Parameters:
  expression - The expression to evaluate
Parameters:
  errorMessage - The message to return if the rule is violated
Parameters:
  type - TYPE_EXPRESSION (SOFIA Expression) or TYPE_REGULAR_EXPRESSION (Regular Expression) or TYPE_JAVASCRIPT (Note JavaScript Rules are not executed by this validator, they can be added here as a place holder in case the rules are imported into an HtmlValidatorTextComponent)



ValidationRule
public ValidationRule(DataStoreExpression expression, String errorMessage, boolean executeOnServer)(Code)
Creates an expression rule. The expression is a boolean value and the rule will be violated if the expression returns false
Parameters:
  expression - The expression to evaluate
Parameters:
  errorMessage - The message to return if the rule is violated
Parameters:
  executeOnServer - If the validator is being used from a proxy datastore and the rule must be executed on the server set this value to true



ValidationRule
public ValidationRule(String errorMessage)(Code)
Creates a type check rule. The type check rule checks if a field is the correct data type
Parameters:
  errorMessage - The message to return if the rule is violated



ValidationRule
public ValidationRule(String errorMessage, int type)(Code)
Creates a type or a required rule rule. The type check rule checks if a field is the correct data type, required checks that the value is not null or spaces
Parameters:
  errorMessage - The message to return if the rule is violated
Parameters:
  type - The type of rule TYPE_TYPE_CHECK or TYPE_REQUIRED



ValidationRule
public ValidationRule(String lookupTable, String searchExpression, String descriptionColumn, String descriptionBucket, String errorMessage)(Code)
Creates a lookup rule
Parameters:
  lookupTable - The name of the table to lookup the value against.
Parameters:
  searchExpression - A DataStore Expression that returns a String and will be used as the where clause for the SQL that will validate the data.
Parameters:
  errorMessage - The error message to display if the error expression returns false.
Parameters:
  descriptionColumn - The name of the column in the lookup table used to fill in the description.
Parameters:
  descriptionBucket - The name of a bucket column in the datastore to place the description.
Parameters:
  errorMessage - The message to return if the rule is violated



ValidationRule
public ValidationRule()(Code)
Creates a proxy rule that will run on the server




Method Detail
evaluateRule
public void evaluateRule(DataStoreBuffer ds, int rowNo, int colNo, DBConnection conn) throws DataStoreException(Code)
Evaluates the rule for a specific datastore, row and column. It throws a DataStoreException if the rule is violated



getDesciptionColumn
public String getDesciptionColumn()(Code)



getDescriptionBucket
public String getDescriptionBucket()(Code)



getDsExpression
public DataStoreExpression getDsExpression()(Code)



getErrorMessage
public String getErrorMessage()(Code)



getExpression
public String getExpression()(Code)



getLookupExpression
public String getLookupExpression()(Code)



getLookupTable
public String getLookupTable()(Code)



getMaxValue
public Object getMaxValue()(Code)



getMinValue
public Object getMinValue()(Code)



getRuleType
public int getRuleType()(Code)



isExecuteOnServer
public boolean isExecuteOnServer()(Code)



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.