This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
public class Customer extends BaseEntity{ | |
private String name; | |
private String surname; | |
private String identity_number; | |
private int age; | |
public Customer(String name, String surname, String identity_number, int age) { | |
this.name = name; | |
this.surname = surname; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestClientManagement { | |
@Test | |
public void should_persist_a_customer() { | |
Customer customer = new Customer("John", "Doe", "123456", 36); | |
long id=new CustomerManagementService().createCustomer(customer); | |
Assert.assertEquals("Id is not was expected",5,id); | |
} | |
@Test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<profiles> | |
<profile> | |
<id>dev</id> | |
<activation> | |
<activeByDefault>true</activeByDefault> | |
</activation> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.liquibase</groupId> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>org.apache.openjpa</groupId> | |
<artifactId>openjpa-all</artifactId> | |
<version>2.1.1</version> | |
</dependency> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.apache.openjpa</groupId> | |
<artifactId>openjpa-maven-plugin</artifactId> | |
<version>2.2.0</version> | |
<configuration> | |
<includes>**/entities/*.class</includes> | |
<excludes>**/entities/XML*.class</excludes> | |
<addDefaultConstructor>true</addDefaultConstructor> | |
<enforcePropertyRestrictions>true</enforcePropertyRestrictions> | |
</configuration> |
NewerOlder