org.ujorm.orm
Class AliasKey

java.lang.Object
  extended by org.ujorm.orm.AliasKey

public final class AliasKey
extends Object

Relation from the one table to another including alias


Constructor Summary
AliasKey(Key<?,?> key)
          Constructor
AliasKey(Key<?,?> key, String aliasFrom, String aliasTo)
          Constructor
 
Method Summary
static void addKeys(Key<?,?> key, Collection<AliasKey> out)
          Add full range of composite key
static void addLastKey(Key<?,?> key, Collection<AliasKey> out)
          Add the last condition
static void addRelations(Key<?,?> key, Collection<AliasKey> out)
          Add relations only
 boolean equals(Object obj)
           
 String getAliasFrom()
          Alias previous table
 String getAliasTo()
          Alias the next table
 ColumnWrapper getColumn(OrmHandler handler)
          Create a new ColumnWrapper for a required alias
 Key<?,?> getKey()
          The direct Key
static AliasKey getLastKey(Key<?,?> compositeKey)
          Add the last condition
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AliasKey

public AliasKey(Key<?,?> key)
Constructor

Parameters:
key - Direct Key

AliasKey

public AliasKey(Key<?,?> key,
                String aliasFrom,
                String aliasTo)
Constructor

Parameters:
key - direct Key
aliasFrom - Alias for the previous table
aliasTo - Alias for the next table
Method Detail

getKey

public Key<?,?> getKey()
The direct Key


getAliasFrom

public String getAliasFrom()
Alias previous table


getAliasTo

public String getAliasTo()
Alias the next table


getColumn

public ColumnWrapper getColumn(OrmHandler handler)
Create a new ColumnWrapper for a required alias


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

addRelations

public static void addRelations(Key<?,?> key,
                                Collection<AliasKey> out)
Add relations only

Parameters:
key - The Ujorm composite Key
out - Result

addKeys

public static void addKeys(Key<?,?> key,
                           Collection<AliasKey> out)
Add full range of composite key

Parameters:
key - The Ujorm composite Key
out - The result collection

addLastKey

public static void addLastKey(Key<?,?> key,
                              Collection<AliasKey> out)
Add the last condition

Parameters:
key - The Ujorm composite Key
out - The result collection

getLastKey

public static AliasKey getLastKey(Key<?,?> compositeKey)
Add the last condition

Parameters:
key - The Ujorm composite Key
out - The result collection


Copyright 2013, Pavel Ponec