Skip to content

Instantly share code, notes, and snippets.

View tkt028's full-sized avatar

Khon tkt028

  • home
  • Vietnam
View GitHub Profile
@tkt028
tkt028 / example-1-InheritanceType.JOINED
Created April 29, 2014 12:40
SpringJPA: map Java inheritance hierarchies to database tables
// @Note: Sample code from Broadleaf
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "BLC_CUSTOMER", uniqueConstraints = @UniqueConstraint(columnNames = { "USER_NAME" }))
public class CustomerImpl implements Customer, AdminMainEntity {
@Id
@Column(name = "CUSTOMER_ID")
protected Long id;
@tkt028
tkt028 / get-stacktrace.java
Created April 28, 2014 07:04
Get string of current stacktrace in Java
// Get current stack trace in Java
// - http://stackoverflow.com/questions/1069066/get-current-stack-trace-in-java
// - http://stackoverflow.com/questions/944991/is-there-a-way-to-dump-a-stack-trace-without-throwing-an-exception-in-java
// - http://javarevisited.blogspot.com/2013/04/how-to-get-current-stack-trace-in-java-thread.html
import org.apache.commons.lang.exception.ExceptionUtils;
public void testGetListElevesOfClassInEnclassmentForNonViecourante() {
String fullStackTrace = ExceptionUtils.getFullStackTrace(new Throwable("TKT Unit Test"));
System.out.println(fullStackTrace);
@tkt028
tkt028 / about.md
Created May 22, 2012 08:03 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer