Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓
Streaming data changes, one at a time.

Gunnar Morling gunnarmorling

🤓
Streaming data changes, one at a time.
View GitHub Profile
View gist:114036775b0c40fa9142
@ValueMapping( source = "BAR", target = "FOO" )
@ValueMapping( source = "<ANY>", target = "DEFAULT" )
@ValueMapping( source = "<ANY_UNMAPPED>", target = "BLUB" )
View Try.java
public class Try {
@NotNull(message = "field1", groups = BaseComponent.class)
public String field1;
@NotNull(message = "field2", groups = Component.class)
public String field2;
@NotNull(message = "field3", groups = OtherComponent.class)
public String field3 = "";
View 01_SingleValueExtractor.java
interface SingleValueExtractor<I, O> {
O extractValue(I input);
// only invoked if invalid; Property name enough as input?
Path.Node getNode(String property);
}
View gist:28d4619f0871f4f04e78
class ValueAndPathNode<O> {
Node getPathNode();
O getValue();
}
interface SingleValueExtractor<I, 0> {
ValueAndPathNode<O> extractValue(I input);
}
interface MultiValueExtractor<I, 0> {
View gist:a82a40a9d9b63defb402
// 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
View NumericFieldTest.java
@Indexed
public class PointOfInterest {
@Id
@DocumentId
@Field(name = "myId")
@NumericField
private byte id;
...
View several_id_fields.java
@Id
@DocumentId
@NumericField(forField="id_forNumericSort")
@Field(name = "id_forNumericSort", store=Store.NO, index=Index.NO)
public Integer getId() {
return id;
}
View 01_sorting_simple.java
@Field(analyzed=Analyze.NO)
@SortField
public String getLastname() {
return lastname;
}
@gunnarmorling
gunnarmorling / github_pr_branch_links.user.js
Last active Aug 29, 2015
GreaseMonkey script for rendering source and target branches of GitHub PRs as links
View github_pr_branch_links.user.js
View gradle.log
➜ 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
You can’t perform that action at this time.