org.hibernatespatial.cfg
Class HSConfiguration

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<Object,Object>
          extended by java.util.Properties
              extended by org.hibernatespatial.cfg.HSConfiguration
All Implemented Interfaces:
Serializable, Cloneable, Map<Object,Object>

public class HSConfiguration
extends Properties

Configuration information for the Hibernate Spatial Extension.

Author:
Karel Maesen
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
HSConfiguration()
           
 
Method Summary
 boolean configure()
          Gets the configuriation from the hibernate-spatail.cfg.xml file on the classpath.
 boolean configure(org.hibernate.cfg.Configuration hibernateConfig)
          Derives the configuration from the Hibernate Configuration object.
 boolean configure(File resource)
          Gets the configuriation from the specified file.
 boolean configure(String resource)
          Gets the configuriation from the specified file on the class path.
 String getDefaultDialect()
           
 String getPrecisionModel()
           
 String getPrecisionModelScale()
           
protected  String getProperty(HSProperty property)
           
 String getSource()
          The source file or URL for this configuration.
 void setDefaultDialect(String dialect)
           
 void setPrecisionModel(String precisionModel)
           
 void setPrecisionModelScale(String scale)
           
protected  void setProperty(HSProperty property, String value)
           
 String toString()
           
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HSConfiguration

public HSConfiguration()
Method Detail

getDefaultDialect

public String getDefaultDialect()

setDefaultDialect

public void setDefaultDialect(String dialect)

getPrecisionModel

public String getPrecisionModel()

setPrecisionModel

public void setPrecisionModel(String precisionModel)

getPrecisionModelScale

public String getPrecisionModelScale()

setPrecisionModelScale

public void setPrecisionModelScale(String scale)

getProperty

protected String getProperty(HSProperty property)

setProperty

protected void setProperty(HSProperty property,
                           String value)

configure

public boolean configure(org.hibernate.cfg.Configuration hibernateConfig)
Derives the configuration from the Hibernate Configuration object.

Parameters:
hibernateConfig - Hibernate Configuration object
Returns:
true, if the configuration is successfull.

configure

public boolean configure()
Gets the configuriation from the hibernate-spatail.cfg.xml file on the classpath.

Returns:
true if the configuration is successfull;

configure

public boolean configure(File resource)
Gets the configuriation from the specified file.

Parameters:
resource - the configuration file
Returns:
true if the configuration is successfull;

getSource

public String getSource()
The source file or URL for this configuration.

Returns:
The source name (file or URL).

configure

public boolean configure(String resource)
Gets the configuriation from the specified file on the class path.

Parameters:
resource - the configuration file
Returns:
true if the configuration is successfull;

toString

public String toString()
Overrides:
toString in class Hashtable<Object,Object>


Copyright © 2011 hibernatespatial.org. All Rights Reserved.