org.ujorm.orm.impl
Class ColumnWrapperImpl

java.lang.Object
  extended by org.ujorm.orm.impl.ColumnWrapperImpl
All Implemented Interfaces:
ColumnWrapper

public class ColumnWrapperImpl
extends Object
implements ColumnWrapper

Wrapper for a MetaColumn


Constructor Summary
ColumnWrapperImpl(MetaColumn column, Key key)
           
ColumnWrapperImpl(MetaColumn column, String tableAlias)
           
ColumnWrapperImpl(MetaColumn column, String tableAlias, Key key)
          Basic constructor
 
Method Summary
 boolean equals(Object relation)
          Two models are the same if its key names are the same for the same domain type.
 Key getKey()
          Returns an original Key
 MetaColumn getModel()
          Returns an original column model
 String getName()
          Returns an original colum name
 String getTableAlias()
          Returns always the NonNull alias of the related database table
 int hashCode()
          The hashCode form the Key name
 boolean isCompositeKey()
          Is it a composite Key?
 String toString()
          Returns the Key
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColumnWrapperImpl

public ColumnWrapperImpl(MetaColumn column,
                         String tableAlias)

ColumnWrapperImpl

public ColumnWrapperImpl(MetaColumn column,
                         Key key)

ColumnWrapperImpl

public ColumnWrapperImpl(MetaColumn column,
                         String tableAlias,
                         Key key)
Basic constructor

Parameters:
column - Mandatory column
table - Optional table
key - Optional Key
Method Detail

getModel

public MetaColumn getModel()
Returns an original column model

Specified by:
getModel in interface ColumnWrapper

getName

public String getName()
Returns an original colum name

Specified by:
getName in interface ColumnWrapper

getTableAlias

public String getTableAlias()
Returns always the NonNull alias of the related database table

Specified by:
getTableAlias in interface ColumnWrapper

getKey

public Key getKey()
Returns an original Key

Specified by:
getKey in interface ColumnWrapper

isCompositeKey

public boolean isCompositeKey()
Is it a composite Key?

Specified by:
isCompositeKey in interface ColumnWrapper

equals

public boolean equals(Object relation)
Two models are the same if its key names are the same for the same domain type.

Specified by:
equals in interface ColumnWrapper
Overrides:
equals in class Object

hashCode

public int hashCode()
The hashCode form the Key name

Overrides:
hashCode in class Object

toString

public String toString()
Returns the Key

Overrides:
toString in class Object


Copyright 2013, Pavel Ponec