org.ujoframework.orm.metaModel
Class MetaPKey

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

public final class MetaPKey
extends AbstractMetaModel

The table primary key.

Author:
Pavel Ponec
See Also:
Serialized Form

Field Summary
static ListProperty<MetaPKey,MetaColumn> COLUMNS
          DB columns
static 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()
          A String representation.
 
Methods inherited from class org.ujoframework.orm.AbstractMetaModel
get, changeDefault, checkReadOnly, isUsable, isUsable, readAuthorization, readOnly, setReadOnly, writeValue
 
Methods inherited from class org.ujoframework.implementation.quick.QuickUjo
newListProperty, newListProperty, newProperty, newProperty, newProperty, newProperty, newProperty, newProperty, readValue
 
Methods inherited from class org.ujoframework.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 Property<MetaPKey,MetaTable> TABLE
DB table


COLUMNS

public static final ListProperty<MetaPKey,MetaColumn> COLUMNS
DB columns

Constructor Detail

MetaPKey

public MetaPKey(MetaTable table)
Method Detail

toString

public java.lang.String toString()
Description copied from class: AbstractUjo
A String representation.

Overrides:
toString in class 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 © 2010. All Rights Reserved.