View MultipleExtractedValue.java
// Should we reject it? | |
public class DoubleExtractor implements ValueExtractor<Multimap<@ExtractedValue ?, @ExtractedValue ?>> { | |
@Override | |
public void extractValues(Multimap<?, ?> originalValue, ValueExtractor.ValueReceiver receiver) { | |
... | |
} | |
} |
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; | |
} |
View github_pr_branch_links.user.js
// Copyright © 2015 Gunnar Morling | |
// This work is free. You can redistribute it and/or modify it under the | |
// terms of the Do What The Fuck You Want To Public License, Version 2, | |
// as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
// ==UserScript== | |
// @name GitHub PR branch links | |
// @description Renders the source and target branches of GitHub pull requests as links | |
// @namespace http://gunnarmorling.de | |
// @include https://github.com/* |