Skip to content

Instantly share code, notes, and snippets.

View gunnarmorling's full-sized avatar
🤓
Streaming data changes, one at a time.

Gunnar Morling gunnarmorling

🤓
Streaming data changes, one at a time.
View GitHub Profile
interface SingleValueExtractor<I, O> {
O extractValue(I input);
// only invoked if invalid; Property name enough as input?
Path.Node getNode(String property);
}
class ValueAndPathNode<O> {
Node getPathNode();
O getValue();
}
interface SingleValueExtractor<I, 0> {
ValueAndPathNode<O> extractValue(I input);
}
interface MultiValueExtractor<I, 0> {
// Required to make HV work on JDK 9
https://hibernate.atlassian.net/browse/HV-1049 Don't access annotations from "jdk.internal" package
https://hibernate.atlassian.net/browse/HV-1048 Correctly interpret version string returned by JDK 9
// Other bug fixes we did since 5.2.2
https://hibernate.atlassian.net/browse/HV-1022 Validator.validateValue does not work for JDK-8 TYPE_USE annotations
https://hibernate.atlassian.net/browse/HV-1025 Configuration streams not reusable on IBM JVM
https://hibernate.atlassian.net/browse/HV-1025 Copying PathImpl results in hashCode==0
@Indexed
public class PointOfInterest {
@Id
@DocumentId
@Field(name = "myId")
@NumericField
private byte id;
...
@Id
@DocumentId
@NumericField(forField="id_forNumericSort")
@Field(name = "id_forNumericSort", store=Store.NO, index=Index.NO)
public Integer getId() {
return id;
}
@Field(analyzed=Analyze.NO)
@SortField
public String getLastname() {
return lastname;
}
@gunnarmorling
gunnarmorling / github_pr_branch_links.user.js
Last active August 29, 2015 14:24
GreaseMonkey script for rendering source and target branches of GitHub PRs as links
➜ hibernate-orm git:(HHH-9708) ✗ ./gradlew clean compileJava
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy UP-TO-DATE
:buildSrc:processResources UP-TO-DATE
:buildSrc:classes UP-TO-DATE
:buildSrc:jar UP-TO-DATE
:buildSrc:assemble UP-TO-DATE
:buildSrc:compileTestJava UP-TO-DATE
:buildSrc:compileTestGroovy UP-TO-DATE
:buildSrc:processTestResources UP-TO-DATE
@gunnarmorling
gunnarmorling / UC-1
Last active August 29, 2015 14:16
OGM-465 Error handling SPI
// UC-1: As a user of OGM, upon an exception during flush(), I want to log all operations applied so far and abort the
// processing of the flush cycle
File[] files = Maven.resolver()
.resolve( "org.apache.avro:avro:jar:1.7.6" )
.withTransitivity()
.asFile();
System.out.println( Arrays.toString( files ) );