org.caleigo.core
Interface ICompositeEntityDescriptor.ICompositeFieldGroup

All Known Implementing Classes:
CompositeEntityDescriptor.CompositeFieldGroup
Enclosing interface:
ICompositeEntityDescriptor

public static interface ICompositeEntityDescriptor.ICompositeFieldGroup

The IFieldGroup is used to group sets of fields belonging to a single entitydescriptor together and to define their relation to each other within the composite entity descriptor. Note that several field groups may have the same entity descriptor but represent different records in the data space.


Method Summary
 IBaseEntityDescriptor getBaseEntityDescriptor()
           
 ICompositeEntityDescriptor.ICompositeFieldGroup getChildFieldGroup(int index)
           
 int getChildFieldGroupCount()
           
 java.lang.String getEntityIdentity()
           
 int getFieldCount()
           
 ICompositeEntityDescriptor.ICompositeFieldDescriptor getFieldDescriptor(int index)
           
 java.util.Iterator getFieldGroups()
           
 IEntityRelationPath getParentRelationPath()
           
 boolean getRequired()
           
 

Method Detail

getBaseEntityDescriptor

public IBaseEntityDescriptor getBaseEntityDescriptor()
Returns:
the entity descriptor of the field group. All fields must belong to that entity descriptor. A composite entity may however have several fieldgroups with the same entity descriptor, but all must have unique entity identity strings.

getEntityIdentity

public java.lang.String getEntityIdentity()
Returns:
the named identity of the called field groups entity descriptor. This will normally be the code name of the entity descriptor unless multiple instances of the descriptor exists. It is used as alias in sql-select-questions.

getParentRelationPath

public IEntityRelationPath getParentRelationPath()
Returns:
the relation path that goes from the parent field group to this child field group.

getFieldCount

public int getFieldCount()
Returns:
the number of field descriptors that the called field group contains. This includes both data and calculated field descriptors.

getFieldDescriptor

public ICompositeEntityDescriptor.ICompositeFieldDescriptor getFieldDescriptor(int index)
Returns:
a specific field descriptor from the the called field group by its ordial index. May cast OutOfBoundException.

getChildFieldGroupCount

public int getChildFieldGroupCount()
Returns:
the number of field groups that the called field group contains. This includes both data and calculated field descriptors.

getChildFieldGroup

public ICompositeEntityDescriptor.ICompositeFieldGroup getChildFieldGroup(int index)
Returns:
a specific field group from the the called field group by its ordial index. May cast OutOfBoundException.

getFieldGroups

public java.util.Iterator getFieldGroups()
Returns:
an iterator (deapfirst-order) that iterates over all field group's that has this field group as root. The order should be deapfirst i.e. a field group tree with selected fields from base entity descriptors should be iterated in a way that corresponds with the order one expects in a SQL-select command.

getRequired

public boolean getRequired()
Returns:
a boolean that determine if this field group's fields should be required in joins or not (joins according to SQL92).
true: Inner join.
false: Outer join, null-value might be displayed.

If two groups are related in a parent-child relation the parent is seen as the LEFT and the children as the RIGHT (table). A parent and a child can thus have one of the following four combination resulting in a belonging SQL join-clause:
parent.getRequired()==true & child.getRequired()==true -> inner join
parent.getRequired()==true & child.getRequired()==false -> right outer join
parent.getRequired()==false & child.getRequired()==true -> left outer join
parent.getRequired()==false & child.getRequired()==false -> full outer join

OBS:
Field Group siblings relation doesn't affect the join-clause. The default value should be false resulting in full outer joins between field groups and it's children.


Copyright © 2005 Caleigo. All Rights Reserved.