전체 글 874

[svn] visualsvn server backup/restore

백업 svnadmin dump 명령 1.svnadmin dump repository-location > dump.file Visual SVN 일괄 백업 하기 도스 배치 파일을 이용하여 SVN 저장소들을 일괄 백업 하는 스크립트를 작성해 보았다. Visual SVN 저장소 루트 경로: C:\Repositories dump 파일 명: 저장소명.dump 백업 파일 폴더: C:/BACKUP echo off echo Back SVN to C:/BACKUP pushd C:\Repositories for /d %%i in (*) do echo dump %%i & svnadmin dump %%i > C:\BACKUP\%%i.dump popd ※ pushd : 현재 디렉터리를 변경 ※ popd: pushd를 수행한 폴더..

[java] dynamic getter, setter

개발을 하다보면 부득이하게 동적으로 class에 값을 넣거나 값을 가져와야 할 경우가 있습니다. 아래와 같이 class.getDeclaredField() 를 사용하면 손쉽게 할 수 있습니다. public class TAllSaveThsusBean { /** * Desc : Refection을 활용한 Getter/Setter */ public ArrayList ReflectionGF(ArrayList objAL) throws Exception { try { //VALL 객체 : Value Object로 Getter, Setter를 가지고 있음 VALL v_condition = 화면에서 넘겨 받은 값 VO : 조건값 ArrayList v_save1 = 화면에서 넘겨 받은 값 VO : 저장할 VO이면서 여러레..

웹 개발 2019.07.18

[Querydsl] 동적으로 where 만들기

먼저, 여기에서 말하는 동적 where는 아래와 같은 where절을 의미합니다. WHERE userName = '홍길동' AND ( age = 24 or telno = '010-1111-2222' ) Querydsl에서는 BooleanBuilder를 사용하여 이와 같은 복합 검색조건을 만들 수 있습니다. 방법 1) and를 기준으로 괄호를 구분 ( and가 나오면 새로운 괄호의 시작 ) ex) and roleCode = 1 and ( roleName = 2 or roleDesc = 3 ) String temp = "{\"keyword_0\":{\"selectType\":\"roleCode\",\"andOr\":\"and\",\"select\":\"ROLE-000\",\"input\":\"\",\"rule..

[Querydsl] CASE WHEN 사용하기

Querydsl에서 CASE WHEN을 사용하기 위해서는 CaseBuilder()를 사용하면 됩니다. 사용 방법은 아래를 참고하시면 됩니다. 예1) Expression cases = new CaseBuilder() .when(c.annualSpending.gt(10000)).then("Premier") .when(c.annualSpending.gt(5000)).then("Gold") .when(c.annualSpending.gt(2000)).then("Silver") .otherwise("Bronze"); 예2) import static kr.com.wow.QTbUser; // 클래스 및 함수 선언부 생략 JPAQuery query = jpaQueryFactory .from(tbUser) .select(..

728x90
loading