
com.github.fluent.hibernate.request.SQLJoinToAdd Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluent-hibernate-core Show documentation
Show all versions of fluent-hibernate-core Show documentation
A library to work with Hibernate by fluent API. This library hasn't dependencies except Hibernate dependencies. It requires Java 1.6 and above.
The newest version!
package com.github.fluent.hibernate.request;
import org.hibernate.SQLQuery;
/**
* A join for a native SQL.
*
* @author V.Ladynev
*/
/* package */final class SQLJoinToAdd implements IToAddToSQLQuery {
private String tableAlias;
private String ownerTableAlias;
private String joinPropertyName;
public SQLJoinToAdd(String tableAlias, String ownerTableAlias, String joinPropertyName) {
this.tableAlias = tableAlias;
this.ownerTableAlias = ownerTableAlias;
this.joinPropertyName = joinPropertyName;
}
@Override
public void addToQuery(SQLQuery query) {
if (joinPropertyName == null) {
query.addJoin(tableAlias, ownerTableAlias);
} else {
query.addJoin(tableAlias, ownerTableAlias, joinPropertyName);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy