Java Doc for JdbcBeanSerializer.java in  » Web-Server » Jigsaw » org » w3c » tools » jdbc » 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 » Web Server » Jigsaw » org.w3c.tools.jdbc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.w3c.tools.jdbc.JdbcBeanSerializer

JdbcBeanSerializer
public class JdbcBeanSerializer implements PropertyChangeListener(Code)
Read http://www.w3.org/Jigsaw/Doc/Programmer/jspdb.html to know how to use this class.
version:
   $Revision: 1.17 $
author:
   Benoît Mahé (bmahe@w3.org)


Field Summary
final protected static  intEXCEPT
    
final protected static  intINTERSECT
    
final protected static  intNOTHING
     INTERSECT, UNION, EXCEPT.
final protected static  intUNION
    
protected  JdbcBeanInterfacebean
     Our bean.
protected  JdbcBeanSerializerexcept_serializer
    
protected  JdbcBeanSerializerintersect_serializer
    
protected  intpriority
    
protected  ResultSetresult
    
protected  JdbcBeanSerializerunion_serializer
    

Constructor Summary
public  JdbcBeanSerializer(JdbcBeanInterface bean)
    

Method Summary
public  voidclean()
    
protected  StringcomputeSQLCount(boolean all, boolean distinct, String properties)
    
protected  StringcomputeSQLDelete()
    
protected  StringcomputeSQLInsert()
     Compute the SQL request necessary to update the Database.
protected  StringcomputeSQLSelect(String orderby, boolean asc, boolean all, String select, String properties)
    
protected  StringcomputeSQLUpdate(String primarykeys)
    
public  intcount()
     Count the number or row with columns matching the value of the bean properties.
public  intcount(String properties)
     Count the number or row with columns matching the value of the given properties.
public  intcount(boolean all)
     Count the number or row with columns matching the value of the bean properties.
public  intcount(boolean all, boolean distinct)
    
public  intcount(boolean all, boolean distinct, String properties)
     Count the number or row with columns matching the value of the given properties.
public  booleandelete()
     Delete the row relative to the current bean.
public  JdbcBeanSerializerexcept(JdbcBeanInterface ebean)
     USE THIS METHOD ONLY BEFORE SELECT QUERIES.
protected  voidfinalize()
     Called by the Garbage Collector.
public  booleanfirst()
    
protected  JdbcServergetJdbcServer()
    
public  voidinitBean()
     Restore default value except for JdbcBean properties.
public  booleaninsert()
     Insert the current bean values in the associated table.
public  JdbcBeanSerializerintersect(JdbcBeanInterface ibean)
     USE THIS METHOD ONLY BEFORE SELECT QUERIES.
public  booleanisLast()
    
protected  booleanisModified()
    
protected  voidmarkModified(boolean modified)
    
public  booleannext()
    
public  voidpropertyChange(PropertyChangeEvent evt)
     PropertyChangeListener implementation: This method gets called when a bound property is changed.
public  voidremoveExceptBean()
    
public  voidremoveIntersectBean()
    
public  voidremoveUnionBean()
    
public  voidselect()
     Perform a sql select to update the beans properties.
public  voidselect(boolean all)
     Perform a sql select to update the beans properties.
public  voidselect(String orderby)
     Perform a sql select to update the beans properties.
public  voidselect(String orderby, boolean asc, boolean all)
     Perform a sql select to update the beans properties.
public  voidselect(String orderby, boolean asc, boolean all, boolean distinct)
     Perform a sql select to update the beans properties.
public  voidselect(String orderby)
     Perform a sql select to update the beans properties.
public  voidselect(String orderby, boolean asc, boolean all, boolean distinct)
     Perform a sql select to update the beans properties.
public  voidselect(String orderby, boolean asc, boolean all, boolean distinct, String toselect)
     Perform a sql select to update the beans properties.
public  voidselectDistinct(String column)
     Perform a sql select to update only the given columns.
public  JdbcBeanSerializerunion(JdbcBeanInterface ubean)
     USE THIS METHOD ONLY BEFORE QUERIES.
public  booleanupdate(String primarykey)
     Update the row relative to our bean.
public  booleanupdate(String primarykeys)
     Update the row relative to our bean.
public  voidupdateProperties(JdbcBeanInterface ubean)
     Update our bean property with the given bean property (must be an instance of the same class).

Field Detail
EXCEPT
final protected static int EXCEPT(Code)



INTERSECT
final protected static int INTERSECT(Code)



NOTHING
final protected static int NOTHING(Code)
INTERSECT, UNION, EXCEPT.



UNION
final protected static int UNION(Code)



bean
protected JdbcBeanInterface bean(Code)
Our bean.



except_serializer
protected JdbcBeanSerializer except_serializer(Code)



intersect_serializer
protected JdbcBeanSerializer intersect_serializer(Code)



priority
protected int priority(Code)



result
protected ResultSet result(Code)
The ResultSet



union_serializer
protected JdbcBeanSerializer union_serializer(Code)




Constructor Detail
JdbcBeanSerializer
public JdbcBeanSerializer(JdbcBeanInterface bean)(Code)
Constructor
Parameters:
  bean - the JdbcBean to serialize




Method Detail
clean
public void clean()(Code)
Clean cached properties (relative to our bean)



computeSQLCount
protected String computeSQLCount(boolean all, boolean distinct, String properties)(Code)



computeSQLDelete
protected String computeSQLDelete()(Code)



computeSQLInsert
protected String computeSQLInsert()(Code)
Compute the SQL request necessary to update the Database. a String



computeSQLSelect
protected String computeSQLSelect(String orderby, boolean asc, boolean all, String select, String properties)(Code)



computeSQLUpdate
protected String computeSQLUpdate(String primarykeys)(Code)



