Ableverse™
TOB 6.0

av.tob
Class TheRelation

java.lang.Object
  extended by av.tob.TheObject
      extended by av.tob.TheRelation
All Implemented Interfaces:
Kin<TheRelation,TheRelation>

public class TheRelation
extends TheObject
implements Kin<TheRelation,TheRelation>

This is the base class for all persistent relations managed by TOB.

See the Object-Relation-Kin Model.

Author:
Compl

Nested Class Summary
 class TheRelation.Tie<T extends TheObject>
          This is the root class for all ties.
 
Field Summary
 
Fields inherited from class av.tob.TheObject
DUPLICATED_UNARY_KIN, OBJECT_DATA_LOST, to$msgr, WRITE_CONFLICT
 
Constructor Summary
protected TheRelation()
          The no-arg constructor.
 
Method Summary
<R extends TheRelation>
Kin<R,R>
asKin()
          This doesn't provide type safety but to enable generic casts for subclasses.
 TheRelation getO()
          Get the related object of this kin.
 short getOnlinePriority()
          It might be a little memory economic that load relations after plain objects for the reduced trigger queue size during chained loading processes.
 TheRelation getR()
          Get the source relation object of this kin.
 int getTieCount()
          This method will be overrided by TOB generated code and return the calculated count of tie fields of the actual relation class.
 
Methods inherited from class av.tob.TheObject
beingBornNotify, bornNotify, changedNotify, clonedFromNotify, committedNotify, committingNotify, die, getID, getPersistentFieldCount, getTimeCreated, getTimeModified, getTOB, isBorn, isDead, killedNotify, killingNotify, onlineNotify, previousSelf, restoredNotify, setOnlinePriority, writtenNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TheRelation

protected TheRelation()
The no-arg constructor.

Method Detail

asKin

public <R extends TheRelation> Kin<R,R> asKin()
This doesn't provide type safety but to enable generic casts for subclasses.

Type Parameters:
R - must be assignable from the actual instance.
Returns:
the same relation object with specified R as both the source relation type and the related object type

getR

public TheRelation getR()
Description copied from interface: Kin
Get the source relation object of this kin.

Specified by:
getR in interface Kin<TheRelation,TheRelation>
Returns:
this relation object

getO

public TheRelation getO()
Description copied from interface: Kin
Get the related object of this kin.

Specified by:
getO in interface Kin<TheRelation,TheRelation>
Returns:
this relation object

getTieCount

public int getTieCount()
This method will be overrided by TOB generated code and return the calculated count of tie fields of the actual relation class.

-1 will be returned by a non-born object.

Returns:
how many tie fields the relation class actually has, or -1 if not invoked against a born object

getOnlinePriority

public short getOnlinePriority()
It might be a little memory economic that load relations after plain objects for the reduced trigger queue size during chained loading processes. So get it some bigger than the value of TheObject.getOnlinePriority().

Overrides:
getOnlinePriority in class TheObject
Returns:
the online priority for this object. approximately 100 * the percentage of free memory in jvm above which this object should be kept online.
See Also:
TheObject.getOnlinePriority()

Ableverse™
TOB 6.0

Copyright© 2006 Ableverse Platform. All rights reserved.