java.lang.Object
org.litebridgedb.db.spi.Aliased
A name and an optional alias.
This class provides functionality to create and manage aliased entities. It is designed to be extended by other classes that require naming and optional aliasing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Stringalias()Retrieve the alias of the aliased entity.Retrieve the alias if it is set; otherwise, return the name.Set the alias for this entity and return the updated instance.booleanbooleanequalsIgnoreAlias(Aliased aliased) inthashCode()name()Retrieve the name of the aliased entity.final voidSet the alias for this entity.
-
Constructor Details
-
Aliased
-
Aliased
-
-
Method Details
-
name
Retrieve the name of the aliased entity.- Returns:
- the name of the aliased entity
-
alias
Retrieve the alias of the aliased entity.- Returns:
- the alias of the aliased entity, or
nullif no alias is set
-
aliasOrName
Retrieve the alias if it is set; otherwise, return the name.- Returns:
- the alias of the entity if it exists, or the name if no alias is set
-
as
Set the alias for this entity and return the updated instance.- Parameters:
alias- the alias to assign to this entity; must not be null- Returns:
- the updated instance of
Aliasedwith the specified alias set
-
setAlias
Set the alias for this entity.- Parameters:
alias- the alias to assign to this entity; must not be null
-
equals
-
equalsIgnoreAlias
-
hashCode
public int hashCode()
-