org.ujorm.orm.metaModel
Class MetaRelation2Many

java.lang.Object
  extended by org.ujorm.extensions.SuperAbstractUjo
      extended by org.ujorm.extensions.AbstractUjo
          extended by org.ujorm.orm.AbstractMetaModel
              extended by org.ujorm.orm.metaModel.MetaRelation2Many
All Implemented Interfaces:
Serializable, UjoCloneable, UjoTextable, Ujo
Direct Known Subclasses:
MetaColumn

public class MetaRelation2Many
extends AbstractMetaModel

The database/object relation to many.

Author:
Pavel Ponec
See Also:
Serialized Form

Field Summary
static Key<MetaRelation2Many,String> ID
          The meta-model ID.
static Key<MetaRelation2Many,String> NAME
          The database column name.
static Key<MetaRelation2Many,MetaTable> TABLE
          DB table
static Key<MetaRelation2Many,Key> TABLE_PROPERTY
          Table property
 
Constructor Summary
MetaRelation2Many()
           
MetaRelation2Many(MetaTable table, Key tableProperty, MetaRelation2Many param)
           
 
Method Summary
 OrmHandler getHandler()
          OrmHandler
 Key getProperty()
          Returns a column property
 MetaTable getTable()
           
 Class<OrmUjo> getTableClass()
          Returns a class of column table.
 Object getValue(Ujo ujo)
          Get property value
 boolean isColumn()
          It is a DB column (either a value of a foreign key), not a relation to many.
 boolean isForeignKey()
          Is it a Foreign Key ?
 boolean isTypeOf(Class type)
          Returns true if the property type is a type or subtype of the parameter class.
 String toString()
          Column name.
 
Methods inherited from class org.ujorm.orm.AbstractMetaModel
get, changeDefault, checkReadOnly, isFilled, isFilled, readAuthorization, readOnly, setReadOnly, writeValue
 
Methods inherited from class org.ujorm.extensions.AbstractUjo
newCamelFactory, newFactory, readValue
 
Methods inherited from class org.ujorm.extensions.SuperAbstractUjo
clone, equals, init, init, readKeys, readProperties, readUjoManager, readValueString, writeValueString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final Key<MetaRelation2Many,String> ID
The meta-model ID.


NAME

public static final Key<MetaRelation2Many,String> NAME
The database column name. If an appropriate Key is a relation to another ORM object with more primary keys, then the several names can be separated by a space or comma character.


TABLE_PROPERTY

public static final Key<MetaRelation2Many,Key> TABLE_PROPERTY
Table property


TABLE

public static final Key<MetaRelation2Many,MetaTable> TABLE
DB table

Constructor Detail

MetaRelation2Many

public MetaRelation2Many()

MetaRelation2Many

public MetaRelation2Many(MetaTable table,
                         Key tableProperty,
                         MetaRelation2Many param)
Method Detail

isColumn

public boolean isColumn()
It is a DB column (either a value of a foreign key), not a relation to many.


isForeignKey

public boolean isForeignKey()
Is it a Foreign Key ?


getProperty

public final Key getProperty()
Returns a column property


isTypeOf

public final boolean isTypeOf(Class type)
Returns true if the property type is a type or subtype of the parameter class.


getTable

public final MetaTable getTable()

getTableClass

public final Class<OrmUjo> getTableClass()
Returns a class of column table.


getValue

public final Object getValue(Ujo ujo)
Get property value


getHandler

public OrmHandler getHandler()
OrmHandler


toString

public String toString()
Column name.

Overrides:
toString in class SuperAbstractUjo


Copyright © 2012. All Rights Reserved.