Skip to content

Commit

Permalink
Merge branch 'integration' into InstallErrorsAndMessages
Browse files Browse the repository at this point in the history
  • Loading branch information
cbridgha authored Jul 18, 2024
2 parents 48b3328 + 517bd25 commit f5df605
Show file tree
Hide file tree
Showing 11 changed files with 460 additions and 283 deletions.
9 changes: 5 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

- [ ] I have considered the risk of behavior change or other zero migration impact (https://github.com/OpenLiberty/open-liberty/wiki/Behavior-Changes).
- [ ] If this PR fixes an Issue, the description includes "Fixes #FILLMEIN" or "Resolves #FILLMEIN" (verify `release bug` label if applicable: https://github.com/OpenLiberty/open-liberty/wiki/Open-Liberty-Conventions).
- [ ] If this PR resolves an external Known Issue (including APARS), the description includes "Fixes #FILLMEIN" or "Resolves #FILLMEIN".

################################################################################################

# Delete this section and fill in the remaining info from the template
Expand All @@ -23,7 +28,3 @@ Otherwise, a link to an issue or specific issue labels are optional.

For full details, please see this wiki page: https://github.com/OpenLiberty/open-liberty/wiki/Open-Liberty-Conventions
################################################################################################

- [ ] Considered risk of behavior change or other zero migration impact (https://github.com/OpenLiberty/open-liberty/wiki/Behavior-Changes)
- [ ] Resolved Issues: Fixes #FILLMEIN... (verify `release bug` label if applicable: https://github.com/OpenLiberty/open-liberty/wiki/Open-Liberty-Conventions)
- [ ] Resolved external Known Issues (including APARS): Fixes #FILLMEIN...
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<featureManager>
<platform>jakartaee-10.0</platform>
<platform>microProfile-4.0</platform>
<platform>microProfile-6.0</platform>
<feature>jsp</feature>
<feature>localConnector-1.0</feature>
<feature>mpHealth</feature>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
-Dcom.ibm.ws.beta.edition=true

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*******************************************************************************
* Copyright (c) 2024 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package com.informix.jdbcx;

import java.util.HashMap;
import java.util.Map;

public class IfxConstants {
public enum TestType {
STARTUP,
RUNTIME,
DUPLICATE_RESTART,
DUPLICATE_RUNTIME,
HALT,
CONNECT,
LEASE;

private static final Map<Integer, TestType> _map = new HashMap<Integer, TestType>();
static {
for (TestType testType : TestType.values()) {
_map.put(testType.ordinal(), testType);
}
}

public static TestType from(int ordinal) {
return _map.get(ordinal);
}
};
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import com.ibm.websphere.ras.TraceComponent;
import com.ibm.websphere.ras.annotation.Trivial;

import jakarta.data.Sort;
import jakarta.data.exceptions.MappingException;
import jakarta.persistence.Inheritance;

Expand Down Expand Up @@ -138,41 +137,6 @@ Object getAttribute(Object entity, String attributeName) throws IllegalAccessExc
return value;
}

@Trivial
String getAttributeName(String name, boolean failIfNotFound) {
String lowerName = name.toLowerCase();
String attributeName = attributeNames.get(lowerName);
if (attributeName == null)
if (ID.equals(lowerName))
if (idClassAttributeAccessors == null && failIfNotFound)
throw new MappingException("Entity class " + getType().getName() + " does not have a property named " + name +
" or which is designated as the @Id."); // TODO NLS
else
attributeName = null; // Special case for IdClass
else if (name.length() == 0)
throw new MappingException("Error parsing method name or entity property name is missing."); // TODO NLS
else {
// tolerate possible mixture of . and _ separators:
lowerName = lowerName.replace('.', '_');
attributeName = attributeNames.get(lowerName);
if (attributeName == null) {
// tolerate possible mixture of . and _ separators with lack of separators:
lowerName = lowerName.replace("_", "");
attributeName = attributeNames.get(lowerName);
if (attributeName == null && failIfNotFound)
// TODO If attempting to parse Query by Method Name without a By keyword, then the message
// should also include the possibility that repository method is missing an annotation.
throw new MappingException("Entity class " + getType().getName() + " does not have a property named " + name +
". The following are valid property names for the entity: " +
attributeTypes.keySet()); // TODO NLS
}
}

if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(this, tc, "getAttributeName " + name + ": " + attributeName);
return attributeName;
}

Collection<String> getAttributeNames() {
return attributeNames.values();
}
Expand Down Expand Up @@ -263,25 +227,6 @@ Class<?> getType() {
return recordClass == null ? entityClass : recordClass;
}

/**
* Creates a Sort instance with the corresponding entity attribute name
* or returns the existing instance if it already matches.
*
* @param name name provided by the user to sort by.
* @param sort the Sort to add.
* @return a Sort instance with the corresponding entity attribute name.
*/
@Trivial
<T> Sort<T> getWithAttributeName(String name, Sort<T> sort) {
name = getAttributeName(name, true);
if (name == sort.property())
return sort;
else
return sort.isAscending() //
? sort.ignoreCase() ? Sort.ascIgnoreCase(name) : Sort.asc(name) //
: sort.ignoreCase() ? Sort.descIgnoreCase(name) : Sort.desc(name);
}

/**
* Creates a CompletableFuture to represent an EntityInfo in PersistenceDataProvider's entityInfoMap.
*
Expand Down
Loading

0 comments on commit f5df605

Please sign in to comment.