@ImportResource(value="classpath:/dataContext.xml")
@ComponentScan(basePackages={"nc.ird.cantharella.data.dao","nc.ird.cantharella.data.validation.utils"})
@Configuration
public abstract class DataContext
extends Object
DB_* properties can be placed in the properties file, if they vary depending on the environment.
| Modifier and Type | Field and Description |
|---|---|
static List<String> |
COUNTRY_CODES
Country codes
|
protected boolean |
dbDebugProperty
DB debug
|
protected String |
dbPasswordProperty
DB password
|
protected String |
dbUrlProperty
DB URL
|
protected String |
dbUserProperty
DB user
|
static int |
DECIMAL_MAX
According to DECIMAL_PRECISION and DECIMAL_SCALE, number max allowed for decimals.
|
static int |
DECIMAL_PRECISION
Precision is the total number of digits
|
static int |
DECIMAL_SCALE
Scale is the number of digits to the right of the decimal point in a number.
|
static String |
ENCODING
Encoding
|
static List<Locale> |
LOCALES
Availables locales for the application
|
static Map<Integer,String> |
REFERENTIELS
Référentiels
|
| Constructor and Description |
|---|
DataContext() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.context.support.MessageSourceAccessor |
dataMessageSource() |
ModelValidator |
dataModelValidator() |
DataSource |
dataSource() |
org.hibernate.SessionFactory |
sessionFactory() |
org.springframework.orm.hibernate3.HibernateTransactionManager |
transactionManager() |
javax.validation.ValidatorFactory |
validatorFactory() |
public static final String ENCODING
public static final int DECIMAL_PRECISION
public static final int DECIMAL_SCALE
public static final int DECIMAL_MAX
protected boolean dbDebugProperty
protected String dbPasswordProperty
protected String dbUrlProperty
protected String dbUserProperty
@Bean public org.springframework.context.support.MessageSourceAccessor dataMessageSource()
@Bean public DataSource dataSource()
@Bean public org.hibernate.SessionFactory sessionFactory()
@Bean public org.springframework.orm.hibernate3.HibernateTransactionManager transactionManager()
@Bean public javax.validation.ValidatorFactory validatorFactory()
@Bean public ModelValidator dataModelValidator()
Copyright © 2012. All Rights Reserved.