public class Alias<E> extends AbstractPathRoot<E> implements EntityAlias<E>
| Modifier and Type | Field and Description |
|---|---|
private Class<?> |
entityType |
private String |
name |
private E |
prototype |
private Class<E> |
resultType |
private String |
source |
| Constructor and Description |
|---|
Alias(String source)
The constructor.
|
Alias(String source,
String name)
The constructor.
|
Alias(String source,
String name,
Class<?> entityType,
E prototype,
Class<E> resultType)
The constructor.
|
Alias(String source,
String name,
Class<E> type)
The constructor.
|
Alias(String source,
String name,
E prototype)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Alias<E> |
as(String aliasName) |
Class<?> |
getEntityType() |
String |
getName() |
E |
getPrototype() |
Class<E> |
getResultType() |
String |
getSource() |
static <E extends Bean> |
ofBean(E prototype) |
static <E extends Bean> |
ofBean(E prototype,
String alias) |
String |
toString() |
to, to, to, to, to, to, to, toprivate final String source
private final String name
private final E prototype
private final Class<?> entityType
public Alias(String source)
source - - see getSource().public Alias(String source, String name)
source - - see getSource().name - - see getName().public Alias(String source, String name, Class<E> type)
source - - see getSource().name - - see getName().type - - see getEntityType().public Alias(String source, String name, E prototype)
source - - see getSource().name - - see getName().prototype - - see getPrototype().public Alias(String source, String name, Class<?> entityType, E prototype, Class<E> resultType)
source - - see getSource().name - - see getName().entityType - - see getEntityType().prototype - - see getPrototype().resultType - - see getResultType().public String getSource()
getSource in interface EntityAlias<E>EntityAlias. Typically the name of a table, entity, class, etc. Shall NOT
be null.public String getName()
getName in interface AttributeReadNamegetName in interface EntityAlias<E>EntityAlias (what is "alias" in "SELECT FROM Foo AS alias").public E getPrototype()
getPrototype in interface EntityAlias<E>getPrototype in interface PathRoot<E>prototype of this source. May be null.public Class<?> getEntityType()
getEntityType in interface EntityAlias<E>Class reflecting the internal entity of the source. It is not
bound to <E> as the internal entity does not necessarily have to be the queried
result type. May be null.public Class<E> getResultType()
getResultType in interface EntityAlias<E>Class reflecting the external result when this EntityAlias gets queried.public Alias<E> as(String aliasName)
as in interface EntityAlias<E>aliasName - the new alias name.Alias with the given alias name.Copyright © 2001–2016 mmm-Team. All rights reserved.