@@ -242,9 +242,9 @@ SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader, environment,
localCacheScope
|
- MyBatis uses local cache to prevent circular references and speed up repeated nested queries.
- By default (SESSION) all queries executed during a session are cached. If localCacheScope=STATEMENT local session will be used just for
- statement execution, no data will be shared between two different calls to the same SqlSession.
+ 마이바티스는 순환참조를 막거나 반복된 쿼리의 속도를 높히기 위해 로컬캐시를 사용한다.
+ 디폴트 설정인 SESSION을 사용해서 동일 세션의 모든 쿼리를 캐시한다.
+ localCacheScope=STATEMENT 로 설정하면 로컬 세션은 구문 실행할때만 사용하고 같은 SqlSession에서 두개의 다른 호출사이에는 데이터를 공유하지 않는다.
|
SESSION | STATEMENT
@@ -258,11 +258,11 @@ SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader, environment,
jdbcTypeForNull
|
- Specifies the JDBC type for null values when no specific JDBC type was provided for the parameter.
- Some drivers require specifying the column JDBC type but others work with generic values like NULL, VARCHAR or OTHER.
+ JDBC타입을 파라미터에 제공하지 않을때 null값을 처리한 JDBC타입을 명시한다.
+ 일부 드라이버는 칼럼의 JDBC타입을 정의하도록 요구하지만 대부분은 NULL, VARCHAR 나 OTHER 처럼 일반적인 값을 사용해서 동작한다.
|
- JdbcType enumeration. Most common are: NULL, VARCHAR and OTHER
+ JdbcType 이늄. 대부분은 NULL, VARCHAR 나 OTHER 를 공통적으로 사용한다.
|
OTHER
@@ -273,10 +273,10 @@ SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader, environment,
lazyLoadTriggerMethods
|
- Specifies which Object's methods trigger a lazy load
+ 늦은 로딩을 야기하는 객체의 메소드를 명시
|
- A method name list separated by commas
+ 메소드 이름을 나열하고 여러개일 경우 콤마(,) 로 구분
|
equals,clone,hashCode,toString
@@ -287,10 +287,10 @@ SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader, environment,
defaultScriptingLanguage
|
- Specifies the language used by default for dynamic SQL generation.
+ 동적으로 SQL을 만들기 위해 기본적으로 사용하는 언어를 명시
|
- A type alias or fully qualified class name.
+ 타입별칭이나 패키지 경로를 포함한 클래스명
|
org.apache.ibatis.scripting.xmltags.XMLDynamicLanguageDriver
@@ -301,7 +301,9 @@ SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader, environment,
callSettersOnNulls
|
- Specifies if setters or map's put method will be called when a retrieved value is null. It is useful when you rely on Map.keySet() or null value initialization. Note primitives such as (int,boolean,etc.) will not be set to null.
+ 가져온 값이 null일때 setter나 맵의 put 메소드를 호출할지를 명시
+ Map.keySet() 이나 null값을 초기화할때 유용하다.
+ int, boolean 등과 같은 원시타입은 null을 셋팅할 수 없다는 점은 알아두면 좋다.
|
true | false
@@ -315,13 +317,13 @@ SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader, environment,
logPrefix
|
- Specifies the prefix string that MyBatis will add to the logger names.
+ 마이바티스가 로거(logger) 이름에 추가할 접두사 문자열을 명시
|
- Any String
+ 문자열
|
- Not set
+ 셋팅하지 않음
|
@@ -343,7 +346,7 @@ SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader, environment,
proxyFactory
|
- Specifies the proxy tool that MyBatis will use for creating lazy loading capable objects.
+ 마이바티스가 늦은 로딩을 처리할 객체를 생성할 때 사용할 프록시 툴을 명시
|
CGLIB | JAVASSIST
@@ -945,9 +948,8 @@ public class ExampleTypeHandler extends BaseTypeHandler {
JDBC타입에 대한 자동검색 기능은 애노테이션을 명시한 경우에만 가능하다는 것을 알아둘 필요가 있다.
- You can create a generic TypeHandler that is able to handle more than one class. For that purpose
- add a constructor that receives the class as a parameter and MyBatis will pass the actual class when
- constructing the TypeHandler.
+ 한개 이상의 클래스를 다루는 제네릭 TypeHandler를 만들수 있다.
+ 파라미터로 클래스를 가져오는 생성자를 추가하고 마이바티스는 TypeHandler를 만들때 실제 클래스를 전달할 것이다.
extends BaseTypeHandler {
...
]]>
- EnumTypeHandler and EnumOrdinalTypeHandler are generic TypeHandlers. We will learn
- about them in the following section.
+
EnumTypeHandler 와 EnumOrdinalTypeHandler 는 제네릭 TypeHandler이다.
+ 이어서 각각을 다룬다.
- If you want to map an Enum, you'll need to use either
- EnumTypeHandler or EnumOrdinalTypeHandler.
+ Enum을 매핑하고자 한다면 EnumTypeHandler 나 EnumOrdinalTypeHandler 를 사용할 필요가 있을것이다.
- For example, let's say that we need to store the rounding mode that
- should be used with some number if it needs to be rounded. By default, MyBatis
- uses EnumTypeHandler to convert the Enum
- values to their names.
+ 예를들어, 순환 방식으로 몇개의 숫자를 사용하는 순환모드를 저장할 필요가 있다고 해보자.
+ 기본적으로 마이바티스는 Enum 값을 각각의 이름으로 변환하기 위해 EnumTypeHandler 를 사용한다.
- Note EnumTypeHandler is special in the sense that unlike other handlers,
- it does not handle just one specific class, but any class that extends Enum
+ EnumTypeHandler는 특히 다른 핸들러와 차이가 있다.
+ 어떤 하나의 특정 클래스를 다루지 않고 Enum 을 확장하는 모든 클래스를 다룬다.
- However, we may not want to store names. Our DBA may insist on an
- integer code instead. That's just as easy: add EnumOrdinalTypeHandler
- to the typeHandlers in your config file, and now each
- RoundingMode will be mapped to an integer using its ordinal value.
+ 아무리 이름을 저장하려해도 DBA는 숫자코드를 고집할수 있다. 이름대신 숫자코드를 저장하는 방법은 쉽다.
+ 설정파일의 typeHandlers에 EnumOrdinalTypeHandler 를 추가하자.
+ 그러면 각각의 RoundingMode는 순서값을 사용해서 숫자를 매핑할 것이다.
@@ -994,19 +992,15 @@ public class GenericTypeHandler extends BaseTypeHandler {
]]>
- But what if you want to map the same Enum to a
- string in one place and to integer in another?
+ 같은 Enum을 사용해서 어떤곳에는 문자열로 매핑하고 다른곳에는 숫자로 매핑해야 한다면 무엇을 해야 하나?
- The auto-mapper will automatically use EnumOrdinalTypeHandler,
- so if we want to go back to using plain old ordinary
- EnumTypeHandler, we have to tell it, by explicitly setting
- the type handler to use for those SQL statements.
+ 자동매퍼는 EnumOrdinalTypeHandler 를 자동으로 사용할 것이다.
+ 그래서 평범한 순서를 나타내는 EnumTypeHandler 를 사용하고자 한다면 SQL구문에 사용할 타입핸들러를 몀시적으로 설정한다.
- (Mapper files aren't covered until the next section, so if this is your first
- time reading through the documentation, you may want to skip this for now
- and come back to it later.)
+ (매퍼 파일은 다음절까지는 다루지 않는다.
+ 그래서 문서를 보면서 처음 봤다면 일단 이부분은 건너띄고 다음에 다시 볼수도 있다. )
extends BaseTypeHandler {
]]>
- Note that this forces us to use a resultMap
- instead of a resultType in our select statements.
+ 여기서 사용한 select구문에서는 resultType 대신에 resultMap을 사용해야 한다는 점을 알아두자.
@@ -1296,7 +1289,7 @@ data_source 프로퍼티가 InitialContext 에서 직접 찾을 것이다.
이 설정은 인스턴스화할 때 InitialContext 생성자에 “encoding” 프로퍼티를 “UTF8” 로 전달한다.
- You can plug any 3rd party DataSource by implementing the interface org.apache.ibatis.datasource.DataSourceFactory:
+ org.apache.ibatis.datasource.DataSourceFactory 인터페이스를 구현해서 또다른 DataSource구현체를 만들수 있다.
}]]>
- org.apache.ibatis.datasource.unpooled.UnpooledDataSourceFactory can be used as super class
- class to build new datasource adapters. For example this is the code needed to plug C3P0:
+ org.apache.ibatis.datasource.unpooled.UnpooledDataSourceFactory 는 새로운 데이터소스를 만들기 위한 상위 클래스처럼 사용할 수 있다.
+ 예를들면 다음의 코드를 사용해서 C3P0를 사용할 수 있다.
- To set it up, add a property for each setter method you want MyBatis to call.
- Below depicts a sample configuration which connects to a PostgreSQL database:
+ 마이바티스가 호출할 setter메소드가 사용하는 프로퍼티를 추가해서 설정한다.
+ 다음의 설정은 PostgreSQL 데이터베이스에 연결할때 사용한 샘플 설정이다.
diff --git a/src/site/ko/xdoc/dynamic-sql.xml b/src/site/ko/xdoc/dynamic-sql.xml
index 89682a1fc..abcf869d2 100644
--- a/src/site/ko/xdoc/dynamic-sql.xml
+++ b/src/site/ko/xdoc/dynamic-sql.xml
@@ -179,7 +179,7 @@ AND title like ‘someTitle’]]>
살펴볼 것이다.
- The bind element lets you create a variable out of an OGNL expression and bind it to the context. For example:
+ bind 엘리먼트는 OGNL표현을 사용해서 변수를 만든 뒤 컨텍스트에 바인딩한다. 예를들면
@@ -203,31 +203,31 @@ AND title like ‘someTitle’]]>
]]>
- Starting from version 3.2 MyBatis supports pluggable scripting languages,
- so you can plug a language driver and use that language to write your dynamic
- SQL queries.
- There are two built-in languages:
+ 마이바티스 3.2부터는 플러그인 형태로 스크립트 언어를 사용할 수 있다.
+ 그래서 언어 드라이버를 장착하고 동적 SQL쿼리를 작성할때 그 언어를 사용할 수 있다.
+ 두개의 내장된 언어가 있다.
- The xml language is the default one. It is able to execute all the dynamic tags we saw in the previous sections.
- The raw language is in fact the absence of language. When using this setting MyBatis just performs the
- parameter substitution and passes the statement to the database driver. As you may guess, the raw language
- is faster than the xml language.
+ xml 언어는 설정하지 않을때 기본으로 사용하는 값이다.
+ xml을 사용하면 이전에 다룬 모든 동적태그를 실행할 수 있다.
+ raw 언어는 사실 기능이 조금 부족하다.
+ raw설정을 사용하면 마이바티스는 파라미터를 치환해서 데이터베이스 드라이버에 구문을 전달한다.
+ 짐작하는 것처럼 raw 언어는 xml 언어보다 조금더 빠르다.
- You can specify the language you want to use in an statement adding the lang attribute as follows:
+ 다음처럼 lang 속성을 추가해서 구문에서 사용할 언어를 명시할 수 있다.
SELECT * FROM BLOG
]]>
- Or, in the case you are using mappers, using the @Lang annotation:
+ 또는 매퍼를 사용하는 경우라면 @Lang 애노테이션을 사용한다.
selectBlog();
}]]>
- You can also implement your own language driver by implementing the following interface:
+ 다음의 인터페이스를 구현해서 자신만의 언어 드라이버를 구현할 수도 있다.
parameterType);
diff --git a/src/site/ko/xdoc/getting-started.xml b/src/site/ko/xdoc/getting-started.xml
index 85c1307ea..69d9f67ea 100644
--- a/src/site/ko/xdoc/getting-started.xml
+++ b/src/site/ko/xdoc/getting-started.xml
@@ -31,14 +31,14 @@
- To use the MyBatis you just need to include the
+ 마이바티스를 사용하기 위해
mybatis-x.x.x.jar
- file in the classpath.
+ 파일을 클래스패스에 두어야 한다.
- If you are using Maven just add the following dependency to your pom.xml:
+ 메이븐을 사용한다면 pom.xml 에 다음의 설정을 추가하자.
diff --git a/src/site/ko/xdoc/index.xml b/src/site/ko/xdoc/index.xml
index a290733e4..a9218241b 100644
--- a/src/site/ko/xdoc/index.xml
+++ b/src/site/ko/xdoc/index.xml
@@ -46,7 +46,7 @@ MyBatis 는 JDBC 코드와 수동으로 셋팅하는 파라미터와 결과 매
- 번역자 : 이동국(fromm0@gmail.com, http://ldg.pe.kr, http://me2day.net/fromm0)
+ 번역자 : 이동국(fromm0@gmail.com, http://ldg.pe.kr, https://www.facebook.com/dongguk.lee.3)
|