JPA 샘플 클래스 MyEntity

Jmnote (토론 | 기여)님의 2016년 7월 13일 (수) 15:39 판 (새 문서: {{테스트|MySQL}} ==개요== ;JPA 샘플 클래스 MyEntity <source lang='java'> package com.example.myapp; import java.io.Serializable; import java.math.BigDecimal; import java.s...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

JPA 샘플 클래스 MyEntity
package com.example.myapp;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Calendar;
import java.util.Currency;
import java.util.Locale;
import java.util.TimeZone;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class MyEntity {
	@Id private Long id;
	
	@Column private Integer myInteger1;
	@Column private Long myLong;
	@Column private Short myShort;
	@Column private Float myFloat;
	@Column private Double myDouble;
	@Column private String myString;
	@Column private Byte myByte;
	@Column private Byte[] myBytes;
	@Column private Boolean myBoolean;
	@SuppressWarnings("rawtypes")
	@Column private Class myClass;

	// java.sql
	@Column private Timestamp myTimestamp;
	@Column private Date myDate;
	@Column private Time myTime;

	// java.math
	@Column private BigDecimal myBigDecimal;
	
	// java.io
	@Column private Serializable mySerializable;
	
	// java.sql
	@Column private Clob myClob;
	@Column private Blob myBlob;

	// java.util
	@Column private Calendar myCalendar;
	@Column private Locale myLocale;
	@Column private TimeZone myTimeZone;
	@Column private Currency myCurrency;
}

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}