2014년 7월 16일 수요일

Hibernate - Auto Increment

hibernate 사용 시 auto increment 때문에 컬럼에 값을 지정할 수 없는 경우
다음과 같이 지정

@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Column(name="dbms_seq", nullable=false, unique=true)
public String getDbms_seq() {
    return dbms_seq;
}

2014년 6월 24일 화요일

eclipse 자동 주석

Window -> Preferences -> Java -> Code Style -> Code Templates -> Comments 에서

파일정보 주석 (소스 가장 위 상단을 선택)Types -> Edit
/**
 * @FileName  : ${file_name}
 * @Project     : ${project_name}
 * @Date         : ${date}
 * @작성자      : ${user}

 * @변경이력 :
 * @프로그램 설명 :
 */


/**
 * <pre> 
 * ${package_name} 
 *   |_${file_name} 
 * </pre> 
 * @author :    ${user}
 * @date :    ${date} ${time}
 * @brief : 클래스의 개요
 */
 

메소드정보 주석 (원하는 함수를 선택)

Methods -> Edit

/**
 * @Method Name  : ${enclosing_method}
 * @작성일   : ${date}
 * @작성자   : ${user}
 * @변경이력  :
 * @Method 설명 :
 * ${tags}
 */







/**
 * @brief : 메소드 개요
 * @date :     ${date}
 * @param : 파라미터 값의 내용
 * @return :    ${return_type}
 * @remarks : 자세한 설명 기술 (optional)
 * @bug : 버그에 대한 기술(optional)
 * @code : 중요 코드를 설명할때 시작 지점(optional)
 * @endcode : 중요 코드를 설명할 때 종료 지점을 가르킴(optional)
 */

${} 내용설명

data : Current date (현재 날짜)
dollar : The dollar symbol (달러문양)
enclosing_type :The type enclosing the method (선택된 메소드의 타입)
file_name : Name of the enclosing compilation (선택된 편집파일 이름)
package_name : Name of the enclosing package (선택된 패키지 이름)
project_name : Name of the enclosing project (선택된 프로젝트 이름)
tags : Generated Javadoc tags (@param, @return...) (Javedoc 태그 생성)
time : Current time (현재 시간)
todo : Todo task tag ('해야할일'태그 생성)
type_name : Name of the current type (현재 타입의 이름)
user : User name (사용자 이름)
year : Current year (현재 연도)


3.2 기준으로 주석입력 단축키는 ALT + SHIFT + J

2014년 5월 23일 금요일

GPROF


* GPROT

** Main
cc -o t t.c -pg
gprof t gmon.out > t_profile.txt


** shared library
-pg 대신 -g 사용
export LD_PROFILE_OUTPUT=`pwd`
export LD_PROFILE=libSafeDBSDK4C.so
rm -f $LD_PROFILE.profile
./t
sprof /home/inuk/safedb/package64/libs/$LD_PROFILE $LD_PROFILE.profile -p >log