org.ujorm.orm.metaModel
Class MetaPKey

java.lang.Object
  extended by org.ujorm.extensions.AbstractUjo
      extended by org.ujorm.implementation.quick.QuickUjo
          extended by org.ujorm.orm.AbstractMetaModel
              extended by org.ujorm.orm.metaModel.MetaPKey
All Implemented Interfaces:
java.io.Serializable, org.ujorm.extensions.UjoCloneable, org.ujorm.extensions.UjoTextable, org.ujorm.Ujo

public final class MetaPKey
extends AbstractMetaModel

The table primary key.

Author:
Pavel Ponec
See Also:
Serialized Form

Field Summary
static org.ujorm.extensions.ListProperty<MetaPKey,MetaColumn> COLUMNS
          DB columns
static org.ujorm.extensions.Property<MetaPKey,MetaTable> TABLE
          DB table
 
Constructor Summary
MetaPKey(MetaTable table)
           
 
Method Summary
 boolean assignPrimaryKey(OrmUjo bo, Session session)
          Assign a PK from framework in case the PK generator is type of MEMO_SEQUENCE.
 MetaColumn getColumn(int i)
          Returns column on the selected position.
 MetaColumn getFirstColumn()
          Returns the first column.
 java.lang.String toString()
           
 
Methods inherited from class org.ujorm.orm.AbstractMetaModel
get, changeDefault, checkReadOnly, isFilled, isFilled, readAuthorization, readOnly, setReadOnly, writeValue
 
Methods inherited from class org.ujorm.implementation.quick.QuickUjo
newListProperty, newListProperty, newProperty, newProperty, newProperty, newProperty, newProperty, newProperty, readValue
 
Methods inherited from class org.ujorm.extensions.AbstractUjo
clone, equals, init, init, readProperties, readUjoManager, readValueString, writeValueString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TABLE

public static final org.ujorm.extensions.Property<MetaPKey,MetaTable> TABLE
DB table


COLUMNS

public static final org.ujorm.extensions.ListProperty<MetaPKey,MetaColumn> COLUMNS
DB columns

Constructor Detail

MetaPKey

public MetaPKey(MetaTable table)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class org.ujorm.extensions.AbstractUjo

assignPrimaryKey

public boolean assignPrimaryKey(OrmUjo bo,
                                Session session)
                         throws java.lang.IllegalArgumentException
Assign a PK from framework in case the PK generator is type of MEMO_SEQUENCE.

Returns:
Value 'true' means, that primary key was assigned successfully and 'false' means that a primary key was defined earlier.
Throws:
java.lang.IllegalArgumentException - The PK can't be assigned.

getFirstColumn

public MetaColumn getFirstColumn()
Returns the first column.


getColumn

public MetaColumn getColumn(int i)
Returns column on the selected position.



Copyright © 2011. All Rights Reserved.