org.apache.ojb.broker.accesslayer.conversions

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 » Database ORM » db ojb » org.apache.ojb.broker.accesslayer.conversions 
org.apache.ojb.broker.accesslayer.conversions
Conversions package This package contains classes related to type and value conversions between attributes of persistent classes and their mapped columns in the relational database.

The FieldConversion>/code> interface defines two callback methods for conversion from Java to Database (javaToSql(Object source)) and from Database to Java (sqlToJava(Object source)).
OJB users can use predefined FieldConversion implementations contained in this package and can also implement their own conversions that perform arbitrary mappings. The usage of a FieldConversion must be declared in the FieldDescriptor element in the repository.xml file.

The conversion-methods of the FieldConversion>/code> interface may throw a ConversionException to signal errors during the conversion operations.

The class FieldConversionDefaultImpl is the default implementation of the FieldConversion>/code> interface. This implementation does not modify its input.

The class Boolean2IntFieldConversion is an implementation of the FieldConversion>/code> interface that provides a conversion from persistent classes attributes of type Boolean to rdbms columns of type BIGINT, INTEGER, SMALLINT, TINYINT or BIT.

The class JavaDate2SqlDateFieldConversion is an implementation of the FieldConversion>/code> interface that provides a conversion from persistent classes attributes of type java.util.Date to rdbms columns of type java.sql.Date.

The class Object2ByteArrFieldConversion is an implementation of the FieldConversion>/code> interface that provides a conversion from persistent classes attributes of type java.lang.Object (or any subtype) to rdbms columns of a type able of holding byte arrays (CHAR, VARCHAR, LONGVARCHAR, BINARY, VARBINARY, or LONGVARBINARY).
This conversion can be useful if embedded objects can not be mapped on a dedicated extra table but must be "inlined". This approach is used for the mapping of DListEntry object that hold an inlined Identity Object.

Patterns applied: Callback, Strategy

Todo: Provide more predefined implementations

Java Source File NameTypeComment
BlankString2NullFieldConversion.javaClass this implementation of the FieldConversion interface converts between blank strings ("") and nulls values in the rdbms.
Boolean2IntFieldConversion.javaClass this implementation of the FieldConversion interface converts between java Boolean values and int values in the rdbms.
Calendar2DateFieldConversion.javaClass This implementation of the FieldConversion interface converts between java.util.Calendar and java.sql.Date .
Calendar2TimestampFieldConversion.javaClass This implementation of the FieldConversion interface converts between java.util.Calendar and java.sql.Timestamp .
ConversionException.javaClass A ConversionException can be thrown by implementors of FieldConversion to signal failures during the conversion process.
FieldConversion.javaInterface The class FieldConversion declares a protocol for type and value conversions between persistent classes attributes and counterpart objects supported by the JDBC specification, e.g.
FieldConversionDefaultImpl.javaClass default implementation of the FieldConversion interface.
GUID2StringFieldConversion.javaClass this implementation of the FieldConversion interface converts between GUIDs and their String representation.
Int2IntegerFieldConversion.javaClass this implementation of the FieldConversion interface converts int to Integer, Integer to int.
IntList2VarcharFieldConversion.javaClass This implementation of the FieldConversion interface converts between a java.util.List of java.lang.Integer objects and a database varchar field.
JavaDate2SqlDateFieldConversion.javaClass this implementation of the FieldConversion interface converts between java.util.Date values and java.sql.Date values in the rdbms.
JavaDate2SqlTimestampFieldConversion.javaClass this implementation of the FieldConversion interface converts between java.util.Date values and java.sql.Timestamp values in the rdbms.
Object2Base64StringFieldConversion.javaClass this implementation of the FieldConversion interface converts between java.lang.Objects values and char[] values in the rdbms. This conversion is useful to store serialized objects in database columns.
Object2ByteArrFieldConversion.javaClass This implementation of the FieldConversion interface converts between java.lang.Objects values and byte[] values in the rdbms.
Object2ByteArrUncompressedFieldConversion.javaClass This implementation of the FieldConversion interface converts between java.lang.Objects values and byte[] values in the rdbms.
StringList2VarcharFieldConversion.javaClass This implementation of the FieldConversion interface converts between a java.util.List of java.lang.String objects and a database varchar field.
StringVector2VarcharFieldConversion.javaClass Converts a Vector of string elements back and forth from a database varchar field Strings may not contain "#" as this is used as separator. This class maybe useful if it's important to have the string vector stored in a human readable form that allows editing.
See Also:   Object2ByteArrFieldConversion
See Also:    uses Java serialization and is not suited for
See Also:   this purpose.
TimeList2VarcharFieldConversion.javaClass This implementation of the FieldConversion interface converts between a java.util.List of java.sql.Time objects and a database varchar field.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.