com.basecmp.core.persistence.util
Class XmlBeanMetaData

java.lang.Object
  extended bycom.basecmp.core.persistence.util.XmlBeanMetaData

public class XmlBeanMetaData
extends java.lang.Object

Immutable datacontainer for class XmlBean. Copyright (c) 2004 by Wolfgang Schröder Created on 13.06.2004

Author:
Wolfgang Schröder

Method Summary
 boolean containsKey(java.lang.String xmlPropertyName)
           
 java.lang.String getDataType(java.lang.String xmlPropertyName)
          Returns the java-type for the given xml-property-name, which was defined by the xml-definition at instantiation.
 java.lang.Object getDefaultValue(java.lang.String xmlPropertyName)
          Returns the default-value for the given xml-property-name, which was defined by the xml-definition at instantiation.
static XmlBeanMetaData getInstance(java.lang.String xmlBeanDefinition)
          Creates and caches an instance of XmlBeanMetaData for the given XML.
 int getXmlPropertyCount()
           
 boolean isArray(java.lang.String xmlPropertyName)
          Returns true, if the value for the given xml-property-name may is an array, otherwise false.
static boolean isCached(java.lang.String xmlBeanDefinition)
          Returns true, if an instance of XmlBeanMetaData with the given XML, identified by it's hash-value, has already been created and cached, otherwise false.
 boolean isInitialized()
          Return true, if the instance is fully initialzed, otherwise false.
 boolean isNotNull(java.lang.String xmlPropertyName)
          Returns true, if the value for the given xml-property-name may not become null, otherwise false.
 java.util.Set keySet()
           
 void postProcess()
          This method is used internally by the factory-method and has no functionality after initialization-phase of the bean-instance has been done.
 void setDataType(java.lang.String string)
          This method is used internally by the factory-method and has no functionality after initialization-phase of the bean-instance has been done.
 void setDefaultValue(java.lang.String string)
          This method is used internally by the factory-method and has no functionality after initialization-phase of the bean-instance has been done.
 void setIsArray(java.lang.String string)
          This method is used internally by the factory-method and has no functionality after initialization-phase of the bean-instance has been done.
 void setName(java.lang.String string)
          This method is used internally by the factory-method and has no functionality after initialization-phase of the bean-instance has been done.
 void setNotNull(java.lang.String string)
          This method is used internally by the factory-method and has no functionality after initialization-phase of the bean-instance has been done.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

containsKey

public boolean containsKey(java.lang.String xmlPropertyName)

getDataType

public java.lang.String getDataType(java.lang.String xmlPropertyName)
Returns the java-type for the given xml-property-name, which was defined by the xml-definition at instantiation. Returns null if the given xml-property-name does not exist.


getDefaultValue

public java.lang.Object getDefaultValue(java.lang.String xmlPropertyName)
Returns the default-value for the given xml-property-name, which was defined by the xml-definition at instantiation. Returns null if the given xml-property-name does not exist.


getInstance

public static XmlBeanMetaData getInstance(java.lang.String xmlBeanDefinition)
Creates and caches an instance of XmlBeanMetaData for the given XML.

Parameters:
xmlBeanDefinition -
Returns:
Throws:
java.lang.RuntimeException - Thrown if instantiation has problems reading and/or parsing the given XML.

getXmlPropertyCount

public int getXmlPropertyCount()

isArray

public boolean isArray(java.lang.String xmlPropertyName)
Returns true, if the value for the given xml-property-name may is an array, otherwise false. Return by default false, if the xml-property is not defined. Defined by the xml-definition at instantiation.


isCached

public static boolean isCached(java.lang.String xmlBeanDefinition)
Returns true, if an instance of XmlBeanMetaData with the given XML, identified by it's hash-value, has already been created and cached, otherwise false.

Parameters:
xmlBeanDefinition -
Returns:

isInitialized

public boolean isInitialized()
Return true, if the instance is fully initialzed, otherwise false.


isNotNull

public boolean isNotNull(java.lang.String xmlPropertyName)
Returns true, if the value for the given xml-property-name may not become null, otherwise false. Return by default false, if the xml-property is not defined. Defined by the xml-definition at instantiation.


keySet

public java.util.Set keySet()

postProcess

public void postProcess()
This method is used internally by the factory-method and has no functionality after initialization-phase of the bean-instance has been done. The method has to be public, because the factory uses internally an instance of Apache-Digester in order to parse the xml-definition given to the factory.


setDataType

public void setDataType(java.lang.String string)
This method is used internally by the factory-method and has no functionality after initialization-phase of the bean-instance has been done. The method has to be public, because the factory uses internally an instance of Apache-Digester in order to parse the xml-definition given to the factory.


setDefaultValue

public void setDefaultValue(java.lang.String string)
This method is used internally by the factory-method and has no functionality after initialization-phase of the bean-instance has been done. The method has to be public, because the factory uses internally an instance of Apache-Digester in order to parse the xml-definition given to the factory.


setIsArray

public void setIsArray(java.lang.String string)
This method is used internally by the factory-method and has no functionality after initialization-phase of the bean-instance has been done. The method has to be public, because the factory uses internally an instance of Apache-Digester in order to parse the xml-definition given to the factory.


setName

public void setName(java.lang.String string)
This method is used internally by the factory-method and has no functionality after initialization-phase of the bean-instance has been done. The method has to be public, because the factory uses internally an instance of Apache-Digester in order to parse the xml-definition given to the factory.


setNotNull

public void setNotNull(java.lang.String string)
This method is used internally by the factory-method and has no functionality after initialization-phase of the bean-instance has been done. The method has to be public, because the factory uses internally an instance of Apache-Digester in order to parse the xml-definition given to the factory.



Copyright © 2004 by basecmp® - Professional Web Solutions