org.caleigo.core
Class FieldRelation

java.lang.Object
  extended byorg.caleigo.core.FieldRelation
All Implemented Interfaces:
IFieldRelation, java.io.Serializable

public class FieldRelation
extends java.lang.Object
implements IFieldRelation

Basic implementation of the IFieldRelation An IFieldRelation is allways an agregate of an IEntityRelation that defines a link between two IEntityRelation objects. The relation objects does combined with the descriptor objects form a travesable graph.

This implementation of the IFieldRelation does not require that the classes of the linked descriptors has been loaded and initialized. The purpose is to avoid unnecesary expasions of the entire descriptor graph.

Version:
1.00
Author:
Dennis Zikovic
See Also:
Serialized Form

Constructor Summary
(package private) FieldRelation(IFieldDescriptor referenceFieldDescriptor, IFieldDescriptor targetFieldDescriptor)
          Constructor for FieldRelation.
(package private) FieldRelation(IFieldDescriptor referenceFieldDescriptor, java.lang.String targetEntityClassName, java.lang.String targetFieldSourceName)
          Constructor for FieldRelation.
(package private) FieldRelation(java.lang.String referenceEntityClassName, java.lang.String referenceFieldSourceName, IFieldDescriptor targetFieldDescriptor)
          Constructor for FieldRelation.
(package private) FieldRelation(java.lang.String referenceEntityClassName, java.lang.String referenceFieldSourceName, java.lang.String targetEntityClassName, java.lang.String targetFieldSourceName)
          Constructor for FieldRelation.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 IEntityRelation getEntityRelation()
          Access method that return the IEntityRelation that the called IFieldRelation is a part of.
 IFieldDescriptor getReferenceField()
          Access method that return the IFieldDescriptor that is the source/reference field that addresses another field.
 IFieldDescriptor getTargetField()
          Access method that return the IFieldDescriptor that is the target field that are addressed by the reference field.
(package private)  void setEntityRelation(IEntityRelation relation)
          Mutation method with restricted access to avoid missuse.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldRelation

FieldRelation(java.lang.String referenceEntityClassName,
              java.lang.String referenceFieldSourceName,
              java.lang.String targetEntityClassName,
              java.lang.String targetFieldSourceName)
Constructor for FieldRelation. Note package scope to avoid missuse.


FieldRelation

FieldRelation(IFieldDescriptor referenceFieldDescriptor,
              java.lang.String targetEntityClassName,
              java.lang.String targetFieldSourceName)
Constructor for FieldRelation. Note package scope to avoid missuse.


FieldRelation

FieldRelation(java.lang.String referenceEntityClassName,
              java.lang.String referenceFieldSourceName,
              IFieldDescriptor targetFieldDescriptor)
Constructor for FieldRelation. Note package scope to avoid missuse.


FieldRelation

FieldRelation(IFieldDescriptor referenceFieldDescriptor,
              IFieldDescriptor targetFieldDescriptor)
Constructor for FieldRelation. Note package scope to avoid missuse.

Method Detail

equals

public boolean equals(java.lang.Object obj)

getEntityRelation

public IEntityRelation getEntityRelation()
Access method that return the IEntityRelation that the called IFieldRelation is a part of.

Specified by:
getEntityRelation in interface IFieldRelation

getReferenceField

public IFieldDescriptor getReferenceField()
Access method that return the IFieldDescriptor that is the source/reference field that addresses another field. In RDB terms the reference field is or should be defined as a foreign key.

Specified by:
getReferenceField in interface IFieldRelation

getTargetField

public IFieldDescriptor getTargetField()
Access method that return the IFieldDescriptor that is the target field that are addressed by the reference field. In RDB terms the target field is usually a primary-key field.

Specified by:
getTargetField in interface IFieldRelation

setEntityRelation

void setEntityRelation(IEntityRelation relation)
Mutation method with restricted access to avoid missuse.



Copyright © 2005 Caleigo. All Rights Reserved.