Skip to content

Commit

Permalink
Merge pull request #28599 from njr-11/28595-refactor-methods-to-query…
Browse files Browse the repository at this point in the history
…info

refactor methods to QueryInfo
  • Loading branch information
njr-11 authored May 31, 2024
2 parents dca1180 + b04e8d5 commit 3a9521e
Show file tree
Hide file tree
Showing 3 changed files with 1,627 additions and 1,660 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import java.util.SortedMap;
import java.util.concurrent.CompletableFuture;

import com.ibm.websphere.ras.Tr;
import com.ibm.websphere.ras.TraceComponent;
import com.ibm.websphere.ras.annotation.Trivial;

import jakarta.data.Sort;
Expand All @@ -39,6 +41,8 @@
* Entity information
*/
public class EntityInfo {
private static final TraceComponent tc = Tr.register(EntityInfo.class);

/**
* Suffix for generated record class names. The name used for a generated
* record entity class is: [RecordName][RECORD_ENTITY_SUFFIX]
Expand Down Expand Up @@ -134,6 +138,7 @@ 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);
Expand Down Expand Up @@ -163,6 +168,8 @@ else if (name.length() == 0)
}
}

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

Expand Down
Loading

0 comments on commit 3a9521e

Please sign in to comment.