All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.tool.ide.completion.EntityNameReference Maven / Gradle / Ivy

There is a newer version: 5.6.15.Final
Show newest version
package org.hibernate.tool.ide.completion;

/**
 * Class that represents an alias to some entityname in a HQL statement. e.g. "Product as p" or "Product p"
 * 
 * Should not be used by external clients.
 * 
 * @author leon, Max Rydahl Andersen
 */
public class EntityNameReference {

    private String alias;

    private String entityName;

    public EntityNameReference(String type, String alias) {
        this.entityName = type;
        this.alias = alias;
    }

    /** 
     * 
     * @return The alias, the "p" in "Product as p" 
     */
    public String getAlias() {
        return alias;
    }

    /**
     * 
     * @return the entityname, the "Product" in "Product as b"
     */
    public String getEntityName() {
        return entityName;
    }

    public String toString() {
        return alias + ":" + entityName;
    }



}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy