Package com.poscoict.glueframework.dao
package com.poscoict.glueframework.dao
dao package. Glue Data Access Object(DAO).
DAO class는 applicationContext.xml에 정의된다.
1. JDBC DAO 사용예<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/> <property name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:ORCL"/> <property name="username" value="scott"/> <property name="password" value="tiger"/> <property name="defaultAutoCommit" value="false"/> </bean> <bean id="dao" class="com.poscoict.glueframework.dao.jdbc.GlueJdbcDao"> <property name="dataSource" ref="dataSource"/> <property name="queryManager" ref="queryManager"/> </bean> <bean id="queryManager" class="com.poscoict.glueframework.dao.manager.GlueQueryManagerImpl"> <constructor-arg><ref local="cacheManager"/></constructor-arg> <constructor-arg><ref local="queryLoader"/></constructor-arg> </bean> <bean id="cacheManager" class="com.poscoict.glueframework.cache.jcs.GlueJCSCacheManager"/> <bean id="queryLoader" class="com.poscoict.glueframework.dao.manager.GlueQueryLoader"> <property name="rootPath" value="query"/> </bean>
2. MyBatis DAO 사용예<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/> <property name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:ORCL"/> <property name="username" value="scott"/> <property name="password" value="tiger"/> <property name="defaultAutoCommit" value="false"/> </bean> <bean id="dao" class="com.poscoict.glueframework.dao.mybatis.GlueMybatisDao"> <property name="sqlSession" ref="sqlSession" /> </bean> <bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate"> <constructor-arg index="0" ref="sqlSessionFactory" /> </bean> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="mapperLocations" value="classpath*:mybatis/mapper/*.xml" /> </bean>
- Since:
- 2013. 5. 10.
- Version:
- 1.0.0
- Author:
- 허 두녕
-
ClassDescriptionAudit 항목을 홀드하는 역할을 수행하는 인터페이스SQL 문법 오류로 인해서 발생하는 Exception 클래스.ColumnMapRowMapper 확장.Data Access Object(DAO) 관련 Exception이 발생했을 때 쓰로우 된다.데이타 베이스와 같은 자원에 연결시 에러가 발생되면 던져지는 Exception 클래스.데이타베이스에 insert or update 시 무결성 제약조건에 위배되는 경우 던져지는 Exception 클래스.카테고리화 되지 못하는 일반적인 SQLException이 발생하면 던져지는 Exception 클래스.