public class HibernateAdministrationDAO extends Object implements AdministrationDAO, org.springframework.context.ApplicationContextAware
Context
,
AdministrationDAO
,
AdministrationService
Constructor and Description |
---|
HibernateAdministrationDAO() |
Modifier and Type | Method and Description |
---|---|
void |
deleteGlobalProperty(GlobalProperty property) |
List<List<Object>> |
executeSQL(String sql,
boolean selectOnly) |
List<GlobalProperty> |
getAllGlobalProperties() |
List<GlobalProperty> |
getGlobalPropertiesByPrefix(String prefix) |
List<GlobalProperty> |
getGlobalPropertiesBySuffix(String suffix) |
String |
getGlobalProperty(String propertyName) |
GlobalProperty |
getGlobalPropertyByUuid(String uuid) |
GlobalProperty |
getGlobalPropertyObject(String propertyName) |
int |
getMaximumPropertyLength(Class<? extends OpenmrsObject> aClass,
String fieldName) |
protected List<org.springframework.validation.Validator> |
getValidators(Object obj)
Fetches all validators that are registered
|
boolean |
isDatabaseStringComparisonCaseSensitive() |
GlobalProperty |
saveGlobalProperty(GlobalProperty gp) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Set session factory
|
void |
updatePostgresSequence()
Updates PostgreSQL Sequences after core data insertion
|
void |
validate(Object object,
org.springframework.validation.Errors errors) |
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public String getGlobalProperty(String propertyName) throws DAOException
getGlobalProperty
in interface AdministrationDAO
DAOException
AdministrationDAO.getGlobalProperty(java.lang.String)
public GlobalProperty getGlobalPropertyObject(String propertyName)
getGlobalPropertyObject
in interface AdministrationDAO
AdministrationDAO.getGlobalPropertyObject(java.lang.String)
public GlobalProperty getGlobalPropertyByUuid(String uuid) throws DAOException
getGlobalPropertyByUuid
in interface AdministrationDAO
DAOException
public List<GlobalProperty> getAllGlobalProperties() throws DAOException
getAllGlobalProperties
in interface AdministrationDAO
DAOException
AdministrationDAO.getAllGlobalProperties()
public List<GlobalProperty> getGlobalPropertiesByPrefix(String prefix)
getGlobalPropertiesByPrefix
in interface AdministrationDAO
AdministrationDAO.getGlobalPropertiesByPrefix(java.lang.String)
public List<GlobalProperty> getGlobalPropertiesBySuffix(String suffix)
getGlobalPropertiesBySuffix
in interface AdministrationDAO
AdministrationDAO.getGlobalPropertiesBySuffix(java.lang.String)
public void deleteGlobalProperty(GlobalProperty property) throws DAOException
deleteGlobalProperty
in interface AdministrationDAO
DAOException
AdministrationDAO.deleteGlobalProperty(GlobalProperty)
public GlobalProperty saveGlobalProperty(GlobalProperty gp) throws DAOException
saveGlobalProperty
in interface AdministrationDAO
DAOException
AdministrationDAO.saveGlobalProperty(org.openmrs.GlobalProperty)
public List<List<Object>> executeSQL(String sql, boolean selectOnly) throws DAOException
executeSQL
in interface AdministrationDAO
DAOException
AdministrationDAO.executeSQL(java.lang.String, boolean)
public int getMaximumPropertyLength(Class<? extends OpenmrsObject> aClass, String fieldName)
getMaximumPropertyLength
in interface AdministrationDAO
AdministrationService.getMaximumPropertyLength(Class, String)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public void validate(Object object, org.springframework.validation.Errors errors) throws DAOException
validate
in interface AdministrationDAO
DAOException
Should Pass validation if field lengths are correct
Should Fail validation if field lengths are not correct
Should Fail validation for location class if field lengths are not correct
Should Pass validation for location class if field lengths are correct
protected List<org.springframework.validation.Validator> getValidators(Object obj)
obj
- the object that will be validatedpublic boolean isDatabaseStringComparisonCaseSensitive()
isDatabaseStringComparisonCaseSensitive
in interface AdministrationDAO
AdministrationService.isDatabaseStringComparisonCaseSensitive()
public void updatePostgresSequence() throws DAOException
updatePostgresSequence
in interface AdministrationDAO
DAOException
AdministrationDAO.updatePostgresSequence()
Copyright © 2024 OpenMRS Inc.. All rights reserved.