Java Doc for DataTypes.java in  » Database-ORM » MMBase » org » mmbase » datatypes » 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 » Database ORM » MMBase » org.mmbase.datatypes 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mmbase.datatypes.DataTypes

DataTypes
public class DataTypes (Code)

This class contains various methods for manipulating DataType objects. It contains a static set of named DataType objects, with which it is possible to craete a set of datatypes that are accessable throught the MMBase application. This set contains, at the very least, the basic datatypes (a DataType for every 'MMBase' type, i.e. integer, string, etc). There can be only one DataType in a set with a given name, so it is not possible to have multiple registered datatypes with the same name.

A number of other methods in this class deal with conversion, creating datatypes, and 'finishing' datatypes (locking a datatype to protect it form being changed).


author:
   Pierre van Rooden
since:
   MMBase-1.8
version:
   $Id: DataTypes.java,v 1.27 2008/01/28 16:31:29 michiel Exp $




Method Summary
public static  DataTypeaddFinalDataType(BasicDataType dataType)
     Add an instance of a DataType to the set of data types that are available thoughout the application.
public static  BasicDataType<C>createDataType(String name, Class<C> classType)
     Create an instance of a DataType based on the class passed. The DataType returned is, if possible, a specialized DataType (such as IntegerDataType ) based on the MMBase Type that most closely matches the passed class.
public static synchronized  BasicDataTypegetDataType(String name)
     Returns a DataType from the the available set of datatypes accessible throughout the application, or null if that type does not exist.
public static synchronized  BasicDataTypegetDataType(int type)
     Returns the basic DataType that matches the passed type.
public static synchronized  BasicDataTypegetDataTypeInstance(String name, BasicDataType baseDataType)
     Returns a DataType instance. The system first tries to obtain a data type from the available set of datatypes accessible throughout the application.
public static synchronized  BasicDataTypegetDataTypeInstance(String name, int type)
     Returns a DataType instance. The system first tries to obtain a type from the available set of datatypes accessible throughout the application.
public static  ListDataTypegetListDataType(int listItemType)
     Returns the basic ListDataType whose item's DataType matches the passed type.
public static synchronized  ListDataTypegetListDataTypeInstance(String name, int listItemType)
     Returns a ListDataType instance. The system first tries to obtain a type from the available set of datatypes accessible throughout the application.
public static  DataTypeCollectorgetSystemCollector()
    
public static  voidinitialize()
    
public static  voidmain(String arg)
    
public static  DocumenttoXml(DataType dataType)
     Returns a new XML completely describing the given DataType.



Method Detail
addFinalDataType
public static DataType addFinalDataType(BasicDataType dataType)(Code)
Add an instance of a DataType to the set of data types that are available thoughout the application. The datatype should have a proper name, and not occur already in the set. Note that the datatype is finished when added (if it wasn't already), and can thereafter not be changed.
Parameters:
  dataType - the datatype to add the dataType added.
throws:
  IllegalArgumentException - if the datatype does not have a name or already occurs in the set



createDataType
public static BasicDataType<C> createDataType(String name, Class<C> classType)(Code)
Create an instance of a DataType based on the class passed. The DataType returned is, if possible, a specialized DataType (such as IntegerDataType ) based on the MMBase Type that most closely matches the passed class. Otherwise, it is a generic DataType specific for that class (with generally means that it only supports basic functionality such as autocast).
Parameters:
  name - The name of the datatype to create. If null is passed, the class name is used.
Parameters:
  classType - The class of the datatype to create. If null is passed, thedataType returned is based on Object.class.



getDataType
public static synchronized BasicDataType getDataType(String name)(Code)
Returns a DataType from the the available set of datatypes accessible throughout the application, or null if that type does not exist.
Parameters:
  name - the name of the DataType to look for A DataType instance or null if none can be found



getDataType
public static synchronized BasicDataType getDataType(int type)(Code)
Returns the basic DataType that matches the passed type. The datatype is retrieved from the available set of datatypes accessible throughout the application. If this datatype does not (yet) exists, an instance is automatically created and added. The datatype returned by this method is only useful for matching or cloning - it cannot be changed.
Parameters:
  type - the base type whose DataType to return the DataType instance



getDataTypeInstance
public static synchronized BasicDataType getDataTypeInstance(String name, BasicDataType baseDataType)(Code)
Returns a DataType instance. The system first tries to obtain a data type from the available set of datatypes accessible throughout the application. If a DataType of the passed name exists, a clone of that DataType is returned. Otherwise, a clone of the base DataType passed is returned. if the DataType with the passed name does not exist, and the value passed for the baseDataType is null, the method returns null.
Parameters:
  name - the name of the DataType to look for
Parameters:
  baseDataType - the dataType to match against. Can be null. A DataType instance or null if none can be instantiated



getDataTypeInstance
public static synchronized BasicDataType getDataTypeInstance(String name, int type)(Code)
Returns a DataType instance. The system first tries to obtain a type from the available set of datatypes accessible throughout the application. If a DataType of the passed name exists, a clone of that DataType is returned. Otherwise, an instance of a DataType based on the base type is returned.
Parameters:
  name - the name of the DataType to look for
Parameters:
  type - the base type to use for a default datatype instance A DataType instance



getListDataType
public static ListDataType getListDataType(int listItemType)(Code)
Returns the basic ListDataType whose item's DataType matches the passed type. The datatype is retrieved from the available set of datatypes accessible throughout the application. If this datatype does not (yet) exists, an instance is automatically created and added. The datatype returned by this method is only useful for matching or cloning - it cannot be changed.
Parameters:
  listItemType - the base type whose ListDataType to return the ListDataType instance



getListDataTypeInstance
public static synchronized ListDataType getListDataTypeInstance(String name, int listItemType)(Code)
Returns a ListDataType instance. The system first tries to obtain a type from the available set of datatypes accessible throughout the application. If a DataType of the passed name exists, a clone of that DataType is returned. Otherwise, an instance of a ListDataType based on the list item type is returned.
Parameters:
  name - the name of the DataType to look for
Parameters:
  listItemType - the base type to use for a default listdatatype instance(this type determines the type of the list elements) A ListDataType instance



getSystemCollector
public static DataTypeCollector getSystemCollector()(Code)



initialize
public static void initialize()(Code)



main
public static void main(String arg) throws Exception(Code)



toXml
public static Document toXml(DataType dataType)(Code)
Returns a new XML completely describing the given DataType. This means that the XML will not have a base attribute.



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.