org.ujorm.implementation.orm
Class RelationToOne<UJO extends ExtendedOrmUjo,VALUE>

java.lang.Object
  extended by org.ujorm.extensions.Property<U,VALUE>
      extended by org.ujorm.implementation.orm.OrmProperty<UJO,VALUE>
          extended by org.ujorm.implementation.orm.RelationToOne<UJO,VALUE>
All Implemented Interfaces:
CharSequence, Comparable<Key>, CriterionProvider<UJO,VALUE>, Key<UJO,VALUE>, UjoProperty<UJO,VALUE>

public class RelationToOne<UJO extends ExtendedOrmUjo,VALUE>
extends OrmProperty<UJO,VALUE>

Foreign key property

Author:
Pavel Ponec

Field Summary
 
Fields inherited from class org.ujorm.extensions.Property
PROPERTY_SEPARATOR, UNDEFINED_INDEX
 
Constructor Summary
protected RelationToOne(String name, Class type, Key relatedKey)
           
 
Method Summary
 Key getRelatedKey()
          Return null if no related key was assigned.
static
<UJO extends ExtendedOrmUjo,VALUE extends ExtendedOrmUjo>
RelationToOne<UJO,VALUE>
newInstance(Class<VALUE> type, Key<VALUE,?> relatedKey)
          A Property Factory
 
Methods inherited from class org.ujorm.implementation.orm.OrmProperty
lock, of
 
Methods inherited from class org.ujorm.extensions.Property
_nextRawSequence, add, compareTo, copy, descending, descending, equals, equalsName, forAll, forNone, forSql, getDefault, getDomainType, getIndex, getName, getType, getValue, charAt, checkLock, checkValidity, init, isAscending, isDefault, isDirect, isTypeOf, length, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, setValue, setValueFromDefault, subSequence, toString, toStringFull, where, where, whereEq, whereEq, whereFilled, whereGe, whereGt, whereIn, whereIn, whereLe, whereLt, whereNeq, whereNotFilled, whereNotIn, whereNotIn, whereNotNull, whereNull, writeDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RelationToOne

protected RelationToOne(String name,
                        Class type,
                        Key relatedKey)
Method Detail

getRelatedKey

public Key getRelatedKey()
Return null if no related key was assigned.


newInstance

public static <UJO extends ExtendedOrmUjo,VALUE extends ExtendedOrmUjo> RelationToOne<UJO,VALUE> newInstance(Class<VALUE> type,
                                                                                                             Key<VALUE,?> relatedKey)
A Property Factory



Copyright © 2012. All Rights Reserved.