com.github.fluent.hibernate.request.SQLEntityToAdd 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;
/**
* An entity for a native SQL.
*
* @author V.Ladynev
*/
/* package */final class SQLEntityToAdd implements IToAddToSQLQuery {
private String tableAlias;
private Class> entityType;
public SQLEntityToAdd(String tableAlias, Class> entityType) {
this.tableAlias = tableAlias;
this.entityType = entityType;
}
@Override
public void addToQuery(SQLQuery query) {
if (tableAlias == null) {
query.addEntity(entityType);
} else {
query.addEntity(tableAlias, entityType);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy