Java Doc for GeOxygeneBrokerHelper.java in  » GIS » GeOxygene-1.3 » fr » ign » cogit » geoxygene » datatools » ojb » 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 » GIS » GeOxygene 1.3 » fr.ign.cogit.geoxygene.datatools.ojb 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   fr.ign.cogit.geoxygene.datatools.ojb.GeOxygeneBrokerHelper

GeOxygeneBrokerHelper
public class GeOxygeneBrokerHelper (Code)
Redefinition de la classe org.apache.ojb.util.BrokerHelper d'OJB, permettant d'appeler une methode "javaToSql(Object, Connection) pour ecrire les structures dans Oracle. Par rapport a la version originale de BrokerHelper : les imports ont ete reorganises, le constructeur renomme, un parametre connection ajoute dans la signature de getValuesForObject (ligne 352), un ajout dans la methode getValuesForObject (ligne 375), un parametre connection ajoute dans getAllRwValues, un parametre connection ajoute dans getNonKeyRwValues, un parametre connection ajoute dans getKeyValues, un parametre connection ajoute dans getKeyValues. Les 4 dernieres modifs se font suite a des erreurs de compile, suite au premier ajout dans getValuesForObject. AB 11 juillet 2005 :
Utilisation des noms de classes et de la réflection pour permettre la compilation sépérée pour Oracle.
Patch pour permettre l'utilisation de la meme classe de "FieldConversion" pour Oracle et Postgis.
author:
   Thierry Badard & Arnaud Braun
version:
   1.1


Field Summary
final public static  StringREPOSITORY_NAME_SEPARATOR
    

Constructor Summary
public  GeOxygeneBrokerHelper(PersistenceBroker broker)
    

Method Summary
public  booleanassertValidPkFields(FieldDescriptor[] fieldDescriptors, Object[] pkValues)
     returns true if the primary key fields are valid, else false.
public static  StringbuildMessageString(Object obj, Object value, Field field)
    
public static  PBKeycrossCheckPBKey(PBKey key)
     Check if the user of the given PBKey was null, if so we try to get user/password from the jdbc-connection-descriptor matching the given PBKey.getAlias().
public static  PBKeyextractAllTokens(String name)
     splits up the name string and extract db url, user name and password and build a new PBKey instance - the token '#' is used to separate the substrings.
public  Object[]extractValueArray(ValueContainer[] containers)
     Extract a value array of the given ValueContainer array.
public  ValueContainer[]getAllRwValues(ClassDescriptor cld, Object obj, Connection conn)
    
protected  ObjectgetAutoIncrementValue(FieldDescriptor fd, Object obj, Object cv)
     Get an autoincremented value that has already had a field conversion run on it.

The data type of the value that is returned by this method is compatible with the java-world.

public  QuerygetCountQuery(Query aQuery)
    
public  ValueContainer[]getKeyValues(ClassDescriptor cld, Object objectOrProxy, boolean convertToSql, Connection conn)
     returns an Array with an Objects PK VALUES if convertToSql is true, any associated java-to-sql conversions are applied.
public  ValueContainer[]getKeyValues(ClassDescriptor cld, Identity oid)
    
public  ValueContainer[]getKeyValues(ClassDescriptor cld, Identity oid, boolean convertToSql)
    
public  ValueContainer[]getKeyValues(ClassDescriptor cld, Object objectOrProxy, Connection conn)
     returns an Array with an Objects PK VALUES, with any java-to-sql FieldConversion applied.
public  ValueContainer[]getNonKeyRwValues(ClassDescriptor cld, Object obj, Connection conn)
    
protected  ClassDescriptorgetRealClassDescriptor(ClassDescriptor aCld, Object anObj)
     Answer the real ClassDescriptor for anObj ie.
public  ValueContainer[]getValuesForObject(FieldDescriptor[] fields, Object obj, boolean convertToSql, Connection conn)
    

Field Detail
REPOSITORY_NAME_SEPARATOR
final public static String REPOSITORY_NAME_SEPARATOR(Code)




Constructor Detail
GeOxygeneBrokerHelper
public GeOxygeneBrokerHelper(PersistenceBroker broker)(Code)




Method Detail
assertValidPkFields
public boolean assertValidPkFields(FieldDescriptor[] fieldDescriptors, Object[] pkValues)(Code)
returns true if the primary key fields are valid, else false. PK fields are valid if each of them is either an OJB managed attribute (autoincrement or locking) or if it contains a valid non-null value
Parameters:
  fieldDescriptors - the array of PK fielddescriptors
Parameters:
  pkValues - the array of PK values boolean



buildMessageString
public static String buildMessageString(Object obj, Object value, Field field)(Code)



crossCheckPBKey
public static PBKey crossCheckPBKey(PBKey key)(Code)
Check if the user of the given PBKey was null, if so we try to get user/password from the jdbc-connection-descriptor matching the given PBKey.getAlias().



extractAllTokens
public static PBKey extractAllTokens(String name)(Code)
splits up the name string and extract db url, user name and password and build a new PBKey instance - the token '#' is used to separate the substrings.
throws:
  PersistenceBrokerException - if given name was null



extractValueArray
public Object[] extractValueArray(ValueContainer[] containers)(Code)
Extract a value array of the given ValueContainer array.
Parameters:
  containers - a value array



getAllRwValues
public ValueContainer[] getAllRwValues(ClassDescriptor cld, Object obj, Connection conn) throws PersistenceBrokerException(Code)
returns an array containing values for all the Objects attribute (READ/WRITE only)
throws:
  MetadataException - if there is an erros accessing obj field values



getAutoIncrementValue
protected Object getAutoIncrementValue(FieldDescriptor fd, Object obj, Object cv)(Code)
Get an autoincremented value that has already had a field conversion run on it.

The data type of the value that is returned by this method is compatible with the java-world. The return value has NOT been run through a field conversion and converted to a corresponding sql-type.
throws:
  MetadataException - if there is an erros accessing obj field values




getCountQuery
public Query getCountQuery(Query aQuery)(Code)
Build a Count-Query based on aQuery
Parameters:
  aQuery - a Query



getKeyValues
public ValueContainer[] getKeyValues(ClassDescriptor cld, Object objectOrProxy, boolean convertToSql, Connection conn) throws PersistenceBrokerException(Code)
returns an Array with an Objects PK VALUES if convertToSql is true, any associated java-to-sql conversions are applied. If the Object is a Proxy or a VirtualProxy NO conversion is necessary.
Parameters:
  objectOrProxy -
Parameters:
  convertToSql - Object[]
throws:
  PersistenceBrokerException -



getKeyValues
public ValueContainer[] getKeyValues(ClassDescriptor cld, Identity oid) throws PersistenceBrokerException(Code)
Return key Values of an Identity
Parameters:
  cld -
Parameters:
  oid - Object[]
throws:
  PersistenceBrokerException -



getKeyValues
public ValueContainer[] getKeyValues(ClassDescriptor cld, Identity oid, boolean convertToSql) throws PersistenceBrokerException(Code)
Return key Values of an Identity
Parameters:
  cld -
Parameters:
  oid -
Parameters:
  convertToSql - Object[]
throws:
  PersistenceBrokerException -



getKeyValues
public ValueContainer[] getKeyValues(ClassDescriptor cld, Object objectOrProxy, Connection conn) throws PersistenceBrokerException(Code)
returns an Array with an Objects PK VALUES, with any java-to-sql FieldConversion applied. If the Object is a Proxy or a VirtualProxy NO conversion is necessary.
Parameters:
  objectOrProxy - Object[]
throws:
  PersistenceBrokerException -



getNonKeyRwValues
public ValueContainer[] getNonKeyRwValues(ClassDescriptor cld, Object obj, Connection conn) throws PersistenceBrokerException(Code)
returns an Array with an Objects NON-PK VALUES (READ/WRITE only)
throws:
  MetadataException - if there is an erros accessing o field values



getRealClassDescriptor
protected ClassDescriptor getRealClassDescriptor(ClassDescriptor aCld, Object anObj)(Code)
Answer the real ClassDescriptor for anObj ie. aCld may be an Interface of anObj, so the cld for anObj is returned



getValuesForObject
public ValueContainer[] getValuesForObject(FieldDescriptor[] fields, Object obj, boolean convertToSql, Connection conn) throws PersistenceBrokerException(Code)
Get the values of the fields for an obj
Parameters:
  fields -
Parameters:
  obj -
throws:
  PersistenceBrokerException -



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.