count
public int count()(Code)
Count the number or row with columns matching the value of the bean properties. an int



count
public int count(String properties)(Code)
Count the number or row with columns matching the value of the given properties.
Parameters:
  properties - The property names an int



count
public int count(boolean all)(Code)
Count the number or row with columns matching the value of the bean properties.
Parameters:
  all - (join with associated beans?) an int



count
public int count(boolean all, boolean distinct)(Code)
Count the number or row with columns matching the value of the bean properties
Parameters:
  all - (join with associated beans?)
Parameters:
  distinct - (SELECT DISTINCT?) an int



count
public int count(boolean all, boolean distinct, String properties)(Code)
Count the number or row with columns matching the value of the given properties.
Parameters:
  all - (join with associated beans?)
Parameters:
  distinct - (SELECT DISTINCT?)
Parameters:
  properties - The property names an int



delete
public boolean delete()(Code)
Delete the row relative to the current bean. false if the DELETE request failed.



except
public JdbcBeanSerializer except(JdbcBeanInterface ebean)(Code)
USE THIS METHOD ONLY BEFORE SELECT QUERIES. This will produce a select query with an EXCEPT statement in it using the values of the given bean.
Parameters:
  ibean - the intersect bean



finalize
protected void finalize() throws Throwable(Code)
Called by the Garbage Collector.



first
public boolean first()(Code)
Go to the first row false if there is no first row



getJdbcServer
protected JdbcServer getJdbcServer()(Code)



initBean
public void initBean()(Code)
Restore default value except for JdbcBean properties.



insert
public boolean insert()(Code)
Insert the current bean values in the associated table. false if the INSERT request failed.



intersect
public JdbcBeanSerializer intersect(JdbcBeanInterface ibean)(Code)
USE THIS METHOD ONLY BEFORE SELECT QUERIES. This will produce a select query with an INTERSECT statement in it using the values of the given bean.
Parameters:
  ibean - the intersect bean



isLast
public boolean isLast()(Code)
Did we reached the last row? true if the last row is reached



isModified
protected boolean isModified()(Code)



markModified
protected void markModified(boolean modified)(Code)



next
public boolean next()(Code)
Update our bean with the value of the next row false if there is no more row



propertyChange
public void propertyChange(PropertyChangeEvent evt)(Code)
PropertyChangeListener implementation: This method gets called when a bound property is changed.
Parameters:
  evt - A PropertyChangeEvent object describing the event source and the property that has changed.



removeExceptBean
public void removeExceptBean()(Code)
Remove the except bean



removeIntersectBean
public void removeIntersectBean()(Code)
Remove the intersect bean



removeUnionBean
public void removeUnionBean()(Code)
Remove the union bean



select
public void select()(Code)
Perform a sql select to update the beans properties.



select
public void select(boolean all)(Code)
Perform a sql select to update the beans properties.
Parameters:
  all - join with attached beans? (default is true)



select
public void select(String orderby)(Code)
Perform a sql select to update the beans properties.
Parameters:
  orderby - orderby rule



select
public void select(String orderby, boolean asc, boolean all)(Code)
Perform a sql select to update the beans properties.
Parameters:
  orderby - orderby rule
Parameters:
  asc - boolean if true orderby is ASC if false it itDESC (relative to the orderby[] parameter)
Parameters:
  all - join with attached beans? (default is true)



select
public void select(String orderby, boolean asc, boolean all, boolean distinct)(Code)
Perform a sql select to update the beans properties.
Parameters:
  orderby - orderby rule
Parameters:
  asc - boolean if true orderby is ASC if false it itDESC (relative to the orderby[] parameter)
Parameters:
  all - join with attached beans? (default is true)
Parameters:
  distinct - if true, result won't have duplicate row (default is false)



select
public void select(String orderby)(Code)
Perform a sql select to update the beans properties.
Parameters:
  orderby - array of orderby rules (ASC by default)



select
public void select(String orderby, boolean asc, boolean all, boolean distinct)(Code)
Perform a sql select to update the beans properties.
Parameters:
  orderby - array of orderby rules
Parameters:
  asc - array of boolean if true orderby is ASC if false it itDESC (relative to the orderby[] parameter)
Parameters:
  all - join with attached beans? (default is true)
Parameters:
  distinct - if true, result won't have duplicate row (default is false)



select
public void select(String orderby, boolean asc, boolean all, boolean distinct, String toselect)(Code)
Perform a sql select to update the beans properties.
Parameters:
  orderby - array of orderby rules
Parameters:
  asc - array of boolean if true orderby is ASC if false it itDESC (relative to the orderby[] parameter)
Parameters:
  all - join with attached beans? (default is true)
Parameters:
  distinct - if true, result won't have duplicate row (default is
Parameters:
  toselect - array of columns name to selectfalse)



selectDistinct
public void selectDistinct(String column)(Code)
Perform a sql select to update only the given columns. (distinct flag is set as true.
Parameters:
  column - the bean property to update



union
public JdbcBeanSerializer union(JdbcBeanInterface ubean)(Code)
USE THIS METHOD ONLY BEFORE QUERIES. This will produce a select query with an UNION statement in it using the values of the given bean.
Parameters:
  ibean - the intersect bean



update
public boolean update(String primarykey)(Code)
Update the row relative to our bean.
Parameters:
  primarykey - The primary key of the SQL table false if the UPDATE request failed.



update
public boolean update(String primarykeys)(Code)
Update the row relative to our bean.
Parameters:
  primarykey - The primary key of the SQL table false if the UPDATE request failed.



updateProperties
public void updateProperties(JdbcBeanInterface ubean)(Code)
Update our bean property with the given bean property (must be an instance of the same class).
Parameters:
  ubean - the bean to get new properties



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.