|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.poscoict.glueframework.dao.manager.GlueQueryLoader
public class GlueQueryLoader

쿼리정보(GlueQueryDefinition)를 로딩하여 서비스하는 클래스.
config path에 존재하는 모든 xxx-query.glue_sql( or xxx-query.xml ) 파일 정보를 로딩하여 GlueQueryDefinition 을 생성한 후
java.util.HashMap을 구성한다.
config path에 존재하는 query file의 naming 및 확장자에 유의한다. Application do not use this class.
bean property 설정 - rootPath : (선택) default는 'query' - extraQueryFiles : (선택) [sample]사용예 1 : application의 classpath에서 query 폴더에 있는 쿼리파일을 로딩함. 사용예 2 : application의 classpath에서 rootPath 로 지정된 폴더에 있는 쿼리파일을 로딩함. 사용예 3 : application의 classpath에서 rootPath 로 지정된 property에 해당하는 폴더에 있는 쿼리파일을 로딩함. queryLoader.rootPath=ext/query 라고 glue.properties에 정의되어 있어야 함. 사용예 4 : application의 classpath의 rootPath외의 query 파일을 로딩함. glue-master.jar에 master-query/easyaccess-query.glue_sql 이 있고, 해당 jar파일은 classpath에 잡혀 있음.
master-query/easyaccess-query.glue_sql
| Field Summary | |
|---|---|
protected static String |
QUERYMAP
xxx-query.glue_sql |
| Constructor Summary | |
|---|---|
GlueQueryLoader()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
String |
getRootPath()
getter method. |
Object |
loadCacheObject(Object cacheKey,
String regionName)
주어진 캐쉬 영역명에 해당하는 캐쉬영역에서 캐쉬 키를 사용하여 오브젝트를 로딩함 |
void |
setExtraQueryFiles(List<String> extraQueryFiles)
setter method for DI. |
void |
setPathEncoding(String pathEncoding)
setter method for DI. |
void |
setRootPath(String queryRoot)
setter method for DI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String QUERYMAP
| Constructor Detail |
|---|
public GlueQueryLoader()
| Method Detail |
|---|
public Object loadCacheObject(Object cacheKey,
String regionName)
throws GlueException
GlueCacheLoader
loadCacheObject in interface GlueCacheLoadercacheKey - 캐쉬 키regionName - 캐쉬 영역명
GlueException - - 캐쉬관련 에러발생 시public void setRootPath(String queryRoot)
queryRoot - 2가지 type이 가능. directory의 구분자는 슬래시(/)인지 역슬래시(\)인지 확인필요함.
1. Class Loader를 이용한 상대경로 지정2. glue.properties 이용한 절대 경로 지정 일 경우 ==> Thread.currentThread().getContextClassLoader().getResource( "ext/query" ) 가 사용됨. ext/query=C://apache-tomcat-7.0.47 ==> Thread.currentThread().getContextClassLoader().getResource( "C://apache-tomcat-7.0.47" ) 가 사용됨.
public void setExtraQueryFiles(List<String> extraQueryFiles)
extraQueryFiles - public void setPathEncoding(String pathEncoding)
pathEncoding - public String getRootPath()
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||