Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBX-2867: Replace deprecated use of method 'org.hibernate.mapping.Component#getPropertyIterator()' #4867

Merged
merged 1 commit into from
Jul 17, 2024
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 @@ -298,7 +298,7 @@ private Value getNextAttributeType(Component t, String attributeName) {
if (idx != -1) {
attributeName = attributeName.substring(0, idx);
}
Iterator<?> names = t.getPropertyIterator();
Iterator<?> names = t.getProperties().iterator();
while ( names.hasNext() ) {
Property element = (Property) names.next();
String name = element.getName();
Expand All @@ -313,7 +313,7 @@ void addPropertiesToList(Component t, String prefix, int cursorPosition, IHQLCom
if (t == null) {
return;
}
Iterator<?> props = t.getPropertyIterator();
Iterator<?> props = t.getProperties().iterator();
while ( props.hasNext() ) {
Property element = (Property) props.next();
String candidate = element.getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ public String getSafeHibernateTypeName(Property p) {
}

public Iterator<?> getProperties(Component v) {
return new SkipBackRefPropertyIterator(v.getPropertyIterator());
return new SkipBackRefPropertyIterator(v.getProperties().iterator());
}

public Iterator<?> getProperties(PersistentClass pc) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public String generateAnnColumnAnnotation(Property property) {
if ( property.isComposite() ) {
annotations.append( "@" + importType("jakarta.persistence.AttributeOverrides") +"( {" );
Component component = (Component) property.getValue();
Iterator<?> subElements = component.getPropertyIterator();
Iterator<?> subElements = component.getProperties().iterator();
buildRecursiveAttributeOverride( subElements, null, property, annotations );
annotations.setLength( annotations.length() - 2 );
annotations.append( " } )" );
Expand Down Expand Up @@ -390,7 +390,7 @@ private void buildRecursiveAttributeOverride(Iterator<?> subElements, String pat
}
path = path + subProperty.getName();
Component component = (Component) subProperty.getValue();
buildRecursiveAttributeOverride( component.getPropertyIterator(), path, subProperty, annotations );
buildRecursiveAttributeOverride( component.getProperties().iterator(), path, subProperty, annotations );
}
else {
Selectable selectable = subProperty.getColumns().get(0);
Expand Down Expand Up @@ -821,7 +821,7 @@ protected boolean isRequiredInConstructor(Property field) {
return true;
} else if (field.getValue() instanceof Component) {
Component c = (Component) field.getValue();
Iterator<?> it = c.getPropertyIterator();
Iterator<?> it = c.getProperties().iterator();
while ( it.hasNext() ) {
Property prop = (Property) it.next();
if(isRequiredInConstructor(prop)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public String getImplements() {
}

public Iterator<Property> getAllPropertiesIterator() {
return clazz.getPropertyIterator();
return clazz.getProperties().iterator();
}

public boolean isComponent() {
Expand Down
Loading