|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.poscoict.glueframework.dao.manager.GlueQueryLoader
public class GlueQueryLoader
CacheLoader ±¸Çöü. Äõ¸®Á¤º¸(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 : (¼±ÅÃ) - loadDesc : (¼±ÅÃ) default´Â 'false' true ÀÎ °æ¿ì GlueQuery File¿¡¼ desc Á¤º¸¸¦ GlueQueryDefinition¿¡ Ãß°¡ÇϹǷΠ´ÙÀ½ ÄÚµå »ç¿ë °¡´ÉÇÔ.Strin desc = dao.getQueryManager().getQueryDefinition("emp.select").getDescription();
¿¹Á¦»ç¿ë ¿¹# 1 - applicationÀÇ classpath¿¡¼ query Æú´õ¿¡ ÀÖ´Â Äõ¸®ÆÄÀÏÀ» ·ÎµùÇÔ. »ç¿ë ¿¹# 2 - applicationÀÇ classpath¿¡¼ rootPath ·Î ÁöÁ¤µÈ Æú´õ¿¡ ÀÖ´Â Äõ¸®ÆÄÀÏÀ» ·ÎµùÇÔ. »ç¿ë ¿¹# 3 - applicationÀÇ classpathÀÇ rootPath¿ÜÀÇ query ÆÄÀÏÀ» ·ÎµùÇÔ. jar ÆÄÀϾȿ¡ master-query/easyaccess-query.glue_sql ÀÌ ÀÖÀ½. »ç¿ë ¿¹# 4 - GlueQuery File¿¡¼ desc Á¤º¸µµ GlueQueryDefinition¿¡ Ãß°¡ÇÒ °æ¿ì
master-query/easyaccess-query.glue_sql Âü°í : {name}-query.glue_sql
Field Summary | |
---|---|
protected static String |
QUERYMAP
Deprecated. |
Constructor Summary | |
---|---|
GlueQueryLoader()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
ÁÖ¾îÁø Á¤º¸·Î Äõ¸®ÆÄÀÏ('*.glue_sql') List¸¦ ±¸¼ºÇÑ´Ù. rootPath(default´Â 'query')¿¡ Á¸ÀçÇÏ´Â ¸ðµç Äõ¸®ÆÄÀÏÀÌ ÇØ´çÇÑ´Ù. |
String |
getRootPath()
getter method. |
Object |
loadCacheObject(Object cacheKey,
String regionName)
ÁÖ¾îÁø ij½¬ ¿µ¿ª¸í¿¡ ÇØ´çÇϴ ij½¬¿µ¿ª¿¡¼ ij½¬ Å°¸¦ »ç¿ëÇÏ¿© ¿ÀºêÁ§Æ®¸¦ ·ÎµùÇÔ |
void |
setExtraQueryFiles(List<String> extraQueryFiles)
setter method for DI. |
void |
setLoadDesc(boolean loadDesc)
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 |
---|
@Deprecated protected static final String QUERYMAP
Constructor Detail |
---|
public GlueQueryLoader()
Method Detail |
---|
public Object loadCacheObject(Object cacheKey, String regionName) throws GlueException
GlueCacheLoader
loadCacheObject
in interface GlueCacheLoader
cacheKey
- ij½¬ Å°regionName
- ij½¬ ¿µ¿ª¸í
GlueException
- - ij½¬°ü·Ã ¿¡·¯¹ß»ý ½Ã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 setLoadDesc(boolean loadDesc)
loadDesc
- public void setPathEncoding(String pathEncoding)
pathEncoding
- public String getRootPath()
public void afterPropertiesSet() throws Exception
(non-Javadoc)URL url = GlueFileResourceUtil.getResource( "query" ); logger.trace( "{}' url : {}", rootPath, url ); ÀÇ °á°ú·Î Á¤¸®ÇÔ. [was] º° [url °ª] Tomcat : file:/C:/apache-tomcat-7.0.47/work/Catalina/localhost/sample-ui/WEB-INF/classes/query/ Tomcat : file:/C:/apache-tomcat-7.0.47/webapps/sample-ui/WEB-INF/classes/query/ Tomcat 8 : jar:file:/C:/apache-tomcat-8.0.18/webapps/sample-ui.war!/WEB-INF/classes/query/ jBoss AS : vfs:/C:/jboss-eap-6.2/bin/content/sample-ui.war/WEB-INF/classes/query/ jBoss AS : vfs:/C:/jboss-eap-6.2/standalone/deployments/sample-ui.war/WEB-INF/classes/query/ WebLogic : zip:C:/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_appsdir_sample-ui_war/wq0kqk/war/WEB-INF/lib/_wl_cls_gen.jar!/query WebSphere : file:/C:/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/hwangyujin-pcNode01Cell/sample-ui.ear/sample-ui.war/WEB-INF/classes/query/ Zeus : java : jar, jar:file:/C:/eclipse/workspace-glue-4-sample/sample-schedule-2/build/user-application.jar!/query
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
InitializingBean.afterPropertiesSet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |