Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
* Specifies the base value for the {@link jakarta.persistence.OrderColumn
* order column} of a persistent list or array, that is, the order column
* value of the first element of the list or array.
* Specifies the base value for the {@linkplain jakarta.persistence.OrderColumn
* order column} of a persistent list or array, that is, the order column value
* of the first element of the list or array.
* <ul>
* <li>When a row is read from the database, this base value is subtracted
* from the order column value to determine an index in the list or array.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,12 @@ public void appendBooleanValueString(SqlAppender appender, boolean bool) {
}
}

@Override
protected void registerDefaultKeywords() {
super.registerDefaultKeywords();
registerKeyword( "number" );
}

@Override
public void initializeFunctionRegistry(FunctionContributions functionContributions) {
super.initializeFunctionRegistry(functionContributions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,19 @@

public final class ArrayHelper {

public static boolean contains(Object[] array, Object object) {
public static <T> boolean contains(T[] array, T object) {
return indexOf( array, object ) > -1;
}

public static <T> boolean containsAll(T[] array, T[] elements) {
for ( T element : elements ) {
if ( !contains( array, element ) ) {
return false;
}
}
return true;
}

public static boolean contains(int[] array, int value) {
for ( int i = 0; i < array.length; i++ ) {
if ( array[i] == value ) {
Expand Down

Large diffs are not rendered by default.

Loading
Loading