com.vladmihalcea.hibernate.type.util
Class Configuration

java.lang.Object
  extended by com.vladmihalcea.hibernate.type.util.Configuration

public class Configuration
extends Object

Configuration - It allows declarative configuration through the hibernate.properties file or the hibernate-types.properties file. The properties from hibernate-types.properties can override the ones from the hibernate.properties file. It loads the Properties configuration file and makes them available to other components.

Since:
2.1.0
Author:
Vlad Mihalcea

Nested Class Summary
static class Configuration.PropertyKey
          Each Property has a well-defined key.
 
Field Summary
static Configuration INSTANCE
           
static String PROPERTIES_FILE_NAME
           
static String PROPERTIES_FILE_PATH
           
 
Method Summary
 Boolean booleanProperty(Configuration.PropertyKey propertyKey)
          Get Boolean property value
<T> Class<T>
classProperty(Configuration.PropertyKey propertyKey)
          Get Class property value
 ObjectMapperWrapper getObjectMapperWrapper()
          Get ObjectMapperWrapper reference
 Properties getProperties()
          Get all properties.
 Integer integerProperty(Configuration.PropertyKey propertyKey)
          Get Integer property value
 Long longProperty(Configuration.PropertyKey propertyKey)
          Get Long property value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final Configuration INSTANCE

PROPERTIES_FILE_PATH

public static final String PROPERTIES_FILE_PATH
See Also:
Constant Field Values

PROPERTIES_FILE_NAME

public static final String PROPERTIES_FILE_NAME
See Also:
Constant Field Values
Method Detail

getProperties

public Properties getProperties()
Get all properties.

Returns:
properties.

getObjectMapperWrapper

public ObjectMapperWrapper getObjectMapperWrapper()
Get ObjectMapperWrapper reference

Returns:
ObjectMapperWrapper reference

integerProperty

public Integer integerProperty(Configuration.PropertyKey propertyKey)
Get Integer property value

Parameters:
propertyKey - property key
Returns:
Integer property value

longProperty

public Long longProperty(Configuration.PropertyKey propertyKey)
Get Long property value

Parameters:
propertyKey - property key
Returns:
Long property value

booleanProperty

public Boolean booleanProperty(Configuration.PropertyKey propertyKey)
Get Boolean property value

Parameters:
propertyKey - property key
Returns:
Boolean property value

classProperty

public <T> Class<T> classProperty(Configuration.PropertyKey propertyKey)
Get Class property value

Type Parameters:
T - class generic type
Parameters:
propertyKey - property key
Returns:
Class property value


Copyright © 2021. All rights reserved.