Pages

Sunday, March 23, 2014

JPA - Entity SequenceGenerator




@Entity
@NamedQueries({
@NamedQuery(name = "Departments.findAll", query = "select o from Departments o")
})
public class Departments implements Serializable {
@Id
@Column(name="DEPARTMENT_ID", nullable = false)
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator = "DEPARTMENTS_GEN")
@SequenceGenerator(name="DEPARTMENTS_GEN", sequenceName = "DEPARTMENTS_SEQ")

private Long departmentId;
@Column(name="DEPARTMENT_NAME", nullable = false, length = 30)
private String departmentName;
// setters and getters
}


Thursday, March 6, 2014

Unit testing with Junit in JDeveloper 11G

refer links:
http://www.oracle.com/technetwork/articles/adf/part5-083468.html
http://www.oracle.com/technetwork/articles/server-side-unit-tests-096611.html
http://tamanmohamed.blogspot.com/2011/06/unit-testing-with-junit-4x-in.html
http://biemond.blogspot.com/2009/07/unit-test-your-composite-application.html


..... updating