tadas44
11/30/2016, 1:49 PMtadas44
11/30/2016, 1:50 PMsss
11/30/2016, 1:50 PMtadas44
11/30/2016, 1:52 PMtadas44
11/30/2016, 1:52 PMsss
11/30/2016, 1:52 PMsss
11/30/2016, 1:53 PMtadas44
11/30/2016, 1:54 PMrocketraman
11/30/2016, 5:27 PMrocketraman
11/30/2016, 5:33 PMjanvladimirmostert
12/01/2016, 6:03 AMrocketraman
12/01/2016, 6:14 AMjanvladimirmostert
12/01/2016, 7:20 AM@Entity
@Table(name = "Companies")
@JsonIgnoreProperties(ignoreUnknown = true)
class Company(
@Column(unique = true)
var name: String = ""
) : StandardEntity() {
fun getCompanyByName(em: EntityManager, name: String): Company {
val query = em.createQuery("SELECT o FROM Company AS o WHERE o.name=:name", Company::class.java)
query.setParameter("name", name)
return query.singleResult
}
}
Superclass:
@MappedSuperclass
open class StandardEntity {
@Id
@GeneratedValue(strategy = javax.persistence.GenerationType.AUTO)
@Column(name = "id")
var id: Int? = null
@Version
@JsonIgnore
@Column(name = "version")
private var version: Int = 0
....
}
If hibernate is used properly, queries are also optimal in the majority of cases, if you need something that is much better optimised, there's always the option of native queries.
I've used JOOQ and SpringData, Torque, and several other ORMs, Hibernate suits my needs much better.
JOOQ actually charges you a license fee if using SQLServer / Oracle DBs, some clients actually use those, so with Hibernate, write in MySQL and just switch to their DBs.tadas44
12/01/2016, 7:22 AMsquash
. Maybe you could recommend rest api framework?tadas44
12/01/2016, 7:22 AMvertx
is great, what else?janvladimirmostert
12/01/2016, 7:23 AMtadas44
12/01/2016, 7:25 AMjanvladimirmostert
12/01/2016, 7:26 AMjanvladimirmostert
12/01/2016, 7:26 AMtadas44
12/01/2016, 7:27 AMtadas44
12/01/2016, 7:27 AMjanvladimirmostert
12/01/2016, 7:28 AMjanvladimirmostert
12/01/2016, 7:28 AMtadas44
12/01/2016, 7:31 AMorangy
squash
I’m experimenting with "data interfaces”, and codegen under the hood. Now trying to convert @sdeleuze’s geospatial exposed sample.miha-x64
12/01/2016, 9:08 AM@Autowired
and asked myself “Why we need Dagger there?” But with other frameworks or without them Dagger might be quite handy.
I like immutable data classes so much, but are there any benefits from immutable objects with really final
fields in comparison with effectively-immutable objects that must be initialized e. g. by Hibernate? Scott Oaks, author of "Java Performance: The Definitive Guide” says that despite some myths there is no performance impact from final fields.kenkyee
12/01/2016, 12:45 PMsss
12/02/2016, 11:38 AMsss
12/02/2016, 11:48 AMorangy