it.eng.qbe.model.structure
Class DataMartEntity

java.lang.Object
  extended by it.eng.qbe.model.structure.DataMartEntity
All Implemented Interfaces:
IDataMartItem

public class DataMartEntity
extends java.lang.Object
implements IDataMartItem

The Class DataMartEntity.

Author:
Andrea Gioia

Constructor Summary
DataMartEntity(java.lang.String name, java.lang.String path, java.lang.String role, java.lang.String type, DataMartModelStructure structure)
          Instantiates a new data mart entity.
 
Method Summary
 DataMartField addKeyField(java.lang.String fieldName)
          Adds the key field.
 DataMartField addNormalField(java.lang.String fieldName)
          Adds the normal field.
 DataMartEntity addSubEntity(java.lang.String subEntityName, java.lang.String subEntityRole, java.lang.String subEntityType)
          Adds the sub entity.
 java.util.List getAllFieldOccurencesOnSubEntity(java.lang.String entityName, java.lang.String fieldName)
          Gets the all field occurences on sub entity.
 java.util.List getAllFields()
          Gets the all fields.
 java.util.List getAllSubEntities()
          Gets the all sub entities.
 java.util.List getAllSubEntities(java.lang.String entityName)
          Gets the all sub entities.
 DataMartField getField(java.lang.String fieldName)
          Gets the field.
 long getId()
          Gets the id.
 java.util.Iterator getKeyFieldIterator()
          Gets the key field iterator.
 java.util.List getKeyFields()
          Gets the key fields.
 java.lang.String getName()
          Gets the name.
 java.util.Iterator getNormalFieldIterator()
          Gets the normal field iterator.
 java.util.List getNormalFields()
          Gets the normal fields.
 DataMartEntity getParent()
          Gets the parent.
 java.lang.String getPath()
          Gets the path.
 java.lang.String getRole()
          Gets the role.
 DataMartEntity getRoot()
          Gets the root.
 DataMartModelStructure getStructure()
          Gets the structure.
 java.util.List getSubEntities()
          Gets the sub entities.
 DataMartEntity getSubEntity(java.lang.String entityUniqueName)
          Gets the sub entity.
 java.lang.String getType()
          Gets the type.
 java.lang.String getUniqueName()
          Gets the unique name.
 java.lang.String getUniqueType()
           
 void setName(java.lang.String name)
          Sets the name.
 void setParent(DataMartEntity parent)
          Sets the parent.
 void setPath(java.lang.String path)
          Sets the path.
 void setRole(java.lang.String role)
          Sets the role.
 void setRoot(DataMartEntity root)
          Sets the root.
protected  void setStructure(DataMartModelStructure structure)
          Sets the structure.
 void setType(java.lang.String type)
          Sets the type.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataMartEntity

public DataMartEntity(java.lang.String name,
                      java.lang.String path,
                      java.lang.String role,
                      java.lang.String type,
                      DataMartModelStructure structure)
Instantiates a new data mart entity.

Parameters:
name - the name
path - the path
role - the role
type - the type
structure - the structure
Method Detail

getUniqueName

public java.lang.String getUniqueName()
Gets the unique name.

Returns:
the unique name

getUniqueType

public java.lang.String getUniqueType()
Returns:
the unique type - i.e. type + role (if any). Ex. it.eng.spagobi.Promotion(promotion_id)

addNormalField

public DataMartField addNormalField(java.lang.String fieldName)
Adds the normal field.

Parameters:
fieldName - the field name
Returns:
the data mart field

addKeyField

public DataMartField addKeyField(java.lang.String fieldName)
Adds the key field.

Parameters:
fieldName - the field name
Returns:
the data mart field

getField

public DataMartField getField(java.lang.String fieldName)
Gets the field.

Parameters:
fieldName - the field name
Returns:
the field

getAllFields

public java.util.List getAllFields()
Gets the all fields.

Returns:
the all fields

getKeyFields

public java.util.List getKeyFields()
Gets the key fields.

Returns:
the key fields

getKeyFieldIterator

public java.util.Iterator getKeyFieldIterator()
Gets the key field iterator.

Returns:
the key field iterator

getNormalFields

public java.util.List getNormalFields()
Gets the normal fields.

Returns:
the normal fields

getNormalFieldIterator

public java.util.Iterator getNormalFieldIterator()
Gets the normal field iterator.

Returns:
the normal field iterator

addSubEntity

public DataMartEntity addSubEntity(java.lang.String subEntityName,
                                   java.lang.String subEntityRole,
                                   java.lang.String subEntityType)
Adds the sub entity.

Parameters:
subEntityName - the sub entity name
subEntityRole - the sub entity role
subEntityType - the sub entity type
Returns:
the data mart entity

getSubEntity

public DataMartEntity getSubEntity(java.lang.String entityUniqueName)
Gets the sub entity.

Parameters:
entityUniqueName - the entity unique name
Returns:
the sub entity

getSubEntities

public java.util.List getSubEntities()
Gets the sub entities.

Returns:
the sub entities

getAllSubEntities

public java.util.List getAllSubEntities()
Gets the all sub entities.

Returns:
the all sub entities

getAllSubEntities

public java.util.List getAllSubEntities(java.lang.String entityName)
Gets the all sub entities.

Parameters:
entityName - the entity name
Returns:
the all sub entities

getAllFieldOccurencesOnSubEntity

public java.util.List getAllFieldOccurencesOnSubEntity(java.lang.String entityName,
                                                       java.lang.String fieldName)
Gets the all field occurences on sub entity.

Parameters:
entityName - the entity name
fieldName - the field name
Returns:
the all field occurences on sub entity

getName

public java.lang.String getName()
Gets the name.

Returns:
the name

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getStructure

public DataMartModelStructure getStructure()
Gets the structure.

Returns:
the structure

setStructure

protected void setStructure(DataMartModelStructure structure)
Sets the structure.

Parameters:
structure - the new structure

getParent

public DataMartEntity getParent()
Gets the parent.

Returns:
the parent

setParent

public void setParent(DataMartEntity parent)
Sets the parent.

Parameters:
parent - the new parent

getPath

public java.lang.String getPath()
Gets the path.

Returns:
the path

setPath

public void setPath(java.lang.String path)
Sets the path.

Parameters:
path - the new path

getRole

public java.lang.String getRole()
Gets the role.

Returns:
the role

setRole

public void setRole(java.lang.String role)
Sets the role.

Parameters:
role - the new role

getType

public java.lang.String getType()
Gets the type.

Returns:
the type

setType

public void setType(java.lang.String type)
Sets the type.

Parameters:
type - the new type

setName

public void setName(java.lang.String name)
Sets the name.

Parameters:
name - the new name

getId

public long getId()
Gets the id.

Returns:
the id

getRoot

public DataMartEntity getRoot()
Gets the root.

Returns:
the root

setRoot

public void setRoot(DataMartEntity root)
Sets the root.

Parameters:
root - the new root