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
| ... | |
| import static com.blogspot.vardlokkur.domain.QEmployee.employee; | |
| import javax.persistence.EntityManager; | |
| import javax.persistence.PersistenceContext; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import com.blogspot.vardlokkur.domain.EmployeeNameProjection; | |
| import com.blogspot.vardlokkur.domain.QEmployeeNameProjection; |
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
| package com.blogspot.vardlokkur.domain; | |
| import java.io.Serializable; | |
| import javax.annotation.concurrent.Immutable; | |
| import com.mysema.query.annotations.QueryProjection; | |
| @Immutable | |
| public class EmployeeNameProjection implements Serializable { |
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
| ... | |
| import static com.blogspot.vardlokkur.domain.QEmployee.employee; | |
| import javax.persistence.EntityManager; | |
| import javax.persistence.PersistenceContext; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import com.blogspot.vardlokkur.domain.EmployeeNameProjection; | |
| import com.blogspot.vardlokkur.domain.EmployeeNameProjectionFactory |
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
| package com.blogspot.vardlokkur.domain; | |
| import static com.blogspot.vardlokkur.domain.QEmployee.employee; | |
| import com.mysema.query.Tuple; | |
| import com.mysema.query.types.MappingProjection; | |
| public class EmployeeNameProjectionFactory extends MappingProjection<EmployeeNameProjection> { | |
| public EmployeeNameProjectionFactory() { |
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
| ... | |
| import static com.blogspot.vardlokkur.domain.QEmployee.employee; | |
| import javax.persistence.EntityManager; | |
| import javax.persistence.PersistenceContext; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import com.blogspot.vardlokkur.domain.EmployeeNameProjection; |
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
| package com.blogspot.vardlokkur.domain; | |
| import java.io.Serializable; | |
| import javax.annotation.concurrent.Immutable; | |
| import javax.persistence.Column; | |
| import javax.persistence.Entity; | |
| import javax.persistence.Id; | |
| import javax.persistence.Table; |
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
| package com.blogspot.vardlokkur.domain; | |
| import java.io.Serializable; | |
| import javax.annotation.concurrent.Immutable; | |
| @Immutable | |
| public class EmployeeNameProjection implements Serializable { | |
| private final Long employeeId; |
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
| package com.blogspot.vardlokkur.domain; | |
| ... | |
| import org.joda.money.Money; | |
| @Entity | |
| @Table(name = "EMPLOYEE") | |
| public class Employee implements Serializable { | |
| ... |
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
| /** | |
| * Provides the domain model. | |
| * | |
| * @author Warlock | |
| */ | |
| @org.hibernate.annotations.TypeDef(name = "money", defaultForType = Money.class, typeClass = PersistentMoneyAmount.class) | |
| package com.blogspot.vardlokkur.domain; | |
| import org.jadira.usertype.moneyandcurrency.joda.PersistentMoneyAmount; | |
| import org.joda.money.Money; |
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
| select * from ( | |
| select | |
| row_.*, rownum rownum_ | |
| from ( | |
| select | |
| employee0_.EMPLOYEE_ID as EMPLOYEE1_0_, employee0_.DATE_OF_BIRTH as DATE2_0_, | |
| employee0_.EMPLOYEE_NAME as EMPLOYEE3_0_ | |
| from EMPLOYEE employee0_ | |
| order by employee0_.EMPLOYEE_NAME | |
| ) row_ |
NewerOlder