본문 바로가기
[SQLite3] 03. SQL 고급 #2 [SQLite3] 03. SQL 고급 #2 이 글은 "빠르게 활용하는 모바일 데이터베이스 SQLite3” 이란 글을 보며 필요한 내용만 정리한 글입니다.자세한 내용은 책을 구매해서 보세요 9. 트리거 -DB TRIGGER 란 특정 테이블이나 뷰에 INSERT, DELETE, UPDATE 와 같은 데이터 조작 이벤트가 발생했을 때 자동으로 지정된 동작을 수행하게 하는 것이다. 트리거 활용 -syntaxCREATE TRIGGER [triggerName] [triggerTiming] [triggerOperation] ON [tableName]BEGIN [sqlOperations]END; triggerTiming 은 아래와 같다.BEFORE : 대상 테이블의 CUD 동작 직전에 트리거에서 지정한 동작이 수행된다.. 2018. 5. 19.
[Kotlin Tutorial] Kotlin 의 Type system #2 [Kotlin Tutorial] Kotlin 의 Type system #2 참조 : Kotlin in action 6.2. Primitive and other basic types 6.2.1. Primitive types: Int, Boolean, and more -Kotlin 은 primitive type 과 wrapper type 을 구분하지 않는다. -그렇다면 Int 가 object 라면 Kotlin 은 모든 primitive type 을 실제로 object 로 만드는가?당연히 그렇게 안 했다.compiler 가 대부분의 Int type 을 Java 의 primitive type 으로 변형시킨다.generic, collection 등은 원래 Java 의 Integer 형태만 담을 수 있으므로 이 경.. 2017. 8. 22.
[Effective Java] 타입 안전이 보장되는 혼성(heterogeneous) 컨테이너의 사용을 고려하자. [Effective Java] 타입 안전이 보장되는 혼성(heterogeneous) 컨테이너의 사용을 고려하자. - 제네릭은 Set 이나 Map 같은 컬렉션, ThreadLocal 이나 AtomicReference 같은 단일 요소(single-element) 저장 컨테이너에 가장 많이 사용된다. 이 컬렉션들은 컨테이너를 매개변수화 한 것이다. 컨테이너의 특성에 따라 사용 가능한 타입 매개변수의 갯수가 자연스럽게 제한된다. - 타입 안전을 지키면서 더 큰 유연성을 갖기 위해서 ( 예를 들면 nosql 처럼 column 이 상황에 따라 다른 경우 )는 컨테이너 대신 키(key) 를 매개변수화 해주면 된다. - Class 클래스는 1.5부터 제네릭화되었다. 클래스 리터럴 타입은 Class 가 아니고 Class.. 2016. 11. 22.
[android] findViewById casting bolierplate removal. android, findViewById casting bolierplate removal. @SuppressWarnings("unchecked")public final E findView (int id) { return (E) findViewById(id);} @Overridepublic void onCreate (Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView textView = findView(R.id.textview);Button button = findView(R.id.button);ImageView image = findView(R.id.imageview); myMethod( findView(R.id.imagev.. 2014. 4. 17.
[Java] Reflection Tutorial - Dynamic Class Loading and Reloading. Java, Reflection Tutorial - Dynamic Class Loading and Reloading. Java 에서 dynamic 하게 class 를 load 혹은 reload 할 수 있다. The ClassLoader Java 의 모든 class 는 ClassLoader의 subclass 를 이용하여 로드된다.한 class 가 load 될 때 다른 연관된 ( refer 된 ) class 들도 모두 함께 recursive 하게 load 된다. The ClassLoader Hierachy 새로운 class loader 를 작성할 떄면 반드시 Java 의 기본 ClassLoader 를 상속하여 이용해야 한다. 먼저 parent ClassLoader 를 이용하여 load 를 시도하고, paren.. 2014. 1. 9.
반응형